summaryrefslogtreecommitdiff
path: root/src/ui/include/screen.hpp
blob: 87a0d9b8acbeea36ad7f9271299666b024d4a980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright 2023 jacqueline <me@jacqueline.id.au>
 *
 * SPDX-License-Identifier: GPL-3.0-only
 */

#pragma once

#include <memory>

#include "core/lv_obj.h"
#include "core/lv_obj_tree.h"
#include "lvgl.h"

namespace ui {

class Screen {
 public:
  Screen() : root_(lv_obj_create(NULL)) {}
  virtual ~Screen() { lv_obj_del(root_); }

  auto root() -> lv_obj_t* { return root_; }

 protected:
  lv_obj_t* const root_;
};

}  // namespace ui