e_devicemgr_inputgen: make a e_devicemgr_inputgen_intern.h header 31/321631/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 25 Mar 2025 05:29:48 +0000 (14:29 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 26 Mar 2025 03:43:55 +0000 (12:43 +0900)
move the declaration of e_devicemgr_inputgen symble from e_devicemgr_intern.h
to e_devicemgr_inputgen_intern.h file

Change-Id: I5ae5e8808fe2747eb48d528c8081ecd89444bb36

src/bin/debug/e_test_helper.c
src/bin/inputmgr/e_devicemgr_input.c
src/bin/inputmgr/e_devicemgr_inputgen.c
src/bin/inputmgr/e_devicemgr_inputgen_intern.h [new file with mode: 0644]
src/bin/inputmgr/e_devicemgr_intern.h
src/bin/server/e_devicemgr_wl.c

index 90402acc9ee62027d56f9974d5a8a16da483dd1a..40344f0b77a4584a7950589edfe767ffd729978a 100644 (file)
@@ -4,6 +4,7 @@
 #include "e_comp_intern.h"
 #include "e_comp_wl_intern.h"
 #include "e_devicemgr_intern.h"
+#include "e_devicemgr_inputgen_intern.h"
 #include "e_pixmap_intern.h"
 #include "e_client_intern.h"
 #include "e_comp_object_intern.h"
index 2854ace64833abec72528471069fe9630f5af120..e42d0d6391f717e902722e2acfb1fdd4204ad556 100644 (file)
@@ -1,5 +1,6 @@
 
 #include "e_devicemgr_intern.h"
+#include "e_devicemgr_inputgen_intern.h"
 #include "e_keyrouter_intern.h"
 #include "e_input_intern.h"
 #include "e_input_event.h"
index e921bdbf24fbc65f424b95e50305d0e4ac58f728..c9a9e02d69bef79efa20d2fdeb5b8baa5dd4d3eb 100644 (file)
@@ -1,3 +1,4 @@
+#include "e_devicemgr_inputgen_intern.h"
 #include "e_devicemgr_intern.h"
 #include "e_keyrouter_intern.h"
 #include "e_input_evdev_intern.h"
 #include <linux/uinput.h>
 #include <tizen-extension-server-protocol.h>
 
+#define INPUTGEN_MAX_BTN 16
+
+typedef struct _E_Devicemgr_Inputgen_Touch_Axis E_Devicemgr_Inputgen_Touch_Axis;
+typedef struct _E_Devicemgr_Inputgen_Client_Data E_Devicemgr_Inputgen_Client_Data;
+typedef struct _E_Devicemgr_Inputgen_Client_Global_Data E_Devicemgr_Inputgen_Client_Global_Data;
+typedef struct _E_Devicemgr_Inputgen_Device_Data E_Devicemgr_Inputgen_Device_Data;
+typedef struct _E_Devicemgr_Inputgen_Resource_Data E_Devicemgr_Inputgen_Resource_Data;
+typedef struct _E_Devicemgr_Coords E_Devicemgr_Coords;
+
+struct _E_Devicemgr_Coords
+{
+   int x, y;
+};
+
+struct _E_Devicemgr_Inputgen_Client_Data
+{
+   struct wl_client *client;
+   int ref;
+};
+
+struct _E_Devicemgr_Inputgen_Client_Global_Data
+{
+   struct wl_client *client;
+   unsigned int clas;
+};
+
+struct _E_Devicemgr_Inputgen_Touch_Axis
+{
+   double radius_x;
+   double radius_y;
+   double pressure;
+   double angle;
+   double palm;
+};
+
+struct _E_Devicemgr_Inputgen_Device_Data
+{
+   int uinp_fd;
+   char *identifier;
+   char name[UINPUT_MAX_NAME_SIZE];
+   Ecore_Device_Class clas;
+   struct
+     {
+        unsigned int pressed;
+        E_Devicemgr_Coords *coords;
+        E_Devicemgr_Inputgen_Touch_Axis *axis;
+        E_Devicemgr_Inputgen_Touch_Axis axis_tmp;
+     } touch;
+   struct
+     {
+        unsigned int pressed;
+        E_Devicemgr_Coords coords;
+     } mouse;
+   struct
+     {
+        Eina_List *pressed;
+     } key;
+
+   Eina_List *clients;
+};
+
+struct _E_Devicemgr_Inputgen_Resource_Data
+{
+   struct wl_resource *resource;
+   char name[UINPUT_MAX_NAME_SIZE];
+   Ecore_Timer *sync_timer;
+};
+
 static Ecore_Device_Class
 _e_devicemgr_inputgen_class_to_ecore_device_class(unsigned int clas)
 {
diff --git a/src/bin/inputmgr/e_devicemgr_inputgen_intern.h b/src/bin/inputmgr/e_devicemgr_inputgen_intern.h
new file mode 100644 (file)
index 0000000..aa24f8e
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef E_DEVICEMGR_INPUTGEN_INTERN_H
+#define E_DEVICEMGR_INPUTGEN_INTERN_H
+
+#include "e_intern.h"
+#include "e_devicemgr.h"
+
+#define INPUT_GENERATOR_DEVICE "Input Generator"
+
+EINTERN int  e_devicemgr_create_virtual_device(Ecore_Device_Class clas, const char *name);
+EINTERN void e_devicemgr_destroy_virtual_device(int uinp_fd);
+
+EINTERN int  e_devicemgr_inputgen_add(struct wl_client *client, struct wl_resource *resource, uint32_t clas, const char *name);
+EINTERN void e_devicemgr_inputgen_add_with_sync(struct wl_client *client, struct wl_resource *resource, uint32_t clas, const char *name);
+EINTERN void e_devicemgr_inputgen_remove(struct wl_client *client, struct wl_resource *resource, uint32_t clas);
+EINTERN int  e_devicemgr_inputgen_generate_key(struct wl_client *client, struct wl_resource *resource, const char *keyname, Eina_Bool pressed);
+EINTERN int  e_devicemgr_inputgen_generate_pointer(struct wl_client *client, struct wl_resource *resource, uint32_t type, uint32_t x, uint32_t y, uint32_t button);
+EINTERN int  e_devicemgr_inputgen_generate_touch(struct wl_client *client, struct wl_resource *resource, uint32_t type, uint32_t x, uint32_t y, uint32_t finger);
+EINTERN void e_devicemgr_inputgen_get_device_info(E_Devicemgr_Input_Device *dev);
+EINTERN int  e_devicemgr_inputgen_generate_wheel(struct wl_client *client, struct wl_resource *resource, uint32_t type, int32_t value);
+EINTERN int  e_devicemgr_inputgen_touch_axis_store(struct wl_client *client, struct wl_resource *resource, uint32_t type, double value);
+EINTERN void e_devicemgr_inputgen_device_ready_send(E_Devicemgr_Input_Device *dev);
+
+#endif
index 38d15af90232b6bdb93d80fbd008f8c42e5b6f61..ec18308f66729ff2c1153d591a65f7929d8d3d6e 100644 (file)
 #define TRACE_INPUT_DEVICE_END()
 #endif
 
-#define INPUT_GENERATOR_DEVICE "Input Generator"
 #define DETENT_DEVICE_NAME "tizen_detent"
-#define INPUTGEN_MAX_BTN 16
 
 typedef struct _E_Devicemgr_Coords E_Devicemgr_Coords;
-typedef struct _E_Devicemgr_Inputgen_Touch_Axis E_Devicemgr_Inputgen_Touch_Axis;
-typedef struct _E_Devicemgr_Inputgen_Client_Data E_Devicemgr_Inputgen_Client_Data;
-typedef struct _E_Devicemgr_Inputgen_Client_Global_Data E_Devicemgr_Inputgen_Client_Global_Data;
-typedef struct _E_Devicemgr_Inputgen_Device_Data E_Devicemgr_Inputgen_Device_Data;
-typedef struct _E_Devicemgr_Inputgen_Resource_Data E_Devicemgr_Inputgen_Resource_Data;
 
 struct _E_Devicemgr_Coords
 {
    int x, y;
 };
 
-struct _E_Devicemgr_Inputgen_Client_Data
-{
-   struct wl_client *client;
-   int ref;
-};
-
-struct _E_Devicemgr_Inputgen_Client_Global_Data
-{
-   struct wl_client *client;
-   unsigned int clas;
-};
-
-struct _E_Devicemgr_Inputgen_Touch_Axis
-{
-   double radius_x;
-   double radius_y;
-   double pressure;
-   double angle;
-   double palm;
-};
-
-struct _E_Devicemgr_Inputgen_Device_Data
-{
-   int uinp_fd;
-   char *identifier;
-   char name[UINPUT_MAX_NAME_SIZE];
-   Ecore_Device_Class clas;
-   struct
-     {
-        unsigned int pressed;
-        E_Devicemgr_Coords *coords;
-        E_Devicemgr_Inputgen_Touch_Axis *axis;
-        E_Devicemgr_Inputgen_Touch_Axis axis_tmp;
-     } touch;
-   struct
-     {
-        unsigned int pressed;
-        E_Devicemgr_Coords coords;
-     } mouse;
-   struct
-     {
-        Eina_List *pressed;
-     } key;
-
-   Eina_List *clients;
-};
-
-struct _E_Devicemgr_Inputgen_Resource_Data
-{
-   struct wl_resource *resource;
-   char name[UINPUT_MAX_NAME_SIZE];
-   Ecore_Timer *sync_timer;
-};
-
 struct _E_Devicemgr_Conf_Edd
 {
    struct
@@ -144,17 +83,6 @@ EINTERN Eina_Bool e_devicemgr_relative_motion_is_grabbed(unsigned int boundaries
 EINTERN void e_devicemgr_conf_init(E_Devicemgr_Config_Data *dconfig);
 EINTERN void e_devicemgr_conf_fini(E_Devicemgr_Config_Data *dconfig);
 
-EINTERN int  e_devicemgr_inputgen_add(struct wl_client *client, struct wl_resource *resource, uint32_t clas, const char *name);
-EINTERN void e_devicemgr_inputgen_add_with_sync(struct wl_client *client, struct wl_resource *resource, uint32_t clas, const char *name);
-EINTERN void e_devicemgr_inputgen_remove(struct wl_client *client, struct wl_resource *resource, uint32_t clas);
-EINTERN int  e_devicemgr_inputgen_generate_key(struct wl_client *client, struct wl_resource *resource, const char *keyname, Eina_Bool pressed);
-EINTERN int  e_devicemgr_inputgen_generate_pointer(struct wl_client *client, struct wl_resource *resource, uint32_t type, uint32_t x, uint32_t y, uint32_t button);
-EINTERN int  e_devicemgr_inputgen_generate_touch(struct wl_client *client, struct wl_resource *resource, uint32_t type, uint32_t x, uint32_t y, uint32_t finger);
-EINTERN void e_devicemgr_inputgen_get_device_info(E_Devicemgr_Input_Device *dev);
-EINTERN int  e_devicemgr_inputgen_generate_wheel(struct wl_client *client, struct wl_resource *resource, uint32_t type, int32_t value);
-EINTERN int  e_devicemgr_inputgen_touch_axis_store(struct wl_client *client, struct wl_resource *resource, uint32_t type, double value);
-EINTERN void e_devicemgr_inputgen_device_ready_send(E_Devicemgr_Input_Device *dev);
-
 EINTERN int  e_devicemgr_create_virtual_device(Ecore_Device_Class clas, const char *name);
 EINTERN void e_devicemgr_destroy_virtual_device(int uinp_fd);
 
index 27452269165205223862895f33cc1c1a889bc933..c04bc2aa97d9de94becc4f1163158c51027c7ff6 100644 (file)
@@ -1,6 +1,7 @@
 #include "e_devicemgr_wl_intern.h"
 #include "e_devicemgr_intern.h"
 #include "e_devicemgr_block_intern.h"
+#include "e_devicemgr_inputgen_intern.h"
 #include "e_input_intern.h"
 #include "e_comp_wl_intern.h"
 #include "e_comp_wl_input_intern.h"