From 1fd0435f21ef74f28417fbb832aad764e618d9fb Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Sat, 20 Jun 2020 09:43:56 +0000 Subject: [PATCH] Get rid of trailing whitespaces (4 / 14) Remove trailing whitespaces Differential Revision: https://phab.enlightenment.org/D12002 --- src/lib/ecore/Ecore_Getopt.h | 2 +- src/lib/ecore/ecore.c | 2 +- src/lib/ecore/ecore_exe_posix.c | 2 +- .../ecore_audio/ecore_audio_obj_out_pulse.c | 6 +- src/lib/ecore_cocoa/ecore_cocoa_keys.h | 2 +- src/lib/ecore_con/Ecore_Con.h | 66 +-- src/lib/ecore_drm/Ecore_Drm.h | 104 ++--- src/lib/ecore_drm/ecore_drm.c | 14 +- src/lib/ecore_drm/ecore_drm_dbus.c | 34 +- src/lib/ecore_drm/ecore_drm_device.c | 24 +- src/lib/ecore_drm/ecore_drm_evdev.c | 90 ++-- src/lib/ecore_drm/ecore_drm_fb.c | 6 +- src/lib/ecore_drm/ecore_drm_inputs.c | 34 +- src/lib/ecore_drm/ecore_drm_launcher.c | 10 +- src/lib/ecore_drm/ecore_drm_logind.c | 20 +- src/lib/ecore_drm/ecore_drm_output.c | 58 +-- src/lib/ecore_drm/ecore_drm_private.h | 8 +- src/lib/ecore_drm/ecore_drm_sprites.c | 28 +- src/lib/ecore_drm/ecore_drm_tty.c | 30 +- src/lib/ecore_evas/Ecore_Evas_Types.h | 2 +- src/lib/ecore_evas/ecore_evas_buffer.c | 14 +- src/lib/ecore_evas/ecore_evas_ews.c | 2 +- src/lib/ecore_evas/ecore_evas_extn.h | 2 +- src/lib/ecore_evas/ecore_evas_wayland.h | 2 +- src/lib/ecore_fb/ecore_fb.c | 2 +- src/lib/ecore_fb/ecore_fb_li.c | 6 +- src/lib/ecore_fb/ecore_fb_private.h | 6 +- src/lib/ecore_file/Ecore_File.h | 4 +- src/lib/ecore_file/ecore_file_monitor_poll.c | 4 +- src/lib/ecore_imf/ecore_imf_context.c | 4 +- src/lib/ecore_input/Ecore_Input.h | 28 +- src/lib/ecore_input/ecore_input_compose.c | 2 +- src/lib/ecore_input/ecore_input_private.h | 2 +- src/lib/ecore_input_evas/Ecore_Input_Evas.h | 2 +- .../ecore_input_evas_private.h | 2 +- src/lib/ecore_ipc/Ecore_Ipc.h | 6 +- src/lib/ecore_ipc/ecore_ipc.c | 2 +- src/lib/ecore_ipc/ecore_ipc_private.h | 8 +- src/lib/ecore_sdl/Ecore_Sdl.h | 2 +- src/lib/ecore_sdl/ecore_sdl_private.h | 14 +- .../ecore_wayland/xdg-shell-client-protocol.h | 6 +- src/lib/ecore_wayland/xdg-shell-protocol.c | 6 +- src/lib/ecore_wl2/ecore_wl2_display.c | 2 +- src/lib/ecore_x/ecore_x.c | 2 +- src/lib/ecore_x/ecore_x_e.c | 38 +- src/lib/ecore_x/ecore_x_events.c | 2 +- src/lib/ecore_x/ecore_x_icccm.c | 2 +- src/lib/ecore_x/ecore_x_image.c | 4 +- src/lib/ecore_x/ecore_x_netwm.c | 4 +- src/lib/ecore_x/ecore_x_randr.c | 394 +++++++++--------- src/lib/ecore_x/ecore_x_screensaver.c | 4 +- src/lib/ecore_x/ecore_x_test.c | 2 +- 52 files changed, 561 insertions(+), 561 deletions(-) diff --git a/src/lib/ecore/Ecore_Getopt.h b/src/lib/ecore/Ecore_Getopt.h index 7a038f744a..751d30c788 100644 --- a/src/lib/ecore/Ecore_Getopt.h +++ b/src/lib/ecore/Ecore_Getopt.h @@ -1186,7 +1186,7 @@ EAPI Eina_List *ecore_getopt_list_free(Eina_List *list); * @return @c EINA_TRUE on success, @c EINA_FALSE on incorrect geometry value. * * This is a helper function to be used with ECORE_GETOPT_CALLBACK_*(). - * + * * @c callback_data value is ignored, you can safely use @c NULL. */ EAPI Eina_Bool ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage); diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index f6cacd44a6..0d79b621b2 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -582,7 +582,7 @@ ecore_fork_reset(void) fcb->func(fcb->data); } fork_cbs_walking--; - + EINA_LIST_FOREACH_SAFE(fork_cbs, l, ln, fcb) { if (fcb->delete_me) diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c index 07f1058ab0..f88f0ca15b 100644 --- a/src/lib/ecore/ecore_exe_posix.c +++ b/src/lib/ecore/ecore_exe_posix.c @@ -298,7 +298,7 @@ _impl_ecore_exe_efl_object_finalize(Eo *obj, Ecore_Exe_Data *exe) #endif if (run_pri != ECORE_EXE_PRIORITY_INHERIT) { -#ifdef PRIO_PROCESS +#ifdef PRIO_PROCESS if ((run_pri >= -20) && (run_pri <= 19)) setpriority(PRIO_PROCESS, 0, run_pri); #else diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c index edcc924acb..463ecb6773 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c +++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c @@ -234,11 +234,11 @@ static void _state_cb(pa_context *context, void *data) Eo *eo_obj; pa_context_state_t state; Ecore_Audio_Out_Pulse_Data *pd = data; - + if (!EPA_LOAD()) return; state = EPA_CALL(pa_context_get_state)(context); pd->state = state; - + //ref everything in the list to be sure... EINA_LIST_FOREACH(pd->outputs, out, eo_obj) { efl_ref(eo_obj); @@ -271,7 +271,7 @@ static void _state_job(void *data) { Eo *eo_obj; Eina_List *out, *tmp; - + DBG("PA context fail."); //ref everything in the list to be sure... EINA_LIST_FOREACH(pd->outputs, out, eo_obj) { diff --git a/src/lib/ecore_cocoa/ecore_cocoa_keys.h b/src/lib/ecore_cocoa/ecore_cocoa_keys.h index 9a3324c2c7..3cde2686f2 100644 --- a/src/lib/ecore_cocoa/ecore_cocoa_keys.h +++ b/src/lib/ecore_cocoa/ecore_cocoa_keys.h @@ -124,7 +124,7 @@ static const struct _ecore_cocoa_keys_s keystable[] = { 127, "BackSpace", "\x08" }, { 126, "asciitilde", "~" }, -{ 160, "w0", "" }, +{ 160, "w0", "" }, { 161, "w1", "" }, { 162, "w2", "" }, { 163, "w3", "" }, diff --git a/src/lib/ecore_con/Ecore_Con.h b/src/lib/ecore_con/Ecore_Con.h index 3cc1d09417..6155796200 100644 --- a/src/lib/ecore_con/Ecore_Con.h +++ b/src/lib/ecore_con/Ecore_Con.h @@ -120,38 +120,38 @@ /** * @defgroup Ecore_Con_Buffer Ecore Connection Buffering * @ingroup Ecore_Con_Group - * + * * As Ecore_Con works on an event driven design, as data arrives, events will * be produced containing the data that arrived. It is up to the user of * Ecore_Con to either parse as they go, append to a file to later parse the * whole file in one go, or append to memory to parse or handle later. - * - * To help with this Eina has some handy API's. The Eina_Binbuf and - * Eina_Strbuf APIs, abstract dynamic buffer management and make it trivial - * to handle buffers at runtime, without having to manage them. Eina_Binbuf - * makes it possible to create, expand, reset and slice a blob of memory - - * all via API. No system calls, no pointer manipulations and no size + * + * To help with this Eina has some handy API's. The Eina_Binbuf and + * Eina_Strbuf APIs, abstract dynamic buffer management and make it trivial + * to handle buffers at runtime, without having to manage them. Eina_Binbuf + * makes it possible to create, expand, reset and slice a blob of memory - + * all via API. No system calls, no pointer manipulations and no size * calculation. - * - * Additional functions include adding content at specified byte positions in - * the buffer, escaping the inputs, find and replace strings. This provides + * + * Additional functions include adding content at specified byte positions in + * the buffer, escaping the inputs, find and replace strings. This provides * extreme flexibility to play around, with a dynamic blob of memory. - * + * * It is good to free it (using eina_binbuf_free()) after using it. - * + * * Eina_Binbuf compliments Ecore_Con use cases, where dynamic sizes of data * arrive from the network (think http download in chunks). Using * Eina_Binbuf provides enough flexibility to handle data as it arrives and * to defer its processing until desired, without having to think about * where to store the temporary data and how to manage its size. - * + * * An example of how to use these with Ecore_Con follows. - * + * * @code * #include * #include * #include - * + * * static Eina_Bool * data_callback(void *data, int type, void *event) * { @@ -161,56 +161,56 @@ * // append data as it arrives - don't worry where or how it gets stored. * // Also don't worry about size, expanding, reallocing etc. * // just keep appending - size is automatically handled. - * + * * eina_binbuf_append_length(data, url_data->data, url_data->size); - * + * * fprintf(stderr, "Appended %d \n", url_data->size); * } * return EINA_TRUE; * } - * - * - * + * + * + * * static Eina_Bool * completion_callback(void *data, int type, void *event) * { * Ecore_Con_Event_Url_Complete *url_complete = event; * printf("download completed with status code: %d\n", url_complete->status); - * + * * // get the data back from Eina_Binbuf * char *ptr = eina_binbuf_string_get(data); * size_t size = eina_binbuf_length_get(data); - * + * * // process data as required (write to file) * fprintf(stderr, "Size of data = %d bytes\n", size); * int fd = open("./elm.png", O_CREAT); * write(fd, ptr, size); * close(fd); - * + * * // free it when done. * eina_binbuf_free(data); - * + * * ecore_main_loop_quit(); - * + * * return EINA_TRUE; * } - * - * + * + * * int * main(int argc, char **argv) * { - * + * * const char *url = "http://www.enlightenment.org/p/index/d/logo.png"; - * + * * ecore_init(); * ecore_con_init(); * ecore_con_url_init(); - * - * + * + * * // This is single additional line to manage dynamic network data. * Eina_Binbuf *data = eina_binbuf_new(); * Ecore_Con_Url *url_con = ecore_con_url_new(url); - * + * * ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, * completion_callback, * data); @@ -218,7 +218,7 @@ * data_callback, * data); * ecore_con_url_get(url_con); - * + * * ecore_main_loop_begin(); * return 0; * } diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h index 3896b529d0..054995833c 100644 --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h @@ -213,16 +213,16 @@ EAPI extern int ECORE_DRM_EVENT_SEAT_ADD; /**< @since 1.14 */ * @defgroup Ecore_Drm_Group Ecore_Drm - Drm Integration * @ingroup Ecore * @brief Ecore functions for dealing with drm, virtual terminals. - * + * * Ecore_Drm provides a wrapper and functions for using libdrm. - * + * * @li @ref Ecore_Drm_Init_Group * @li @ref Ecore_Drm_Device_Group * @li @ref Ecore_Drm_Tty_Group * @li @ref Ecore_Drm_Output_Group * @li @ref Ecore_Drm_Input_Group * @li @ref Ecore_Drm_Fb_Group - * + * */ EAPI int ecore_drm_init(void); @@ -232,13 +232,13 @@ EAPI int ecore_drm_shutdown(void); * @ingroup Ecore_Drm_Device_Group * @brief Finds a drm device in the system. * - * @param name The name of the device to find. If NULL, this function will + * @param name The name of the device to find. If NULL, this function will * search for the default drm device. - * @param seat The name of the seat where this device may be found. If NULL, + * @param seat The name of the seat where this device may be found. If NULL, * this function will use a default seat name 'seat0'. - * + * * @return An opaque Ecore_Drm_Device structure representing the card. - * + * */ EAPI Ecore_Drm_Device *ecore_drm_device_find(const char *name, const char *seat); @@ -247,9 +247,9 @@ EAPI Ecore_Drm_Device *ecore_drm_device_find(const char *name, const char *seat) * @brief Frees an Ecore_Drm_Device. * * This function will cleanup and free any previously allocated Ecore_Drm_Device. - * + * * @param dev The Ecore_Drm_Device to free - * + * */ EAPI void ecore_drm_device_free(Ecore_Drm_Device *dev); @@ -258,11 +258,11 @@ EAPI void ecore_drm_device_free(Ecore_Drm_Device *dev); * @brief Opens an Ecore_Drm_Device. * * This function will open an existing Ecore_Drm_Device for use. - * + * * @param dev The Ecore_Drm_Device to try and open - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_device_open(Ecore_Drm_Device *dev); @@ -271,50 +271,50 @@ EAPI Eina_Bool ecore_drm_device_open(Ecore_Drm_Device *dev); * @brief Closes an Ecore_Drm_Device. * * This function will close a previously opened Ecore_Drm_Device - * + * * @param dev The Ecore_Drm_Device to free - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_device_close(Ecore_Drm_Device *dev); /** * @ingroup Ecore_Drm_Device_Group * @brief Gets if a given Ecore_Drm_Device is master. - * + * * This function will check if the given drm device is set to master - * + * * @param dev The Ecore_Drm_Device to check - * + * * @return @c EINA_TRUE if device is master, @c EINA_FALSE otherwise - * + * */ EAPI Eina_Bool ecore_drm_device_master_get(Ecore_Drm_Device *dev); /** * @ingroup Ecore_Drm_Device_Group * @brief Sets a given Ecore_Drm_Device to master. - * + * * This function will attempt to set a given drm device to be master - * + * * @param dev The Ecore_Drm_Device to set - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_device_master_set(Ecore_Drm_Device *dev); /** * @ingroup Ecore_Drm_Device_Group * @brief Tells a given Ecore_Drm_Device to stop being master. - * + * * This function will attempt to ask a drm device to stop being master - * + * * @param dev The Ecore_Drm_Device to set - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_device_master_drop(Ecore_Drm_Device *dev); @@ -417,7 +417,7 @@ EAPI void ecore_drm_device_keyboard_cached_keymap_set(struct xkb_keymap *map); * @ingroup Ecore_Drm_Device_Group * @brief Finds an Ecore_Drm_Output at the given coordinates. * - * This function will loop all the existing outputs in Ecore_Drm_Device and + * This function will loop all the existing outputs in Ecore_Drm_Device and * return an output if one exists that encapsulates the given coordinates. * * @param dev The Ecore_Drm_Device to search @@ -433,46 +433,46 @@ EAPI Ecore_Drm_Output *ecore_drm_device_output_find(Ecore_Drm_Device *dev, int x /** * @ingroup Ecore_Drm_Tty_Group * @brief Opens a tty for use. - * + * * @param dev The Ecore_Drm_Device that this tty will belong to. - * @param name The name of the tty to try and open. + * @param name The name of the tty to try and open. * If NULL, /dev/tty0 will be used. - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_tty_open(Ecore_Drm_Device *dev, const char *name); /** * @ingroup Ecore_Drm_Tty_Group * @brief Closes an already opened tty. - * + * * @param dev The Ecore_Drm_Device which owns this tty. - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_tty_close(Ecore_Drm_Device *dev); /** * @ingroup Ecore_Drm_Tty_Group * @brief Releases a virtual terminal. - * + * * @param dev The Ecore_Drm_Device which owns this tty. - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_tty_release(Ecore_Drm_Device *dev); /** * @ingroup Ecore_Drm_Tty_Group * @brief Acquires a virtual terminal. - * + * * @param dev The Ecore_Drm_Device which owns this tty. - * + * * @return @c EINA_TRUE on success, @c EINA_FALSE on failure - * + * */ EAPI Eina_Bool ecore_drm_tty_acquire(Ecore_Drm_Device *dev); @@ -481,10 +481,10 @@ EAPI Eina_Bool ecore_drm_tty_acquire(Ecore_Drm_Device *dev); * @brief Gets the opened virtual terminal file descriptor. * * @param dev The Ecore_Drm_Device which owns this tty. - * + * * @return The tty fd opened from previous call to ecore_drm_tty_open - * - * + * + * * @since 1.10 */ EAPI int ecore_drm_tty_get(Ecore_Drm_Device *dev); @@ -496,8 +496,8 @@ EAPI int ecore_drm_tty_get(Ecore_Drm_Device *dev); * This function will create outputs for Ecore_Drm_Device. * * @param dev The Ecore_Drm_Device device for which outputs - * needs to be created - * + * needs to be created + * * @return EINA_TRUE on success, EINA_FALSE on failure. * */ @@ -510,7 +510,7 @@ EAPI Eina_Bool ecore_drm_outputs_create(Ecore_Drm_Device *dev); * This function will cleanup and free any previously allocated Ecore_Drm_Output. * * @param output The Ecore_Drm_Output to free - * + * */ EAPI void ecore_drm_output_free(Ecore_Drm_Output *output); @@ -565,7 +565,7 @@ EAPI void ecore_drm_output_repaint(Ecore_Drm_Output *output); * This function will give the output size of Ecore_Drm_Device. * * @param dev The Ecore_Drm_Device to get output size - * @param output The output id whose information needs to be retrieved + * @param output The output id whose information needs to be retrieved * @param *w The parameter in which output width is stored * @param *h The parameter in which output height is stored * @@ -649,7 +649,7 @@ EAPI void ecore_drm_fb_destroy(Ecore_Drm_Fb *fb); * @param fb The Ecore_Drm_Fb to mark as dirty * @param rects The regions of the Ecore_Drm_Fb which are dirty * @param count The number of regions - * + * * @since 1.14 */ EAPI void ecore_drm_fb_dirty(Ecore_Drm_Fb *fb, Eina_Rectangle *rects, unsigned int count); @@ -793,7 +793,7 @@ EAPI char *ecore_drm_output_name_get(Ecore_Drm_Output *output); * * @param output The Ecore_Drm_Output to set the dpms level on * @param level The level to set - * + * * @since 1.14 */ EAPI void ecore_drm_output_dpms_set(Ecore_Drm_Output *output, int level); @@ -809,7 +809,7 @@ EAPI void ecore_drm_output_dpms_set(Ecore_Drm_Output *output, int level); * @param r The amount to scale the red channel * @param g The amount to scale the green channel * @param b The amount to scale the blue channel - * + * * @since 1.14 */ EAPI void ecore_drm_output_gamma_set(Ecore_Drm_Output *output, uint16_t size, uint16_t *r, uint16_t *g, uint16_t *b); @@ -966,7 +966,7 @@ EAPI void ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, i * @ingroup Ecore_Drm_Device_Group * @brief Finds an Ecore_Drm_Output which has the given name. * - * This function will loop all the existing outputs in Ecore_Drm_Device and + * This function will loop all the existing outputs in Ecore_Drm_Device and * return an output if one exists that matches the given name. * * @param dev The Ecore_Drm_Device to search diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c index fb8c593b09..75c4c76b38 100644 --- a/src/lib/ecore_drm/ecore_drm.c +++ b/src/lib/ecore_drm/ecore_drm.c @@ -50,25 +50,25 @@ _ecore_drm_event_activate_send(Eina_Bool active) if (!(e = calloc(1, sizeof(Ecore_Drm_Event_Activate)))) return; e->active = active; - ecore_event_add(ECORE_DRM_EVENT_ACTIVATE, e, + ecore_event_add(ECORE_DRM_EVENT_ACTIVATE, e, _ecore_drm_event_activate_free, NULL); } /** * @defgroup Ecore_Drm_Init_Group Drm Library Init and Shutdown Functions - * + * * Functions that start and shutdown the Ecore_Drm Library. */ /** * Initialize the Ecore_Drm library - * + * * @return The number of times the library has been initialized without * being shut down. 0 is returned if an error occurs. - * + * * @ingroup Ecore_Drm_Init_Group */ -EAPI int +EAPI int ecore_drm_init(void) { /* if we have already initialized, return the count */ @@ -78,7 +78,7 @@ ecore_drm_init(void) if (!eina_init()) return --_ecore_drm_init_count; /* try to init ecore */ - if (!ecore_init()) + if (!ecore_init()) { eina_shutdown(); return --_ecore_drm_init_count; @@ -96,7 +96,7 @@ ecore_drm_init(void) /* eina_log_level_set(EINA_LOG_LEVEL_DBG); */ /* try to create logging domain */ - _ecore_drm_log_dom = + _ecore_drm_log_dom = eina_log_domain_register("ecore_drm", ECORE_DRM_DEFAULT_LOG_COLOR); if (!_ecore_drm_log_dom) { diff --git a/src/lib/ecore_drm/ecore_drm_dbus.c b/src/lib/ecore_drm/ecore_drm_dbus.c index 5834133179..4d60428879 100644 --- a/src/lib/ecore_drm/ecore_drm_dbus.c +++ b/src/lib/ecore_drm/ecore_drm_dbus.c @@ -33,7 +33,7 @@ static int _dbus_init_count = 0; static Eldbus_Connection *dconn; static Eldbus_Object *dobj; -static void +static void _ecore_drm_dbus_device_pause_done(uint32_t major, uint32_t minor) { Eldbus_Proxy *proxy; @@ -56,7 +56,7 @@ _ecore_drm_dbus_device_pause_done(uint32_t major, uint32_t minor) eldbus_proxy_send(proxy, msg, NULL, NULL, -1); } -static void +static void _cb_session_removed(void *data, const Eldbus_Message *msg) { Ecore_Drm_Device *dev; @@ -81,7 +81,7 @@ _cb_session_removed(void *data, const Eldbus_Message *msg) } } -static void +static void _cb_device_paused(void *ctxt EINA_UNUSED, const Eldbus_Message *msg) { const char *errname, *errmsg; @@ -104,7 +104,7 @@ _cb_device_paused(void *ctxt EINA_UNUSED, const Eldbus_Message *msg) } } -static void +static void _cb_device_resumed(void *ctxt EINA_UNUSED, const Eldbus_Message *msg) { const char *errname, *errmsg; @@ -133,7 +133,7 @@ _property_response_set(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus ERR("Eldbus Message error %s - %s\n\n", errname, errmsg); } -static void +static void _cb_properties_changed(void *data EINA_UNUSED, Eldbus_Proxy *proxy EINA_UNUSED, void *event) { Eldbus_Proxy_Event_Property_Changed *ev; @@ -142,14 +142,14 @@ _cb_properties_changed(void *data EINA_UNUSED, Eldbus_Proxy *proxy EINA_UNUSED, if (!strcmp(ev->name, "Active")) { - eldbus_proxy_property_set(proxy, "Active", "b", (void *)EINA_TRUE, + eldbus_proxy_property_set(proxy, "Active", "b", (void *)EINA_TRUE, _property_response_set, NULL); - eldbus_proxy_property_set(proxy, "State", "s", &"active", + eldbus_proxy_property_set(proxy, "State", "s", &"active", _property_response_set, NULL); } } -Eina_Bool +Eina_Bool _ecore_drm_dbus_session_take(void) { Eldbus_Proxy *proxy; @@ -184,7 +184,7 @@ _ecore_drm_dbus_session_take(void) return EINA_TRUE; } -Eina_Bool +Eina_Bool _ecore_drm_dbus_session_release(void) { Eldbus_Proxy *proxy; @@ -217,7 +217,7 @@ _ecore_drm_dbus_session_release(void) return EINA_TRUE; } -void +void _ecore_drm_dbus_device_release(uint32_t major, uint32_t minor) { Eldbus_Proxy *proxy; @@ -264,7 +264,7 @@ eldbus_err: if (callback) callback(data, fd, b); } -int +int _ecore_drm_dbus_device_take(uint32_t major, uint32_t minor, Ecore_Drm_Open_Cb callback, void *data) { Eldbus_Proxy *proxy; @@ -338,7 +338,7 @@ _ecore_drm_dbus_device_take_no_pending(uint32_t major, uint32_t minor, Eina_Bool return fd; } -int +int _ecore_drm_dbus_init(Ecore_Drm_Device *dev) { Eldbus_Proxy *proxy; @@ -385,7 +385,7 @@ _ecore_drm_dbus_init(Ecore_Drm_Device *dev) goto proxy_err; } - eldbus_proxy_signal_handler_add(proxy, "SessionRemoved", + eldbus_proxy_signal_handler_add(proxy, "SessionRemoved", _cb_session_removed, dev); /* try to get the Session proxy */ @@ -395,9 +395,9 @@ _ecore_drm_dbus_init(Ecore_Drm_Device *dev) goto proxy_err; } - eldbus_proxy_signal_handler_add(proxy, "PauseDevice", + eldbus_proxy_signal_handler_add(proxy, "PauseDevice", _cb_device_paused, NULL); - eldbus_proxy_signal_handler_add(proxy, "ResumeDevice", + eldbus_proxy_signal_handler_add(proxy, "ResumeDevice", _cb_device_resumed, NULL); /* try to get the Properties proxy */ @@ -408,7 +408,7 @@ _ecore_drm_dbus_init(Ecore_Drm_Device *dev) } eldbus_proxy_properties_monitor(proxy, EINA_TRUE); - eldbus_proxy_event_callback_add(proxy, ELDBUS_PROXY_EVENT_PROPERTY_CHANGED, + eldbus_proxy_event_callback_add(proxy, ELDBUS_PROXY_EVENT_PROPERTY_CHANGED, _cb_properties_changed, NULL); return _dbus_init_count; @@ -424,7 +424,7 @@ conn_err: return --_dbus_init_count; } -int +int _ecore_drm_dbus_shutdown(void) { if (--_dbus_init_count != 0) return _dbus_init_count; diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c index d2d6f6f03f..c5865ce1e8 100644 --- a/src/lib/ecore_drm/ecore_drm_device.c +++ b/src/lib/ecore_drm/ecore_drm_device.c @@ -193,8 +193,8 @@ _ecore_drm_device_cached_keymap_update(struct xkb_keymap *map) /** * @defgroup Ecore_Drm_Device_Group Device manipulation functions - * - * Functions that deal with finding, opening, closing, and otherwise using + * + * Functions that deal with finding, opening, closing, and otherwise using * the DRM device itself. */ @@ -231,7 +231,7 @@ ecore_drm_device_find(const char *name, const char *seat) if (!(devseat = eeze_udev_syspath_get_property(device, "ID_SEAT"))) devseat = eina_stringshare_add("seat0"); - if ((seat) && (strcmp(seat, devseat))) + if ((seat) && (strcmp(seat, devseat))) goto cont; else if (strcmp(devseat, "seat0")) goto cont; @@ -239,7 +239,7 @@ ecore_drm_device_find(const char *name, const char *seat) devparent = eeze_udev_syspath_get_parent_filtered(device, "pci", NULL); if (!devparent) { - devparent = + devparent = eeze_udev_syspath_get_parent_filtered(device, "platform", NULL); platform = EINA_TRUE; } @@ -297,7 +297,7 @@ out: return dev; } -EAPI void +EAPI void ecore_drm_device_free(Ecore_Drm_Device *dev) { unsigned int i = 0; @@ -334,7 +334,7 @@ ecore_drm_device_free(Ecore_Drm_Device *dev) free(dev); } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_device_open(Ecore_Drm_Device *dev) { uint64_t caps; @@ -454,7 +454,7 @@ ecore_drm_devices_get(void) return drm_devices; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_device_master_get(Ecore_Drm_Device *dev) { drm_magic_t mag; @@ -463,14 +463,14 @@ ecore_drm_device_master_get(Ecore_Drm_Device *dev) if ((!dev) || (dev->drm.fd < 0)) return EINA_FALSE; /* get if we are master or not */ - if ((drmGetMagic(dev->drm.fd, &mag) == 0) && + if ((drmGetMagic(dev->drm.fd, &mag) == 0) && (drmAuthMagic(dev->drm.fd, mag) == 0)) return EINA_TRUE; return EINA_FALSE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_device_master_set(Ecore_Drm_Device *dev) { /* check for valid device */ @@ -483,7 +483,7 @@ ecore_drm_device_master_set(Ecore_Drm_Device *dev) return EINA_TRUE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_device_master_drop(Ecore_Drm_Device *dev) { /* check for valid device */ @@ -496,14 +496,14 @@ ecore_drm_device_master_drop(Ecore_Drm_Device *dev) return EINA_TRUE; } -EAPI int +EAPI int ecore_drm_device_fd_get(Ecore_Drm_Device *dev) { EINA_SAFETY_ON_NULL_RETURN_VAL(dev, -1); return dev->drm.fd; } -EAPI void +EAPI void ecore_drm_device_window_set(Ecore_Drm_Device *dev, unsigned int window) { /* check for valid device */ diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c index c907769be9..f93f78ca0e 100644 --- a/src/lib/ecore_drm/ecore_drm_evdev.c +++ b/src/lib/ecore_drm/ecore_drm_evdev.c @@ -32,7 +32,7 @@ static void _device_modifiers_update(Ecore_Drm_Evdev *edev); -static void +static void _device_calibration_set(Ecore_Drm_Evdev *edev) { const char *sysname; @@ -42,7 +42,7 @@ _device_calibration_set(Ecore_Drm_Evdev *edev) const char *vals; enum libinput_config_status status; - if ((!libinput_device_config_calibration_has_matrix(edev->device)) || + if ((!libinput_device_config_calibration_has_matrix(edev->device)) || (libinput_device_config_calibration_get_default_matrix(edev->device, cal) != 0)) return; @@ -54,7 +54,7 @@ _device_calibration_set(Ecore_Drm_Evdev *edev) EINA_LIST_FREE(devices, device) { vals = eeze_udev_syspath_get_property(device, "WL_CALIBRATION"); - if ((!vals) || + if ((!vals) || (sscanf(vals, "%f %f %f %f %f %f", &cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6)) goto cont; @@ -62,7 +62,7 @@ _device_calibration_set(Ecore_Drm_Evdev *edev) cal[2] /= edev->output->current_mode->width; cal[5] /= edev->output->current_mode->height; - status = + status = libinput_device_config_calibration_set_matrix(edev->device, cal); if (status != LIBINPUT_CONFIG_STATUS_SUCCESS) @@ -74,7 +74,7 @@ cont: } } -static void +static void _device_output_set(Ecore_Drm_Evdev *edev) { Ecore_Drm_Input *input; @@ -102,7 +102,7 @@ _device_output_set(Ecore_Drm_Evdev *edev) edev->output = output; - if (libinput_device_has_capability(edev->device, + if (libinput_device_has_capability(edev->device, LIBINPUT_DEVICE_CAP_POINTER)) { edev->seat->ptr.ix = edev->seat->ptr.dx = edev->output->current_mode->width / 2; @@ -112,7 +112,7 @@ _device_output_set(Ecore_Drm_Evdev *edev) } } -static void +static void _device_configure(Ecore_Drm_Evdev *edev) { if (libinput_device_config_tap_get_finger_count(edev->device) > 0) @@ -123,7 +123,7 @@ _device_configure(Ecore_Drm_Evdev *edev) libinput_device_config_tap_set_enabled(edev->device, tap); } - ecore_drm_outputs_geometry_get(edev->seat->input->dev, + ecore_drm_outputs_geometry_get(edev->seat->input->dev, &edev->mouse.minx, &edev->mouse.miny, &edev->mouse.maxw, &edev->mouse.maxh); @@ -131,7 +131,7 @@ _device_configure(Ecore_Drm_Evdev *edev) _device_calibration_set(edev); } -static void +static void _device_keyboard_setup(Ecore_Drm_Evdev *edev) { Ecore_Drm_Input *input; @@ -155,25 +155,25 @@ _device_keyboard_setup(Ecore_Drm_Evdev *edev) return; } - edev->xkb.ctrl_mask = + edev->xkb.ctrl_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, XKB_MOD_NAME_CTRL); - edev->xkb.alt_mask = + edev->xkb.alt_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, XKB_MOD_NAME_ALT); - edev->xkb.shift_mask = + edev->xkb.shift_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, XKB_MOD_NAME_SHIFT); - edev->xkb.win_mask = + edev->xkb.win_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, XKB_MOD_NAME_LOGO); - edev->xkb.scroll_mask = + edev->xkb.scroll_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, XKB_LED_NAME_SCROLL); - edev->xkb.num_mask = + edev->xkb.num_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, XKB_LED_NAME_NUM); - edev->xkb.caps_mask = + edev->xkb.caps_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, XKB_MOD_NAME_CAPS); - edev->xkb.altgr_mask = + edev->xkb.altgr_mask = 1 << xkb_map_mod_get_index(edev->xkb.keymap, "ISO_Level3_Shift"); } -static int +static int _device_keysym_translate(xkb_keysym_t keysym, unsigned int modifiers, char *buffer, int bytes) { unsigned long hbytes = 0; @@ -222,13 +222,13 @@ _device_modifiers_update_device(Ecore_Drm_Evdev *edev, Ecore_Drm_Evdev *from) { xkb_mod_mask_t mask; - edev->xkb.depressed = + edev->xkb.depressed = xkb_state_serialize_mods(from->xkb.state, XKB_STATE_DEPRESSED); - edev->xkb.latched = + edev->xkb.latched = xkb_state_serialize_mods(from->xkb.state, XKB_STATE_LATCHED); - edev->xkb.locked = + edev->xkb.locked = xkb_state_serialize_mods(from->xkb.state, XKB_STATE_LOCKED); - edev->xkb.group = + edev->xkb.group = xkb_state_serialize_mods(from->xkb.state, XKB_STATE_EFFECTIVE); mask = (edev->xkb.depressed | edev->xkb.latched); @@ -251,7 +251,7 @@ _device_modifiers_update_device(Ecore_Drm_Evdev *edev, Ecore_Drm_Evdev *from) edev->xkb.modifiers |= ECORE_EVENT_MODIFIER_ALTGR; } -static void +static void _device_modifiers_update(Ecore_Drm_Evdev *edev) { edev->xkb.modifiers = 0; @@ -322,7 +322,7 @@ _device_handle_key(struct libinput_device *device, struct libinput_event_keyboar ((state == LIBINPUT_KEY_STATE_RELEASED) && (key_count != 0))) return; - xkb_state_update_key(edev->xkb.state, code, + xkb_state_update_key(edev->xkb.state, code, (state ? XKB_KEY_DOWN : XKB_KEY_UP)); /* get the keysym for this code */ @@ -340,8 +340,8 @@ _device_handle_key(struct libinput_device *device, struct libinput_event_keyboar snprintf(keyname, sizeof(keyname), "Keycode-%u", code); /* if shift is active, we need to transform the key to lower */ - if (xkb_state_mod_index_is_active(edev->xkb.state, - xkb_map_mod_get_index(edev->xkb.keymap, + if (xkb_state_mod_index_is_active(edev->xkb.state, + xkb_map_mod_get_index(edev->xkb.keymap, XKB_MOD_NAME_SHIFT), XKB_STATE_MODS_EFFECTIVE)) { @@ -350,7 +350,7 @@ _device_handle_key(struct libinput_device *device, struct libinput_event_keyboar } memset(compose_buffer, 0, sizeof(compose_buffer)); - if (_device_keysym_translate(sym, edev->xkb.modifiers, + if (_device_keysym_translate(sym, edev->xkb.modifiers, compose_buffer, sizeof(compose_buffer))) { compose = eina_str_convert("ISO8859-1", "UTF-8", compose_buffer); @@ -398,7 +398,7 @@ err: if (tmp) free(tmp); } -static void +static void _device_pointer_motion(Ecore_Drm_Evdev *edev, struct libinput_event_pointer *event) { Ecore_Drm_Input *input; @@ -455,7 +455,7 @@ _ecore_drm_pointer_motion_post(Ecore_Drm_Evdev *edev) _device_pointer_motion(edev, NULL); } -static void +static void _device_handle_pointer_motion(struct libinput_device *device, struct libinput_event_pointer *event) { Ecore_Drm_Evdev *edev; @@ -476,7 +476,7 @@ _device_handle_pointer_motion(struct libinput_device *device, struct libinput_ev _device_pointer_motion(edev, event); } -static void +static void _device_handle_pointer_motion_absolute(struct libinput_device *device, struct libinput_event_pointer *event) { Ecore_Drm_Evdev *edev; @@ -498,7 +498,7 @@ _device_handle_pointer_motion_absolute(struct libinput_device *device, struct li _device_pointer_motion(edev, event); } -static void +static void _device_handle_button(struct libinput_device *device, struct libinput_event_pointer *event) { Ecore_Drm_Evdev *edev; @@ -557,7 +557,7 @@ _device_handle_button(struct libinput_device *device, struct libinput_event_poin (button == edev->mouse.prev_button)) { edev->mouse.did_double = EINA_TRUE; - if (((current - edev->mouse.last) <= (2 * edev->mouse.threshold)) && + if (((current - edev->mouse.last) <= (2 * edev->mouse.threshold)) && (button == edev->mouse.last_button)) { edev->mouse.did_triple = EINA_TRUE; @@ -600,7 +600,7 @@ _event_scroll_get(struct libinput_event_pointer *pe, enum libinput_pointer_axis return 0.0; } -static void +static void _device_handle_axis(struct libinput_device *device, struct libinput_event_pointer *event) { Ecore_Drm_Evdev *edev; @@ -635,7 +635,7 @@ _device_handle_axis(struct libinput_device *device, struct libinput_event_pointe ev->z = _event_scroll_get(event, axis); axis = LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL; - if (libinput_event_pointer_has_axis(event, axis)) + if (libinput_event_pointer_has_axis(event, axis)) { ev->direction = 1; ev->z = _event_scroll_get(event, axis); @@ -771,7 +771,7 @@ _device_handle_touch_event_send(Ecore_Drm_Evdev *edev, struct libinput_event_tou (button == edev->mouse.prev_button)) { edev->mouse.did_double = EINA_TRUE; - if (((current - edev->mouse.last) <= (2 * edev->mouse.threshold)) && + if (((current - edev->mouse.last) <= (2 * edev->mouse.threshold)) && (button == edev->mouse.last_button)) { edev->mouse.did_triple = EINA_TRUE; @@ -877,7 +877,7 @@ _device_handle_touch_motion(struct libinput_device *device, struct libinput_even _device_handle_touch_motion_send(edev, event); } -static void +static void _device_handle_touch_up(struct libinput_device *device, struct libinput_event_touch *event) { Ecore_Drm_Evdev *edev; @@ -889,13 +889,13 @@ _device_handle_touch_up(struct libinput_device *device, struct libinput_event_to _device_handle_touch_event_send(edev, event, ECORE_EVENT_MOUSE_BUTTON_UP); } -static void +static void _device_handle_touch_frame(struct libinput_device *device EINA_UNUSED, struct libinput_event_touch *event EINA_UNUSED) { /* DBG("Unhandled Touch Frame Event"); */ } -void +void _ecore_drm_evdev_device_destroy(Ecore_Drm_Evdev *edev) { EINA_SAFETY_ON_NULL_RETURN(edev); @@ -913,7 +913,7 @@ _ecore_drm_evdev_device_destroy(Ecore_Drm_Evdev *edev) free(edev); } -Eina_Bool +Eina_Bool _ecore_drm_evdev_event_process(struct libinput_event *event) { struct libinput_device *device; @@ -926,11 +926,11 @@ _ecore_drm_evdev_event_process(struct libinput_event *event) _device_handle_key(device, libinput_event_get_keyboard_event(event)); break; case LIBINPUT_EVENT_POINTER_MOTION: - _device_handle_pointer_motion(device, + _device_handle_pointer_motion(device, libinput_event_get_pointer_event(event)); break; case LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE: - _device_handle_pointer_motion_absolute(device, + _device_handle_pointer_motion_absolute(device, libinput_event_get_pointer_event(event)); break; case LIBINPUT_EVENT_POINTER_BUTTON: @@ -943,7 +943,7 @@ _ecore_drm_evdev_event_process(struct libinput_event *event) _device_handle_touch_down(device, libinput_event_get_touch_event(event)); break; case LIBINPUT_EVENT_TOUCH_MOTION: - _device_handle_touch_motion(device, + _device_handle_touch_motion(device, libinput_event_get_touch_event(event)); break; case LIBINPUT_EVENT_TOUCH_UP: @@ -985,7 +985,7 @@ ecore_drm_inputs_device_axis_size_set(Ecore_Drm_Evdev *edev, int w, int h) EINA_SAFETY_ON_NULL_RETURN(edev); EINA_SAFETY_ON_TRUE_RETURN((w == 0) || (h == 0)); - if ((!libinput_device_config_calibration_has_matrix(edev->device)) || + if ((!libinput_device_config_calibration_has_matrix(edev->device)) || (libinput_device_config_calibration_get_default_matrix(edev->device, cal) != 0)) return; @@ -997,7 +997,7 @@ ecore_drm_inputs_device_axis_size_set(Ecore_Drm_Evdev *edev, int w, int h) EINA_LIST_FREE(devices, device) { vals = eeze_udev_syspath_get_property(device, "WL_CALIBRATION"); - if ((!vals) || + if ((!vals) || (sscanf(vals, "%f %f %f %f %f %f", &cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6)) goto cont; @@ -1005,7 +1005,7 @@ ecore_drm_inputs_device_axis_size_set(Ecore_Drm_Evdev *edev, int w, int h) cal[2] /= w; cal[5] /= h; - status = + status = libinput_device_config_calibration_set_matrix(edev->device, cal); if (status != LIBINPUT_CONFIG_STATUS_SUCCESS) diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c index 7f3d32360e..cf9c9e5ffd 100644 --- a/src/lib/ecore_drm/ecore_drm_fb.c +++ b/src/lib/ecore_drm/ecore_drm_fb.c @@ -30,9 +30,9 @@ /** * @defgroup Ecore_Drm_Fb_Group Frame buffer manipulation - * + * * Functions that deal with frame buffers. - * + * */ static Eina_Bool @@ -148,7 +148,7 @@ create_err: return NULL; } -EAPI void +EAPI void ecore_drm_fb_destroy(Ecore_Drm_Fb *fb) { struct drm_mode_destroy_dumb darg; diff --git a/src/lib/ecore_drm/ecore_drm_inputs.c b/src/lib/ecore_drm/ecore_drm_inputs.c index d0896eced3..c01126ab39 100644 --- a/src/lib/ecore_drm/ecore_drm_inputs.c +++ b/src/lib/ecore_drm/ecore_drm_inputs.c @@ -32,7 +32,7 @@ EAPI int ECORE_DRM_EVENT_SEAT_ADD = -1; static Eina_Hash *_fd_hash = NULL; /* local functions */ -static int +static int _cb_open_restricted(const char *path, int flags, void *data) { Ecore_Drm_Input *input; @@ -49,7 +49,7 @@ _cb_open_restricted(const char *path, int flags, void *data) return fd; } -static void +static void _cb_close_restricted(int fd, void *data) { Ecore_Drm_Input *input; @@ -108,7 +108,7 @@ _seat_get(Ecore_Drm_Input *input, const char *seat) return _seat_create(input, seat); } -static void +static void _device_added(Ecore_Drm_Input *input, struct libinput_device *device) { struct libinput_seat *libinput_seat; @@ -139,7 +139,7 @@ _device_added(Ecore_Drm_Input *input, struct libinput_device *device) seat->devices = eina_list_append(seat->devices, edev); } -static void +static void _device_removed(Ecore_Drm_Input *input EINA_UNUSED, struct libinput_device *device) { Ecore_Drm_Evdev *edev; @@ -161,7 +161,7 @@ _device_removed(Ecore_Drm_Input *input EINA_UNUSED, struct libinput_device *devi _ecore_drm_evdev_device_destroy(edev); } -static int +static int _udev_event_process(struct libinput_event *event) { struct libinput *libinput; @@ -188,14 +188,14 @@ _udev_event_process(struct libinput_event *event) return ret; } -static void +static void _input_event_process(struct libinput_event *event) { if (_udev_event_process(event)) return; if (_ecore_drm_evdev_event_process(event)) return; } -static void +static void _input_events_process(Ecore_Drm_Input *input) { struct libinput_event *event; @@ -207,7 +207,7 @@ _input_events_process(Ecore_Drm_Input *input) } } -static Eina_Bool +static Eina_Bool _cb_input_dispatch(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED) { Ecore_Drm_Input *input; @@ -223,14 +223,14 @@ _cb_input_dispatch(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED) return EINA_TRUE; } -const struct libinput_interface _input_interface = +const struct libinput_interface _input_interface = { _cb_open_restricted, _cb_close_restricted, }; /* public functions */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_inputs_create(Ecore_Drm_Device *dev) { Ecore_Drm_Input *input; @@ -246,7 +246,7 @@ ecore_drm_inputs_create(Ecore_Drm_Device *dev) input->dev = dev; /* try to create libinput context */ - input->libinput = + input->libinput = libinput_udev_create_context(&_input_interface, input, eeze_udev_get()); if (!input->libinput) { @@ -285,7 +285,7 @@ err: return EINA_FALSE; } -EAPI void +EAPI void ecore_drm_inputs_destroy(Ecore_Drm_Device *dev) { Ecore_Drm_Input *input; @@ -313,7 +313,7 @@ ecore_drm_inputs_destroy(Ecore_Drm_Device *dev) } } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_inputs_enable(Ecore_Drm_Input *input) { EINA_SAFETY_ON_NULL_RETURN_VAL(input, EINA_FALSE); @@ -323,14 +323,14 @@ ecore_drm_inputs_enable(Ecore_Drm_Input *input) if (!input->hdlr) { - input->hdlr = - ecore_main_fd_handler_add(input->fd, ECORE_FD_READ, + input->hdlr = + ecore_main_fd_handler_add(input->fd, ECORE_FD_READ, _cb_input_dispatch, input, NULL, NULL); } if (input->suspended) { - if (libinput_resume(input->libinput) != 0) + if (libinput_resume(input->libinput) != 0) goto err; input->suspended = EINA_FALSE; @@ -351,7 +351,7 @@ err: return EINA_FALSE; } -EAPI void +EAPI void ecore_drm_inputs_disable(Ecore_Drm_Input *input) { EINA_SAFETY_ON_NULL_RETURN(input); diff --git a/src/lib/ecore_drm/ecore_drm_launcher.c b/src/lib/ecore_drm/ecore_drm_launcher.c index 7c70d240cb..256eacc892 100644 --- a/src/lib/ecore_drm/ecore_drm_launcher.c +++ b/src/lib/ecore_drm/ecore_drm_launcher.c @@ -30,7 +30,7 @@ static Eina_Bool logind = EINA_FALSE; -static Eina_Bool +static Eina_Bool _ecore_drm_launcher_cb_vt_switch(void *data, int type EINA_UNUSED, void *event) { Ecore_Drm_Device *dev; @@ -81,7 +81,7 @@ _ecore_drm_launcher_device_flags_set(int fd, int flags) return fd; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_launcher_connect(Ecore_Drm_Device *dev) { EINA_SAFETY_ON_NULL_RETURN_VAL(dev, EINA_FALSE); @@ -106,14 +106,14 @@ ecore_drm_launcher_connect(Ecore_Drm_Device *dev) } } - dev->tty.switch_hdlr = - ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, + dev->tty.switch_hdlr = + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _ecore_drm_launcher_cb_vt_switch, dev); return EINA_TRUE; } -EAPI void +EAPI void ecore_drm_launcher_disconnect(Ecore_Drm_Device *dev) { EINA_SAFETY_ON_NULL_RETURN(dev); diff --git a/src/lib/ecore_drm/ecore_drm_logind.c b/src/lib/ecore_drm/ecore_drm_logind.c index 4266239a84..07db06049b 100644 --- a/src/lib/ecore_drm/ecore_drm_logind.c +++ b/src/lib/ecore_drm/ecore_drm_logind.c @@ -102,7 +102,7 @@ _ecore_drm_logind_vt_get(Ecore_Drm_Device *dev) } #endif -static Eina_Bool +static Eina_Bool _ecore_drm_logind_vt_setup(Ecore_Drm_Device *dev) { char buff[64]; @@ -116,7 +116,7 @@ _ecore_drm_logind_vt_setup(Ecore_Drm_Device *dev) return EINA_TRUE; } -static Eina_Bool +static Eina_Bool _ecore_drm_logind_cb_vt_signal(void *data, int type EINA_UNUSED, void *event) { Ecore_Drm_Device *dev; @@ -146,7 +146,7 @@ _ecore_drm_logind_cb_vt_signal(void *data, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_RENEW; } -static Eina_Bool +static Eina_Bool _ecore_drm_logind_cb_activate(void *data, int type EINA_UNUSED, void *event) { Ecore_Drm_Event_Activate *ev; @@ -245,15 +245,15 @@ _ecore_drm_logind_connect(Ecore_Drm_Device *dev) /* setup handler for vt signals */ if (!dev->tty.event_hdlr) { - dev->tty.event_hdlr = - ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, + dev->tty.event_hdlr = + ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, _ecore_drm_logind_cb_vt_signal, dev); } if (!active_hdlr) { - active_hdlr = - ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE, + active_hdlr = + ecore_event_handler_add(ECORE_DRM_EVENT_ACTIVATE, _ecore_drm_logind_cb_activate, dev); } @@ -266,7 +266,7 @@ take_err: return EINA_FALSE; } -void +void _ecore_drm_logind_disconnect(Ecore_Drm_Device *dev) { if (active_hdlr) ecore_event_handler_del(active_hdlr); @@ -277,7 +277,7 @@ _ecore_drm_logind_disconnect(Ecore_Drm_Device *dev) _ecore_drm_dbus_shutdown(); } -void +void _ecore_drm_logind_restore(Ecore_Drm_Device *dev) { _ecore_drm_tty_restore(dev); @@ -291,7 +291,7 @@ _ecore_drm_logind_device_open(const char *device, Ecore_Drm_Open_Cb callback, vo if (stat(device, &st) < 0) return EINA_FALSE; if (!S_ISCHR(st.st_mode)) return EINA_FALSE; - if (_ecore_drm_dbus_device_take(major(st.st_rdev), minor(st.st_rdev), + if (_ecore_drm_dbus_device_take(major(st.st_rdev), minor(st.st_rdev), callback, data) < 0) return EINA_FALSE; diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index 5fbc809053..7cad23557d 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -37,7 +37,7 @@ #define EDID_OFFSET_PNPID 0x08 #define EDID_OFFSET_SERIAL 0x0c -static const char *conn_types[] = +static const char *conn_types[] = { "None", "VGA", "DVI-I", "DVI-D", "DVI-A", "Composite", "S-Video", "LVDS", "Component", "DIN", @@ -111,7 +111,7 @@ _ecore_drm_output_property_get(int fd, drmModeConnectorPtr conn, const char *nam return NULL; } -static void +static void _ecore_drm_output_edid_parse_string(const uint8_t *data, char text[]) { int i = 0, rep = 0; @@ -139,7 +139,7 @@ _ecore_drm_output_edid_parse_string(const uint8_t *data, char text[]) if (rep > 4) text[0] = '\0'; } -static int +static int _ecore_drm_output_edid_parse(Ecore_Drm_Output *output, const uint8_t *data, size_t len) { int i = 0; @@ -149,8 +149,8 @@ _ecore_drm_output_edid_parse(Ecore_Drm_Output *output, const uint8_t *data, size if ((data[0] != 0x00) || (data[1] != 0xff)) return -1; output->edid.pnp[0] = 'A' + ((data[EDID_OFFSET_PNPID + 0] & 0x7c) / 4) - 1; - output->edid.pnp[1] = - 'A' + ((data[EDID_OFFSET_PNPID + 0] & 0x3) * 8) + + output->edid.pnp[1] = + 'A' + ((data[EDID_OFFSET_PNPID + 0] & 0x3) * 8) + ((data[EDID_OFFSET_PNPID + 1] & 0xe0) / 32) - 1; output->edid.pnp[2] = 'A' + (data[EDID_OFFSET_PNPID + 1] & 0x1f) - 1; output->edid.pnp[3] = '\0'; @@ -178,7 +178,7 @@ _ecore_drm_output_edid_parse(Ecore_Drm_Output *output, const uint8_t *data, size return 0; } -static void +static void _ecore_drm_output_edid_find(Ecore_Drm_Output *output, drmModeConnector *conn) { drmModePropertyBlobPtr blob = NULL; @@ -189,10 +189,10 @@ _ecore_drm_output_edid_find(Ecore_Drm_Output *output, drmModeConnector *conn) { if (!(prop = drmModeGetProperty(output->dev->drm.fd, conn->props[i]))) continue; - if ((prop->flags & DRM_MODE_PROP_BLOB) && + if ((prop->flags & DRM_MODE_PROP_BLOB) && (!strcmp(prop->name, "EDID"))) { - blob = drmModeGetPropertyBlob(output->dev->drm.fd, + blob = drmModeGetPropertyBlob(output->dev->drm.fd, conn->prop_values[i]); } drmModeFreeProperty(prop); @@ -217,7 +217,7 @@ _ecore_drm_output_edid_find(Ecore_Drm_Output *output, drmModeConnector *conn) drmModeFreePropertyBlob(blob); } -static void +static void _ecore_drm_output_software_render(Ecore_Drm_Output *output) { if (!output) return; @@ -637,7 +637,7 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto output->current_mode->flags |= DRM_MODE_TYPE_DEFAULT; /* try to init backlight */ - output->backlight = + output->backlight = _ecore_drm_output_backlight_init(output, conn->connector_type); /* parse edid */ @@ -692,7 +692,7 @@ err: return NULL; } -static void +static void _ecore_drm_output_free(Ecore_Drm_Output *output) { Ecore_Drm_Output_Mode *mode; @@ -708,7 +708,7 @@ _ecore_drm_output_free(Ecore_Drm_Output *output) } /* delete the backlight struct */ - if (output->backlight) + if (output->backlight) _ecore_drm_output_backlight_shutdown(output->backlight); /* turn off hardware cursor */ @@ -743,7 +743,7 @@ _ecore_drm_output_free(Ecore_Drm_Output *output) free(output); } -void +void _ecore_drm_output_frame_finish(Ecore_Drm_Output *output) { if (!output) return; @@ -753,7 +753,7 @@ _ecore_drm_output_frame_finish(Ecore_Drm_Output *output) output->repaint_scheduled = EINA_FALSE; } -void +void _ecore_drm_output_fb_release(Ecore_Drm_Output *output, Ecore_Drm_Fb *fb) { if ((!output) || (!fb)) return; @@ -763,7 +763,7 @@ _ecore_drm_output_fb_release(Ecore_Drm_Output *output, Ecore_Drm_Fb *fb) ecore_drm_fb_destroy(fb); } -void +void _ecore_drm_output_repaint_start(Ecore_Drm_Output *output) { unsigned int fb; @@ -780,7 +780,7 @@ _ecore_drm_output_repaint_start(Ecore_Drm_Output *output) } fb = output->dev->current->id; - if (drmModePageFlip(output->dev->drm.fd, output->crtc_id, fb, + if (drmModePageFlip(output->dev->drm.fd, output->crtc_id, fb, DRM_MODE_PAGE_FLIP_EVENT, output) < 0) { ERR("Could not schedule output page flip event"); @@ -920,12 +920,12 @@ _ecore_drm_output_render_disable(Ecore_Drm_Output *output) /** * @defgroup Ecore_Drm_Output_Group Ecore DRM Output - * + * * Functions to manage DRM outputs. - * + * */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_outputs_create(Ecore_Drm_Device *dev) { Eina_Bool ret = EINA_TRUE; @@ -998,13 +998,13 @@ next: return ret; } -EAPI void +EAPI void ecore_drm_output_free(Ecore_Drm_Output *output) { _ecore_drm_output_free(output); } -EAPI void +EAPI void ecore_drm_output_cursor_size_set(Ecore_Drm_Output *output, int handle, int w, int h) { EINA_SAFETY_ON_NULL_RETURN(output); @@ -1012,7 +1012,7 @@ ecore_drm_output_cursor_size_set(Ecore_Drm_Output *output, int handle, int w, in drmModeSetCursor(output->dev->drm.fd, output->crtc_id, handle, w, h); } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_output_enable(Ecore_Drm_Output *output) { EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); @@ -1036,7 +1036,7 @@ ecore_drm_output_disable(Ecore_Drm_Output *output) _ecore_drm_output_event_send(output, EINA_FALSE); } -EAPI void +EAPI void ecore_drm_output_fb_release(Ecore_Drm_Output *output, Ecore_Drm_Fb *fb) { EINA_SAFETY_ON_NULL_RETURN(output); @@ -1044,7 +1044,7 @@ ecore_drm_output_fb_release(Ecore_Drm_Output *output, Ecore_Drm_Fb *fb) _ecore_drm_output_fb_release(output, fb); } -EAPI void +EAPI void ecore_drm_output_repaint(Ecore_Drm_Output *output) { Ecore_Drm_Device *dev; @@ -1070,7 +1070,7 @@ ecore_drm_output_repaint(Ecore_Drm_Output *output) output->need_repaint = EINA_FALSE; - if ((!dev->current) || + if ((!dev->current) || (dev->current->stride != dev->next->stride)) { Ecore_Drm_Output_Mode *mode; @@ -1099,13 +1099,13 @@ ecore_drm_output_repaint(Ecore_Drm_Output *output) EINA_LIST_FOREACH(dev->sprites, l, sprite) { unsigned int flags = 0, id = 0; - drmVBlank vbl = + drmVBlank vbl = { .request.type = (DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT), .request.sequence = 1, }; - if (((!sprite->current_fb) && (!sprite->next_fb)) || + if (((!sprite->current_fb) && (!sprite->next_fb)) || (!ecore_drm_sprites_crtc_supported(output, sprite->crtcs))) continue; @@ -1132,7 +1132,7 @@ err: } } -EAPI void +EAPI void ecore_drm_output_size_get(Ecore_Drm_Device *dev, int output, int *w, int *h) { drmModeFB *fb; @@ -1147,7 +1147,7 @@ ecore_drm_output_size_get(Ecore_Drm_Device *dev, int output, int *w, int *h) drmModeFreeFB(fb); } -EAPI void +EAPI void ecore_drm_outputs_geometry_get(Ecore_Drm_Device *dev, int *x, int *y, int *w, int *h) { Ecore_Drm_Output *output; diff --git a/src/lib/ecore_drm/ecore_drm_private.h b/src/lib/ecore_drm/ecore_drm_private.h index 0be6a61ef8..90699559ee 100644 --- a/src/lib/ecore_drm/ecore_drm_private.h +++ b/src/lib/ecore_drm/ecore_drm_private.h @@ -173,7 +173,7 @@ struct _Ecore_Drm_Output char serial[13]; } edid; - Ecore_Drm_Backlight *backlight; + Ecore_Drm_Backlight *backlight; Ecore_Drm_Fb *current, *next; Eina_Bool primary : 1; @@ -237,7 +237,7 @@ struct _Ecore_Drm_Evdev /* } pt[EVDEV_MAX_SLOTS]; */ /* } abs; */ - struct + struct { int ix, iy; int minx, miny, maxw, maxh; @@ -249,7 +249,7 @@ struct _Ecore_Drm_Evdev uint32_t prev_button, last_button; } mouse; - struct + struct { struct xkb_keymap *keymap; struct xkb_state *state; @@ -282,7 +282,7 @@ struct _Ecore_Drm_Sprite unsigned int crtcs; unsigned int plane_id; - struct + struct { int x, y; unsigned int w, h; diff --git a/src/lib/ecore_drm/ecore_drm_sprites.c b/src/lib/ecore_drm/ecore_drm_sprites.c index bcc6669765..523d787c4f 100644 --- a/src/lib/ecore_drm/ecore_drm_sprites.c +++ b/src/lib/ecore_drm/ecore_drm_sprites.c @@ -30,14 +30,14 @@ /** * @defgroup Ecore_Drm_Sprites_Group Ecore DRM Sprites - * + * * Functions for managing DRM sprites. - * + * */ /* TODO: DOXY !! */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_sprites_create(Ecore_Drm_Device *dev) { drmModePlaneRes *res; @@ -58,8 +58,8 @@ ecore_drm_sprites_create(Ecore_Drm_Device *dev) continue; /* allocate space for sprite */ - if (!(sprite = - malloc(sizeof(Ecore_Drm_Sprite) + + if (!(sprite = + malloc(sizeof(Ecore_Drm_Sprite) + ((sizeof(unsigned int)) * p->count_formats)))) { drmModeFreePlane(p); @@ -71,7 +71,7 @@ ecore_drm_sprites_create(Ecore_Drm_Device *dev) sprite->crtcs = p->possible_crtcs; sprite->plane_id = p->plane_id; sprite->num_formats = p->count_formats; - memcpy(sprite->formats, p->formats, + memcpy(sprite->formats, p->formats, p->count_formats * sizeof(p->formats[0])); drmModeFreePlane(p); @@ -84,7 +84,7 @@ ecore_drm_sprites_create(Ecore_Drm_Device *dev) return EINA_TRUE; } -EAPI void +EAPI void ecore_drm_sprites_destroy(Ecore_Drm_Device *dev) { Ecore_Drm_Sprite *sprite; @@ -106,28 +106,28 @@ ecore_drm_sprites_destroy(Ecore_Drm_Device *dev) } } -EAPI void +EAPI void ecore_drm_sprites_fb_set(Ecore_Drm_Sprite *sprite, int fb_id, int flags) { EINA_SAFETY_ON_TRUE_RETURN((!sprite) || (!sprite->output)); if (fb_id) { - drmModeSetPlane(sprite->drm_fd, sprite->plane_id, - sprite->output->crtc_id, fb_id, flags, - sprite->dest.x, sprite->dest.y, sprite->dest.w, + drmModeSetPlane(sprite->drm_fd, sprite->plane_id, + sprite->output->crtc_id, fb_id, flags, + sprite->dest.x, sprite->dest.y, sprite->dest.w, sprite->dest.h, sprite->src.x, sprite->src.y, sprite->src.w, sprite->src.h); } else { - drmModeSetPlane(sprite->drm_fd, sprite->plane_id, - sprite->output->crtc_id, 0, 0, + drmModeSetPlane(sprite->drm_fd, sprite->plane_id, + sprite->output->crtc_id, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_sprites_crtc_supported(Ecore_Drm_Output *output, unsigned int supported) { Ecore_Drm_Device *dev; diff --git a/src/lib/ecore_drm/ecore_drm_tty.c b/src/lib/ecore_drm/ecore_drm_tty.c index b950ba1de7..822ee3bbbe 100644 --- a/src/lib/ecore_drm/ecore_drm_tty.c +++ b/src/lib/ecore_drm/ecore_drm_tty.c @@ -34,7 +34,7 @@ static int kbd_mode = 0; -static Eina_Bool +static Eina_Bool _ecore_drm_tty_cb_vt_signal(void *data, int type EINA_UNUSED, void *event) { Ecore_Drm_Device *dev; @@ -77,14 +77,14 @@ _ecore_drm_tty_switch(Ecore_Drm_Device *dev, int activate_vt) return ioctl(dev->tty.fd, VT_ACTIVATE, activate_vt) >= 0; } -static Eina_Bool +static Eina_Bool _ecore_drm_tty_setup(Ecore_Drm_Device *dev) { struct stat st; int kmode; struct vt_mode vtmode = { 0, 0, SIGUSR1, SIGUSR2, 0 }; - if ((fstat(dev->tty.fd, &st) == -1) || + if ((fstat(dev->tty.fd, &st) == -1) || (major(st.st_rdev) != TTY_MAJOR) || (minor(st.st_rdev) <= 0) || (minor(st.st_rdev) >= 64)) { @@ -121,7 +121,7 @@ _ecore_drm_tty_setup(Ecore_Drm_Device *dev) else if (dev->tty.kbd_mode == K_OFF) dev->tty.kbd_mode = K_UNICODE; - if (ioctl(dev->tty.fd, KDSKBMUTE, 1) && + if (ioctl(dev->tty.fd, KDSKBMUTE, 1) && ioctl(dev->tty.fd, KDSKBMODE, K_OFF)) { ERR("Could not set K_OFF keyboard mode: %m"); @@ -156,11 +156,11 @@ err_kmode: /** * @defgroup Ecore_Drm_Tty_Group Tty manipulation functions - * + * * Functions that deal with opening, closing, and otherwise using a tty */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_tty_open(Ecore_Drm_Device *dev, const char *name) { char tty[32] = ""; @@ -219,8 +219,8 @@ ecore_drm_tty_open(Ecore_Drm_Device *dev, const char *name) return EINA_FALSE; } - dev->tty.event_hdlr = - ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, + dev->tty.event_hdlr = + ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, _ecore_drm_tty_cb_vt_signal, dev); /* set current tty into env */ @@ -240,7 +240,7 @@ _ecore_drm_tty_restore(Ecore_Drm_Device *dev) if (ioctl(fd, KDSETMODE, KD_TEXT)) ERR("Could not set KD_TEXT mode on tty: %m\n"); - if (ioctl(dev->tty.fd, KDSKBMUTE, 0) && + if (ioctl(dev->tty.fd, KDSKBMUTE, 0) && ioctl(dev->tty.fd, KDSKBMODE, kbd_mode)) { ERR("Could not restore keyboard mode: %m"); @@ -253,7 +253,7 @@ _ecore_drm_tty_restore(Ecore_Drm_Device *dev) ERR("Could not reset VT handling\n"); } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_tty_close(Ecore_Drm_Device *dev) { /* check for valid device */ @@ -276,7 +276,7 @@ ecore_drm_tty_close(Ecore_Drm_Device *dev) return EINA_TRUE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_tty_release(Ecore_Drm_Device *dev) { /* check for valid device */ @@ -284,7 +284,7 @@ ecore_drm_tty_release(Ecore_Drm_Device *dev) (dev->tty.fd < 0), EINA_FALSE); /* send ioctl for vt release */ - if (ioctl(dev->tty.fd, VT_RELDISP, 1) < 0) + if (ioctl(dev->tty.fd, VT_RELDISP, 1) < 0) { ERR("Could not release VT: %m"); return EINA_FALSE; @@ -293,7 +293,7 @@ ecore_drm_tty_release(Ecore_Drm_Device *dev) return EINA_TRUE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_drm_tty_acquire(Ecore_Drm_Device *dev) { /* check for valid device */ @@ -301,7 +301,7 @@ ecore_drm_tty_acquire(Ecore_Drm_Device *dev) (dev->tty.fd < 0), EINA_FALSE); /* send ioctl for vt acquire */ - if (ioctl(dev->tty.fd, VT_RELDISP, VT_ACKACQ) < 0) + if (ioctl(dev->tty.fd, VT_RELDISP, VT_ACKACQ) < 0) { ERR("Could not acquire VT: %m"); return EINA_FALSE; @@ -310,7 +310,7 @@ ecore_drm_tty_acquire(Ecore_Drm_Device *dev) return EINA_TRUE; } -EAPI int +EAPI int ecore_drm_tty_get(Ecore_Drm_Device *dev) { /* check for valid device */ diff --git a/src/lib/ecore_evas/Ecore_Evas_Types.h b/src/lib/ecore_evas/Ecore_Evas_Types.h index fae0b0e16f..aa93c97164 100644 --- a/src/lib/ecore_evas/Ecore_Evas_Types.h +++ b/src/lib/ecore_evas/Ecore_Evas_Types.h @@ -12,7 +12,7 @@ typedef unsigned int Ecore_X_Window; typedef unsigned int Ecore_X_Pixmap; typedef unsigned int Ecore_X_Atom; -typedef struct _Ecore_X_Icon +typedef struct _Ecore_X_Icon { unsigned int width, height; unsigned int *data; diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c index 390ddd4a99..2f3f2ff72b 100644 --- a/src/lib/ecore_evas/ecore_evas_buffer.c +++ b/src/lib/ecore_evas/ecore_evas_buffer.c @@ -239,7 +239,7 @@ _ecore_evas_buffer_coord_translate(Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y) fw = ee->w; fh = ee->h; ww = ee->w; hh = ee->h; } - + if ((fx == 0) && (fy == 0) && (fw == ww) && (fh == hh)) { *x = (ee->w * (*x - xx)) / fw; @@ -262,12 +262,12 @@ _ecore_evas_buffer_coord_translate(Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y) static void _ecore_evas_buffer_transfer_modifiers_locks(Evas *e, Evas *e2) { - const char *mods[] = + const char *mods[] = { "Shift", "Control", "Alt", "Meta", "Hyper", "Super", NULL }; - const char *locks[] = + const char *locks[] = { "Scroll_Lock", "Num_Lock", "Caps_Lock", NULL }; int i; - + for (i = 0; mods[i]; i++) { if (evas_key_modifier_is_set(evas_key_modifier_get(e), mods[i])) @@ -532,7 +532,7 @@ _ecore_evas_buffer_alpha_set(Ecore_Evas *ee, int alpha) else { Evas_Engine_Info_Buffer *einfo; - + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); if (einfo) { @@ -639,13 +639,13 @@ _ecore_evas_buffer_pointer_warp(const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y ev->root.y = y; { - const char *mods[] = + const char *mods[] = { "Shift", "Control", "Alt", "Super", NULL }; int modifiers[] = { ECORE_EVENT_MODIFIER_SHIFT, ECORE_EVENT_MODIFIER_CTRL, ECORE_EVENT_MODIFIER_ALT, ECORE_EVENT_MODIFIER_WIN, 0 }; int i; - + for (i = 0; mods[i]; i++) if (evas_key_modifier_is_set(evas_key_modifier_get(ee->evas), mods[i])) ev->modifiers |= modifiers[i]; diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c index 77a33f7094..86e939f765 100644 --- a/src/lib/ecore_evas/ecore_evas_ews.c +++ b/src/lib/ecore_evas/ecore_evas_ews.c @@ -644,7 +644,7 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func = _ecore_evas_ews_transparent_set, NULL, // profiles_set NULL, // profile_set - + NULL, NULL, NULL, diff --git a/src/lib/ecore_evas/ecore_evas_extn.h b/src/lib/ecore_evas/ecore_evas_extn.h index 67d9dffb76..dab82f69d9 100644 --- a/src/lib/ecore_evas/ecore_evas_extn.h +++ b/src/lib/ecore_evas/ecore_evas_extn.h @@ -3,7 +3,7 @@ typedef struct _Ecore_Evas_Interface_Extn Ecore_Evas_Interface_Extn; -struct _Ecore_Evas_Interface_Extn +struct _Ecore_Evas_Interface_Extn { Ecore_Evas_Interface base; diff --git a/src/lib/ecore_evas/ecore_evas_wayland.h b/src/lib/ecore_evas/ecore_evas_wayland.h index 2d6faa2ea8..b36d93cff0 100644 --- a/src/lib/ecore_evas/ecore_evas_wayland.h +++ b/src/lib/ecore_evas/ecore_evas_wayland.h @@ -3,7 +3,7 @@ typedef struct _Ecore_Evas_Interface_Wayland Ecore_Evas_Interface_Wayland; -struct _Ecore_Evas_Interface_Wayland +struct _Ecore_Evas_Interface_Wayland { Ecore_Evas_Interface base; diff --git a/src/lib/ecore_fb/ecore_fb.c b/src/lib/ecore_fb/ecore_fb.c index 0d90242d0b..c3f1014129 100644 --- a/src/lib/ecore_fb/ecore_fb.c +++ b/src/lib/ecore_fb/ecore_fb.c @@ -57,7 +57,7 @@ ecore_fb_init(const char *name) { oldhand = signal(SIGINT, nosigint); } - + _ecore_fb_size_get(name, &_ecore_fb_console_w, &_ecore_fb_console_h); return _ecore_fb_init_count; diff --git a/src/lib/ecore_fb/ecore_fb_li.c b/src/lib/ecore_fb/ecore_fb_li.c index 9e8025df77..bc253522b7 100644 --- a/src/lib/ecore_fb/ecore_fb_li.c +++ b/src/lib/ecore_fb/ecore_fb_li.c @@ -47,7 +47,7 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie { int offset = 0; const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 7]; - + /* check the key table */ if (iev->value) { @@ -102,11 +102,11 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie const char *key = _ecore_fb_li_kbd_syms[(iev->code * 7) + offset]; const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + offset]; - + if (dev->keyboard.ctrl) { const char *ts = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + 3]; - + if (ts) compose = ts; } diff --git a/src/lib/ecore_fb/ecore_fb_private.h b/src/lib/ecore_fb/ecore_fb_private.h index e48c7b09f8..b9bdd6d70a 100644 --- a/src/lib/ecore_fb/ecore_fb_private.h +++ b/src/lib/ecore_fb/ecore_fb_private.h @@ -18,7 +18,7 @@ #include #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) - #define kernel_ulong_t unsigned long + #define kernel_ulong_t unsigned long #define BITS_PER_LONG 32 #include #undef kernel_ulong_t @@ -53,7 +53,7 @@ struct _Ecore_Fb_Input_Device int fd; Ecore_Fd_Handler *handler; int listen; - struct + struct { Ecore_Fb_Input_Device_Cap cap; char *name; @@ -105,7 +105,7 @@ void ecore_fb_vt_shutdown(void); #ifndef TS_GET_CAL #define TS_GET_CAL 0x8014660a #endif - + #undef EAPI #define EAPI diff --git a/src/lib/ecore_file/Ecore_File.h b/src/lib/ecore_file/Ecore_File.h index 37f3bd8a0c..8c17daa58a 100644 --- a/src/lib/ecore_file/Ecore_File.h +++ b/src/lib/ecore_file/Ecore_File.h @@ -92,7 +92,7 @@ typedef void (*Ecore_File_Download_Completion_Cb)(void *data, const char *file, /** * @typedef _Ecore_File_Progress_Return - * What to do with the download as a return from the + * What to do with the download as a return from the * Ecore_File_Download_Progress_Cb function, if provided. */ typedef enum _Ecore_File_Progress_Return @@ -518,7 +518,7 @@ EAPI int ecore_file_dir_is_empty (const char *dir); * This function monitors @p path. If @p path is @c NULL, or is an * empty string, or none of the notify methods (Inotify, Windows * notification or polling) is available, or if @p path does not exist - * the function returns @c NULL. Otherwise, it returns a newly + * the function returns @c NULL. Otherwise, it returns a newly * allocated Ecore_File_Monitor object and the monitoring begins. * When one of the Ecore_File_Event event is notified, @p func is called * and @p data is passed to @p func.Call ecore_file_monitor_del() to diff --git a/src/lib/ecore_file/ecore_file_monitor_poll.c b/src/lib/ecore_file/ecore_file_monitor_poll.c index d2034dc7ab..84e82d4694 100644 --- a/src/lib/ecore_file/ecore_file_monitor_poll.c +++ b/src/lib/ecore_file/ecore_file_monitor_poll.c @@ -119,8 +119,8 @@ ecore_file_monitor_backend_add(const char *path, f->name = file; f->mtime = ecore_file_mod_time(buf); f->is_dir = ecore_file_is_dir(buf); - em->files = - (Ecore_File *) eina_inlist_append(EINA_INLIST_GET(em->files), + em->files = + (Ecore_File *) eina_inlist_append(EINA_INLIST_GET(em->files), EINA_INLIST_GET(f)); } } diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c index 270004e81b..5ade47002b 100644 --- a/src/lib/ecore_imf/ecore_imf_context.c +++ b/src/lib/ecore_imf/ecore_imf_context.c @@ -906,7 +906,7 @@ ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx) } show_req_ctx = ctx; - if ((ctx->input_panel_enabled) || + if ((ctx->input_panel_enabled) || (getenv("ECORE_IMF_INPUT_PANEL_ENABLED"))) { if (ctx->klass && ctx->klass->show) ctx->klass->show(ctx); @@ -923,7 +923,7 @@ ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx) return; } - if ((ctx->input_panel_enabled) || + if ((ctx->input_panel_enabled) || (getenv("ECORE_IMF_INPUT_PANEL_ENABLED"))) { if (ctx->klass && ctx->klass->hide) ctx->klass->hide(ctx); diff --git a/src/lib/ecore_input/Ecore_Input.h b/src/lib/ecore_input/Ecore_Input.h index 0e28909729..1c8763818b 100644 --- a/src/lib/ecore_input/Ecore_Input.h +++ b/src/lib/ecore_input/Ecore_Input.h @@ -130,7 +130,7 @@ extern "C" { * An enum of Compose states. */ typedef enum _Ecore_Compose_State - { + { ECORE_COMPOSE_NONE, ECORE_COMPOSE_MIDDLE, ECORE_COMPOSE_DONE @@ -202,10 +202,10 @@ extern "C" { Ecore_Window window; /**< The main window where event happened */ Ecore_Window root_window; /**< The root window where event happened */ Ecore_Window event_window; /**< The child window where event happened */ - + unsigned int timestamp; /**< Time when the event occurred */ unsigned int modifiers; /**< The combination of modifiers key (SHIFT,CTRL,ALT,..)*/ - + int same_screen; /**< same screen flag */ unsigned int keycode; /**< Key scan code numeric value @since 1.10 */ @@ -231,14 +231,14 @@ extern "C" { unsigned int double_click; /**< Double click event */ unsigned int triple_click; /**< Triple click event */ int same_screen; /**< Same screen flag */ - + int x; /**< x coordinate relative to window where event happened */ int y; /**< y coordinate relative to window where event happened */ struct { int x; int y; } root; /**< Coordinates relative to root window */ - + struct { int device; /**< 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */ double radius, radius_x, radius_y; /**< radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */ @@ -262,14 +262,14 @@ extern "C" { Ecore_Window window; /**< The main window where event happened */ Ecore_Window root_window; /**< The root window where event happened */ Ecore_Window event_window; /**< The child window where event happened */ - + unsigned int timestamp; /**< Time when the event occurred */ unsigned int modifiers; /**< The combination of modifiers key (SHIFT,CTRL,ALT,..)*/ - + int same_screen; /**< Same screen flag */ int direction; /**< Orientation of the wheel (horizontal/vertical) */ int z; /**< Value of the wheel event (+1/-1) */ - + int x; /**< x coordinate relative to window where event happened */ int y; /**< y coordinate relative to window where event happened */ struct { @@ -289,19 +289,19 @@ extern "C" { Ecore_Window window; /**< The main window where event happened */ Ecore_Window root_window; /**< The root window where event happened */ Ecore_Window event_window; /**< The child window where event happened */ - + unsigned int timestamp; /**< Time when the event occurred */ unsigned int modifiers; /**< The combination of modifiers key (SHIFT,CTRL,ALT,..)*/ - + int same_screen; /**< Same screen flag */ - + int x; /**< x coordinate relative to window where event happened */ int y; /**< y coordinate relative to window where event happened */ struct { int x; int y; } root; /**< Coordinates relative to root window */ - + struct { int device; /**< 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */ double radius, radius_x, radius_y; /**< radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */ @@ -367,10 +367,10 @@ extern "C" { { Ecore_Window window; /**< The main window where event happened */ Ecore_Window event_window; /**< The child window where event happened */ - + unsigned int timestamp; /**< Time when the event occurred */ unsigned int modifiers; /**< The combination of modifiers key (SHIFT,CTRL,ALT,..)*/ - + int x; /**< x coordinate relative to window where event happened */ int y; /**< y coordinate relative to window where event happened */ diff --git a/src/lib/ecore_input/ecore_input_compose.c b/src/lib/ecore_input/ecore_input_compose.c index 13b90bca09..1c52f550dd 100644 --- a/src/lib/ecore_input/ecore_input_compose.c +++ b/src/lib/ecore_input/ecore_input_compose.c @@ -52,7 +52,7 @@ ecore_compose_get(const Eina_List *seq, char **seqstr_ret) for (p = comp; (p < pend) && s;) { int len, jump = -1, bsize = -1; - + len = strlen(p); psz = (unsigned char *)(p + len + 1); // decode jump amount to next entry diff --git a/src/lib/ecore_input/ecore_input_private.h b/src/lib/ecore_input/ecore_input_private.h index 4d085a19b4..8f53892ac7 100644 --- a/src/lib/ecore_input/ecore_input_private.h +++ b/src/lib/ecore_input/ecore_input_private.h @@ -4,7 +4,7 @@ extern int _ecore_input_log_dom; #ifdef ECORE_INPUT_DEFAULT_LOG_COLOR -# undef ECORE_INPUT_DEFAULT_LOG_COLOR +# undef ECORE_INPUT_DEFAULT_LOG_COLOR #endif #define ECORE_INPUT_DEFAULT_LOG_COLOR EINA_COLOR_BLUE diff --git a/src/lib/ecore_input_evas/Ecore_Input_Evas.h b/src/lib/ecore_input_evas/Ecore_Input_Evas.h index 1ec065613f..27765e6982 100644 --- a/src/lib/ecore_input_evas/Ecore_Input_Evas.h +++ b/src/lib/ecore_input_evas/Ecore_Input_Evas.h @@ -37,7 +37,7 @@ typedef void (*Ecore_Event_Mouse_Move_Cb)(void *window, int x, int y, unsigned i typedef void (*Ecore_Event_Multi_Move_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, unsigned int timestamp); typedef void (*Ecore_Event_Multi_Down_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, Evas_Button_Flags flags, unsigned int timestamp); typedef void (*Ecore_Event_Multi_Up_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, Evas_Button_Flags flags, unsigned int timestamp); - + EAPI int ecore_event_evas_init(void); EAPI int ecore_event_evas_shutdown(void); diff --git a/src/lib/ecore_input_evas/ecore_input_evas_private.h b/src/lib/ecore_input_evas/ecore_input_evas_private.h index 1956e10664..972cf3e7af 100644 --- a/src/lib/ecore_input_evas/ecore_input_evas_private.h +++ b/src/lib/ecore_input_evas/ecore_input_evas_private.h @@ -4,7 +4,7 @@ extern int _ecore_input_evas_log_dom; #ifdef ECORE_INPUT_EVAS_DEFAULT_LOG_COLOR -#undef ECORE_INPUT_EVAS_DEFAULT_LOG_COLOR +#undef ECORE_INPUT_EVAS_DEFAULT_LOG_COLOR #endif #define ECORE_INPUT_EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE diff --git a/src/lib/ecore_ipc/Ecore_Ipc.h b/src/lib/ecore_ipc/Ecore_Ipc.h index 5da43c7639..6881141cf6 100644 --- a/src/lib/ecore_ipc/Ecore_Ipc.h +++ b/src/lib/ecore_ipc/Ecore_Ipc.h @@ -133,7 +133,7 @@ EAPI unsigned long long _ecore_ipc_swap_64(unsigned long long v) EINA_DEPRECATED p->v = (char *)ptr; \ ptr += strlen(p->v) + 1; \ } \ - } + } #define ECORE_IPC_PUTS(v, l)\ { \ strcpy((char *)ptr, p->v); \ @@ -234,7 +234,7 @@ typedef enum _Ecore_Ipc_Type ECORE_IPC_USE_SSL = (1 << 4), ECORE_IPC_NO_PROXY = (1 << 5) } Ecore_Ipc_Type; - + typedef struct _Ecore_Ipc_Event_Client_Add Ecore_Ipc_Event_Client_Add; typedef struct _Ecore_Ipc_Event_Client_Del Ecore_Ipc_Event_Client_Del; typedef struct _Ecore_Ipc_Event_Server_Add Ecore_Ipc_Event_Server_Add; @@ -318,7 +318,7 @@ struct _Ecore_Ipc_Event_Server_Data void *data; /**< The message data */ int size; /**< The data length (in bytes) */ }; - + EAPI extern int ECORE_IPC_EVENT_CLIENT_ADD; EAPI extern int ECORE_IPC_EVENT_CLIENT_DEL; EAPI extern int ECORE_IPC_EVENT_SERVER_ADD; diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c index bd4d76bc65..c21cbcc965 100644 --- a/src/lib/ecore_ipc/ecore_ipc.c +++ b/src/lib/ecore_ipc/ecore_ipc.c @@ -277,7 +277,7 @@ ecore_ipc_post_event_client_del(Ecore_Ipc_Client *cl) Ecore_Ipc_Event_Client_Del *ev; if (cl->delete_me) return; - + cl->delete_me = EINA_TRUE; ev = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del)); diff --git a/src/lib/ecore_ipc/ecore_ipc_private.h b/src/lib/ecore_ipc/ecore_ipc_private.h index c964acd733..b918f3dd64 100644 --- a/src/lib/ecore_ipc/ecore_ipc_private.h +++ b/src/lib/ecore_ipc/ecore_ipc_private.h @@ -79,15 +79,15 @@ struct _Ecore_Ipc_Client unsigned char *buf; int buf_size; int max_buf_size; - + struct { Ecore_Ipc_Msg_Head i, o; } prev; - + int event_count; Eina_Bool delete_me : 1; }; - + struct _Ecore_Ipc_Server { ECORE_MAGIC; @@ -112,7 +112,7 @@ struct _Ecore_Ipc_Server struct { Ecore_Ipc_Msg_Head i, o; } prev; - + int event_count; Eina_Bool delete_me : 1; }; diff --git a/src/lib/ecore_sdl/Ecore_Sdl.h b/src/lib/ecore_sdl/Ecore_Sdl.h index 50b87069ad..c110f14f3d 100644 --- a/src/lib/ecore_sdl/Ecore_Sdl.h +++ b/src/lib/ecore_sdl/Ecore_Sdl.h @@ -100,7 +100,7 @@ struct _Ecore_Sdl_Event_Mouse_Button_Up /** SDL Mouse Up event */ }; typedef struct _Ecore_Sdl_Event_Mouse_Move Ecore_Sdl_Event_Mouse_Move; -struct _Ecore_Sdl_Event_Mouse_Move /** SDL Mouse Move event */ +struct _Ecore_Sdl_Event_Mouse_Move /** SDL Mouse Move event */ { int x; /**< Mouse co-ordinates where the mouse cursor moved to */ int y; /**< Mouse co-ordinates where the mouse cursor moved to */ diff --git a/src/lib/ecore_sdl/ecore_sdl_private.h b/src/lib/ecore_sdl/ecore_sdl_private.h index 593083a957..8d584e53cb 100644 --- a/src/lib/ecore_sdl/ecore_sdl_private.h +++ b/src/lib/ecore_sdl/ecore_sdl_private.h @@ -4,33 +4,33 @@ extern int _ecore_sdl_log_dom; # ifdef ECORE_SDL_DEFAULT_LOG_COLOR -# undef ECORE_SDL_DEFAULT_LOG_COLOR +# undef ECORE_SDL_DEFAULT_LOG_COLOR # endif # define ECORE_SDL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE - + # ifdef ERR # undef ERR # endif # define ERR(...) EINA_LOG_DOM_ERR(_ecore_sdl_log_dom, __VA_ARGS__) - + # ifdef DBG # undef DBG # endif # define DBG(...) EINA_LOG_DOM_DBG(_ecore_sdl_log_dom, __VA_ARGS__) - + # ifdef INF # undef INF # endif # define INF(...) EINA_LOG_DOM_INFO(_ecore_sdl_log_dom, __VA_ARGS__) - + # ifdef WRN # undef WRN # endif # define WRN(...) EINA_LOG_DOM_WARN(_ecore_sdl_log_dom, __VA_ARGS__) - + # ifdef CRI # undef CRI # endif # define CRI(...) EINA_LOG_DOM_CRIT(_ecore_sdl_log_dom, __VA_ARGS__) - + #endif diff --git a/src/lib/ecore_wayland/xdg-shell-client-protocol.h b/src/lib/ecore_wayland/xdg-shell-client-protocol.h index 2b20845db5..aa98e593a3 100644 --- a/src/lib/ecore_wayland/xdg-shell-client-protocol.h +++ b/src/lib/ecore_wayland/xdg-shell-client-protocol.h @@ -1,9 +1,9 @@ -/* +/* * Copyright © 2008-2013 Kristian Høgsberg * Copyright © 2013 Rafael Antognolli * Copyright © 2013 Jasper St. Pierre * Copyright © 2010-2013 Intel Corporation - * + * * Permission to use, copy, modify, distribute, and sell this * software and its documentation for any purpose is hereby granted * without fee, provided that the above copyright notice appear in @@ -15,7 +15,7 @@ * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. - * + * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY diff --git a/src/lib/ecore_wayland/xdg-shell-protocol.c b/src/lib/ecore_wayland/xdg-shell-protocol.c index 82433ea5b8..43545d6e33 100644 --- a/src/lib/ecore_wayland/xdg-shell-protocol.c +++ b/src/lib/ecore_wayland/xdg-shell-protocol.c @@ -1,9 +1,9 @@ -/* +/* * Copyright © 2008-2013 Kristian Høgsberg * Copyright © 2013 Rafael Antognolli * Copyright © 2013 Jasper St. Pierre * Copyright © 2010-2013 Intel Corporation - * + * * Permission to use, copy, modify, distribute, and sell this * software and its documentation for any purpose is hereby granted * without fee, provided that the above copyright notice appear in @@ -15,7 +15,7 @@ * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. - * + * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index cc92b8f871..a91285e466 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -437,7 +437,7 @@ _cb_create_prepare(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED) wl_display_flush_clients(ewd->wl.display); } -static Eina_Bool +static Eina_Bool _recovery_timer(Ecore_Wl2_Display *ewd) { if (!_ecore_wl2_display_connect(ewd, 1)) diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c index 573322a57f..0ad3befd22 100644 --- a/src/lib/ecore_x/ecore_x.c +++ b/src/lib/ecore_x/ecore_x.c @@ -2431,7 +2431,7 @@ ecore_x_pointer_root_xy_get(int *x, int *y) LOGFN; EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); root = ecore_x_window_root_list(&num); - for (i = 0; i < num; i++) + for (i = 0; i < num; i++) { ret = XQueryPointer(_ecore_x_disp, root[i], &rwin, &cwin, &rx, &ry, &wx, &wy, &mask); diff --git a/src/lib/ecore_x/ecore_x_e.c b/src/lib/ecore_x/ecore_x_e.c index 0444010c88..8ba71739f0 100644 --- a/src/lib/ecore_x/ecore_x_e.c +++ b/src/lib/ecore_x/ecore_x_e.c @@ -397,7 +397,7 @@ ecore_x_e_illume_access_action_next_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, win, - ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT, + ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT, 0, 0, 0); } @@ -419,7 +419,7 @@ ecore_x_e_illume_access_action_activate_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, win, - ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE, + ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE, 0, 0, 0); } @@ -988,17 +988,17 @@ ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, } /* for sliding window */ -EAPI void +EAPI void ecore_x_e_illume_sliding_win_state_set(Ecore_X_Window win, unsigned int is_visible) { LOGFN; - ecore_x_window_prop_card32_set(win, - ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE, + ecore_x_window_prop_card32_set(win, + ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE, &is_visible, 1); } /* ecore_x_e_illume_sliding_win_state_set */ -EAPI int +EAPI int ecore_x_e_illume_sliding_win_state_get(Ecore_X_Window win) { unsigned int is_visible = 0; @@ -1006,7 +1006,7 @@ ecore_x_e_illume_sliding_win_state_get(Ecore_X_Window win) LOGFN; ret = ecore_x_window_prop_card32_get(win, - ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE, + ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE, &is_visible, 1); if ((ret == 0) || (ret == -1)) return 0; @@ -1029,11 +1029,11 @@ ecore_x_e_illume_sliding_win_geometry_set(Ecore_X_Window win, geom[2] = w; geom[3] = h; ecore_x_window_prop_card32_set(win, - ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY, + ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY, geom, 4); } /* ecore_x_e_illume_sliding_win_geometry_set */ -EAPI int +EAPI int ecore_x_e_illume_sliding_win_geometry_get(Ecore_X_Window win, int *x, int *y, @@ -1042,27 +1042,27 @@ ecore_x_e_illume_sliding_win_geometry_get(Ecore_X_Window win, { int ret = 0; unsigned int geom[4]; - + LOGFN; - ret = - ecore_x_window_prop_card32_get(win, - ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY, + ret = + ecore_x_window_prop_card32_get(win, + ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY, geom, 4); if (ret != 4) return 0; - + if (x) *x = geom[0]; - + if (y) *y = geom[1]; - + if (w) *w = geom[2]; - + if (h) *h = geom[3]; - + return 1; }/* ecore_x_e_illume_sliding_win_geometry_get */ @@ -1269,7 +1269,7 @@ ecore_x_e_window_profile_set(Ecore_X_Window win, } /* - * @since 1.3 + * @since 1.3 */ EAPI char * ecore_x_e_window_profile_get(Ecore_X_Window win) diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c index a777b48053..aee6d1b9b2 100644 --- a/src/lib/ecore_x/ecore_x_events.c +++ b/src/lib/ecore_x/ecore_x_events.c @@ -2375,7 +2375,7 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event) void _ecore_x_event_handle_damage_notify(XEvent *event) { - XDamageNotifyEvent *damage_event; + XDamageNotifyEvent *damage_event; Ecore_X_Event_Damage *e; _ecore_x_last_event_mouse_move = EINA_FALSE; diff --git a/src/lib/ecore_x/ecore_x_icccm.c b/src/lib/ecore_x/ecore_x_icccm.c index 3a12409876..9f1c6c87af 100644 --- a/src/lib/ecore_x/ecore_x_icccm.c +++ b/src/lib/ecore_x/ecore_x_icccm.c @@ -583,7 +583,7 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, { Atom *protos2 = alloca(sizeof(Atom) * num); int i; - + for (i = 0; i < num; i++) protos2[i] = protos[i]; LOGFN; if (num > 0) diff --git a/src/lib/ecore_x/ecore_x_image.c b/src/lib/ecore_x/ecore_x_image.c index a2f0c27c60..99f53d6e1b 100644 --- a/src/lib/ecore_x/ecore_x_image.c +++ b/src/lib/ecore_x/ecore_x_image.c @@ -101,7 +101,7 @@ _ecore_x_image_shm_check(void) _ecore_x_image_shm_can = 0; return _ecore_x_image_shm_can; } - + XSync(_ecore_x_disp, False); _ecore_x_image_err = 0; @@ -691,7 +691,7 @@ ecore_x_image_to_argb_convert(void *src, break; } break; - + case 32: s32 = ((unsigned int *)(((unsigned char *)src) + ((y + row) * sbpl))) + x; switch (mode) diff --git a/src/lib/ecore_x/ecore_x_netwm.c b/src/lib/ecore_x/ecore_x_netwm.c index b939017039..60e8e0315f 100644 --- a/src/lib/ecore_x/ecore_x_netwm.c +++ b/src/lib/ecore_x/ecore_x_netwm.c @@ -669,7 +669,7 @@ ecore_x_netwm_icons_set(Ecore_X_Window win, { unsigned int *data, *p, *p2; unsigned int i, size, x, y; - + LOGFN; size = 0; for (i = 0; i < (unsigned int)num; i++) @@ -690,7 +690,7 @@ ecore_x_netwm_icons_set(Ecore_X_Window win, for (x = 0; x < icon[i].width; x++) { unsigned int r, g, b, a; - + a = (*p2 >> 24) & 0xff; r = (*p2 >> 16) & 0xff; g = (*p2 >> 8 ) & 0xff; diff --git a/src/lib/ecore_x/ecore_x_randr.c b/src/lib/ecore_x/ecore_x_randr.c index f2288cc404..faab344eb5 100644 --- a/src/lib/ecore_x/ecore_x_randr.c +++ b/src/lib/ecore_x/ecore_x_randr.c @@ -7,10 +7,10 @@ #include "Ecore_X.h" /* NB: FIXME: - * - * A lot of this code uses XRRGetScreenInfo and then calls - * XRRFreeScreenConfigInfo. Typically this is not an Unheard of thing to do, - * however this process of getting config and freeing config does force a + * + * A lot of this code uses XRRGetScreenInfo and then calls + * XRRFreeScreenConfigInfo. Typically this is not an Unheard of thing to do, + * however this process of getting config and freeing config does force a * round-trip to the X server */ /* local variables */ @@ -33,7 +33,7 @@ static Ecore_X_Atom connector_number = 0; # define RANDR_EDID_MANUFACTURER 0x08 # define RANDR_EDID_BLOCK 0x36 -typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio_Preferred +typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio_Preferred { RANDR_EDID_ASPECT_RATIO_PREFERRED_4_3 = 0x00, RANDR_EDID_ASPECT_RATIO_PREFERRED_16_9 = 0x01, @@ -49,7 +49,7 @@ XRRScreenResources *(*_ecore_x_randr_screen_resources_get)(Display *disp, Window #endif /* local functions */ -void +void _ecore_x_randr_init(void) { #ifdef ECORE_XRANDR @@ -76,7 +76,7 @@ _ecore_x_randr_init(void) } /* public functions */ -EAPI int +EAPI int ecore_x_randr_version_get(void) { #ifdef ECORE_XRANDR @@ -85,23 +85,23 @@ ecore_x_randr_version_get(void) return -1; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_query(void) { return _randr_avail; } /** - * @brief This function returns the current config timestamp from + * @brief This function returns the current config timestamp from * XRRScreenConfiguration. - * + * * @param root root window to query screen configuration from - * + * * @returns The screen configuration timestamp - * + * * @since 1.8 */ -EAPI Ecore_X_Time +EAPI Ecore_X_Time ecore_x_randr_config_timestamp_get(Ecore_X_Window root) { Ecore_X_Time timestamp = 0; @@ -133,14 +133,14 @@ ecore_x_randr_config_timestamp_get(Ecore_X_Window root) /* * @param root window which's primary output will be queried */ -EAPI Ecore_X_Randr_Orientation +EAPI Ecore_X_Randr_Orientation ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root) { #ifdef ECORE_XRANDR Rotation ret = 0, crot = 0; /* get the rotations available from XRandr */ - ret = XRRRotations(_ecore_x_disp, + ret = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot); return ret; @@ -153,14 +153,14 @@ ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root) * @param root window which's primary output will be queried * @return the current orientation of the root window's screen primary output */ -EAPI Ecore_X_Randr_Orientation +EAPI Ecore_X_Randr_Orientation ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root) { #ifdef ECORE_XRANDR Rotation ret = 0; /* get the current rotation available from XRandr */ - XRRRotations(_ecore_x_disp, + XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &ret); return ret; @@ -178,7 +178,7 @@ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root) * @return @c EINA_TRUE if the primary output's orientation could be * successfully altered. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Orientation orient) { #ifdef ECORE_XRANDR @@ -223,7 +223,7 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num) int n = 0, i = 0; /* retrieve the number of sizes from X, and the sizes themselves. - * + * * NB: don't have to free the returned sizes */ sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n); if (!sizes) return NULL; @@ -250,7 +250,7 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num) #endif } -EAPI void +EAPI void ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w, int *h, int *w_mm, int *h_mm, int *size_index) { #ifdef ECORE_XRANDR @@ -264,9 +264,9 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w int n = 0; /* retrieve the number of sizes from X, and the sizes themselves. - * + * * NB: don't have to free the returned sizes */ - sizes = + sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n); if ((sizes) && (n > 0)) { @@ -275,7 +275,7 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w /* get the index of the current configuration */ idx = XRRConfigCurrentConfiguration(cfg, &crot); - /* if the index is valid, then fill in the return variables with + /* if the index is valid, then fill in the return variables with * the size information for this index */ if ((idx < n) && (idx >= 0)) { @@ -303,7 +303,7 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w * @return @c EINA_TRUE on success, @c EINA_FALSE on failure due to e.g. * invalid times. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, int size_index) { #ifdef ECORE_XRANDR @@ -325,10 +325,10 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, int size_index if ((cfg = XRRGetScreenInfo(_ecore_x_disp, root))) { /* try to set the new screen config - * + * * NB: Returns Success (0) if it works */ - if (!XRRSetScreenConfig(_ecore_x_disp, cfg, root, size_index, - ECORE_X_RANDR_ORIENTATION_ROT_0, + if (!XRRSetScreenConfig(_ecore_x_disp, cfg, root, size_index, + ECORE_X_RANDR_ORIENTATION_ROT_0, CurrentTime)) { ret = EINA_TRUE; @@ -349,7 +349,7 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, int size_index * @param root window which's primary output will be queried * @return currently used refresh rate or - if request failed or RandRR is not available - 0.0 */ -EAPI Ecore_X_Randr_Refresh_Rate +EAPI Ecore_X_Randr_Refresh_Rate ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root) { #ifdef ECORE_XRANDR @@ -385,7 +385,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int s int n = 0; /* try to get the refresh rates for this screen */ - if ((rates = XRRRates(_ecore_x_disp, + if ((rates = XRRRates(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), size_index, &n))) { Ecore_X_Randr_Refresh_Rate *ret = NULL; @@ -418,7 +418,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int s * @param rate The refresh rate to be set. * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root, int size_index, Ecore_X_Randr_Refresh_Rate rate) { #ifdef ECORE_XRANDR @@ -434,11 +434,11 @@ ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root, int si /* get the current rotation */ XRRConfigRotations(cfg, &rot); - + /* try to set the new screen config - * + * * NB: Returns Success (0) if it works */ - if (!XRRSetScreenConfigAndRate(_ecore_x_disp, cfg, root, + if (!XRRSetScreenConfigAndRate(_ecore_x_disp, cfg, root, size_index, rot, rate, CurrentTime)) { ret = EINA_TRUE; @@ -465,7 +465,7 @@ ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root, int si * @param win Select this window's properties for RandR events. * @param on Enable/disable selecting. */ -EAPI void +EAPI void ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on) { #ifdef ECORE_XRANDR @@ -475,7 +475,7 @@ ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on) { mask = RRScreenChangeNotifyMask; if (_randr_version >= RANDR_VERSION_1_2) - mask |= (RRCrtcChangeNotifyMask | RROutputChangeNotifyMask | + mask |= (RRCrtcChangeNotifyMask | RROutputChangeNotifyMask | RROutputPropertyNotifyMask); } @@ -488,7 +488,7 @@ ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on) * @param w width of screen in px * @param h height of screen in px */ -EAPI void +EAPI void ecore_x_randr_screen_current_size_get(Ecore_X_Window root, int *w, int *h, int *w_mm, int *h_mm) { #ifdef ECORE_XRANDR @@ -514,7 +514,7 @@ ecore_x_randr_screen_current_size_get(Ecore_X_Window root, int *w, int *h, int * * @param wmax maximum width the screen can be set to * @param hmax maximum height the screen can be set to */ -EAPI void +EAPI void ecore_x_randr_screen_size_range_get(Ecore_X_Window root, int *wmin, int *hmin, int *wmax, int *hmax) { #ifdef ECORE_XRANDR @@ -523,9 +523,9 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root, int *wmin, int *hmin, i int swmin = 0, shmin = 0, swmax = 0, shmax = 0; /* try to get the screen size range from XRandr - * + * * NB: returns 1 on success */ - if ((XRRGetScreenSizeRange(_ecore_x_disp, root, &swmin, &shmin, + if ((XRRGetScreenSizeRange(_ecore_x_disp, root, &swmin, &shmin, &swmax, &shmax))) { /* fill in the return variables */ @@ -543,7 +543,7 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root, int *wmin, int *hmin, i * and all other CRTCs dx,dy respectively. * @param root the window's screen which will be reset. */ -EAPI void +EAPI void ecore_x_randr_screen_reset(Ecore_X_Window root) { #ifdef ECORE_XRANDR @@ -612,7 +612,7 @@ ecore_x_randr_screen_reset(Ecore_X_Window root) } /* - * @param root Window which's screen's size should be set. If invalid (e.g. + * @param root Window which's screen's size should be set. If invalid (e.g. * @c NULL) no action is taken. * @param w Width in px the screen should be set to. If out of valid * boundaries, current value is assumed. @@ -625,7 +625,7 @@ ecore_x_randr_screen_reset(Ecore_X_Window root) * @return @c EINA_TRUE if request was successfully sent or screen is already * in requested size, @c EINA_FALSE if parameters are invalid. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_mm, int h_mm) { #ifdef ECORE_XRANDR @@ -733,7 +733,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num) ret[i]->vTotal = res->modes[i].vTotal; if (res->modes[i].nameLength > 0) { - if ((ret[i]->name = + if ((ret[i]->name = (malloc(res->modes[i].nameLength + 1)))) strncpy(ret[i]->name, res->modes[i].name, (res->modes[i].nameLength + 1)); @@ -775,7 +775,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num) * adding failed. * @since 1.2.0 */ -EAPI Ecore_X_Randr_Mode +EAPI Ecore_X_Randr_Mode ecore_x_randr_mode_info_add(Ecore_X_Window root, Ecore_X_Randr_Mode_Info *mode_info) { #ifdef ECORE_XRANDR @@ -783,7 +783,7 @@ ecore_x_randr_mode_info_add(Ecore_X_Window root, Ecore_X_Randr_Mode_Info *mode_i { Ecore_X_Randr_Mode mode = 0; - /* if we have valid mode_info from the user, then ask XRandr to + /* if we have valid mode_info from the user, then ask XRandr to * create the new mode using that as base */ if (mode_info) mode = XRRCreateMode(_ecore_x_disp, root, (XRRModeInfo *)mode_info); @@ -800,7 +800,7 @@ ecore_x_randr_mode_info_add(Ecore_X_Window root, Ecore_X_Randr_Mode_Info *mode_i * @param mode_info * @since 1.2.0 */ -EAPI void +EAPI void ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR @@ -887,7 +887,7 @@ ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode) * * @param mode_info The mode information that should be freed. */ -EAPI void +EAPI void ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info) { #ifdef ECORE_XRANDR @@ -1024,9 +1024,9 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, int *num) Ecore_X_Randr_Output *ret = NULL; /* try to get the screen resources from Xrandr - * + * * NB: We do this ONCE here as we reuse it for every crtc. - * NB: The old code used to loop and fetch the screen resources on + * NB: The old code used to loop and fetch the screen resources on * every crtc */ if ((res = _ecore_x_randr_screen_resources_get(_ecore_x_disp, root))) { @@ -1041,15 +1041,15 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, int *num) /* try to get the crtc info for this crtc */ if (!(crtc = XRRGetCrtcInfo(_ecore_x_disp, res, crtcs[i]))) continue; - + if (crtc->noutput > 0) { /* try to reallocate our return variable */ - if ((tret = realloc(ret, ((nret + crtc->noutput) * + if ((tret = realloc(ret, ((nret + crtc->noutput) * sizeof(Ecore_X_Randr_Output))))) { ret = tret; - memcpy(&ret[nret], crtc->outputs, + memcpy(&ret[nret], crtc->outputs, (crtc->noutput * sizeof(Ecore_X_Randr_Output))); nret += crtc->noutput; } @@ -1130,9 +1130,9 @@ ecore_x_randr_window_crtcs_get(Ecore_X_Window window, int *num) } /* try to get the screen resources from Xrandr - * + * * NB: We do this ONCE here as we reuse it for every crtc. - * NB: The old code used to loop and fetch the screen resources on + * NB: The old code used to loop and fetch the screen resources on * every crtc */ if ((res = _ecore_x_randr_screen_resources_get(_ecore_x_disp, root))) { @@ -1141,11 +1141,11 @@ ecore_x_randr_window_crtcs_get(Ecore_X_Window window, int *num) int i = 0, nret = 0; /* get the geometry of this window */ - ecore_x_window_geometry_get(window, &wrect.x, &wrect.y, + ecore_x_window_geometry_get(window, &wrect.x, &wrect.y, &wrect.w, &wrect.h); /* translate coordinates relative to root window */ - XTranslateCoordinates(_ecore_x_disp, window, root, + XTranslateCoordinates(_ecore_x_disp, window, root, 0, 0, &wrect.x, &wrect.y, &tw); for (i = 0; i < ncrtcs; i++) @@ -1325,7 +1325,7 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc return NULL; } -EAPI void +EAPI void ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h) { #ifdef ECORE_XRANDR @@ -1356,7 +1356,7 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, in #endif } -EAPI void +EAPI void ecore_x_randr_crtc_pos_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y) { #ifdef ECORE_XRANDR @@ -1378,7 +1378,7 @@ ecore_x_randr_crtc_pos_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, * value will be kept. * @return @c EINA_TRUE if position could successfully be altered. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x, int y) { #ifdef ECORE_XRANDR @@ -1419,7 +1419,7 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x, * @return currently set mode or - in case parameters are invalid - * Ecore_X_Randr_Unset */ -EAPI Ecore_X_Randr_Mode +EAPI Ecore_X_Randr_Mode ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -1466,19 +1466,19 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) * @return @c EINA_TRUE if mode setting was successful, @c EINA_FALSE * otherwise. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_mode_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Output *outputs, int noutputs, Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR if (_randr_version < RANDR_VERSION_1_2) return EINA_FALSE; - return ecore_x_randr_crtc_settings_set(root, crtc, outputs, noutputs, + return ecore_x_randr_crtc_settings_set(root, crtc, outputs, noutputs, -1, -1, mode, -1); #endif return EINA_FALSE; } -EAPI void +EAPI void ecore_x_randr_crtc_size_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *w, int *h) { #ifdef ECORE_XRANDR @@ -1487,7 +1487,7 @@ ecore_x_randr_crtc_size_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *w #endif } -EAPI Ecore_X_Randr_Refresh_Rate +EAPI Ecore_X_Randr_Refresh_Rate ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc EINA_UNUSED, Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR @@ -1524,7 +1524,7 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc return 0.0; } -EAPI Ecore_X_Randr_Orientation +EAPI Ecore_X_Randr_Orientation ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -1557,7 +1557,7 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc return 0; } -EAPI Ecore_X_Randr_Orientation +EAPI Ecore_X_Randr_Orientation ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -1590,20 +1590,20 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) return 0; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const Ecore_X_Randr_Orientation orientation) { #ifdef ECORE_XRANDR if (_randr_version < RANDR_VERSION_1_2) return EINA_FALSE; if (orientation != 0) - return ecore_x_randr_crtc_settings_set(root, crtc, NULL, + return ecore_x_randr_crtc_settings_set(root, crtc, NULL, -1, -1, -1, -1, orientation); #endif return EINA_FALSE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_clone_set(Ecore_X_Window root, Ecore_X_Randr_Crtc original, Ecore_X_Randr_Crtc cln) { #ifdef ECORE_XRANDR @@ -1632,7 +1632,7 @@ ecore_x_randr_crtc_clone_set(Ecore_X_Window root, Ecore_X_Randr_Crtc original, E XRRFreeCrtcInfo(info); } - ret = ecore_x_randr_crtc_settings_set(root, cln, NULL, -1, ox, oy, + ret = ecore_x_randr_crtc_settings_set(root, cln, NULL, -1, ox, oy, orig_mode, orig_orient); /* free the resources */ @@ -1666,7 +1666,7 @@ ecore_x_randr_crtc_clone_set(Ecore_X_Window root, Ecore_X_Randr_Crtc original, E * @return @c EINA_TRUE if the configuration alteration was successful, * @c EINA_FALSE otherwise. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Output *outputs, int noutputs, int x, int y, Ecore_X_Randr_Mode mode, Ecore_X_Randr_Orientation orientation) { #ifdef ECORE_XRANDR @@ -1719,8 +1719,8 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ec } /* try to set the crtc config */ - if (!XRRSetCrtcConfig(_ecore_x_disp, res, rcrtc, CurrentTime, - x, y, mode, orientation, + if (!XRRSetCrtcConfig(_ecore_x_disp, res, rcrtc, CurrentTime, + x, y, mode, orientation, routputs, noutputs)) ret = EINA_TRUE; @@ -1751,7 +1751,7 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ec * if repositioning failed or if position of new crtc would be out of given * screen's min/max bounds. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc_r1, Ecore_X_Randr_Crtc crtc_r2, Ecore_X_Randr_Output_Policy policy, Ecore_X_Randr_Relative_Alignment alignment) { #ifdef ECORE_XRANDR @@ -1818,7 +1818,7 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc nx = -1; break; case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL: - nx = ((int)((((double)r2.x + (double)r2.w) / 2.0) - + nx = ((int)((((double)r2.x + (double)r2.w) / 2.0) - ((double)r1.w / 2.0))); break; case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR: @@ -1836,7 +1836,7 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc nx = -1; break; case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL: - nx = ((int)((((double)r2.x + (double)r2.w) / 2.0) - + nx = ((int)((((double)r2.x + (double)r2.w) / 2.0) - ((double)r1.w / 2.0))); break; case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR: @@ -1902,7 +1902,7 @@ ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc) if (info->noutput > 0) { - if ((ret->outputs = + if ((ret->outputs = malloc(info->noutput * sizeof(Ecore_X_Randr_Output)))) { int i = 0; @@ -1915,7 +1915,7 @@ ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc) if (info->npossible > 0) { - if ((ret->possible = + if ((ret->possible = malloc(info->npossible * sizeof(Ecore_X_Randr_Output)))) { int i = 0; @@ -1943,7 +1943,7 @@ ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc) /* * @since 1.8 */ -EAPI void +EAPI void ecore_x_randr_crtc_info_free(Ecore_X_Randr_Crtc_Info *info) { #ifdef ECORE_XRANDR @@ -1968,7 +1968,7 @@ ecore_x_randr_crtc_info_free(Ecore_X_Randr_Crtc_Info *info) * @c EINA_TRUE. * @since 1.2.0 */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR @@ -1977,7 +1977,7 @@ ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mo if ((output) && (mode)) { /* add this mode to output - * + * * NB: This XRR function returns void so we have to assume it worked */ XRRAddOutputMode(_ecore_x_disp, output, mode); @@ -1993,7 +1993,7 @@ ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mo * @param mode the mode removed from the output * @since 1.2.0 */ -EAPI void +EAPI void ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR @@ -2144,7 +2144,7 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Outpu return NULL; } -EAPI Ecore_X_Randr_Crtc +EAPI Ecore_X_Randr_Crtc ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -2231,7 +2231,7 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, /* * @deprecated use ecore_x_randr_crtc_gamma_size_get() */ -EINA_DEPRECATED EAPI int +EINA_DEPRECATED EAPI int ecore_x_randr_crtc_gamma_ramp_size_get(Ecore_X_Randr_Crtc crtc EINA_UNUSED) { return 0; @@ -2249,7 +2249,7 @@ ecore_x_randr_crtc_gamma_ramps_get(Ecore_X_Randr_Crtc crtc EINA_UNUSED) /* * @deprecated use ecore_x_randr_crtc_gamma_set() */ -EINA_DEPRECATED EAPI Eina_Bool +EINA_DEPRECATED EAPI Eina_Bool ecore_x_randr_crtc_gamma_ramps_set(Ecore_X_Randr_Crtc crtc EINA_UNUSED, const Ecore_X_Randr_Crtc_Gamma *red EINA_UNUSED, const Ecore_X_Randr_Crtc_Gamma *green EINA_UNUSED, const Ecore_X_Randr_Crtc_Gamma *blue EINA_UNUSED) { return EINA_FALSE; @@ -2258,7 +2258,7 @@ ecore_x_randr_crtc_gamma_ramps_set(Ecore_X_Randr_Crtc crtc EINA_UNUSED, const Ec /* * @since 1.8 */ -EAPI int +EAPI int ecore_x_randr_crtc_gamma_size_get(Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -2303,14 +2303,14 @@ ecore_x_randr_crtc_gamma_get(Ecore_X_Randr_Crtc crtc) /* * @since 1.8 */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_gamma_set(Ecore_X_Randr_Crtc crtc, const Ecore_X_Randr_Crtc_Gamma_Info *gamma) { #ifdef ECORE_XRANDR if (_randr_version < RANDR_VERSION_1_2) return EINA_FALSE; /* try to set the gamma - * + * * NB: XRRSetCrtcGamma returns void */ XRRSetCrtcGamma(_ecore_x_disp, crtc, (XRRCrtcGamma *)gamma); @@ -2322,7 +2322,7 @@ ecore_x_randr_crtc_gamma_set(Ecore_X_Randr_Crtc crtc, const Ecore_X_Randr_Crtc_G return EINA_FALSE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, const Ecore_X_Randr_Crtc *not_moved, int nnot_moved, int dx, int dy) { #ifdef ECORE_XRANDR @@ -2388,7 +2388,7 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, const Ecore_X_Randr_Crtc * * @param dy Amount of pixels the CRTCs should be moved in y direction. * @return @c EINA_TRUE if all crtcs could be moved successfully. */ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, int ncrtc, int dx, int dy) { #ifdef ECORE_XRANDR @@ -2420,8 +2420,8 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i /* try to get crtc info for original crtc */ if ((info[i] = XRRGetCrtcInfo(_ecore_x_disp, res, crtcs[i]))) { - if (((info[i]->x + dx) < 0) || ((info[i]->y + dy < 0)) || - ((int)(info[i]->x + info[i]->width) > mw) || + if (((info[i]->x + dx) < 0) || ((info[i]->y + dy < 0)) || + ((int)(info[i]->x + info[i]->width) > mw) || ((int)(info[i]->y + info[i]->height) > mh)) { goto err; @@ -2433,17 +2433,17 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i } /* resize the screen if we need to */ - if (!(((nw > sw) || (nh > sh)) || + if (!(((nw > sw) || (nh > sh)) || ecore_x_randr_screen_current_size_set(root, nw, nh, -1, -1))) goto err; /* actually move the crtcs */ for (i = 0; ((i < ncrtc) && info[i]); i++) { - if (!ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1, - (info[i]->x + dx), - (info[i]->y + dy), - info[i]->mode, + if (!ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1, + (info[i]->x + dx), + (info[i]->y + dy), + info[i]->mode, info[i]->rotation)) { ret = EINA_FALSE; @@ -2457,10 +2457,10 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i while ((--i) >= 0) { if (info[i]) - ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1, - (info[i]->x - dx), - (info[i]->y - dy), - info[i]->mode, + ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1, + (info[i]->x - dx), + (info[i]->y - dy), + info[i]->mode, info[i]->rotation); } } @@ -2494,7 +2494,7 @@ err: * @param w width of given mode in px * @param h height of given mode in px */ -EAPI void +EAPI void ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h) { #ifdef ECORE_XRANDR @@ -2526,20 +2526,20 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w #endif } -EAPI Ecore_X_Randr_Connection_Status +EAPI Ecore_X_Randr_Connection_Status ecore_x_randr_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR XRRScreenResources *res = NULL; - if (_randr_version < RANDR_VERSION_1_2) + if (_randr_version < RANDR_VERSION_1_2) return ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN; /* try to get the screen resources from Xrandr */ if ((res = _ecore_x_randr_screen_resources_get(_ecore_x_disp, root))) { XRROutputInfo *info = NULL; - Ecore_X_Randr_Connection_Status ret = + Ecore_X_Randr_Connection_Status ret = ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN; /* try to get output info */ @@ -2560,7 +2560,7 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Ou return ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN; } -EAPI void +EAPI void ecore_x_randr_output_size_mm_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *w, int *h) { #ifdef ECORE_XRANDR @@ -2589,14 +2589,14 @@ ecore_x_randr_output_size_mm_get(Ecore_X_Window root, Ecore_X_Randr_Output outpu #endif } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_output_crtc_set(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Output output EINA_UNUSED, const Ecore_X_Randr_Crtc crtc EINA_UNUSED) { /* TODO: !! */ return EINA_FALSE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_output_backlight_available(void) { #ifdef ECORE_XRANDR @@ -2619,7 +2619,7 @@ ecore_x_randr_output_backlight_available(void) * @param root The window's screen which will be set. * @param level Of the backlight between @c 0 and @c 1. */ -EAPI void +EAPI void ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, double level) { #ifdef ECORE_XRANDR @@ -2641,7 +2641,7 @@ ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, double level) #endif } -EAPI double +EAPI double ecore_x_randr_output_backlight_level_get(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -2656,11 +2656,11 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root EINA_UNUSED, Ecore_ /* check if "new" backlight is available */ if (_randr_version >= RANDR_VERSION_1_3) { - if ((backlight = + if ((backlight = XInternAtom(_ecore_x_disp, RR_PROPERTY_BACKLIGHT, True))) { - XRRGetOutputProperty(_ecore_x_disp, output, backlight, 0, 4, - False, False, None, &type, &format, + XRRGetOutputProperty(_ecore_x_disp, output, backlight, 0, 4, + False, False, None, &type, &format, &items, &bytes, &prop); } } @@ -2668,15 +2668,15 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root EINA_UNUSED, Ecore_ if ((!prop) || (items == 0)) { /* check legacy backlight property - * - * FIXME: NB: Not sure what randr version we need for the legacy + * + * FIXME: NB: Not sure what randr version we need for the legacy * backlight property so skip version check */ if ((backlight = XInternAtom(_ecore_x_disp, "BACKLIGHT", True))) { free(prop); prop = NULL; - XRRGetOutputProperty(_ecore_x_disp, output, backlight, 0, 4, - False, False, None, &type, &format, + XRRGetOutputProperty(_ecore_x_disp, output, backlight, 0, 4, + False, False, None, &type, &format, &items, &bytes, &prop); } } @@ -2700,7 +2700,7 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root EINA_UNUSED, Ecore_ if ((info->range) && (info->num_values == 2)) { /* convert the current value */ - ret = ((double)(val - info->values[0])) / + ret = ((double)(val - info->values[0])) / ((double)(info->values[1] - info->values[0])); } @@ -2713,7 +2713,7 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root EINA_UNUSED, Ecore_ return -1; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_output_backlight_level_set(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Output output, double level) { #ifdef ECORE_XRANDR @@ -2757,8 +2757,8 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root EINA_UNUSED, Ecore_ if (val < min) val = min; /* tell xrandr to change the backlight value */ - XRRChangeOutputProperty(_ecore_x_disp, output, backlight, - XA_INTEGER, 32, PropModeReplace, + XRRChangeOutputProperty(_ecore_x_disp, output, backlight, + XA_INTEGER, 32, PropModeReplace, (unsigned char *)&val, 1); /* send changes to X */ @@ -2796,14 +2796,14 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Out if (_randr_version < RANDR_VERSION_1_2) return NULL; /* try to get the edid atom */ - if (!(edid = XInternAtom(_ecore_x_disp, RR_PROPERTY_RANDR_EDID, False))) + if (!(edid = XInternAtom(_ecore_x_disp, RR_PROPERTY_RANDR_EDID, False))) return NULL; /* get the output property - * + * * NB: Returns 0 on success */ if (!XRRGetOutputProperty(_ecore_x_disp, output, edid, 0, 128, False, False, - AnyPropertyType, &type, &format, &nitems, + AnyPropertyType, &type, &format, &nitems, &bytes, &prop)) { if ((type == XA_INTEGER) && (nitems >= 1) && (format == 8)) @@ -2824,13 +2824,13 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Out return NULL; } -EAPI Ecore_X_Render_Subpixel_Order +EAPI Ecore_X_Render_Subpixel_Order ecore_x_randr_output_subpixel_order_get(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR XRRScreenResources *res = NULL; - if (_randr_version < RANDR_VERSION_1_2) + if (_randr_version < RANDR_VERSION_1_2) return ECORE_X_RENDER_SUBPIXEL_ORDER_UNKNOWN; /* try to get the screen resources from Xrandr */ @@ -2870,9 +2870,9 @@ ecore_x_randr_output_wired_clones_get(Ecore_X_Window root EINA_UNUSED, Ecore_X_R int format = 0; unsigned long nitems = 0, bytes = 0; - /* NB: FIXME: - * - * I am not sure that this code is correct. This needs checking + /* NB: FIXME: + * + * I am not sure that this code is correct. This needs checking */ if (_randr_version < RANDR_VERSION_1_3) return NULL; @@ -2882,10 +2882,10 @@ ecore_x_randr_output_wired_clones_get(Ecore_X_Window root EINA_UNUSED, Ecore_X_R return NULL; /* get the output property - * + * * NB: Returns 0 on success */ - if (!XRRGetOutputProperty(_ecore_x_disp, output, clones, 0, 100, False, False, - AnyPropertyType, &type, &format, &nitems, + if (!XRRGetOutputProperty(_ecore_x_disp, output, clones, 0, 100, False, False, + AnyPropertyType, &type, &format, &nitems, &bytes, &prop)) { if ((type == XA_ATOM) && (nitems >= 1) && (format == 32)) @@ -2932,10 +2932,10 @@ ecore_x_randr_output_signal_formats_get(Ecore_X_Window root EINA_UNUSED, Ecore_X return NULL; /* try to get the output property from Xrandr - * + * * NB: Returns 0 on success */ - if (XRRGetOutputProperty(_ecore_x_disp, output, sig, 0, 100, - False, False, AnyPropertyType, &type, &format, + if (XRRGetOutputProperty(_ecore_x_disp, output, sig, 0, 100, + False, False, AnyPropertyType, &type, &format, &items, &bytes, &prop)) { free(prop); @@ -2958,10 +2958,10 @@ ecore_x_randr_output_signal_formats_get(Ecore_X_Window root EINA_UNUSED, Ecore_X if (info->num_values > 0) { - if ((formats = + if ((formats = malloc(info->num_values * sizeof(Ecore_X_Randr_Signal_Format)))) { - memcpy(formats, info->values, + memcpy(formats, info->values, (info->num_values * sizeof(Ecore_X_Randr_Signal_Format))); } } @@ -2975,7 +2975,7 @@ ecore_x_randr_output_signal_formats_get(Ecore_X_Window root EINA_UNUSED, Ecore_X return NULL; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_output_signal_format_set(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Output output EINA_UNUSED, Ecore_X_Randr_Signal_Format *sig EINA_UNUSED) { /* TODO: (1.3) !! */ @@ -3001,10 +3001,10 @@ ecore_x_randr_output_signal_properties_get(Ecore_X_Window root EINA_UNUSED, Ecor return NULL; /* try to get the output property from Xrandr - * + * * NB: Returns 0 on success */ - if (XRRGetOutputProperty(_ecore_x_disp, output, sig, 0, 100, - False, False, AnyPropertyType, &type, &format, + if (XRRGetOutputProperty(_ecore_x_disp, output, sig, 0, 100, + False, False, AnyPropertyType, &type, &format, &items, &bytes, &prop)) { free(prop); @@ -3027,10 +3027,10 @@ ecore_x_randr_output_signal_properties_get(Ecore_X_Window root EINA_UNUSED, Ecor if (info->num_values > 0) { - if ((props = + if ((props = malloc(info->num_values * sizeof(Ecore_X_Randr_Signal_Property)))) { - memcpy(props, info->values, + memcpy(props, info->values, (info->num_values * sizeof(Ecore_X_Randr_Signal_Property))); } } @@ -3045,17 +3045,17 @@ ecore_x_randr_output_signal_properties_get(Ecore_X_Window root EINA_UNUSED, Ecor } /* TODO NB: - * + * * Document this. - * - * Returns: + * + * Returns: * 0 == unknown * 1 == primary * 2 == secondary * 3 == (typically) TV Connector but is driver/hardware dependent - * + * */ -EAPI int +EAPI int ecore_x_randr_output_connector_number_get(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -3069,10 +3069,10 @@ ecore_x_randr_output_connector_number_get(Ecore_X_Window root EINA_UNUSED, Ecore if (_randr_version < RANDR_VERSION_1_3) return -1; /* try to get the output property from Xrandr - * + * * NB: Returns 0 on success */ - if (XRRGetOutputProperty(_ecore_x_disp, output, connector_number, 0, 100, - False, False, AnyPropertyType, &type, &format, + if (XRRGetOutputProperty(_ecore_x_disp, output, connector_number, 0, 100, + False, False, AnyPropertyType, &type, &format, &items, &bytes, &prop)) { free(prop); @@ -3107,7 +3107,7 @@ ecore_x_randr_output_connector_number_get(Ecore_X_Window root EINA_UNUSED, Ecore return -1; } -EAPI Ecore_X_Randr_Connector_Type +EAPI Ecore_X_Randr_Connector_Type ecore_x_randr_output_connector_type_get(Ecore_X_Window root EINA_UNUSED, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -3121,8 +3121,8 @@ ecore_x_randr_output_connector_type_get(Ecore_X_Window root EINA_UNUSED, Ecore_X if (_randr_version < RANDR_VERSION_1_3) return -1; /* try to get the connector type atom */ - if (XRRGetOutputProperty(_ecore_x_disp, output, connector_type, 0, 100, - False, False, AnyPropertyType, &type, &format, + if (XRRGetOutputProperty(_ecore_x_disp, output, connector_type, 0, 100, + False, False, AnyPropertyType, &type, &format, &items, &bytes, &prop) != Success) { free(prop); @@ -3134,12 +3134,12 @@ ecore_x_randr_output_connector_type_get(Ecore_X_Window root EINA_UNUSED, Ecore_X Atom conn; free(prop); - /* NB: some butthead drivers (*cough* nouveau *cough*) do not - * implement randr properly. They are not using the connector type + /* NB: some butthead drivers (*cough* nouveau *cough*) do not + * implement randr properly. They are not using the connector type * property of randr, but rather a "subconnector" property */ if ((conn = XInternAtom(_ecore_x_disp, "subconnector", True))) - XRRGetOutputProperty(_ecore_x_disp, output, conn, 0, 4, - False, False, AnyPropertyType, &type, + XRRGetOutputProperty(_ecore_x_disp, output, conn, 0, 4, + False, False, AnyPropertyType, &type, &format, &items, &bytes, &prop); } @@ -3178,7 +3178,7 @@ ecore_x_randr_output_connector_type_get(Ecore_X_Window root EINA_UNUSED, Ecore_X return -1; } -EAPI Ecore_X_Randr_Output +EAPI Ecore_X_Randr_Output ecore_x_randr_primary_output_get(Ecore_X_Window root) { #ifdef ECORE_XRANDR @@ -3189,7 +3189,7 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root) #endif } -EAPI void +EAPI void ecore_x_randr_primary_output_set(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -3202,7 +3202,7 @@ ecore_x_randr_primary_output_set(Ecore_X_Window root, Ecore_X_Randr_Output outpu * API Functions for RandR version 1.4 * ***************************************/ -EAPI void +EAPI void ecore_x_randr_crtc_panning_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h) { #ifdef ECORE_XRANDR @@ -3232,7 +3232,7 @@ ecore_x_randr_crtc_panning_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc #endif } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_panning_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const int x, const int y, const int w, const int h) { #ifdef ECORE_XRANDR @@ -3273,7 +3273,7 @@ ecore_x_randr_crtc_panning_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc #endif } -EAPI void +EAPI void ecore_x_randr_crtc_tracking_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h) { #ifdef ECORE_XRANDR @@ -3303,7 +3303,7 @@ ecore_x_randr_crtc_tracking_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crt #endif } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_tracking_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const int x, const int y, const int w, const int h) { #ifdef ECORE_XRANDR @@ -3344,7 +3344,7 @@ ecore_x_randr_crtc_tracking_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crt #endif } -EAPI void +EAPI void ecore_x_randr_crtc_border_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h) { #ifdef ECORE_XRANDR @@ -3374,7 +3374,7 @@ ecore_x_randr_crtc_border_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, #endif } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_crtc_border_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const int left, const int top, const int right, const int bottom) { #ifdef ECORE_XRANDR @@ -3419,7 +3419,7 @@ ecore_x_randr_crtc_border_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, * API Functions for RandR Edid ***************************************/ -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_edid_has_valid_header(unsigned char *edid, unsigned long edid_length) { const unsigned char header[] = @@ -3431,7 +3431,7 @@ ecore_x_randr_edid_has_valid_header(unsigned char *edid, unsigned long edid_leng return EINA_FALSE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3466,14 +3466,14 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, unsigned long ed #endif } -EAPI int +EAPI int ecore_x_randr_edid_version_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR - if ((edid_length > RANDR_EDID_VERSION_MINOR) && + if ((edid_length > RANDR_EDID_VERSION_MINOR) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) { - return (edid[RANDR_EDID_VERSION_MAJOR] << 8) | + return (edid[RANDR_EDID_VERSION_MAJOR] << 8) | edid[RANDR_EDID_VERSION_MINOR]; } @@ -3487,7 +3487,7 @@ EAPI char * ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR - if ((edid_length > RANDR_EDID_MANUFACTURER + 1) && + if ((edid_length > RANDR_EDID_MANUFACTURER + 1) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) { unsigned char *x; @@ -3517,7 +3517,7 @@ ecore_x_randr_edid_display_name_get(unsigned char *edid, unsigned long edid_leng version = ecore_x_randr_edid_version_get(edid, edid_length); if (version < RANDR_EDID_VERSION_1_3) return NULL; - for (block = (edid + RANDR_EDID_BLOCK); + for (block = (edid + RANDR_EDID_BLOCK); block <= (edid + RANDR_EDID_BLOCK + (3 * 18)); block += 18) { if ((block[0] == 0) && (block[1] == 0)) @@ -3553,7 +3553,7 @@ ecore_x_randr_edid_display_ascii_get(unsigned char *edid, unsigned long edid_len version = ecore_x_randr_edid_version_get(edid, edid_length); if (version < RANDR_EDID_VERSION_1_3) return NULL; - for (block = (edid + RANDR_EDID_BLOCK); + for (block = (edid + RANDR_EDID_BLOCK); block <= (edid + RANDR_EDID_BLOCK + (3 * 18)); block += 18) { if ((block[0] == 0) && (block[1] == 0)) @@ -3589,7 +3589,7 @@ ecore_x_randr_edid_display_serial_get(unsigned char *edid, unsigned long edid_le version = ecore_x_randr_edid_version_get(edid, edid_length); if (version < RANDR_EDID_VERSION_1_3) return NULL; - for (block = (edid + RANDR_EDID_BLOCK); + for (block = (edid + RANDR_EDID_BLOCK); block <= (edid + RANDR_EDID_BLOCK + (3 * 18)); block += 18) { if ((block[0] == 0) && (block[1] == 0)) @@ -3615,19 +3615,19 @@ ecore_x_randr_edid_display_serial_get(unsigned char *edid, unsigned long edid_le return NULL; } -EAPI int +EAPI int ecore_x_randr_edid_model_get(unsigned char *edid, unsigned long edid_length) { return ecore_x_randr_edid_manufacturer_model_get(edid, edid_length); } -EAPI int +EAPI int ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR - if ((edid_length > RANDR_EDID_MANUFACTURER + 1) && + if ((edid_length > RANDR_EDID_MANUFACTURER + 1) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) - return (int)(edid[0x0c] + (edid[0x0d] << 8) + + return (int)(edid[0x0c] + (edid[0x0d] << 8) + (edid[0x0e] << 16) + (edid[0x0f] << 24)); return ECORE_X_RANDR_EDID_UNKNOWN_VALUE; @@ -3636,18 +3636,18 @@ ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, unsigned #endif } -EAPI int +EAPI int ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR - if ((edid_length > RANDR_EDID_MANUFACTURER + 1) && + if ((edid_length > RANDR_EDID_MANUFACTURER + 1) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) return (int)(edid[0x0a] + (edid[0x0b] << 8)); #endif return ECORE_X_RANDR_EDID_UNKNOWN_VALUE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_edid_dpms_available_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3662,7 +3662,7 @@ ecore_x_randr_edid_dpms_available_get(unsigned char *edid, unsigned long edid_le #endif } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3676,7 +3676,7 @@ ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, unsigned long return EINA_FALSE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3690,7 +3690,7 @@ ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, unsigned long return EINA_FALSE; } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3704,7 +3704,7 @@ ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, unsigned long edi return EINA_FALSE; } -EAPI Ecore_X_Randr_Edid_Aspect_Ratio +EAPI Ecore_X_Randr_Edid_Aspect_Ratio ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3712,17 +3712,17 @@ ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, unsig int version = 0; version = ecore_x_randr_edid_version_get(edid, edid_length); - if (version < RANDR_EDID_VERSION_1_3) + if (version < RANDR_EDID_VERSION_1_3) return ECORE_X_RANDR_EDID_UNKNOWN_VALUE; - for (block = (edid + RANDR_EDID_BLOCK); + for (block = (edid + RANDR_EDID_BLOCK); block <= (edid + RANDR_EDID_BLOCK + (3 * 18)); block += 18) { if ((block[0] == 0) && (block[1] == 0)) { if ((block[3] == 0xfd) && (block[10] == 0x04)) { - Ecore_X_Randr_Edid_Aspect_Ratio_Preferred ratio = + Ecore_X_Randr_Edid_Aspect_Ratio_Preferred ratio = (Ecore_X_Randr_Edid_Aspect_Ratio_Preferred)((block[15] & 0xe0) >> 5); switch (ratio) @@ -3750,7 +3750,7 @@ ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, unsig #endif } -EAPI Ecore_X_Randr_Edid_Aspect_Ratio +EAPI Ecore_X_Randr_Edid_Aspect_Ratio ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3761,10 +3761,10 @@ ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, unsigned long ret = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; version = ecore_x_randr_edid_version_get(edid, edid_length); - if (version < RANDR_EDID_VERSION_1_3) + if (version < RANDR_EDID_VERSION_1_3) return ECORE_X_RANDR_EDID_UNKNOWN_VALUE; - for (block = (edid + RANDR_EDID_BLOCK); + for (block = (edid + RANDR_EDID_BLOCK); block <= (edid + RANDR_EDID_BLOCK + (3 * 18)); block += 18) { if ((block[0] == 0) && (block[1] == 0)) @@ -3791,7 +3791,7 @@ ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, unsigned long #endif } -EAPI Ecore_X_Randr_Edid_Display_Colorscheme +EAPI Ecore_X_Randr_Edid_Display_Colorscheme ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3801,7 +3801,7 @@ ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, unsigned long ed ret = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; version = ecore_x_randr_edid_version_get(edid, edid_length); - if (version < RANDR_EDID_VERSION_1_3) + if (version < RANDR_EDID_VERSION_1_3) return ECORE_X_RANDR_EDID_UNKNOWN_VALUE; if (ecore_x_randr_edid_display_type_digital_get(edid, edid_length)) @@ -3821,7 +3821,7 @@ ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, unsigned long ed #endif } -EAPI Eina_Bool +EAPI Eina_Bool ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3836,7 +3836,7 @@ ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, unsigned long e #endif } -EAPI Ecore_X_Randr_Edid_Display_Interface_Type +EAPI Ecore_X_Randr_Edid_Display_Interface_Type ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, unsigned long edid_length) { #ifdef ECORE_XRANDR @@ -3846,7 +3846,7 @@ ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, unsigned long type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; version = ecore_x_randr_edid_version_get(edid, edid_length); - if (version < RANDR_EDID_VERSION_1_3) + if (version < RANDR_EDID_VERSION_1_3) return ECORE_X_RANDR_EDID_UNKNOWN_VALUE; type = (edid[0x14] & 0x0f); diff --git a/src/lib/ecore_x/ecore_x_screensaver.c b/src/lib/ecore_x/ecore_x_screensaver.c index cded6a3b84..0fc4bf30f9 100644 --- a/src/lib/ecore_x/ecore_x_screensaver.c +++ b/src/lib/ecore_x/ecore_x_screensaver.c @@ -217,7 +217,7 @@ ecore_x_screensaver_custom_blanking_enable(void) { #ifdef ECORE_XSS XSetWindowAttributes attr; - + XScreenSaverSetAttributes(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp), -9999, -9999, 1, 1, 0, @@ -247,7 +247,7 @@ ecore_x_screensaver_supend(void) ecore_x_screensaver_suspend(); } -EAPI void +EAPI void ecore_x_screensaver_suspend(void) { #ifdef ECORE_XSS diff --git a/src/lib/ecore_x/ecore_x_test.c b/src/lib/ecore_x/ecore_x_test.c index fbd991e14b..51ead5a136 100644 --- a/src/lib/ecore_x/ecore_x_test.c +++ b/src/lib/ecore_x/ecore_x_test.c @@ -153,7 +153,7 @@ ecore_x_keysym_string_get(int keysym) return XKeysymToString(keysym); } -EAPI int +EAPI int ecore_x_keysym_keycode_get(const char *keyname) { int keycode = 0;