e_comp_wl: add new structure and function for E_Comp_Wl_Shell_Surface_Api 87/317387/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 5 Sep 2024 06:26:17 +0000 (15:26 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 9 Sep 2024 23:22:08 +0000 (08:22 +0900)
We add a new structure and E_API for setting this to ec->comp_data's shell surface resource.
- structure: E_Comp_Wl_Shell_Surface_Api
- E_API: e_comp_wl_shell_surface_api_set

By this change,
E_Shell_Surface_Api uses this new structure.

Change-Id: Ic432587b5652951ccc7e1abed9b6cdb8b9ca2709

src/bin/server/e_comp_wl.c
src/bin/server/e_comp_wl_shell_intern.h
src/include/e_comp_wl.h

index 68958d50eb0e46a586214b7fc0a37ec8530eb384..f11dd25dc40cc44efc2659815eff6e7fda6d4626 100644 (file)
@@ -4463,6 +4463,12 @@ e_comp_wl_shell_window_size_get(E_Client *ec, int *w, int *h)
    return EINA_TRUE;
 }
 
+E_API void
+e_comp_wl_shell_surface_api_set(E_Client *ec, E_Comp_Wl_Shell_Surface_Api *api)
+{
+   e_shell_e_client_shsurface_api_set(ec, api);
+}
+
 E_API struct wl_resource *
 e_comp_wl_shell_surface_get(E_Client *ec)
 {
index a2ec6dfe18e29de289a454457490f88ceee8192d..41c58788b3cf974fb3661e99048e39e40509732a 100644 (file)
@@ -1,14 +1,9 @@
 #ifndef E_COMP_WL_SHELL_INTERN_H
 #define E_COMP_WL_SHELL_INTERN_H
 
-typedef struct
-{
-   void (*configure_send)(struct wl_resource *resource, uint32_t edges, int32_t width, int32_t height);
-   void (*configure)(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
-   void (*ping)(struct wl_resource *resource);
-   void (*map)(struct wl_resource *resource);
-   void (*unmap)(struct wl_resource *resource);
-} E_Shell_Surface_Api;
+#include "e_comp_wl.h"
+
+typedef struct _E_Comp_Wl_Shell_Surface_Api E_Shell_Surface_Api;
 
 EINTERN Eina_Bool e_comp_wl_shell_init(void);
 EINTERN void      e_comp_wl_shell_shutdown(void);
index 5ccb5c09473c011ba9498114a24c4c0ae438b800..1e5c23667e731f2fd2127c0792d60f7ee0cbfbf2 100644 (file)
@@ -54,6 +54,7 @@ typedef struct _E_Comp_Wl_Aux_Hint  E_Comp_Wl_Aux_Hint;
 typedef struct _E_Comp_Wl_Buffer_Viewport E_Comp_Wl_Buffer_Viewport;
 typedef struct _E_Comp_Wl_Subsurf_Data E_Comp_Wl_Subsurf_Data;
 typedef struct _E_Comp_Wl_Surface_State E_Comp_Wl_Surface_State;
+typedef struct _E_Comp_Wl_Shell_Surface_Api E_Comp_Wl_Shell_Surface_Api;
 typedef struct _E_Comp_Wl_Data E_Comp_Wl_Data;
 typedef struct _E_Comp_Wl_Output E_Comp_Wl_Output;
 typedef struct _E_Comp_Wl_Intercept_Hook E_Comp_Wl_Intercept_Hook;
@@ -173,6 +174,15 @@ struct _E_Comp_Wl_Buffer_Viewport {
    uint32_t wait_for_transform_change;
 };
 
+struct _E_Comp_Wl_Shell_Surface_Api
+{
+   void (*configure_send)(struct wl_resource *resource, uint32_t edges, int32_t width, int32_t height);
+   void (*configure)(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
+   void (*ping)(struct wl_resource *resource);
+   void (*map)(struct wl_resource *resource);
+   void (*unmap)(struct wl_resource *resource);
+};
+
 struct _E_Comp_Wl_Surface_State
 {
    int sx, sy;
@@ -639,6 +649,7 @@ E_API void      e_comp_wl_shell_configure_send(E_Client *ec, uint32_t edges, int
 E_API void      e_comp_wl_shell_unmap(E_Client *ec);
 E_API Eina_Bool e_comp_wl_shell_window_size_get(E_Client *ec, int *w, int *h);
 
+E_API void                e_comp_wl_shell_surface_api_set(E_Client *ec, E_Comp_Wl_Shell_Surface_Api *api);
 E_API struct wl_resource *e_comp_wl_shell_surface_get(E_Client *ec);
 E_API void                e_comp_wl_shell_surface_set(E_Client *ec, struct wl_resource *surface);