e_input: move all in e_input_private.h to e_input_intern.h 25/305025/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 24 Jan 2024 23:54:17 +0000 (08:54 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 26 Jan 2024 00:59:22 +0000 (09:59 +0900)
Move all of the definitions and internal signatures to e_input_intern.h.
Then, e_input has only one internal header file which is e_input_intern.h

Change-Id: Ib2d2d53f77626466f54dd418ac43ee13cc83dd8e

src/bin/Makefile.mk
src/bin/e_info_server_input.c
src/bin/e_input.c
src/bin/e_input_device.c
src/bin/e_input_evdev.c
src/bin/e_input_inputs.c
src/bin/e_input_intern.h
src/bin/e_input_log.h [new file with mode: 0644]
src/bin/e_input_private.h [deleted file]

index 212da0c..ff50fcc 100644 (file)
@@ -218,7 +218,6 @@ src/bin/e_keyrouter_conf.c \
 src/bin/e_keyrouter_wl.c \
 src/bin/e_keyrouter.c \
 src/bin/e_gesture.c \
-src/bin/e_input_private.h \
 src/bin/e_input.c \
 src/bin/e_input_inputs.c \
 src/bin/e_input_device.c \
index d2e8b3d..c8913f0 100644 (file)
@@ -1,7 +1,7 @@
 #include "e.h"
 #include "e_info_server_input_intern.h"
 #include "e_info_shared_types.h"
-#include "e_input_private.h"
+#include "e_input_log.h"
 #include "e_comp_screen_intern.h"
 #include "e_output_intern.h"
 
index 687788f..470017b 100644 (file)
@@ -1,6 +1,6 @@
 #include "e.h"
 #include "e_input_intern.h"
-#include "e_input_private.h"
+#include "e_input_log.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_wl_input_intern.h"
 #include "e_comp_wl_intern.h"
@@ -8,6 +8,7 @@
 #include <Ecore_Input_Evas.h>
 #include <cpu-boosting.h>
 #include <pthread.h>
+#include <Eeze.h>
 
 static int _e_input_hooks_delete = 0;
 static int _e_input_hooks_walking = 0;
index d92e3f7..9fd71b7 100644 (file)
@@ -1,9 +1,11 @@
 #include "e.h"
 #include "e_input_intern.h"
-#include "e_input_private.h"
+#include "e_input_log.h"
 #include "e_comp_screen_intern.h"
 #include "e_output_intern.h"
 
+#include <Eeze.h>
+
 /* e_input_device private variable */
 static Eina_List *einput_devices;
 static E_Input_Device *e_input_device_default = NULL;
index 0fcec6e..1aa2ca1 100644 (file)
@@ -1,6 +1,6 @@
 #include "e.h"
 #include "e_input_intern.h"
-#include "e_input_private.h"
+#include "e_input_log.h"
 #include "e_device_intern.h"
 #include "e_keyrouter_private.h"
 #include "e_input_event.h"
@@ -9,6 +9,7 @@
 #include "e_output_intern.h"
 
 #include <glib.h>
+#include <Eeze.h>
 
 #define G_LIST_GET_DATA(list) ((list) ? (((GList *)(list))->data) : NULL)
 
index 8f96e1d..5699e15 100644 (file)
@@ -1,7 +1,7 @@
 #include "e.h"
 #include "e_devicemgr_intern.h"
 #include "e_input_intern.h"
-#include "e_input_private.h"
+#include "e_input_log.h"
 #include "e_input_event_intern.h"
 #include "e_keyrouter_intern.h"
 #include "e_comp_wl_intern.h"
index abce807..8a45e67 100644 (file)
@@ -3,6 +3,145 @@
 
 #include "e_device_intern.h"
 
+#include <libinput.h>
+
+#define E_INPUT_ENV_LIBINPUT_LOG_DISABLE "E_INPUT_LIBINPUT_LOG_DISABLE"
+#define E_INPUT_ENV_LIBINPUT_LOG_EINA_LOG "E_INPUT_LIBINPUT_LOG_EINA_LOG"
+#define E_INPUT_POINTER_AXIS_DISCRETE_STEP 120
+#define E_INPUT_FINGER_SCROLL_THRESHOLD 1
+
+typedef enum _E_Input_Axis_Source {
+   E_INPUT_AXIS_SOURCE_WHEEL = 1,
+   E_INPUT_AXIS_SOURCE_FINGER,
+   E_INPUT_AXIS_SOURCE_CONTINUOUS,
+} E_Input_Axis_Source;
+
+struct _E_Input_Coord
+{
+   int x;
+   int y;
+};
+
+struct _E_Input_Seat
+{
+   const char *name;
+   E_Input_Backend *input;
+   E_Input_Device *dev;
+   Eina_List *devices;
+   struct libinput_seat *seat;
+   Ecore_Device *ecore_dev;
+
+   struct
+     {
+        int ix, iy;
+        double dx, dy;
+        Eina_Bool swap;
+        Eina_Bool invert_x;
+        Eina_Bool invert_y;
+     } ptr;
+
+   E_Device *e_dev;
+};
+
+struct _E_Input_Backend
+{
+   int fd;
+   E_Input_Device *dev;
+   struct libinput *libinput;
+
+   Ecore_Fd_Handler *hdlr;
+
+   Eina_Bool enabled : 1;
+   Eina_Bool suspended : 1;
+   Eina_Bool left_handed : 1;
+
+   Ecore_Thread *thread;
+   Ecore_Thread *input_thread;
+   E_Input_Libinput_Backend backend;
+
+   Eina_Bool log_disable : 1;
+   Eina_Bool log_use_eina : 1;
+
+   unsigned int path_ndevices;
+
+   GMainLoop *input_thread_loop;
+   E_Input_Event_Source *event_source;
+};
+
+struct _E_Input_Evdev
+{
+   E_Input_Seat *seat;
+   struct libinput_device *device;
+
+   const char *path;
+   Ecore_Device *ecore_dev;
+   Eina_List *ecore_dev_list;
+   E_Device *e_dev;
+   GList *e_dev_list;
+
+   int mt_slot;
+
+   struct
+     {
+        int minx, miny, maxw, maxh;
+        double dx, dy;
+        unsigned int last, prev;
+        uint32_t threshold;
+        Eina_Bool did_double : 1;
+        Eina_Bool did_triple : 1;
+        uint32_t prev_button, last_button;
+        unsigned int pressed_button;
+     } mouse;
+
+   struct
+     {
+        struct xkb_keymap *keymap;
+        struct xkb_state *state;
+        xkb_mod_mask_t ctrl_mask;
+        xkb_mod_mask_t alt_mask;
+        xkb_mod_mask_t shift_mask;
+        xkb_mod_mask_t win_mask;
+        xkb_mod_mask_t scroll_mask;
+        xkb_mod_mask_t num_mask;
+        xkb_mod_mask_t caps_mask;
+        xkb_mod_mask_t altgr_mask;
+        unsigned int modifiers;
+        unsigned int depressed, latched, locked, group;
+
+        Eina_List *pressed_keys;
+        GMutex keymap_mutex;
+        GMutex state_mutex;
+     } xkb;
+
+     Eina_Hash *key_remap_hash;
+     Eina_Bool key_remap_enabled;
+
+   E_Input_Seat_Capabilities caps;
+
+   struct
+     {
+        struct
+          {
+             int rotation;
+             int x, y;
+             int w, h;
+          } transform;
+
+        E_Input_Coord *coords;
+        unsigned int pressed;
+        atomic_uint raw_pressed;
+        atomic_bool blocked;
+     } touch;
+
+   const char *output_name;
+   Eina_Bool output_configured;
+
+   Eina_Bool disable_acceleration;
+};
+
+EINTERN extern struct xkb_keymap *cached_keymap;
+EINTERN extern struct xkb_context *cached_context;
+
 EINTERN extern int E_INPUT_EVENT_SEAT_ADD;
 EINTERN extern int E_EVENT_INPUT_ENABLED;
 EINTERN extern int E_EVENT_INPUT_DISABLED;
@@ -74,6 +213,25 @@ EINTERN void e_input_boost_unlock(GMutex *mutex);
 EINTERN void e_input_thread_id_set(pid_t tid);
 EINTERN void e_input_thread_run(E_Input_Backend *input);
 
+EINTERN void e_input_device_output_changed(E_Input_Device *dev);
+
 EINTERN Eina_Bool e_input_libinput_context_create(E_Input_Backend *input);
+EINTERN void      _input_events_process(E_Input_Backend *input);
+
+EINTERN E_Input_Evdev *_e_input_evdev_device_create(E_Input_Seat *seat, struct libinput_device *device);
+
+EINTERN Eina_Bool      _e_input_evdev_event_process(struct libinput_event *event);
+EINTERN void           _e_input_evdev_device_destroy(E_Input_Evdev *evdev);
+EINTERN const char    *e_input_evdev_seatname_get(E_Input_Evdev *evdev);
+EINTERN Eina_Bool      e_input_evdev_seatname_set(E_Input_Evdev *evdev, const char *seatname);
+EINTERN void           _device_calibration_set(E_Input_Evdev *edev);
+EINTERN void           _e_input_pointer_motion_post(E_Input_Evdev *edev);
+
+EINTERN struct xkb_context *_e_input_device_cached_context_get(enum xkb_context_flags flags);
+EINTERN struct xkb_keymap  *_e_input_device_cached_keymap_get(struct xkb_context *ctx, const struct xkb_rule_names *names, enum xkb_keymap_compile_flags flags);
+
+EINTERN void _e_input_hook_call(E_Input_Hook_Point hookpoint, const char *device_name);
+
+EINTERN void _e_input_key_event_list_add(Ecore_Event_Key *key);
 
 #endif
diff --git a/src/bin/e_input_log.h b/src/bin/e_input_log.h
new file mode 100644 (file)
index 0000000..bdaf143
--- /dev/null
@@ -0,0 +1,30 @@
+#ifdef E_TYPEDEFS
+
+#else
+
+#ifndef E_INPUT_PRIVIATES_H
+#define E_INPUT_PRIVIATES_H
+
+#ifdef DBG
+# undef DBG
+#endif
+
+#ifdef INF
+# undef INF
+#endif
+
+#ifdef ERR
+# undef ERR
+#endif
+
+extern int _e_input_log_dom;
+#define DBG(...)  EINA_LOG_DOM_DBG(_e_input_log_dom, __VA_ARGS__)
+#define INF(...)  EINA_LOG_DOM_INFO(_e_input_log_dom, __VA_ARGS__)
+#define ERR(...)  EINA_LOG_DOM_ERR(_e_input_log_dom, __VA_ARGS__)
+
+#define EIERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+
+#endif
+#endif
diff --git a/src/bin/e_input_private.h b/src/bin/e_input_private.h
deleted file mode 100644 (file)
index a0b0f44..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-#ifdef E_TYPEDEFS
-
-#else
-
-#ifndef E_INPUT_PRIVIATES_H
-#define E_INPUT_PRIVIATES_H
-
-#include "e.h"
-#include "e_input.h"
-#include "e_device_intern.h"
-#include "e_input_event.h"
-#include <libinput.h>
-#include <Eeze.h>
-#include <glib.h>
-
-#ifdef DBG
-# undef DBG
-#endif
-
-#ifdef INF
-# undef INF
-#endif
-
-#ifdef ERR
-# undef ERR
-#endif
-
-extern int _e_input_log_dom;
-#define DBG(...)  EINA_LOG_DOM_DBG(_e_input_log_dom, __VA_ARGS__)
-#define INF(...)  EINA_LOG_DOM_INFO(_e_input_log_dom, __VA_ARGS__)
-#define ERR(...)  EINA_LOG_DOM_ERR(_e_input_log_dom, __VA_ARGS__)
-
-#define EIERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define EIINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define EIDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-
-extern struct xkb_keymap *cached_keymap;
-extern struct xkb_context *cached_context;
-
-#define E_INPUT_ENV_LIBINPUT_LOG_DISABLE "E_INPUT_LIBINPUT_LOG_DISABLE"
-#define E_INPUT_ENV_LIBINPUT_LOG_EINA_LOG "E_INPUT_LIBINPUT_LOG_EINA_LOG"
-#define E_INPUT_POINTER_AXIS_DISCRETE_STEP 120
-#define E_INPUT_FINGER_SCROLL_THRESHOLD 1
-
-struct _E_Input_Coord
-{
-   int x;
-   int y;
-};
-
-struct _E_Input_Seat
-{
-   const char *name;
-   E_Input_Backend *input;
-   E_Input_Device *dev;
-   Eina_List *devices;
-   struct libinput_seat *seat;
-   Ecore_Device *ecore_dev;
-
-   struct
-     {
-        int ix, iy;
-        double dx, dy;
-        Eina_Bool swap;
-        Eina_Bool invert_x;
-        Eina_Bool invert_y;
-     } ptr;
-
-   E_Device *e_dev;
-};
-
-struct _E_Input_Backend
-{
-   int fd;
-   E_Input_Device *dev;
-   struct libinput *libinput;
-
-   Ecore_Fd_Handler *hdlr;
-
-   Eina_Bool enabled : 1;
-   Eina_Bool suspended : 1;
-   Eina_Bool left_handed : 1;
-
-   Ecore_Thread *thread;
-   Ecore_Thread *input_thread;
-   E_Input_Libinput_Backend backend;
-
-   Eina_Bool log_disable : 1;
-   Eina_Bool log_use_eina : 1;
-
-   unsigned int path_ndevices;
-
-   GMainLoop *input_thread_loop;
-   E_Input_Event_Source *event_source;
-};
-
-struct _E_Input_Evdev
-{
-   E_Input_Seat *seat;
-   struct libinput_device *device;
-
-   const char *path;
-   Ecore_Device *ecore_dev;
-   Eina_List *ecore_dev_list;
-   E_Device *e_dev;
-   GList *e_dev_list;
-
-   int mt_slot;
-
-   struct
-     {
-        int minx, miny, maxw, maxh;
-        double dx, dy;
-        unsigned int last, prev;
-        uint32_t threshold;
-        Eina_Bool did_double : 1;
-        Eina_Bool did_triple : 1;
-        uint32_t prev_button, last_button;
-        unsigned int pressed_button;
-     } mouse;
-
-   struct
-     {
-        struct xkb_keymap *keymap;
-        struct xkb_state *state;
-        xkb_mod_mask_t ctrl_mask;
-        xkb_mod_mask_t alt_mask;
-        xkb_mod_mask_t shift_mask;
-        xkb_mod_mask_t win_mask;
-        xkb_mod_mask_t scroll_mask;
-        xkb_mod_mask_t num_mask;
-        xkb_mod_mask_t caps_mask;
-        xkb_mod_mask_t altgr_mask;
-        unsigned int modifiers;
-        unsigned int depressed, latched, locked, group;
-
-        Eina_List *pressed_keys;
-        GMutex keymap_mutex;
-        GMutex state_mutex;
-     } xkb;
-
-     Eina_Hash *key_remap_hash;
-     Eina_Bool key_remap_enabled;
-
-   E_Input_Seat_Capabilities caps;
-
-   struct
-     {
-        struct
-          {
-             int rotation;
-             int x, y;
-             int w, h;
-          } transform;
-
-        E_Input_Coord *coords;
-        unsigned int pressed;
-        atomic_uint raw_pressed;
-        atomic_bool blocked;
-     } touch;
-
-   const char *output_name;
-   Eina_Bool output_configured;
-
-   Eina_Bool disable_acceleration;
-};
-
-typedef enum _E_Input_Axis_Source {
-   E_INPUT_AXIS_SOURCE_WHEEL = 1,
-   E_INPUT_AXIS_SOURCE_FINGER,
-   E_INPUT_AXIS_SOURCE_CONTINUOUS,
-} E_Input_Axis_Source;
-
-void _input_events_process(E_Input_Backend *input);
-E_Input_Evdev *_e_input_evdev_device_create(E_Input_Seat *seat, struct libinput_device *device);
-Eina_Bool _e_input_evdev_event_process(struct libinput_event *event);
-
-struct xkb_context * _e_input_device_cached_context_get(enum xkb_context_flags flags);
-struct xkb_keymap *_e_input_device_cached_keymap_get(struct xkb_context *ctx, const struct xkb_rule_names *names, enum xkb_keymap_compile_flags flags);
-
-
-void _e_input_evdev_device_destroy(E_Input_Evdev *evdev);
-void _e_input_pointer_motion_post(E_Input_Evdev *edev);
-
-void _device_calibration_set(E_Input_Evdev *edev);
-void e_input_device_output_changed(E_Input_Device *dev);
-
-const char *e_input_evdev_seatname_get(E_Input_Evdev *evdev);
-Eina_Bool e_input_evdev_seatname_set(E_Input_Evdev *evdev, const char *seatname);
-
-void _e_input_hook_call(E_Input_Hook_Point hookpoint, const char *device_name);
-
-void _e_input_key_event_list_add(Ecore_Event_Key *key);
-
-#endif
-#endif