- void event_visibility(int32_t visibility);
- void event_opacity(wl_fixed_t opacity);
- void event_source_rectangle(int32_t x, int32_t y, int32_t width,
- int32_t height);
- void event_destination_rectangle(int32_t x, int32_t y, int32_t width,
- int32_t height);
- void event_configuration(int32_t width, int32_t height);
- void event_orientation(int32_t orientation);
- void event_pixelformat(int32_t pixelformat);
- void event_layer(struct ivi_controller_layer *layer);
- void event_stats(uint32_t redraw_count, uint32_t frame_count,
- uint32_t update_count, uint32_t pid,
- const char *process_name);
- void event_destroyed();
- void event_content(int32_t content_state);
-
- static void s_visibility(
- void *data, struct ivi_controller_surface *ivi_controller_surface,
- int32_t visibility);
- static void s_opacity(void *data,
- struct ivi_controller_surface *ivi_controller_surface,
- wl_fixed_t opacity);
- static void s_source_rectangle(
- void *data, struct ivi_controller_surface *ivi_controller_surface,
- int32_t x, int32_t y, int32_t width, int32_t height);
- static void s_destination_rectangle(
- void *data, struct ivi_controller_surface *ivi_controller_surface,
- int32_t x, int32_t y, int32_t width, int32_t height);
- static void s_configuration(
- void *data, struct ivi_controller_surface *ivi_controller_surface,
- int32_t width, int32_t height);
- static void s_orientation(
- void *data, struct ivi_controller_surface *ivi_controller_surface,
- int32_t orientation);
- static void s_pixelformat(
- void *data, struct ivi_controller_surface *ivi_controller_surface,
- int32_t pixelformat);
- static void s_layer(void *data,
- struct ivi_controller_surface *ivi_controller_surface,
- struct ivi_controller_layer *layer);
- static void s_stats(void *data,
- struct ivi_controller_surface *ivi_controller_surface,
- uint32_t redraw_count, uint32_t frame_count,
- uint32_t update_count, uint32_t pid,
- const char *process_name);
- static void s_destroyed(
- void *data, struct ivi_controller_surface *ivi_controller_surface);
- static void s_content(void *data,
- struct ivi_controller_surface *ivi_controller_surface,
- int32_t content_state);
-
- static constexpr ivi_controller_surface_listener listener = {
- s_visibility,
- s_opacity,
- s_source_rectangle,
- s_destination_rectangle,
- s_configuration,
- s_orientation,
- s_pixelformat,
- s_layer,
- s_stats,
- s_destroyed,
- s_content,
- };
+ // Requests
+ inline void set_visibility(uint32_t visibility) {
+ ivi_controller_surface_set_visibility(this->proxy, visibility);
+ }
+
+ inline void set_opacity(wl_fixed_t opacity) {
+ ivi_controller_surface_set_opacity(this->proxy, opacity);
+ }
+
+ inline void set_source_rectangle(int32_t x, int32_t y, int32_t width,
+ int32_t height) {
+ ivi_controller_surface_set_source_rectangle(this->proxy, x, y, width,
+ height);
+ }
+
+ inline void set_destination_rectangle(int32_t x, int32_t y, int32_t width,
+ int32_t height) {
+ ivi_controller_surface_set_destination_rectangle(this->proxy, x, y, width,
+ height);
+ }
+
+ inline void set_configuration(int32_t width, int32_t height) {
+ ivi_controller_surface_set_configuration(this->proxy, width, height);
+ }
+
+ inline void set_orientation(int32_t orientation) {
+ ivi_controller_surface_set_orientation(this->proxy, orientation);
+ }
+
+ inline void screenshot(const char *filename) {
+ ivi_controller_surface_screenshot(this->proxy, filename);
+ }
+
+ inline void send_stats() { ivi_controller_surface_send_stats(this->proxy); }
+
+ inline void destroy(int32_t destroy_scene_object) {
+ ivi_controller_surface_destroy(this->proxy, destroy_scene_object);
+ }