forked from enlightenment/efl
Get rid of trailing whitespaces (4 / 14)
Remove trailing whitespaces Differential Revision: https://phab.enlightenment.org/D12002
This commit is contained in:
parent
c2be0d0dba
commit
1fd0435f21
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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", "" },
|
||||
|
|
|
@ -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 <Eina.h>
|
||||
* #include <Ecore.h>
|
||||
* #include <Ecore_Con.h>
|
||||
*
|
||||
*
|
||||
* 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;
|
||||
* }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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] = "<stdin>";
|
||||
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <linux/vt.h>
|
||||
#include <linux/fb.h>
|
||||
#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 <linux/input.h>
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue