17 #ifndef UNITYSYSTEMCOMPOSITOR_MIREGL_H 18 #define UNITYSYSTEMCOMPOSITOR_MIREGL_H 29 std::vector<std::shared_ptr<MirEglSurface>>
mir_surface_init(std::shared_ptr<MirEglApp>
const& app);
34 MirEglSurface(std::shared_ptr<MirEglApp>
const& mir_egl_app,
struct wl_output* wl_output,
int width,
int height);
38 template<
typename Pa
inter>
39 void paint(Painter
const& functor)
42 functor(width(), height());
47 void egl_make_current();
50 unsigned int width()
const;
51 unsigned int height()
const;
53 std::shared_ptr<MirEglApp>
const mir_egl_app;
55 void* content_area =
nullptr;
56 struct wl_display* display =
nullptr;
57 struct wl_surface* surface =
nullptr;
58 struct wl_callback* new_frame_signal =
nullptr;
59 struct wl_shell_surface* window =
nullptr;
62 struct wl_buffer* buffer;
65 bool waiting_for_buffer =
true;
67 EGLSurface eglsurface;
71 static void shell_surface_ping(
void *data,
struct wl_shell_surface *wl_shell_surface, uint32_t serial);
73 static void shell_surface_configure(
void *data,
74 struct wl_shell_surface *wl_shell_surface,
78 static void shell_surface_popup_done(
void *data,
struct wl_shell_surface *wl_shell_surface);
82 #endif //UNITYSYSTEMCOMPOSITOR_MIREGL_H
std::shared_ptr< MirEglApp > make_mir_eglapp(struct wl_display *display)
Definition: miregl.cpp:209
std::vector< std::shared_ptr< MirEglSurface > > mir_surface_init(std::shared_ptr< MirEglApp > const &app)
Definition: miregl.cpp:214
MirEglSurface(std::shared_ptr< MirEglApp > const &mir_egl_app, struct wl_output *wl_output, int width, int height)
Definition: miregl.cpp:226
~MirEglSurface()
Definition: miregl.cpp:251
void paint(Painter const &functor)
Definition: miregl.h:39