forked from enlightenment/enlightenment
Address linting comments.
This commit is contained in:
parent
1edbc5cca4
commit
ff71a650c2
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
DbusAccelerometer* accelerometer_dbus;
|
DbusAccelerometer* accelerometer_dbus;
|
||||||
|
|
||||||
DbusAccelerometer* sensor_proxy_init() {
|
DbusAccelerometer*
|
||||||
|
sensor_proxy_init()
|
||||||
|
{
|
||||||
// Initialise DBUS component
|
// Initialise DBUS component
|
||||||
if (accelerometer_dbus != NULL)
|
if (accelerometer_dbus != NULL)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +60,8 @@ DbusAccelerometer* sensor_proxy_init() {
|
||||||
return accelerometer_dbus;
|
return accelerometer_dbus;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sensor_proxy_shutdown()
|
void
|
||||||
|
sensor_proxy_shutdown(void)
|
||||||
{
|
{
|
||||||
INF("Removing signal handler dbus_property_changed_sh");
|
INF("Removing signal handler dbus_property_changed_sh");
|
||||||
eldbus_signal_handler_del(accelerometer_dbus->dbus_property_changed_sh);
|
eldbus_signal_handler_del(accelerometer_dbus->dbus_property_changed_sh);
|
||||||
|
@ -77,11 +80,14 @@ void sensor_proxy_shutdown()
|
||||||
eldbus_shutdown();
|
eldbus_shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
int _convertible_rotation_get(const enum screen_rotation orientation);
|
int
|
||||||
|
_convertible_rotation_get(const enum screen_rotation orientation);
|
||||||
|
|
||||||
int _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator);
|
int
|
||||||
|
_is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator);
|
||||||
|
|
||||||
Eldbus_Proxy *get_dbus_interface(const char *IFACE)
|
Eldbus_Proxy *
|
||||||
|
get_dbus_interface(const char *IFACE)
|
||||||
{
|
{
|
||||||
DBG("Working on interface: %s", IFACE);
|
DBG("Working on interface: %s", IFACE);
|
||||||
Eldbus_Connection *conn;
|
Eldbus_Connection *conn;
|
||||||
|
@ -110,7 +116,8 @@ Eldbus_Proxy *get_dbus_interface(const char *IFACE)
|
||||||
return sensor_proxy;
|
return sensor_proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum screen_rotation access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool* result)
|
enum screen_rotation
|
||||||
|
access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool* result)
|
||||||
{
|
{
|
||||||
const char *type = NULL;
|
const char *type = NULL;
|
||||||
*result = EINA_TRUE;
|
*result = EINA_TRUE;
|
||||||
|
@ -267,7 +274,8 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int _convertible_rotation_get(const enum screen_rotation orientation)
|
int
|
||||||
|
_convertible_rotation_get(const enum screen_rotation orientation)
|
||||||
{
|
{
|
||||||
switch (orientation)
|
switch (orientation)
|
||||||
{
|
{
|
||||||
|
@ -280,7 +288,8 @@ int _convertible_rotation_get(const enum screen_rotation orientation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const float * _get_matrix_rotation_transformation(int rotation)
|
const float *
|
||||||
|
_get_matrix_rotation_transformation(int rotation)
|
||||||
{
|
{
|
||||||
const float *transformation;
|
const float *transformation;
|
||||||
switch (rotation) {
|
switch (rotation) {
|
||||||
|
@ -299,7 +308,8 @@ const float * _get_matrix_rotation_transformation(int rotation)
|
||||||
return transformation;
|
return transformation;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _fetch_X_device_input_number()
|
int
|
||||||
|
_fetch_X_device_input_number(void)
|
||||||
{
|
{
|
||||||
// I should get the touchscreen associated with the screen probably by looking at the classes of the input devices
|
// I should get the touchscreen associated with the screen probably by looking at the classes of the input devices
|
||||||
// I need to submit my patch to add getters for other XIDeviceInfo fields, like raster mentioned in his commit.
|
// I need to submit my patch to add getters for other XIDeviceInfo fields, like raster mentioned in his commit.
|
||||||
|
@ -335,7 +345,8 @@ int _fetch_X_device_input_number()
|
||||||
return dev_number;
|
return dev_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
|
int
|
||||||
|
_is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
|
||||||
{
|
{
|
||||||
// Looking for a device with either a libinput property for calibration or the old evdev Axlis labels property.
|
// Looking for a device with either a libinput property for calibration or the old evdev Axlis labels property.
|
||||||
int is_correct_device = EINA_FALSE;
|
int is_correct_device = EINA_FALSE;
|
||||||
|
@ -360,7 +371,9 @@ int _is_device_a_touch_pointer(int dev_counter, int num_properties, char **itera
|
||||||
return is_correct_device;
|
return is_correct_device;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation) {
|
void
|
||||||
|
_fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
|
||||||
|
{
|
||||||
DBG("Working on screen %s", randr_id);
|
DBG("Working on screen %s", randr_id);
|
||||||
E_Randr2_Screen *rotatable_screen = e_randr2_screen_id_find(randr_id);
|
E_Randr2_Screen *rotatable_screen = e_randr2_screen_id_find(randr_id);
|
||||||
E_Config_Randr2_Screen *screen_randr_cfg = e_randr2_config_screen_find(rotatable_screen, e_randr2_cfg);
|
E_Config_Randr2_Screen *screen_randr_cfg = e_randr2_config_screen_find(rotatable_screen, e_randr2_cfg);
|
||||||
|
|
|
@ -29,12 +29,14 @@ struct _DbusAccelerometer
|
||||||
DbusAccelerometer* sensor_proxy_init();
|
DbusAccelerometer* sensor_proxy_init();
|
||||||
|
|
||||||
|
|
||||||
void sensor_proxy_shutdown();
|
void
|
||||||
|
sensor_proxy_shutdown(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to get the interface
|
* Helper to get the interface
|
||||||
* */
|
* */
|
||||||
Eldbus_Proxy *get_dbus_interface(const char *IFACE);
|
Eldbus_Proxy *
|
||||||
|
get_dbus_interface(const char *IFACE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function to extract ta string property from the message
|
* Helper function to extract ta string property from the message
|
||||||
|
@ -100,5 +102,6 @@ on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eld
|
||||||
* @param randr_id The randr2 id
|
* @param randr_id The randr2 id
|
||||||
* @param rotation The expected rotation
|
* @param rotation The expected rotation
|
||||||
*/
|
*/
|
||||||
void _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation);
|
void
|
||||||
|
_fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
/* LIST OF INSTANCES */
|
/* LIST OF INSTANCES */
|
||||||
static Eina_List *instances = NULL;
|
static Eina_List *instances = NULL;
|
||||||
|
|
||||||
void _update_instances(const Instance *current_instance)
|
void
|
||||||
|
_update_instances(const Instance *current_instance)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Instance *instance = NULL;
|
Instance *instance = NULL;
|
||||||
|
@ -25,7 +26,8 @@ void _update_instances(const Instance *current_instance)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
|
void
|
||||||
|
_rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
|
||||||
const char *src EINA_UNUSED)
|
const char *src EINA_UNUSED)
|
||||||
{
|
{
|
||||||
DBG("Rotation: Signal %s received from %s", sig, src);
|
DBG("Rotation: Signal %s received from %s", sig, src);
|
||||||
|
@ -37,7 +39,8 @@ void _rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, c
|
||||||
_update_instances(inst);
|
_update_instances(inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
|
void
|
||||||
|
_keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
|
||||||
const char *src EINA_UNUSED)
|
const char *src EINA_UNUSED)
|
||||||
{
|
{
|
||||||
DBG("Keyboard: Signal %s received from %s", sig, src);
|
DBG("Keyboard: Signal %s received from %s", sig, src);
|
||||||
|
@ -56,6 +59,7 @@ _gadget_created(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void update_instances(Eina_List *new_instances) {
|
void
|
||||||
|
update_instances(Eina_List *new_instances) {
|
||||||
instances = new_instances;
|
instances = new_instances;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,8 @@ _rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EI
|
||||||
void
|
void
|
||||||
_keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED);
|
_keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED);
|
||||||
|
|
||||||
void update_instances(Eina_List *instances);
|
void
|
||||||
|
update_instances(Eina_List *instances);
|
||||||
/* end gadcon callback for actions */
|
/* end gadcon callback for actions */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ e_int_config_convertible_module(Evas_Object *comp, const char *p EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
econvertible_config_init()
|
econvertible_config_init(void)
|
||||||
{
|
{
|
||||||
_econvertible_config_dd_new();
|
_econvertible_config_dd_new();
|
||||||
_config = e_config_domain_load("module.econvertible", edd);
|
_config = e_config_domain_load("module.econvertible", edd);
|
||||||
|
@ -153,7 +153,7 @@ econvertible_config_init()
|
||||||
DBG("Config loaded");
|
DBG("Config loaded");
|
||||||
}
|
}
|
||||||
|
|
||||||
void econvertible_config_shutdown()
|
void econvertible_config_shutdown(void)
|
||||||
{
|
{
|
||||||
E_CONFIG_DD_FREE(edd);
|
E_CONFIG_DD_FREE(edd);
|
||||||
E_FREE(convertible_config);
|
E_FREE(convertible_config);
|
||||||
|
|
|
@ -34,11 +34,16 @@ struct _E_Config_Dialog_Data
|
||||||
Evas_Object *inputs;
|
Evas_Object *inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog* e_int_config_convertible_module(Evas_Object *comp, const char *p);
|
E_Config_Dialog*
|
||||||
void econvertible_config_init();
|
e_int_config_convertible_module(Evas_Object *comp, const char *p);
|
||||||
void econvertible_config_shutdown();
|
void
|
||||||
|
econvertible_config_init(void);
|
||||||
|
void
|
||||||
|
econvertible_config_shutdown(void);
|
||||||
//E_Config_Dialog* econvertible_config_init(Evas_Object *comp, const char*p);
|
//E_Config_Dialog* econvertible_config_init(Evas_Object *comp, const char*p);
|
||||||
void _menu_new(Instance *inst, Evas_Event_Mouse_Down *ev);
|
void
|
||||||
void _mouse_down_cb(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
|
_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
|
#endif //E_GADGET_CONVERTIBLE_E_MOD_CONFIG_H
|
||||||
|
|
Loading…
Reference in New Issue