e_comp_wl_data: make an internal header 56/304956/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 15 Jan 2024 08:42:36 +0000 (17:42 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 26 Jan 2024 00:59:17 +0000 (09:59 +0900)
Move the internal resources and the function declaration
to the internal header

Change-Id: I1e1020afb55fa50b6f1410fc21044b7b6bc623f6

src/bin/Makefile.mk
src/bin/e_comp_wl.c
src/bin/e_comp_wl_data.c
src/bin/e_comp_wl_data.h [deleted file]
src/bin/e_comp_wl_data_intern.h [new file with mode: 0644]
src/bin/e_compositor.c
src/bin/e_dnd.c
src/bin/e_includes.h
src/bin/e_policy_wl.c
src/bin/services/e_service_kvm.c

index 7b2446886b22f9b76fb740011496763ab6a2f15a..de8e80ceec53ae374303965e45cee1e82c64821f 100644 (file)
@@ -73,7 +73,6 @@ src/bin/e_zone.h \
 src/bin/e_util_transform.h \
 src/bin/e_comp_screen.h \
 src/bin/e_info_protocol.h \
-src/bin/e_comp_wl_data.h \
 src/bin/e_comp_wl_input.h \
 src/bin/e_comp_wl.h \
 src/bin/e_comp_wl_subsurface.h \
index c74e0d9381266cb255a52a38b2c975e8c14d6c02..85a13bee30079f9f9fcf6266e6808bb8e7f48281 100644 (file)
 #include "e_comp_canvas_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_wl_capture_intern.h"
+#include "e_comp_wl_data_intern.h"
 
 #include <tizen-extension-server-protocol.h>
-
 #include <relative-pointer-unstable-v1-server-protocol.h>
 #include <pointer-constraints-unstable-v1-server-protocol.h>
 
 #include <wayland-tbm-server.h>
 #include <glib.h>
-
 #include <libds/log.h>
 #include <libds/single_pixel_buffer_v1.h>
 
index d3339f156bae6a9ef15adf73a9ab9b9532d97047..b53919b193b52d3eed8d9c89d16da4091454c587 100644 (file)
@@ -1,5 +1,6 @@
 #define EXECUTIVE_MODE_ENABLED
 #include "e.h"
+#include "e_comp_wl_data_intern.h"
 #include "e_comp_canvas_intern.h"
 
 typedef struct {
@@ -18,7 +19,7 @@ _mime_types_free(E_Comp_Wl_Data_Source *source)
    eina_array_free(source->mime_types);
 }
 
-static void 
+static void
 _e_comp_wl_data_offer_cb_accept(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t serial, const char *mime_type)
 {
    E_Comp_Wl_Data_Offer *offer;
diff --git a/src/bin/e_comp_wl_data.h b/src/bin/e_comp_wl_data.h
deleted file mode 100644 (file)
index c73671a..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifdef E_TYPEDEFS
-#else
-# ifndef E_COMP_WL_DATA_H
-#  define E_COMP_WL_DATA_H
-
-#  include "e_comp_wl.h"
-
-#  ifdef PIPE_BUF
-#   define CLIPBOARD_CHUNK PIPE_BUF
-#  else
-#   define CLIPBOARD_CHUNK 4096
-#  endif
-
-typedef struct _E_Comp_Wl_Data_Source E_Comp_Wl_Data_Source;
-typedef struct _E_Comp_Wl_Data_Offer E_Comp_Wl_Data_Offer;
-typedef struct _E_Comp_Wl_Clipboard_Source E_Comp_Wl_Clipboard_Source;
-typedef struct _E_Comp_Wl_Clipboard_Offer E_Comp_Wl_Clipboard_Offer;
-typedef struct _E_Comp_Wl_Manual_Data_Source E_Comp_Wl_Manual_Data_Source;
-typedef struct _E_Comp_Wl_Manual_Data_Offer E_Comp_Wl_Manual_Data_Offer;
-
-struct _E_Comp_Wl_Data_Source
-{
-   struct wl_resource *resource; //resource of wl_data_source
-
-   Eina_Array *mime_types; //mime_type list to offer from source
-   struct wl_signal destroy_signal; //signal to emit when wl_data_source resource is destroyed
-
-   void (*target) (E_Comp_Wl_Data_Source *source, uint32_t serial, const char* mime_type);
-   void (*send) (E_Comp_Wl_Data_Source *source, const char* mime_type, int32_t fd);
-   void (*cancelled) (E_Comp_Wl_Data_Source *source);
-
-   Eina_Bool is_manual;
-   int fd[2];
-   Ecore_Fd_Handler *fd_handler;
-
-   uint32_t dnd_actions;
-   Eina_Bool accepted;
-   Eina_Bool actions_set;
-   enum wl_data_device_manager_dnd_action current_dnd_action;
-   enum wl_data_device_manager_dnd_action compositor_action;
-};
-
-struct _E_Comp_Wl_Data_Offer
-{
-   struct wl_resource *resource; //resource of wl_data_offer
-
-   Eina_Bool dropped; //if 1, its data source is already dropped
-
-   E_Comp_Wl_Data_Source *source; //indicates source client data
-   struct wl_listener source_destroy_listener; //listener for destroy of source
-
-   int fd;
-
-   uint32_t dnd_actions;
-   enum wl_data_device_manager_dnd_action preferred_dnd_action;
-   Eina_Bool in_ask;
-
-   Ecore_Thread *th;
-};
-
-struct _E_Comp_Wl_Clipboard_Source
-{
-   E_Comp_Wl_Data_Source data_source;
-   Ecore_Fd_Handler *fd_handler;
-   uint32_t serial;
-
-   struct wl_array contents; //for extendable buffer
-   int ref;
-   int fd[2];
-};
-
-struct _E_Comp_Wl_Clipboard_Offer
-{
-   E_Comp_Wl_Clipboard_Source *source;
-   Ecore_Fd_Handler *fd_handler;
-   size_t offset;
-};
-
-struct _E_Comp_Wl_Manual_Data_Source
-{
-    E_Comp_Wl_Data_Source data_source;
-    uint32_t serial;
-
-    struct wl_array contents;
-    int ref;
-};
-
-struct _E_Comp_Wl_Manual_Data_Offer
-{
-    E_Comp_Wl_Manual_Data_Source *source;
-    Ecore_Fd_Handler *fd_handler;
-    size_t offset;
-};
-
-EINTERN void e_comp_wl_data_device_send_enter(E_Client *ec);
-EINTERN void e_comp_wl_data_device_send_leave(E_Client *ec);
-EINTERN void *e_comp_wl_data_device_send_offer(E_Client *ec);
-EINTERN void e_comp_wl_data_device_keyboard_focus_set(void);
-EINTERN Eina_Bool e_comp_wl_data_manager_init(void);
-EINTERN void e_comp_wl_data_manager_shutdown(void);
-EINTERN struct wl_resource *e_comp_wl_data_find_for_client(struct wl_client *client);
-EINTERN E_Comp_Wl_Data_Source *e_comp_wl_data_manager_source_create(struct wl_client *client, struct wl_resource *resource, uint32_t id);
-EINTERN int e_comp_wl_clipboard_source_ref(E_Comp_Wl_Clipboard_Source *source);
-EINTERN int e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source);
-EINTERN E_Comp_Wl_Clipboard_Source *e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int *fd);
-EINTERN void e_comp_wl_data_device_only_set(struct wl_resource *data_device_res, Eina_Bool set);
-EINTERN Eina_Bool e_comp_wl_data_device_manual_selection_set(void *data, size_t size, Eina_List *mime_list);
-EINTERN void e_comp_wl_data_current_device_id_set(int id);
-EINTERN int e_comp_wl_data_current_device_id_get(void);
-EINTERN void e_comp_wl_data_offer_mimetype_action_accept(E_Comp_Wl_Data_Offer *offer);
-EINTERN void e_comp_wl_data_secondary_add(E_Client *ec);
-EINTERN void e_comp_wl_data_secondary_remove(E_Client *ec);
-# endif
-#endif
diff --git a/src/bin/e_comp_wl_data_intern.h b/src/bin/e_comp_wl_data_intern.h
new file mode 100644 (file)
index 0000000..49bd6bb
--- /dev/null
@@ -0,0 +1,112 @@
+#ifndef E_COMP_WL_DATA_INTERN_H
+#define E_COMP_WL_DATA_INTERN_H
+
+#  include "e_comp_wl.h"
+
+#  ifdef PIPE_BUF
+#   define CLIPBOARD_CHUNK PIPE_BUF
+#  else
+#   define CLIPBOARD_CHUNK 4096
+#  endif
+
+typedef struct _E_Comp_Wl_Data_Source E_Comp_Wl_Data_Source;
+typedef struct _E_Comp_Wl_Data_Offer E_Comp_Wl_Data_Offer;
+typedef struct _E_Comp_Wl_Clipboard_Source E_Comp_Wl_Clipboard_Source;
+typedef struct _E_Comp_Wl_Clipboard_Offer E_Comp_Wl_Clipboard_Offer;
+typedef struct _E_Comp_Wl_Manual_Data_Source E_Comp_Wl_Manual_Data_Source;
+typedef struct _E_Comp_Wl_Manual_Data_Offer E_Comp_Wl_Manual_Data_Offer;
+
+struct _E_Comp_Wl_Data_Source
+{
+   struct wl_resource *resource; //resource of wl_data_source
+
+   Eina_Array *mime_types; //mime_type list to offer from source
+   struct wl_signal destroy_signal; //signal to emit when wl_data_source resource is destroyed
+
+   void (*target) (E_Comp_Wl_Data_Source *source, uint32_t serial, const char* mime_type);
+   void (*send) (E_Comp_Wl_Data_Source *source, const char* mime_type, int32_t fd);
+   void (*cancelled) (E_Comp_Wl_Data_Source *source);
+
+   Eina_Bool is_manual;
+   int fd[2];
+   Ecore_Fd_Handler *fd_handler;
+
+   uint32_t dnd_actions;
+   Eina_Bool accepted;
+   Eina_Bool actions_set;
+   enum wl_data_device_manager_dnd_action current_dnd_action;
+   enum wl_data_device_manager_dnd_action compositor_action;
+};
+
+struct _E_Comp_Wl_Data_Offer
+{
+   struct wl_resource *resource; //resource of wl_data_offer
+
+   Eina_Bool dropped; //if 1, its data source is already dropped
+
+   E_Comp_Wl_Data_Source *source; //indicates source client data
+   struct wl_listener source_destroy_listener; //listener for destroy of source
+
+   int fd;
+
+   uint32_t dnd_actions;
+   enum wl_data_device_manager_dnd_action preferred_dnd_action;
+   Eina_Bool in_ask;
+
+   Ecore_Thread *th;
+};
+
+struct _E_Comp_Wl_Clipboard_Source
+{
+   E_Comp_Wl_Data_Source data_source;
+   Ecore_Fd_Handler *fd_handler;
+   uint32_t serial;
+
+   struct wl_array contents; //for extendable buffer
+   int ref;
+   int fd[2];
+};
+
+struct _E_Comp_Wl_Clipboard_Offer
+{
+   E_Comp_Wl_Clipboard_Source *source;
+   Ecore_Fd_Handler *fd_handler;
+   size_t offset;
+};
+
+struct _E_Comp_Wl_Manual_Data_Source
+{
+    E_Comp_Wl_Data_Source data_source;
+    uint32_t serial;
+
+    struct wl_array contents;
+    int ref;
+};
+
+struct _E_Comp_Wl_Manual_Data_Offer
+{
+    E_Comp_Wl_Manual_Data_Source *source;
+    Ecore_Fd_Handler *fd_handler;
+    size_t offset;
+};
+
+EINTERN void e_comp_wl_data_device_send_enter(E_Client *ec);
+EINTERN void e_comp_wl_data_device_send_leave(E_Client *ec);
+EINTERN void *e_comp_wl_data_device_send_offer(E_Client *ec);
+EINTERN void e_comp_wl_data_device_keyboard_focus_set(void);
+EINTERN Eina_Bool e_comp_wl_data_manager_init(void);
+EINTERN void e_comp_wl_data_manager_shutdown(void);
+EINTERN struct wl_resource *e_comp_wl_data_find_for_client(struct wl_client *client);
+EINTERN E_Comp_Wl_Data_Source *e_comp_wl_data_manager_source_create(struct wl_client *client, struct wl_resource *resource, uint32_t id);
+EINTERN int e_comp_wl_clipboard_source_ref(E_Comp_Wl_Clipboard_Source *source);
+EINTERN int e_comp_wl_clipboard_source_unref(E_Comp_Wl_Clipboard_Source *source);
+EINTERN E_Comp_Wl_Clipboard_Source *e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int *fd);
+EINTERN void e_comp_wl_data_device_only_set(struct wl_resource *data_device_res, Eina_Bool set);
+EINTERN Eina_Bool e_comp_wl_data_device_manual_selection_set(void *data, size_t size, Eina_List *mime_list);
+EINTERN void e_comp_wl_data_current_device_id_set(int id);
+EINTERN int e_comp_wl_data_current_device_id_get(void);
+EINTERN void e_comp_wl_data_offer_mimetype_action_accept(E_Comp_Wl_Data_Offer *offer);
+EINTERN void e_comp_wl_data_secondary_add(E_Client *ec);
+EINTERN void e_comp_wl_data_secondary_remove(E_Client *ec);
+
+#endif
index e9a6f387274369d92f9d49f07243e7da3aa070cd..c89585c4cbf686eb4cae813700ce136871299767 100644 (file)
@@ -1,5 +1,6 @@
 #include "e.h"
 #include "e_comp_wl_private.h"
+#include "e_comp_wl_data_intern.h"
 
 #include <libds/compositor.h>
 #include <libds/subcompositor.h>
index 2176d471ca4b57d9f743bc7d5b40e6b7c071e294..1ccdfe9da3cc576e2e901abb739f39b7ae2ca802 100644 (file)
@@ -1,4 +1,5 @@
 #include "e.h"
+#include "e_comp_wl_data_intern.h"
 
 struct _E_Drag_Hook
 {
index ffa20f2353028e065e687899248f2d482fa70303..a8a8467531740295983362913929eaf463a9212b 100644 (file)
@@ -49,7 +49,6 @@
 #include "e_egl_sync.h"
 #include "e_comp_wl.h"
 #include "e_comp_wl_subsurface.h"
-#include "e_comp_wl_data.h"
 #include "e_comp_wl_input.h"
 #include "e_comp_wl_tbm.h"
 #include "e_comp_wl_rsm.h"
index a23daf51d6b5327fb4bbd177bf75280b646ae00a..1826f2a240fd85cd15a550144fbece1be05b3cba 100644 (file)
@@ -18,6 +18,7 @@
 #include "e_subsurface_watcher.h"
 #include "e_client_intern.h"
 #include "e_subsurface_watcher_intern.h"
+#include "e_comp_wl_data_intern.h"
 
 #include <device/display.h>
 #include <wayland-server.h>
index 35267f89f0befe695ff73f08209c5f14df83ec7e..107d61e4d22fcfc4bc16a72e6bedccce2d654ff5 100644 (file)
@@ -1,5 +1,6 @@
 #include "e.h"
 #include "services/e_service_kvm.h"
+#include "e_comp_wl_data_intern.h"
 
 #include <wayland-server.h>
 #include <tzsh_server.h>