From 5e7fa42b8c418d6c46b9518e9444ab1d31d7e7e2 Mon Sep 17 00:00:00 2001 From: rafspiny Date: Thu, 10 Aug 2023 11:37:27 +0200 Subject: [PATCH] Make some functions static --- src/modules/convertible/dbus_acceleration.c | 34 +++++++++++++++++--- src/modules/convertible/dbus_acceleration.h | 35 --------------------- src/modules/convertible/e_mod_config.h | 5 --- 3 files changed, 29 insertions(+), 45 deletions(-) diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c index 3325d50af..2a33c25c1 100644 --- a/src/modules/convertible/dbus_acceleration.c +++ b/src/modules/convertible/dbus_acceleration.c @@ -8,7 +8,7 @@ #include "e_mod_main.h" #include "input_rotation.h" -DbusAccelerometer* accelerometer_dbus; +static DbusAccelerometer* accelerometer_dbus; DbusAccelerometer* sensor_proxy_init(void) @@ -80,7 +80,10 @@ _convertible_rotation_get(const enum screen_rotation orientation); int _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator); -Eldbus_Proxy * +/** + * Helper to get the interface + * */ +statis Eldbus_Proxy * get_dbus_interface(const char *IFACE) { DBG("Working on interface: %s", IFACE); @@ -208,7 +211,13 @@ _access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, return res; } -void +/** + * Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy + * @param data DbusAccelerometer + * @param msg The message + * @param pending + */ +static void on_has_accelerometer(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED) { const char *errname, *errmsg; @@ -425,7 +434,14 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation) } } -void +/** + * Callback definition to handle the execution of the ClaimAccelerometer() method of DBUS + * interface net.hadess.SensorProxy + * @param data not used + * @param msg The message + * @param pending + */ + static void on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED) { const char *errname, *errmsg; @@ -439,7 +455,15 @@ on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldb INF("Accelerometer claimed"); } -void + +/** + * Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS + * interface net.hadess.SensorProxy + * @param data not used + * @param msg The message + * @param pending + */ +static void on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED) { const char *errname, *errmsg; diff --git a/src/modules/convertible/dbus_acceleration.h b/src/modules/convertible/dbus_acceleration.h index db2fe5a18..2724c1914 100644 --- a/src/modules/convertible/dbus_acceleration.h +++ b/src/modules/convertible/dbus_acceleration.h @@ -32,21 +32,6 @@ DbusAccelerometer* sensor_proxy_init(void); void sensor_proxy_shutdown(void); -/** - * Helper to get the interface - * */ -Eldbus_Proxy * -get_dbus_interface(const char *IFACE); - -/** - * Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy - * @param data DbusAccelerometer - * @param msg The message - * @param pending - */ -void -on_has_accelerometer(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED); - /** * Callback definition to handle the request of the accelerometer property of DBUS interface net.hadess.SensorProxy * @param data DbusAccelerometer @@ -55,24 +40,4 @@ on_has_accelerometer(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_P */ void on_accelerometer_orientation(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED); - -/** - * Callback definition to handle the execution of the ClaimAccelerometer() method of DBUS - * interface net.hadess.SensorProxy - * @param data not used - * @param msg The message - * @param pending - */ -void -on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED); - -/** - * Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS - * interface net.hadess.SensorProxy - * @param data not used - * @param msg The message - * @param pending - */ -void -on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED); #endif diff --git a/src/modules/convertible/e_mod_config.h b/src/modules/convertible/e_mod_config.h index 7e65bc7ac..ebd8d937a 100644 --- a/src/modules/convertible/e_mod_config.h +++ b/src/modules/convertible/e_mod_config.h @@ -40,10 +40,5 @@ void econvertible_config_init(void); void econvertible_config_shutdown(void); -//E_Config_Dialog* econvertible_config_init(Evas_Object *comp, const char*p); -void -_menu_new(Instance *inst, Evas_Event_Mouse_Down *ev); -void -_mouse_down_cb(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event); #endif //E_GADGET_CONVERTIBLE_E_MOD_CONFIG_H