in 2011, we began using formatting tools to fix problematic formatting.

in later 2011, we began using formatting tools to fix problematic formatting caused by previous runs of formatting tools used to fix problematic formatting


SVN revision: 65852
This commit is contained in:
Mike Blumenkrantz 2011-12-03 20:05:48 +00:00
parent 6b13c32a78
commit 8b6899154c
30 changed files with 1265 additions and 1252 deletions

View File

@ -19,9 +19,9 @@
#include "Ecore_X_Atoms.h"
#include "Ecore_Input.h"
static Eina_Bool _ecore_x_fd_handler(void *data,
static Eina_Bool _ecore_x_fd_handler(void *data,
Ecore_Fd_Handler *fd_handler);
static Eina_Bool _ecore_x_fd_handler_buf(void *data,
static Eina_Bool _ecore_x_fd_handler_buf(void *data,
Ecore_Fd_Handler *fd_handler);
static int _ecore_x_key_mask_get(KeySym sym);
static int _ecore_x_event_modifier(unsigned int state);
@ -139,9 +139,9 @@ EAPI int ECORE_X_LOCK_SHIFT = 0;
#ifdef LOGRT
static double t0 = 0.0;
static Status (*_logrt_real_reply)(Display *disp,
void *rep,
int extra,
Bool discard) = NULL;
void *rep,
int extra,
Bool discard) = NULL;
static void
_logrt_init(void)
{
@ -163,9 +163,9 @@ _logrt_init(void)
Status
_XReply(Display *disp,
void *rep,
int extra,
Bool discard)
void *rep,
int extra,
Bool discard)
{
void *bt[128];
int i, n;
@ -215,35 +215,35 @@ void
_ecore_x_modifiers_get(void)
{
/* everything has these... unless its like a pda... :) */
ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L);
ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L);
ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L);
ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L);
/* apple's xdarwin has no alt!!!! */
ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L);
if (!ECORE_X_MODIFIER_ALT)
ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L);
/* apple's xdarwin has no alt!!!! */
ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L);
if (!ECORE_X_MODIFIER_ALT)
ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L);
if (!ECORE_X_MODIFIER_ALT)
ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L);
if (!ECORE_X_MODIFIER_ALT)
ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L);
/* the windows key... a valid modifier :) */
ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
if (!ECORE_X_MODIFIER_WIN)
ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
/* the windows key... a valid modifier :) */
ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
if (!ECORE_X_MODIFIER_WIN)
ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
if (!ECORE_X_MODIFIER_WIN)
ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
if (!ECORE_X_MODIFIER_WIN)
ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
ECORE_X_MODIFIER_WIN = 0;
if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
ECORE_X_MODIFIER_WIN = 0;
if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL)
ECORE_X_MODIFIER_ALT = 0;
if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL)
ECORE_X_MODIFIER_ALT = 0;
ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock);
ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock);
ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock);
ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock);
ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock);
ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock);
ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock);
ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock);
}
/**
@ -300,7 +300,7 @@ ecore_x_init(const char *name)
eina_init();
_ecore_xlib_log_dom = eina_log_domain_register
("ecore_x", ECORE_XLIB_DEFAULT_LOG_COLOR);
if(_ecore_xlib_log_dom < 0)
if (_ecore_xlib_log_dom < 0)
{
EINA_LOG_ERR(
"Impossible to create a log domain for the Ecore Xlib module.");
@ -375,7 +375,7 @@ ecore_x_init(const char *name)
#ifdef ECORE_XGESTURE
if (XGestureQueryExtension(_ecore_x_disp, &gesture_base, &gesture_err_base))
_ecore_x_event_gesture_id = gesture_base;
_ecore_x_event_gesture_id = gesture_base;
ECORE_X_EVENT_HANDLERS_GROW(gesture_base, GestureNumberEvents);
#endif /* ifdef ECORE_XGESTURE */
@ -497,20 +497,20 @@ ecore_x_init(const char *name)
#ifdef ECORE_XGESTURE
if (_ecore_x_event_gesture_id)
{
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyFlick] =
_ecore_x_event_handle_gesture_notify_flick;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPan] =
_ecore_x_event_handle_gesture_notify_pan;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPinchRotation] =
_ecore_x_event_handle_gesture_notify_pinchrotation;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTap] =
_ecore_x_event_handle_gesture_notify_tap;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTapNHold] =
_ecore_x_event_handle_gesture_notify_tapnhold;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyHold] =
_ecore_x_event_handle_gesture_notify_hold;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyGroup] =
_ecore_x_event_handle_gesture_notify_group;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyFlick] =
_ecore_x_event_handle_gesture_notify_flick;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPan] =
_ecore_x_event_handle_gesture_notify_pan;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPinchRotation] =
_ecore_x_event_handle_gesture_notify_pinchrotation;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTap] =
_ecore_x_event_handle_gesture_notify_tap;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTapNHold] =
_ecore_x_event_handle_gesture_notify_tapnhold;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyHold] =
_ecore_x_event_handle_gesture_notify_hold;
_ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyGroup] =
_ecore_x_event_handle_gesture_notify_group;
}
#endif /* ifdef ECORE_XGESTURE */
@ -767,8 +767,8 @@ ecore_x_default_screen_get(void)
*/
EAPI void
ecore_x_screen_size_get(const Ecore_X_Screen *screen,
int *w,
int *h)
int *w,
int *h)
{
Screen *s = (Screen *)screen;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -992,7 +992,7 @@ ecore_x_bell(int percent)
}
static Eina_Bool
_ecore_x_fd_handler(void *data,
_ecore_x_fd_handler(void *data,
Ecore_Fd_Handler *fd_handler __UNUSED__)
{
Display *d;
@ -1024,7 +1024,7 @@ _ecore_x_fd_handler(void *data,
}
static Eina_Bool
_ecore_x_fd_handler_buf(void *data,
_ecore_x_fd_handler_buf(void *data,
Ecore_Fd_Handler *fd_handler __UNUSED__)
{
Display *d;
@ -1313,7 +1313,7 @@ ecore_x_window_client_sniff(Ecore_X_Window win)
}
EAPI Eina_Bool
ecore_x_window_attributes_get(Ecore_X_Window win,
ecore_x_window_attributes_get(Ecore_X_Window win,
Ecore_X_Window_Attributes *att_ret)
{
XWindowAttributes att;
@ -1371,7 +1371,7 @@ ecore_x_window_save_set_del(Ecore_X_Window win)
EAPI Ecore_X_Window *
ecore_x_window_children_get(Ecore_X_Window win,
int *num)
int *num)
{
Ecore_X_Window *windows = NULL;
Window root_ret = 0, parent_ret = 0, *children_ret = NULL;
@ -1422,7 +1422,7 @@ ecore_x_pointer_control_get(int *accel_num,
EAPI Eina_Bool
ecore_x_pointer_mapping_set(unsigned char *map,
int nmap)
int nmap)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XSetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE;
@ -1430,7 +1430,7 @@ ecore_x_pointer_mapping_set(unsigned char *map,
EAPI Eina_Bool
ecore_x_pointer_mapping_get(unsigned char *map,
int nmap)
int nmap)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XGetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE;
@ -1473,8 +1473,8 @@ ecore_x_pointer_ungrab(void)
EAPI Eina_Bool
ecore_x_pointer_warp(Ecore_X_Window win,
int x,
int y)
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y) ? EINA_TRUE : EINA_FALSE;
@ -1523,15 +1523,15 @@ ecore_x_ungrab(void)
int _ecore_window_grabs_num = 0;
Window *_ecore_window_grabs = NULL;
Eina_Bool (*_ecore_window_grab_replay_func)(void *data,
int event_type,
int event_type,
void *event);
void *_ecore_window_grab_replay_data;
EAPI void
ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
int event_type,
void *event),
void *data)
ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
int event_type,
void *event),
void *data)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_window_grab_replay_func = func;
@ -1539,11 +1539,11 @@ ecore_x_passive_grab_replay_func_set(Eina_Bool (*fun
}
EAPI void
ecore_x_window_button_grab(Ecore_X_Window win,
int button,
ecore_x_window_button_grab(Ecore_X_Window win,
int button,
Ecore_X_Event_Mask event_mask,
int mod,
int any_mod)
int mod,
int any_mod)
{
unsigned int b;
unsigned int m;
@ -1581,7 +1581,7 @@ ecore_x_window_button_grab(Ecore_X_Window win,
}
void
_ecore_x_sync_magic_send(int val,
_ecore_x_sync_magic_send(int val,
Ecore_X_Window swin)
{
XEvent xev;
@ -1635,9 +1635,9 @@ _ecore_x_window_grab_remove(Ecore_X_Window win)
EAPI void
ecore_x_window_button_ungrab(Ecore_X_Window win,
int button,
int mod,
int any_mod)
int button,
int mod,
int any_mod)
{
unsigned int b;
unsigned int m;
@ -1671,9 +1671,9 @@ Window *_ecore_key_grabs = NULL;
EAPI void
ecore_x_window_key_grab(Ecore_X_Window win,
const char *key,
int mod,
int any_mod)
const char *key,
int mod,
int any_mod)
{
KeyCode keycode = 0;
KeySym keysym;
@ -1755,9 +1755,9 @@ _ecore_x_key_grab_remove(Ecore_X_Window win)
EAPI void
ecore_x_window_key_ungrab(Ecore_X_Window win,
const char *key,
int mod,
int any_mod)
const char *key,
int mod,
int any_mod)
{
KeyCode keycode = 0;
KeySym keysym;
@ -1811,14 +1811,14 @@ ecore_x_window_key_ungrab(Ecore_X_Window win,
* @return EINA_TRUE on success EINA_FALSE otherwise.
*/
EAPI Eina_Bool
ecore_x_client_message32_send(Ecore_X_Window win,
Ecore_X_Atom type,
ecore_x_client_message32_send(Ecore_X_Window win,
Ecore_X_Atom type,
Ecore_X_Event_Mask mask,
long d0,
long d1,
long d2,
long d3,
long d4)
long d0,
long d1,
long d2,
long d3,
long d4)
{
XEvent xev;
@ -1848,9 +1848,9 @@ ecore_x_client_message32_send(Ecore_X_Window win,
*/
EAPI Eina_Bool
ecore_x_client_message8_send(Ecore_X_Window win,
Ecore_X_Atom type,
const void *data,
int len)
Ecore_X_Atom type,
const void *data,
int len)
{
XEvent xev;
@ -1870,8 +1870,8 @@ ecore_x_client_message8_send(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_mouse_move_send(Ecore_X_Window win,
int x,
int y)
int x,
int y)
{
XEvent xev;
XWindowAttributes att;
@ -1898,9 +1898,9 @@ ecore_x_mouse_move_send(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_mouse_down_send(Ecore_X_Window win,
int x,
int y,
int b)
int x,
int y,
int b)
{
XEvent xev;
XWindowAttributes att;
@ -1927,9 +1927,9 @@ ecore_x_mouse_down_send(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_mouse_up_send(Ecore_X_Window win,
int x,
int y,
int b)
int x,
int y,
int b)
{
XEvent xev;
XWindowAttributes att;
@ -1981,8 +1981,8 @@ ecore_x_pointer_last_xy_get(int *x,
EAPI void
ecore_x_pointer_xy_get(Ecore_X_Window win,
int *x,
int *y)
int *x,
int *y)
{
Window rwin, cwin;
int rx, ry, wx, wy, ret;
@ -2023,7 +2023,7 @@ ecore_x_visual_id_get(Ecore_X_Visual visual)
*/
EAPI Ecore_X_Visual
ecore_x_default_visual_get(Ecore_X_Display *disp,
Ecore_X_Screen *screen)
Ecore_X_Screen *screen)
{
return DefaultVisual(disp, ecore_x_screen_index_get(screen));
}
@ -2039,7 +2039,7 @@ ecore_x_default_visual_get(Ecore_X_Display *disp,
*/
EAPI Ecore_X_Colormap
ecore_x_default_colormap_get(Ecore_X_Display *disp,
Ecore_X_Screen *screen)
Ecore_X_Screen *screen)
{
return DefaultColormap(disp, ecore_x_screen_index_get(screen));
}
@ -2055,7 +2055,7 @@ ecore_x_default_colormap_get(Ecore_X_Display *disp,
*/
EAPI int
ecore_x_default_depth_get(Ecore_X_Display *disp,
Ecore_X_Screen *screen)
Ecore_X_Screen *screen)
{
return DefaultDepth(disp, ecore_x_screen_index_get(screen));
}

View File

@ -291,9 +291,11 @@ _ecore_x_atoms_init(void)
num = sizeof(items) / sizeof(Atom_Item);
atoms = alloca(num * sizeof(Atom));
names = alloca(num * sizeof(char *));
for (i = 0; i < num; i++) names[i] = (char *)items[i].name;
for (i = 0; i < num; i++)
names[i] = (char *)items[i].name;
XInternAtoms(_ecore_x_disp, names, num, False, atoms);
for (i = 0; i < num; i++) *(items[i].atom) = atoms[i];
for (i = 0; i < num; i++)
*(items[i].atom) = atoms[i];
}
/**
@ -312,8 +314,8 @@ ecore_x_atom_get(const char *name)
}
EAPI void
ecore_x_atoms_get(const char **names,
int num,
ecore_x_atoms_get(const char **names,
int num,
Ecore_X_Atom *atoms)
{
Atom *atoms_int;

View File

@ -40,14 +40,14 @@ ecore_x_composite_query(void)
}
EAPI void
ecore_x_composite_redirect_window(Ecore_X_Window win,
ecore_x_composite_redirect_window(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
switch(type)
switch (type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;
@ -62,14 +62,14 @@ ecore_x_composite_redirect_window(Ecore_X_Window win,
}
EAPI void
ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
switch(type)
switch (type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;
@ -84,14 +84,14 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
}
EAPI void
ecore_x_composite_unredirect_window(Ecore_X_Window win,
ecore_x_composite_unredirect_window(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
switch(type)
switch (type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;
@ -106,14 +106,14 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win,
}
EAPI void
ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
switch(type)
switch (type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;

View File

@ -14,11 +14,11 @@ ecore_x_cursor_color_supported_get(void)
EAPI Ecore_X_Cursor
ecore_x_cursor_new(Ecore_X_Window win,
int *pixels,
int w,
int h,
int hot_x,
int hot_y)
int *pixels,
int w,
int h,
int hot_x,
int hot_y)
{
#ifdef ECORE_XCURSOR
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -43,7 +43,7 @@ ecore_x_cursor_new(Ecore_X_Window win,
// r = (((pixels[i] >> 16) & 0xff) * a) / 0xff;
// g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff;
// b = (((pixels[i] ) & 0xff) * a) / 0xff;
xci->pixels[i] = pixels[i];
xci->pixels[i] = pixels[i];
// (a << 24) | (r << 16) | (g << 8) | (b);
}
c = XcursorImageLoadCursor(_ecore_x_disp, xci);

View File

@ -35,7 +35,7 @@ ecore_x_damage_query(void)
}
EAPI Ecore_X_Damage
ecore_x_damage_new(Ecore_X_Drawable d,
ecore_x_damage_new(Ecore_X_Drawable d,
Ecore_X_Damage_Report_Level level)
{
#ifdef ECORE_XDAMAGE

View File

@ -88,13 +88,13 @@ _ecore_x_dnd_shutdown(void)
}
static Eina_Bool
_ecore_x_dnd_converter_copy(char *target __UNUSED__,
void *data,
int size,
void **data_ret,
int *size_ret,
_ecore_x_dnd_converter_copy(char *target __UNUSED__,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *tprop __UNUSED__,
int *count __UNUSED__)
int *count __UNUSED__)
{
XTextProperty text_prop;
char *mystr;
@ -134,7 +134,7 @@ _ecore_x_dnd_converter_copy(char *target __UNUSED__,
EAPI void
ecore_x_dnd_aware_set(Ecore_X_Window win,
Eina_Bool on)
Eina_Bool on)
{
Ecore_X_Atom prop_data = ECORE_X_DND_VERSION;
@ -212,7 +212,7 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
EAPI Eina_Bool
ecore_x_dnd_type_isset(Ecore_X_Window win,
const char *type)
const char *type)
{
int num, i, ret = EINA_FALSE;
unsigned char *data;
@ -241,8 +241,8 @@ ecore_x_dnd_type_isset(Ecore_X_Window win,
EAPI void
ecore_x_dnd_type_set(Ecore_X_Window win,
const char *type,
Eina_Bool on)
const char *type,
Eina_Bool on)
{
Ecore_X_Atom atom;
Ecore_X_Atom *oldset = NULL, *newset = NULL;
@ -309,8 +309,8 @@ ecore_x_dnd_type_set(Ecore_X_Window win,
EAPI void
ecore_x_dnd_types_set(Ecore_X_Window win,
const char **types,
unsigned int num_types)
const char **types,
unsigned int num_types)
{
Ecore_X_Atom *newset = NULL;
unsigned int i;
@ -340,8 +340,8 @@ ecore_x_dnd_types_set(Ecore_X_Window win,
EAPI void
ecore_x_dnd_actions_set(Ecore_X_Window win,
Ecore_X_Atom *actions,
unsigned int num_actions)
Ecore_X_Atom *actions,
unsigned int num_actions)
{
unsigned int i;
unsigned char *data = NULL;
@ -378,9 +378,9 @@ ecore_x_dnd_actions_set(Ecore_X_Window win,
*/
EAPI void
ecore_x_dnd_callback_pos_update_set(
void (*cb)(void *,
Ecore_X_Xdnd_Position *data),
const void *data)
void (*cb)(void *,
Ecore_X_Xdnd_Position *data),
const void *data)
{
_posupdatecb = cb;
_posupdatedata = (void *)data; /* Discard the const early */
@ -401,7 +401,7 @@ _ecore_x_dnd_target_get(void)
EAPI Eina_Bool
ecore_x_dnd_begin(Ecore_X_Window source,
unsigned char *data,
int size)
int size)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_dnd_version_get(source))
@ -471,8 +471,8 @@ ecore_x_dnd_drop(void)
else
{
/* Dropping on nothing */
ecore_x_selection_xdnd_clear();
_source->state = ECORE_X_DND_SOURCE_IDLE;
ecore_x_selection_xdnd_clear();
_source->state = ECORE_X_DND_SOURCE_IDLE;
}
ecore_x_window_ignore_set(_source->win, 0);
@ -483,10 +483,10 @@ ecore_x_dnd_drop(void)
}
EAPI void
ecore_x_dnd_send_status(Eina_Bool will_accept,
Eina_Bool suppress,
ecore_x_dnd_send_status(Eina_Bool will_accept,
Eina_Bool suppress,
Ecore_X_Rectangle rectangle,
Ecore_X_Atom action)
Ecore_X_Atom action)
{
XEvent xev;
@ -579,8 +579,8 @@ ecore_x_dnd_source_action_get(void)
void
_ecore_x_dnd_drag(Ecore_X_Window root,
int x,
int y)
int x,
int y)
{
XEvent xev;
Ecore_X_Window win;

View File

@ -21,10 +21,10 @@
*/
EAPI void
ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
int *x,
int *y,
int *w,
int *h)
int *x,
int *y,
int *w,
int *h)
{
Window dummy_win;
int ret_x, ret_y;
@ -106,11 +106,11 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
*/
EAPI void
ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d,
Ecore_X_GC gc,
int x,
int y,
int width,
int height)
Ecore_X_GC gc,
int x,
int y,
int width,
int height)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);

View File

@ -18,10 +18,10 @@ ecore_x_e_init(void)
EAPI void
ecore_x_e_frame_size_set(Ecore_X_Window win,
int fl,
int fr,
int ft,
int fb)
int fl,
int fr,
int ft,
int fb)
{
unsigned int frames[4];
@ -35,7 +35,7 @@ ecore_x_e_frame_size_set(Ecore_X_Window win,
EAPI void
ecore_x_e_virtual_keyboard_set(Ecore_X_Window win,
unsigned int is_keyboard)
unsigned int is_keyboard)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
@ -162,7 +162,7 @@ _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
}
EAPI void
ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
Ecore_X_Virtual_Keyboard_State state)
{
Ecore_X_Atom atom = 0;
@ -187,7 +187,7 @@ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
}
EAPI void
ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
Ecore_X_Virtual_Keyboard_State state)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -255,9 +255,9 @@ ecore_x_e_illume_zone_get(Ecore_X_Window win)
}
EAPI void
ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
Ecore_X_Window *zones,
unsigned int n_zones)
unsigned int n_zones)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST,
@ -266,7 +266,7 @@ ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
EAPI void
ecore_x_e_illume_conformant_set(Ecore_X_Window win,
unsigned int is_conformant)
unsigned int is_conformant)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
@ -287,7 +287,7 @@ ecore_x_e_illume_conformant_get(Ecore_X_Window win)
}
EAPI void
ecore_x_e_illume_mode_set(Ecore_X_Window win,
ecore_x_e_illume_mode_set(Ecore_X_Window win,
Ecore_X_Illume_Mode mode)
{
Ecore_X_Atom atom = 0;
@ -311,7 +311,7 @@ ecore_x_e_illume_mode_get(Ecore_X_Window win)
}
EAPI void
ecore_x_e_illume_mode_send(Ecore_X_Window win,
ecore_x_e_illume_mode_send(Ecore_X_Window win,
Ecore_X_Illume_Mode mode)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -377,7 +377,7 @@ ecore_x_e_illume_home_del_send(Ecore_X_Window win)
EAPI void
ecore_x_e_illume_drag_set(Ecore_X_Window win,
unsigned int drag)
unsigned int drag)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1);
@ -397,7 +397,7 @@ ecore_x_e_illume_drag_get(Ecore_X_Window win)
EAPI void
ecore_x_e_illume_drag_locked_set(Ecore_X_Window win,
unsigned int is_locked)
unsigned int is_locked)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
@ -437,10 +437,10 @@ ecore_x_e_illume_drag_end_send(Ecore_X_Window win)
EAPI void
ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
unsigned int geom[4];
@ -455,10 +455,10 @@ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
int *x,
int *y,
int *w,
int *h)
int *x,
int *y,
int *w,
int *h)
{
int ret = 0;
unsigned int geom[4];
@ -488,10 +488,10 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
EAPI void
ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
unsigned int geom[4];
@ -506,10 +506,10 @@ ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
int *x,
int *y,
int *w,
int *h)
int *x,
int *y,
int *w,
int *h)
{
int ret = 0;
unsigned int geom[4];
@ -539,10 +539,10 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
EAPI void
ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
unsigned int geom[4];
@ -557,10 +557,10 @@ ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
int *x,
int *y,
int *w,
int *h)
int *x,
int *y,
int *w,
int *h)
{
int ret = 0;
unsigned int geom[4];
@ -619,7 +619,7 @@ _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom)
EAPI void
ecore_x_e_illume_quickpanel_set(Ecore_X_Window win,
unsigned int is_quickpanel)
unsigned int is_quickpanel)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
@ -640,7 +640,7 @@ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
}
EAPI void
ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
Ecore_X_Illume_Quickpanel_State state)
{
Ecore_X_Atom atom = 0;
@ -666,7 +666,7 @@ ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
}
EAPI void
ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
Ecore_X_Illume_Quickpanel_State state)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -688,7 +688,7 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win)
EAPI void
ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
unsigned int priority)
unsigned int priority)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win,
@ -712,7 +712,7 @@ ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
EAPI void
ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
unsigned int priority)
unsigned int priority)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win,
@ -736,7 +736,7 @@ ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win)
EAPI void
ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win,
unsigned int zone)
unsigned int zone)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win,
@ -769,7 +769,7 @@ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win)
}
EAPI void
ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
Ecore_X_Sync_Counter counter)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -827,8 +827,8 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root,
EAPI void
ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root,
Ecore_X_Window win,
int w,
int h)
int w,
int h)
{
XEvent xev;
@ -854,7 +854,7 @@ ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root,
EAPI void
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
Eina_Bool enabled)
Eina_Bool enabled)
{
Ecore_X_Window win;

View File

@ -9,7 +9,7 @@
#include "ecore_x_private.h"
#include "Ecore_X.h"
static int _ecore_x_error_handle(Display *d,
static int _ecore_x_error_handle(Display *d,
XErrorEvent *ev);
static int _ecore_x_io_error_handle(Display *d);
@ -28,7 +28,7 @@ static int _error_code = 0;
* Set the X error handler function
*/
EAPI void
ecore_x_error_handler_set(void (*func)(void *data),
ecore_x_error_handler_set(void (*func)(void *data),
const void *data)
{
_error_func = func;
@ -43,7 +43,7 @@ ecore_x_error_handler_set(void (*func)(void *data),
* Set the X I/O error handler function
*/
EAPI void
ecore_x_io_error_handler_set(void (*func)(void *data),
ecore_x_io_error_handler_set(void (*func)(void *data),
const void *data)
{
_io_error_func = func;
@ -82,7 +82,7 @@ _ecore_x_error_handler_init(void)
}
static int
_ecore_x_error_handle(Display *d,
_ecore_x_error_handle(Display *d,
XErrorEvent *ev)
{
if (d == _ecore_x_disp)

View File

@ -103,7 +103,7 @@ _ecore_x_event_free_mouse_move(void *data __UNUSED__,
}
EAPI void
ecore_x_event_mask_set(Ecore_X_Window w,
ecore_x_event_mask_set(Ecore_X_Window w,
Ecore_X_Event_Mask mask)
{
XWindowAttributes attr;
@ -120,7 +120,7 @@ ecore_x_event_mask_set(Ecore_X_Window w,
}
EAPI void
ecore_x_event_mask_unset(Ecore_X_Window w,
ecore_x_event_mask_unset(Ecore_X_Window w,
Ecore_X_Event_Mask mask)
{
XWindowAttributes attr;
@ -201,23 +201,23 @@ _ecore_x_event_modifiers(unsigned int state)
void
_ecore_mouse_move(unsigned int timestamp,
unsigned int xmodifiers,
int x,
int y,
int x_root,
int y_root,
int x,
int y,
int x_root,
int y_root,
unsigned int event_window,
unsigned int window,
unsigned int root_win,
int same_screen,
int dev,
double radx,
double rady,
double pressure,
double angle,
double mx,
double my,
double mrx,
double mry)
int same_screen,
int dev,
double radx,
double rady,
double pressure,
double angle,
double mx,
double my,
double mrx,
double mry)
{
Ecore_Event_Mouse_Move *e;
Ecore_Event *event;
@ -263,7 +263,7 @@ _ecore_mouse_move(unsigned int timestamp,
}
static void
_ecore_key_press(int event,
_ecore_key_press(int event,
XKeyEvent *xevent)
{
Ecore_Event_Key *e;
@ -346,27 +346,27 @@ on_error:
}
Ecore_Event_Mouse_Button *
_ecore_mouse_button(int event,
_ecore_mouse_button(int event,
unsigned int timestamp,
unsigned int xmodifiers,
unsigned int buttons,
int x,
int y,
int x_root,
int y_root,
int x,
int y,
int x_root,
int y_root,
unsigned int event_window,
unsigned int window,
unsigned int root_win,
int same_screen,
int dev,
double radx,
double rady,
double pressure,
double angle,
double mx,
double my,
double mrx,
double mry)
int same_screen,
int dev,
double radx,
double rady,
double pressure,
double angle,
double mx,
double my,
double mrx,
double mry)
{
Ecore_Event_Mouse_Button *e;
@ -407,37 +407,37 @@ _ecore_mouse_button(int event,
{
if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN)
{
//Check Double Clicked
if (((int)(timestamp - down_info->last_time) <=
(int)(1000 * _ecore_x_double_click_time)) &&
(window == down_info->last_win) &&
(event_window == down_info->last_event_win))
{
e->double_click = 1;
down_info->did_double = EINA_TRUE;
}
else
{
down_info->did_double = EINA_FALSE;
down_info->did_triple = EINA_FALSE;
}
//Check Double Clicked
if (((int)(timestamp - down_info->last_time) <=
(int)(1000 * _ecore_x_double_click_time)) &&
(window == down_info->last_win) &&
(event_window == down_info->last_event_win))
{
e->double_click = 1;
down_info->did_double = EINA_TRUE;
}
else
{
down_info->did_double = EINA_FALSE;
down_info->did_triple = EINA_FALSE;
}
//Check Triple Clicked
if (((int)(timestamp - down_info->last_last_time) <=
(int)(2 * 1000 * _ecore_x_double_click_time)) &&
(window == down_info->last_win) &&
(window == down_info->last_last_win) &&
(event_window == down_info->last_event_win) &&
(event_window == down_info->last_last_event_win)
)
{
e->triple_click = 1;
down_info->did_triple = EINA_TRUE;
}
else
{
down_info->did_triple = EINA_FALSE;
}
//Check Triple Clicked
if (((int)(timestamp - down_info->last_last_time) <=
(int)(2 * 1000 * _ecore_x_double_click_time)) &&
(window == down_info->last_win) &&
(window == down_info->last_last_win) &&
(event_window == down_info->last_event_win) &&
(event_window == down_info->last_last_event_win)
)
{
e->triple_click = 1;
down_info->did_triple = EINA_TRUE;
}
else
{
down_info->did_triple = EINA_FALSE;
}
}
else
{
@ -715,26 +715,26 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
_ecore_x_last_event_mouse_move_event = NULL;
}
*/
_ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
xevent->xmotion.x, xevent->xmotion.y,
xevent->xmotion.x_root, xevent->xmotion.y_root,
xevent->xmotion.window,
(xevent->xmotion.subwindow ? xevent->xmotion.subwindow :
xevent->xmotion.window),
xevent->xmotion.root,
xevent->xmotion.same_screen,
0, 1, 1,
1.0, // pressure
0.0, // angle
xevent->xmotion.x, xevent->xmotion.y,
xevent->xmotion.x_root, xevent->xmotion.y_root);
_ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
xevent->xmotion.x, xevent->xmotion.y,
xevent->xmotion.x_root, xevent->xmotion.y_root,
xevent->xmotion.window,
(xevent->xmotion.subwindow ? xevent->xmotion.subwindow :
xevent->xmotion.window),
xevent->xmotion.root,
xevent->xmotion.same_screen,
0, 1, 1,
1.0, // pressure
0.0, // angle
xevent->xmotion.x, xevent->xmotion.y,
xevent->xmotion.x_root, xevent->xmotion.y_root);
_ecore_x_last_event_mouse_move = 1;
_ecore_x_last_event_mouse_move = 1;
/* Xdnd handling */
_ecore_x_dnd_drag(xevent->xmotion.root,
xevent->xmotion.x_root,
xevent->xmotion.y_root);
/* Xdnd handling */
_ecore_x_dnd_drag(xevent->xmotion.root,
xevent->xmotion.x_root,
xevent->xmotion.y_root);
}
void
@ -1284,11 +1284,11 @@ void
_ecore_x_event_handle_selection_clear(XEvent *xevent)
{
// Ecore_X_Selection_Intern *d;
Ecore_X_Event_Selection_Clear *e;
Ecore_X_Atom sel;
Ecore_X_Event_Selection_Clear *e;
Ecore_X_Atom sel;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_last_event_mouse_move = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_last_event_mouse_move = 0;
/* errr..... why? paranoia.
d = _ecore_x_selection_get(xevent->xselectionclear.selection);
if (d && (xevent->xselectionclear.time > d->time))
@ -1298,20 +1298,20 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent)
}
*/
/* Generate event for app cleanup */
e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
e->win = xevent->xselectionclear.window;
e->time = xevent->xselectionclear.time;
e->atom = sel = xevent->xselectionclear.selection;
if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
e->selection = ECORE_X_SELECTION_PRIMARY;
else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
e->selection = ECORE_X_SELECTION_SECONDARY;
else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
e->selection = ECORE_X_SELECTION_CLIPBOARD;
else
e->selection = ECORE_X_SELECTION_OTHER;
e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
e->win = xevent->xselectionclear.window;
e->time = xevent->xselectionclear.time;
e->atom = sel = xevent->xselectionclear.selection;
if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
e->selection = ECORE_X_SELECTION_PRIMARY;
else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
e->selection = ECORE_X_SELECTION_SECONDARY;
else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
e->selection = ECORE_X_SELECTION_CLIPBOARD;
else
e->selection = ECORE_X_SELECTION_OTHER;
ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
}
void
@ -1360,17 +1360,17 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
property = None;
else if (data)
{
/* FIXME: This does not properly handle large data transfers */
ecore_x_window_prop_property_set(
xevent->xselectionrequest.requestor,
xevent->xselectionrequest.
property,
type,
typesize,
data,
len);
property = xevent->xselectionrequest.property;
free(data);
/* FIXME: This does not properly handle large data transfers */
ecore_x_window_prop_property_set(
xevent->xselectionrequest.requestor,
xevent->xselectionrequest.
property,
type,
typesize,
data,
len);
property = xevent->xselectionrequest.property;
free(data);
}
ecore_x_selection_notify_send(xevent->xselectionrequest.requestor,
@ -1528,32 +1528,32 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
if (xevent->xclient.data.l[1] & 0x1UL)
{
/* source supports more than 3 types, fetch property */
unsigned char *data;
Ecore_X_Atom *types;
int i, num_ret;
unsigned char *data;
Ecore_X_Atom *types;
int i, num_ret;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(ecore_x_window_prop_property_get(target->source,
ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM,
32, &data, &num_ret)))
{
WRN(
"DND: Could not fetch data type list from source window, aborting.");
free(e);
return;
}
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(ecore_x_window_prop_property_get(target->source,
ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM,
32, &data, &num_ret)))
{
WRN(
"DND: Could not fetch data type list from source window, aborting.");
free(e);
return;
}
types = (Ecore_X_Atom *)data;
e->types = calloc(num_ret, sizeof(char *));
if (e->types)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
for (i = 0; i < num_ret; i++)
e->types[i] = XGetAtomName(_ecore_x_disp, types[i]);
}
types = (Ecore_X_Atom *)data;
e->types = calloc(num_ret, sizeof(char *));
if (e->types)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
for (i = 0; i < num_ret; i++)
e->types[i] = XGetAtomName(_ecore_x_disp, types[i]);
}
e->num_types = num_ret;
e->num_types = num_ret;
}
else
{
@ -1774,7 +1774,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN)
{
// char *name;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
// name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]);
// if (name) ERR("Unknown state: %s", name);
@ -1784,7 +1784,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN)
{
// char *name;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
// name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]);
// if (name) ERR("Unknown state: %s", name);
@ -1888,10 +1888,10 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
&& (xevent->xclient.window == _ecore_x_private_win))
{
/* a grab sync marker */
if (xevent->xclient.data.l[1] == 0x10000001)
_ecore_x_window_grab_remove(xevent->xclient.data.l[2]);
else if (xevent->xclient.data.l[1] == 0x10000002)
_ecore_x_key_grab_remove(xevent->xclient.data.l[2]);
if (xevent->xclient.data.l[1] == 0x10000001)
_ecore_x_window_grab_remove(xevent->xclient.data.l[2]);
else if (xevent->xclient.data.l[1] == 0x10000002)
_ecore_x_key_grab_remove(xevent->xclient.data.l[2]);
}
else
{
@ -2315,7 +2315,7 @@ _ecore_x_event_handle_gesture_notify_flick(XEvent *xevent)
xfe = (XGestureNotifyFlickEvent *)xevent;
e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Flick));
if (!e)
return;
return;
e->win = xfe->window;
e->time = xfe->time;
@ -2341,7 +2341,7 @@ _ecore_x_event_handle_gesture_notify_pan(XEvent *xevent)
xpe = (XGestureNotifyPanEvent *)xevent;
e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Pan));
if (!e)
return;
return;
e->win = xpe->window;
e->time = xpe->time;
@ -2368,7 +2368,7 @@ _ecore_x_event_handle_gesture_notify_pinchrotation(XEvent *xevent)
xpre = (XGestureNotifyPinchRotationEvent *)xevent;
e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_PinchRotation));
if (!e)
return;
return;
e->win = xpre->window;
e->time = xpre->time;
@ -2395,7 +2395,7 @@ _ecore_x_event_handle_gesture_notify_tap(XEvent *xevent)
xte = (XGestureNotifyTapEvent *)xevent;
e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Tap));
if (!e)
return;
return;
e->win = xte->window;
e->time = xte->time;
@ -2421,7 +2421,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent)
xthe = (XGestureNotifyTapNHoldEvent *)xevent;
e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_TapNHold));
if (!e)
return;
return;
e->win = xthe->window;
e->time = xthe->time;
@ -2436,7 +2436,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent)
}
void
_ecore_x_event_handle_gesture_notify_hold(XEvent *xevent)
_ecore_x_event_handle_gesture_notify_hold(XEvent *xevent)
{
XGestureNotifyHoldEvent *xhe;
Ecore_X_Event_Gesture_Notify_Hold *e;
@ -2447,7 +2447,7 @@ void
xhe = (XGestureNotifyHoldEvent *)xevent;
e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Hold));
if (!e)
return;
return;
e->win = xhe->window;
e->time = xhe->time;
@ -2461,7 +2461,7 @@ void
}
void
_ecore_x_event_handle_gesture_notify_group(XEvent *xevent)
_ecore_x_event_handle_gesture_notify_group(XEvent *xevent)
{
XGestureNotifyGroupEvent *xge;
Ecore_X_Event_Gesture_Notify_Group *e;
@ -2472,7 +2472,7 @@ void
xge = (XGestureNotifyGroupEvent *)xevent;
e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Group));
if (!e)
return;
return;
e->win = xge->window;
e->time = xge->time;
@ -2482,5 +2482,6 @@ void
ecore_event_add(ECORE_X_EVENT_GESTURE_NOTIFY_GROUP, e, NULL, NULL);
}
#endif /* ifdef ECORE_XGESTURE */

View File

@ -38,7 +38,7 @@ _ecore_x_fixes_init(void)
/* I don't know what to call this function. */
static XRectangle *
_ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects,
int num)
int num)
{
XRectangle *xrect;
int i;
@ -62,7 +62,7 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects,
static Ecore_X_Rectangle *
_ecore_x_rectangle_x_to_ecore(XRectangle *xrect,
int num)
int num)
{
Ecore_X_Rectangle *rects;
int i;
@ -106,7 +106,7 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection)
EAPI Ecore_X_Region
ecore_x_region_new(Ecore_X_Rectangle *rects,
int num)
int num)
{
#ifdef ECORE_XFIXES
Ecore_X_Region region;
@ -137,7 +137,7 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
}
EAPI Ecore_X_Region
ecore_x_region_new_from_window(Ecore_X_Window win,
ecore_x_region_new_from_window(Ecore_X_Window win,
Ecore_X_Region_Type type)
{
#ifdef ECORE_XFIXES
@ -189,9 +189,9 @@ ecore_x_region_free(Ecore_X_Region region)
}
EAPI void
ecore_x_region_set(Ecore_X_Region region,
ecore_x_region_set(Ecore_X_Region region,
Ecore_X_Rectangle *rects,
int num)
int num)
{
#ifdef ECORE_XFIXES
XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num);
@ -244,16 +244,17 @@ ecore_x_region_subtract(Ecore_X_Region dest,
}
EAPI void
ecore_x_region_invert(Ecore_X_Region dest,
ecore_x_region_invert(Ecore_X_Region dest,
Ecore_X_Rectangle *bounds,
Ecore_X_Region source)
Ecore_X_Region source)
{
#ifdef ECORE_XFIXES
XRectangle *xbound;
int num = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
while (bounds + num) num++;
while (bounds + num)
num++;
xbound = _ecore_x_rectangle_ecore_to_x(bounds, num);
XFixesInvertRegion(_ecore_x_disp, dest, xbound, source);
@ -262,8 +263,8 @@ ecore_x_region_invert(Ecore_X_Region dest,
EAPI void
ecore_x_region_translate(Ecore_X_Region region,
int dx,
int dy)
int dx,
int dy)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -282,8 +283,8 @@ ecore_x_region_extents(Ecore_X_Region dest,
}
EAPI Ecore_X_Rectangle *
ecore_x_region_fetch(Ecore_X_Region region,
int *num,
ecore_x_region_fetch(Ecore_X_Region region,
int *num,
Ecore_X_Rectangle *bounds){
#ifdef ECORE_XFIXES
Ecore_X_Rectangle *rects;
@ -305,10 +306,10 @@ ecore_x_region_fetch(Ecore_X_Region region,
EAPI void
ecore_x_region_expand(Ecore_X_Region dest,
Ecore_X_Region source,
unsigned int left,
unsigned int right,
unsigned int top,
unsigned int bottom)
unsigned int left,
unsigned int right,
unsigned int top,
unsigned int bottom)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -318,9 +319,9 @@ ecore_x_region_expand(Ecore_X_Region dest,
EAPI void
ecore_x_region_gc_clip_set(Ecore_X_Region region,
Ecore_X_GC gc,
int x_origin,
int y_origin)
Ecore_X_GC gc,
int x_origin,
int y_origin)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -329,11 +330,11 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region,
}
EAPI void
ecore_x_region_window_shape_set(Ecore_X_Region region,
Ecore_X_Window win,
ecore_x_region_window_shape_set(Ecore_X_Region region,
Ecore_X_Window win,
Ecore_X_Shape_Type type,
int x_offset,
int y_offset)
int x_offset,
int y_offset)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -347,10 +348,10 @@ ecore_x_region_window_shape_set(Ecore_X_Region region,
}
EAPI void
ecore_x_region_picture_clip_set(Ecore_X_Region region,
ecore_x_region_picture_clip_set(Ecore_X_Region region,
Ecore_X_Picture picture,
int x_origin,
int y_origin)
int x_origin,
int y_origin)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);

View File

@ -19,9 +19,9 @@
* @return The new default graphics context.
*/
EAPI Ecore_X_GC
ecore_x_gc_new(Ecore_X_Drawable draw,
ecore_x_gc_new(Ecore_X_Drawable draw,
Ecore_X_GC_Value_Mask value_mask,
const unsigned int *value_list)
const unsigned int *value_list)
{
XGCValues gcv;
int mask;

View File

@ -26,7 +26,7 @@ _ecore_x_gesture_init(void)
_gesture_available = EINA_TRUE;
}
else
_gesture_available = EINA_FALSE;
_gesture_available = EINA_FALSE;
#else /* ifdef ECORE_XGESTURE */
_gesture_available = EINA_FALSE;
#endif /* ifdef ECORE_XGESTURE */
@ -48,11 +48,11 @@ ecore_x_gesture_events_select(Ecore_X_Window win,
{
#ifdef ECORE_XGESTURE
if (!_gesture_available)
return EINA_FALSE;
return EINA_FALSE;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGestureSelectEvents(_ecore_x_disp, win, mask);
return EINA_TRUE;
#else /* ifdef ECORE_XGESTURE */
return EINA_FALSE;
@ -68,7 +68,7 @@ ecore_x_gesture_events_selected_get(Ecore_X_Window win)
Ecore_X_Gesture_Event_Mask mask;
if (!_gesture_available)
return ECORE_X_GESTURE_EVENT_MASK_NONE;
return ECORE_X_GESTURE_EVENT_MASK_NONE;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (GestureSuccess != XGestureGetSelectedEvents(_ecore_x_disp, win, &mask))
@ -76,7 +76,7 @@ ecore_x_gesture_events_selected_get(Ecore_X_Window win)
mask = ECORE_X_GESTURE_EVENT_MASK_NONE;
return mask;
}
return mask;
#else /* ifdef ECORE_XGESTURE */
return ECORE_X_GESTURE_EVENT_MASK_NONE;
@ -91,14 +91,14 @@ ecore_x_gesture_event_grab(Ecore_X_Window win,
{
#ifdef ECORE_XGESTURE
if (!_gesture_available)
return EINA_FALSE;
return EINA_FALSE;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (GestureGrabSuccess != XGestureGrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime))
{
return EINA_FALSE;
}
return EINA_TRUE;
#else /* ifdef ECORE_XGESTURE */
return EINA_FALSE;
@ -117,14 +117,14 @@ ecore_x_gesture_event_ungrab(Ecore_X_Window win,
Ecore_X_Gesture_Event_Mask mask;
if (!_gesture_available)
return EINA_FALSE;
return EINA_FALSE;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (GestureUngrabSuccess != XGestureUngrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime))
{
return EINA_FALSE;
}
return EINA_TRUE;
#else /* ifdef ECORE_XGESTURE */
return EINA_FALSE;

View File

@ -24,7 +24,7 @@ ecore_x_icccm_init(void)
}
EAPI void
ecore_x_icccm_state_set(Ecore_X_Window win,
ecore_x_icccm_state_set(Ecore_X_Window win,
Ecore_X_Window_State_Hint state)
{
unsigned long c[2];
@ -76,7 +76,7 @@ ecore_x_icccm_state_get(Ecore_X_Window win)
EAPI void
ecore_x_icccm_delete_window_send(Ecore_X_Window win,
Ecore_X_Time t)
Ecore_X_Time t)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
@ -87,7 +87,7 @@ ecore_x_icccm_delete_window_send(Ecore_X_Window win,
EAPI void
ecore_x_icccm_take_focus_send(Ecore_X_Window win,
Ecore_X_Time t)
Ecore_X_Time t)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
@ -98,7 +98,7 @@ ecore_x_icccm_take_focus_send(Ecore_X_Window win,
EAPI void
ecore_x_icccm_save_yourself_send(Ecore_X_Window win,
Ecore_X_Time t)
Ecore_X_Time t)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
@ -109,10 +109,10 @@ ecore_x_icccm_save_yourself_send(Ecore_X_Window win,
EAPI void
ecore_x_icccm_move_resize_send(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
XEvent ev;
@ -132,14 +132,14 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win,
}
EAPI void
ecore_x_icccm_hints_set(Ecore_X_Window win,
Eina_Bool accepts_focus,
ecore_x_icccm_hints_set(Ecore_X_Window win,
Eina_Bool accepts_focus,
Ecore_X_Window_State_Hint initial_state,
Ecore_X_Pixmap icon_pixmap,
Ecore_X_Pixmap icon_mask,
Ecore_X_Window icon_window,
Ecore_X_Window window_group,
Eina_Bool is_urgent)
Ecore_X_Pixmap icon_pixmap,
Ecore_X_Pixmap icon_mask,
Ecore_X_Window icon_window,
Ecore_X_Window window_group,
Eina_Bool is_urgent)
{
XWMHints *hints;
@ -189,14 +189,14 @@ ecore_x_icccm_hints_set(Ecore_X_Window win,
}
EAPI Eina_Bool
ecore_x_icccm_hints_get(Ecore_X_Window win,
Eina_Bool *accepts_focus,
ecore_x_icccm_hints_get(Ecore_X_Window win,
Eina_Bool *accepts_focus,
Ecore_X_Window_State_Hint *initial_state,
Ecore_X_Pixmap *icon_pixmap,
Ecore_X_Pixmap *icon_mask,
Ecore_X_Window *icon_window,
Ecore_X_Window *window_group,
Eina_Bool *is_urgent)
Ecore_X_Pixmap *icon_pixmap,
Ecore_X_Pixmap *icon_mask,
Ecore_X_Window *icon_window,
Ecore_X_Window *window_group,
Eina_Bool *is_urgent)
{
XWMHints *hints;
@ -266,19 +266,19 @@ ecore_x_icccm_hints_get(Ecore_X_Window win,
}
EAPI void
ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
Eina_Bool request_pos,
ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
Eina_Bool request_pos,
Ecore_X_Gravity gravity,
int min_w,
int min_h,
int max_w,
int max_h,
int base_w,
int base_h,
int step_x,
int step_y,
double min_aspect,
double max_aspect)
int min_w,
int min_h,
int max_w,
int max_h,
int base_w,
int base_h,
int step_x,
int step_y,
double min_aspect,
double max_aspect)
{
XSizeHints hint;
long mask;
@ -338,19 +338,19 @@ ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
}
EAPI Eina_Bool
ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
Eina_Bool *request_pos,
ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
Eina_Bool *request_pos,
Ecore_X_Gravity *gravity,
int *min_w,
int *min_h,
int *max_w,
int *max_h,
int *base_w,
int *base_h,
int *step_x,
int *step_y,
double *min_aspect,
double *max_aspect)
int *min_w,
int *min_h,
int *max_w,
int *max_h,
int *base_w,
int *base_h,
int *step_x,
int *step_y,
double *min_aspect,
double *max_aspect)
{
XSizeHints hint;
long mask;
@ -464,7 +464,7 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
EAPI void
ecore_x_icccm_title_set(Ecore_X_Window win,
const char *t)
const char *t)
{
char *list[1];
XTextProperty xprop;
@ -522,23 +522,23 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
t = strdup((char *)xprop.value);
else
{
/* convert to utf8 */
/* convert to utf8 */
#ifdef X_HAVE_UTF8_STRING
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
#else /* ifdef X_HAVE_UTF8_STRING */
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
#endif /* ifdef X_HAVE_UTF8_STRING */
if ((ret == XLocaleNotSupported) ||
(ret == XNoMemory) || (ret == XConverterNotFound))
t = strdup((char *)xprop.value);
else if ((ret >= Success) && (num > 0))
t = strdup(list[0]);
if ((ret == XLocaleNotSupported) ||
(ret == XNoMemory) || (ret == XConverterNotFound))
t = strdup((char *)xprop.value);
else if ((ret >= Success) && (num > 0))
t = strdup(list[0]);
if (list)
XFreeStringList(list);
if (list)
XFreeStringList(list);
}
if (xprop.value)
@ -559,8 +559,8 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
*/
EAPI void
ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
Ecore_X_Atom *protos,
int num)
Ecore_X_Atom *protos,
int num)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (num > 0)
@ -576,9 +576,9 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
* @param on On/Off
*/
EAPI void
ecore_x_icccm_protocol_set(Ecore_X_Window win,
ecore_x_icccm_protocol_set(Ecore_X_Window win,
Ecore_X_WM_Protocol protocol,
Eina_Bool on)
Eina_Bool on)
{
Atom *protos = NULL;
Atom proto;
@ -662,7 +662,7 @@ leave:
* @return 1 if the protocol is set, else 0.
*/
EAPI Eina_Bool
ecore_x_icccm_protocol_isset(Ecore_X_Window win,
ecore_x_icccm_protocol_isset(Ecore_X_Window win,
Ecore_X_WM_Protocol protocol)
{
Atom proto, *protos = NULL;
@ -702,8 +702,8 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win,
*/
EAPI void
ecore_x_icccm_name_class_set(Ecore_X_Window win,
const char *n,
const char *c)
const char *n,
const char *c)
{
XClassHint *xch;
@ -728,8 +728,8 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win,
*/
EAPI void
ecore_x_icccm_name_class_get(Ecore_X_Window win,
char **n,
char **c)
char **n,
char **c)
{
XClassHint xch;
@ -783,8 +783,8 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win)
*/
EAPI void
ecore_x_icccm_command_set(Ecore_X_Window win,
int argc,
char **argv)
int argc,
char **argv)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSetCommand(_ecore_x_disp, win, argv, argc);
@ -801,8 +801,8 @@ ecore_x_icccm_command_set(Ecore_X_Window win,
*/
EAPI void
ecore_x_icccm_command_get(Ecore_X_Window win,
int *argc,
char ***argv)
int *argc,
char ***argv)
{
int i, c;
char **v;
@ -861,7 +861,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win,
*/
EAPI void
ecore_x_icccm_icon_name_set(Ecore_X_Window win,
const char *t)
const char *t)
{
char *list[1];
XTextProperty xprop;
@ -921,26 +921,26 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
t = strdup((char *)xprop.value);
else
{
/* convert to utf8 */
/* convert to utf8 */
#ifdef X_HAVE_UTF8_STRING
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
#else /* ifdef X_HAVE_UTF8_STRING */
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num);
#endif /* ifdef X_HAVE_UTF8_STRING */
if ((ret == XLocaleNotSupported) ||
(ret == XNoMemory) || (ret == XConverterNotFound))
t = strdup((char *)xprop.value);
else if (ret >= Success)
{
if ((num >= 1) && (list))
t = strdup(list[0]);
if ((ret == XLocaleNotSupported) ||
(ret == XNoMemory) || (ret == XConverterNotFound))
t = strdup((char *)xprop.value);
else if (ret >= Success)
{
if ((num >= 1) && (list))
t = strdup(list[0]);
if (list)
XFreeStringList(list);
}
if (list)
XFreeStringList(list);
}
}
if (xprop.value)
@ -1129,7 +1129,7 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win)
*/
EAPI void
ecore_x_icccm_window_role_set(Ecore_X_Window win,
const char *role)
const char *role)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE,

View File

@ -15,7 +15,7 @@ static int _ecore_x_image_shm_can = -1;
static int _ecore_x_image_err = 0;
static int
_ecore_x_image_error_handler(Display *d __UNUSED__,
_ecore_x_image_error_handler(Display *d __UNUSED__,
XErrorEvent *ev __UNUSED__)
{
_ecore_x_image_err = 1;
@ -105,10 +105,10 @@ struct _Ecore_X_Image
};
EAPI Ecore_X_Image *
ecore_x_image_new(int w,
int h,
ecore_x_image_new(int w,
int h,
Ecore_X_Visual vis,
int depth)
int depth)
{
Ecore_X_Image *im;
@ -195,14 +195,14 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
}
EAPI Eina_Bool
ecore_x_image_get(Ecore_X_Image *im,
ecore_x_image_get(Ecore_X_Image *im,
Ecore_X_Drawable draw,
int x,
int y,
int sx,
int sy,
int w,
int h)
int x,
int y,
int sx,
int sy,
int w,
int h)
{
Eina_Bool ret = EINA_TRUE;
XErrorHandler ph;
@ -281,15 +281,15 @@ ecore_x_image_get(Ecore_X_Image *im,
}
EAPI void
ecore_x_image_put(Ecore_X_Image *im,
ecore_x_image_put(Ecore_X_Image *im,
Ecore_X_Drawable draw,
Ecore_X_GC gc,
int x,
int y,
int sx,
int sy,
int w,
int h)
Ecore_X_GC gc,
int x,
int y,
int sx,
int sy,
int w,
int h)
{
Ecore_X_GC tgc = 0;
@ -310,9 +310,9 @@ ecore_x_image_put(Ecore_X_Image *im,
EAPI void *
ecore_x_image_data_get(Ecore_X_Image *im,
int *bpl,
int *rows,
int *bpp)
int *bpl,
int *rows,
int *bpp)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!im->xim) _ecore_x_image_shm_create(im);
@ -345,19 +345,19 @@ ecore_x_image_is_argb32_get(Ecore_X_Image *im)
}
EAPI Eina_Bool
ecore_x_image_to_argb_convert(void *src,
int sbpp,
int sbpl,
ecore_x_image_to_argb_convert(void *src,
int sbpp,
int sbpl,
Ecore_X_Colormap c,
Ecore_X_Visual v,
int x,
int y,
int w,
int h,
unsigned int *dst,
int dbpl,
int dx,
int dy)
Ecore_X_Visual v,
int x,
int y,
int w,
int h,
unsigned int *dst,
int dbpl,
int dx,
int dy)
{
Visual *vis = v;
XColor *cols = NULL;
@ -411,9 +411,9 @@ ecore_x_image_to_argb_convert(void *src,
else if ((vis->class == TrueColor) ||
(vis->class == DirectColor))
{
if ((vis->red_mask == 0x00ff0000) &&
(vis->green_mask == 0x0000ff00) &&
(vis->blue_mask == 0x000000ff))
if ((vis->red_mask == 0x00ff0000) &&
(vis->green_mask == 0x0000ff00) &&
(vis->blue_mask == 0x000000ff))
mode = argbx888;
else if ((vis->red_mask == 0x000000ff) &&
(vis->green_mask == 0x0000ff00) &&

View File

@ -32,8 +32,8 @@ typedef struct _mwmhints
MWMHints;
EAPI Eina_Bool
ecore_x_mwm_hints_get(Ecore_X_Window win,
Ecore_X_MWM_Hint_Func *fhint,
ecore_x_mwm_hints_get(Ecore_X_Window win,
Ecore_X_MWM_Hint_Func *fhint,
Ecore_X_MWM_Hint_Decor *dhint,
Ecore_X_MWM_Hint_Input *ihint)
{
@ -90,7 +90,7 @@ ecore_x_mwm_hints_get(Ecore_X_Window win,
EAPI void
ecore_x_mwm_borderless_set(Ecore_X_Window win,
Eina_Bool borderless)
Eina_Bool borderless)
{
unsigned int data[5] = {0, 0, 0, 0, 0};

View File

@ -39,17 +39,17 @@ struct _Ecore_X_Startup_Info
int silent;
};
static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
Ecore_X_Atom atom,
const char *str);
static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
Ecore_X_Atom atom,
const char *str);
static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win,
Ecore_X_Atom atom);
Ecore_X_Atom atom);
#if 0 /* Unused */
static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info);
static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
char *data);
static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info);
static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
char *data);
#endif /* if 0 */
static void _ecore_x_netwm_startup_info_free(void *data);
static void _ecore_x_netwm_startup_info_free(void *data);
/*
* Convenience macros
@ -94,7 +94,7 @@ ecore_x_netwm_shutdown(void)
EAPI void
ecore_x_netwm_wm_identify(Ecore_X_Window root,
Ecore_X_Window check,
const char *wm_name)
const char *wm_name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(root,
@ -119,8 +119,8 @@ ecore_x_netwm_wm_identify(Ecore_X_Window root,
*/
EAPI void
ecore_x_netwm_supported_set(Ecore_X_Window root,
Ecore_X_Atom *supported,
int num)
Ecore_X_Atom *supported,
int num)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_atom_set(root,
@ -132,7 +132,7 @@ ecore_x_netwm_supported_set(Ecore_X_Window root,
EAPI Eina_Bool
ecore_x_netwm_supported_get(Ecore_X_Window root,
Ecore_X_Atom **supported,
int *num)
int *num)
{
int num_ret;
@ -159,7 +159,7 @@ ecore_x_netwm_supported_get(Ecore_X_Window root,
*/
EAPI void
ecore_x_netwm_desk_count_set(Ecore_X_Window root,
unsigned int n_desks)
unsigned int n_desks)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS,
@ -167,9 +167,9 @@ ecore_x_netwm_desk_count_set(Ecore_X_Window root,
}
EAPI void
ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
Ecore_X_Window *vroots,
unsigned int n_desks)
unsigned int n_desks)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(root,
@ -180,8 +180,8 @@ ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
EAPI void
ecore_x_netwm_desk_names_set(Ecore_X_Window root,
const char **names,
unsigned int n_desks)
const char **names,
unsigned int n_desks)
{
char ss[32], *buf, *t;
const char *s;
@ -198,8 +198,8 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root,
if (!s)
{
/* Default to "Desk-<number>" */
sprintf(ss, "Desk-%d", i);
s = ss;
sprintf(ss, "Desk-%d", i);
s = ss;
}
l = strlen(s) + 1;
@ -219,8 +219,8 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root,
EAPI void
ecore_x_netwm_desk_size_set(Ecore_X_Window root,
unsigned int width,
unsigned int height)
unsigned int width,
unsigned int height)
{
unsigned int size[2];
@ -233,8 +233,8 @@ ecore_x_netwm_desk_size_set(Ecore_X_Window root,
EAPI void
ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
unsigned int *origins,
unsigned int n_desks)
unsigned int *origins,
unsigned int n_desks)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT,
@ -243,10 +243,10 @@ ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
EAPI void
ecore_x_netwm_desk_layout_set(Ecore_X_Window root,
int orientation,
int columns,
int rows,
int starting_corner)
int orientation,
int columns,
int rows,
int starting_corner)
{
unsigned int layout[4];
@ -261,8 +261,8 @@ ecore_x_netwm_desk_layout_set(Ecore_X_Window root,
EAPI void
ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
unsigned int *areas,
unsigned int n_desks)
unsigned int *areas,
unsigned int n_desks)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas,
@ -274,9 +274,9 @@ ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks)
{
int ret;
unsigned int *areas = NULL;
if (!root) root = DefaultRootWindow(_ecore_x_disp);
ret = ecore_x_window_prop_card32_list_get(root, ECORE_X_ATOM_NET_WORKAREA,
&areas);
if (!areas)
@ -290,7 +290,7 @@ ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks)
EAPI void
ecore_x_netwm_desk_current_set(Ecore_X_Window root,
unsigned int desk)
unsigned int desk)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk,
@ -299,7 +299,7 @@ ecore_x_netwm_desk_current_set(Ecore_X_Window root,
EAPI void
ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
Eina_Bool on)
Eina_Bool on)
{
unsigned int val;
@ -315,9 +315,9 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
/* Mapping order */
EAPI void
ecore_x_netwm_client_list_set(Ecore_X_Window root,
ecore_x_netwm_client_list_set(Ecore_X_Window root,
Ecore_X_Window *p_clients,
unsigned int n_clients)
unsigned int n_clients)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST,
@ -326,9 +326,9 @@ ecore_x_netwm_client_list_set(Ecore_X_Window root,
/* Stacking order */
EAPI void
ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
Ecore_X_Window *p_clients,
unsigned int n_clients)
unsigned int n_clients)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING,
@ -347,7 +347,7 @@ ecore_x_netwm_client_active_set(Ecore_X_Window root,
EAPI void
ecore_x_netwm_client_active_request(Ecore_X_Window root,
Ecore_X_Window win,
int type,
int type,
Ecore_X_Window current_win)
{
XEvent xev;
@ -373,7 +373,7 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root,
EAPI void
ecore_x_netwm_name_set(Ecore_X_Window win,
const char *name)
const char *name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name);
@ -381,7 +381,7 @@ ecore_x_netwm_name_set(Ecore_X_Window win,
EAPI int
ecore_x_netwm_name_get(Ecore_X_Window win,
char **name)
char **name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (name)
@ -393,7 +393,7 @@ ecore_x_netwm_name_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_startup_id_set(Ecore_X_Window win,
const char *id)
const char *id)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id);
@ -401,7 +401,7 @@ ecore_x_netwm_startup_id_set(Ecore_X_Window win,
EAPI int
ecore_x_netwm_startup_id_get(Ecore_X_Window win,
char **id)
char **id)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (id)
@ -413,7 +413,7 @@ ecore_x_netwm_startup_id_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_visible_name_set(Ecore_X_Window win,
const char *name)
const char *name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME,
@ -422,7 +422,7 @@ ecore_x_netwm_visible_name_set(Ecore_X_Window win,
EAPI int
ecore_x_netwm_visible_name_get(Ecore_X_Window win,
char **name)
char **name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (name)
@ -435,7 +435,7 @@ ecore_x_netwm_visible_name_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_icon_name_set(Ecore_X_Window win,
const char *name)
const char *name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME,
@ -444,7 +444,7 @@ ecore_x_netwm_icon_name_set(Ecore_X_Window win,
EAPI int
ecore_x_netwm_icon_name_get(Ecore_X_Window win,
char **name)
char **name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (name)
@ -457,7 +457,7 @@ ecore_x_netwm_icon_name_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win,
const char *name)
const char *name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win,
@ -467,7 +467,7 @@ ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win,
EAPI int
ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win,
char **name)
char **name)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (name)
@ -480,7 +480,7 @@ ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_desktop_set(Ecore_X_Window win,
unsigned int desk)
unsigned int desk)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1);
@ -488,7 +488,7 @@ ecore_x_netwm_desktop_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_desktop_get(Ecore_X_Window win,
unsigned int *desk)
unsigned int *desk)
{
int ret;
unsigned int tmp;
@ -508,10 +508,10 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win,
*/
EAPI void
ecore_x_netwm_strut_set(Ecore_X_Window win,
int left,
int right,
int top,
int bottom)
int left,
int right,
int top,
int bottom)
{
unsigned int strut[4];
@ -528,10 +528,10 @@ ecore_x_netwm_strut_set(Ecore_X_Window win,
*/
EAPI Eina_Bool
ecore_x_netwm_strut_get(Ecore_X_Window win,
int *left,
int *right,
int *top,
int *bottom)
int *left,
int *right,
int *top,
int *bottom)
{
int ret = 0;
unsigned int strut[4];
@ -561,18 +561,18 @@ ecore_x_netwm_strut_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
int left,
int right,
int top,
int bottom,
int left_start_y,
int left_end_y,
int right_start_y,
int right_end_y,
int top_start_x,
int top_end_x,
int bottom_start_x,
int bottom_end_x)
int left,
int right,
int top,
int bottom,
int left_start_y,
int left_end_y,
int right_start_y,
int right_end_y,
int top_start_x,
int top_end_x,
int bottom_start_x,
int bottom_end_x)
{
unsigned int strut[12];
@ -597,18 +597,18 @@ ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
int *left,
int *right,
int *top,
int *bottom,
int *left_start_y,
int *left_end_y,
int *right_start_y,
int *right_end_y,
int *top_start_x,
int *top_end_x,
int *bottom_start_x,
int *bottom_end_x)
int *left,
int *right,
int *top,
int *bottom,
int *left_start_y,
int *left_end_y,
int *right_start_y,
int *right_end_y,
int *top_start_x,
int *top_end_x,
int *bottom_start_x,
int *bottom_end_x)
{
int ret = 0;
unsigned int strut[12];
@ -663,7 +663,7 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_icons_get(Ecore_X_Window win,
Ecore_X_Icon **icon,
int *num)
int *num)
{
unsigned int *data, *p;
unsigned int *src;
@ -771,10 +771,10 @@ ecore_x_netwm_icons_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
int x,
int y,
int width,
int height)
int x,
int y,
int width,
int height)
{
unsigned int geometry[4];
@ -791,10 +791,10 @@ ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
int *x,
int *y,
int *width,
int *height)
int *x,
int *y,
int *width,
int *height)
{
int ret;
unsigned int geometry[4];
@ -824,7 +824,7 @@ ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_pid_set(Ecore_X_Window win,
int pid)
int pid)
{
unsigned int tmp;
@ -836,7 +836,7 @@ ecore_x_netwm_pid_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_pid_get(Ecore_X_Window win,
int *pid)
int *pid)
{
int ret;
unsigned int tmp;
@ -870,7 +870,7 @@ ecore_x_netwm_handled_icons_get(Ecore_X_Window win)
EAPI void
ecore_x_netwm_user_time_set(Ecore_X_Window win,
unsigned int tim)
unsigned int tim)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME,
@ -879,7 +879,7 @@ ecore_x_netwm_user_time_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_user_time_get(Ecore_X_Window win,
unsigned int *tim)
unsigned int *tim)
{
int ret;
unsigned int tmp;
@ -927,7 +927,7 @@ _ecore_x_netwm_state_get(Ecore_X_Atom a)
static Ecore_X_Atom
_ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
{
switch(s)
switch (s)
{
case ECORE_X_WINDOW_STATE_MODAL:
return ECORE_X_ATOM_NET_WM_STATE_MODAL;
@ -971,9 +971,9 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
}
EAPI void
ecore_x_netwm_window_state_set(Ecore_X_Window win,
ecore_x_netwm_window_state_set(Ecore_X_Window win,
Ecore_X_Window_State *state,
unsigned int num)
unsigned int num)
{
Ecore_X_Atom *set;
unsigned int i;
@ -998,9 +998,9 @@ ecore_x_netwm_window_state_set(Ecore_X_Window win,
}
EAPI Eina_Bool
ecore_x_netwm_window_state_get(Ecore_X_Window win,
ecore_x_netwm_window_state_get(Ecore_X_Window win,
Ecore_X_Window_State **state,
unsigned int *num)
unsigned int *num)
{
int num_ret, i;
Ecore_X_Atom *atoms;
@ -1124,7 +1124,7 @@ _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type)
* , ECORE_X_WINDOW_TYPE_MENU or ECORE_X_WINDOW_TYPE_DIALOG
*/
EAPI void
ecore_x_netwm_window_type_set(Ecore_X_Window win,
ecore_x_netwm_window_type_set(Ecore_X_Window win,
Ecore_X_Window_Type type)
{
Ecore_X_Atom atom;
@ -1137,7 +1137,7 @@ ecore_x_netwm_window_type_set(Ecore_X_Window win,
/* FIXME: Maybe return 0 on some conditions? */
EAPI Eina_Bool
ecore_x_netwm_window_type_get(Ecore_X_Window win,
ecore_x_netwm_window_type_get(Ecore_X_Window win,
Ecore_X_Window_Type *type)
{
int num;
@ -1161,7 +1161,7 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win,
}
EAPI int
ecore_x_netwm_window_types_get(Ecore_X_Window win,
ecore_x_netwm_window_types_get(Ecore_X_Window win,
Ecore_X_Window_Type **types)
{
int num, i;
@ -1276,9 +1276,9 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win,
/* FIXME: Set complete list */
EAPI void
ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
Ecore_X_Action *action,
unsigned int num)
unsigned int num)
{
Ecore_X_Atom *set;
unsigned int i;
@ -1307,9 +1307,9 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
}
EAPI Eina_Bool
ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
Ecore_X_Action **action,
unsigned int *num)
unsigned int *num)
{
int num_ret, i;
Ecore_X_Atom *atoms;
@ -1345,7 +1345,7 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_opacity_set(Ecore_X_Window win,
unsigned int opacity)
unsigned int opacity)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
@ -1354,7 +1354,7 @@ ecore_x_netwm_opacity_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_opacity_get(Ecore_X_Window win,
unsigned int *opacity)
unsigned int *opacity)
{
int ret;
unsigned int tmp;
@ -1370,10 +1370,10 @@ ecore_x_netwm_opacity_get(Ecore_X_Window win,
EAPI void
ecore_x_netwm_frame_size_set(Ecore_X_Window win,
int fl,
int fr,
int ft,
int fb)
int fl,
int fr,
int ft,
int fb)
{
unsigned int frames[4];
@ -1390,10 +1390,10 @@ ecore_x_netwm_frame_size_set(Ecore_X_Window win,
EAPI Eina_Bool
ecore_x_netwm_frame_size_get(Ecore_X_Window win,
int *fl,
int *fr,
int *ft,
int *fb)
int *fl,
int *fr,
int *ft,
int *fb)
{
int ret = 0;
unsigned int frames[4];
@ -1422,7 +1422,7 @@ ecore_x_netwm_frame_size_get(Ecore_X_Window win,
}
EAPI Eina_Bool
ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
Ecore_X_Sync_Counter *counter)
{
int ret;
@ -1466,7 +1466,7 @@ ecore_x_netwm_ping_send(Ecore_X_Window win)
EAPI void
ecore_x_netwm_sync_request_send(Ecore_X_Window win,
unsigned int serial)
unsigned int serial)
{
XSyncValue value;
XEvent xev;
@ -1492,11 +1492,11 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win,
}
EAPI void
ecore_x_netwm_state_request_send(Ecore_X_Window win,
Ecore_X_Window root,
ecore_x_netwm_state_request_send(Ecore_X_Window win,
Ecore_X_Window root,
Ecore_X_Window_State s1,
Ecore_X_Window_State s2,
Eina_Bool set)
Eina_Bool set)
{
XEvent xev;
@ -1529,7 +1529,7 @@ ecore_x_netwm_state_request_send(Ecore_X_Window win,
EAPI void
ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
Ecore_X_Window root,
unsigned int desktop)
unsigned int desktop)
{
XEvent xev;
@ -1555,7 +1555,7 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
int
_ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
char *data __UNUSED__)
char *data __UNUSED__)
{
#if 0
Ecore_X_Startup_Info *info;
@ -1604,7 +1604,7 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
int
_ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
char *data __UNUSED__)
char *data __UNUSED__)
{
#if 0
Ecore_X_Startup_Info *info;
@ -1646,8 +1646,8 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
*/
static void
_ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
Ecore_X_Atom atom,
const char *str)
Ecore_X_Atom atom,
const char *str)
{
XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str));
@ -1658,7 +1658,7 @@ _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
*/
static char *
_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win,
Ecore_X_Atom atom)
Ecore_X_Atom atom)
{
char *str;
unsigned char *prop_ret;
@ -1758,8 +1758,8 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
else
{
/* Discard buffer */
info->length = 0;
info->buffer[0] = 0;
info->length = 0;
info->buffer[0] = 0;
}
return 1;
@ -1770,7 +1770,7 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
*/
static int
_ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
char *data)
char *data)
{
while (*data)
{
@ -1780,7 +1780,8 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
char value[1024];
/* Skip space */
while (*data == ' ') data++;
while (*data == ' ')
data++;
/* Get key */
key = data;
data = strchr(key, '=');
@ -1984,7 +1985,7 @@ ecore_x_screen_is_composited(int screen)
}
EAPI void
ecore_x_screen_is_composited_set(int screen,
ecore_x_screen_is_composited_set(int screen,
Ecore_X_Window win)
{
static Ecore_X_Atom atom = None;

View File

@ -26,9 +26,9 @@
*/
EAPI Ecore_X_Pixmap
ecore_x_pixmap_new(Ecore_X_Window win,
int w,
int h,
int dep)
int w,
int h,
int dep)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0)
@ -71,15 +71,15 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
* @ingroup Ecore_X_Pixmap_Group
*/
EAPI void
ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
Ecore_X_Drawable dest,
Ecore_X_GC gc,
int sx,
int sy,
int w,
int h,
int dx,
int dy)
Ecore_X_GC gc,
int sx,
int sy,
int w,
int h,
int dx,
int dy)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
@ -96,10 +96,10 @@ ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
*/
EAPI void
ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
int *x,
int *y,
int *w,
int *h)
int *x,
int *y,
int *w,
int *h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (pmap)

View File

@ -18,7 +18,8 @@
root) ((screen = \
XRRRootToScreen(_ecore_x_disp, \
root)) != -1)
#define RANDR_CHECK_1_1_RET(ret) if(_randr_version < RANDR_1_1) return ret
#define RANDR_CHECK_1_1_RET(ret) if (_randr_version < RANDR_1_1) \
return ret
extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display *
dpy,
@ -105,7 +106,7 @@ ecore_x_randr_screen_primary_output_orientation_set(
*/
EAPI Ecore_X_Randr_Screen_Size_MM *
ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
Ecore_X_Randr_Screen_Size_MM *ret = NULL;
@ -148,11 +149,11 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root,
*/
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)
int *w,
int *h,
int *w_mm,
int *h_mm,
int *size_index)
{
#ifdef ECORE_XRANDR
XRRScreenSize *sizes;
@ -202,7 +203,7 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root,
*/
EAPI Eina_Bool
ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
int size_index)
int size_index)
{
#ifdef ECORE_XRANDR
XRRScreenConfiguration *sc = NULL;
@ -270,8 +271,8 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get(
*/
EAPI Ecore_X_Randr_Refresh_Rate *
ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
int size_index,
int *num)
int size_index,
int *num)
{
#ifdef ECORE_XRANDR
Ecore_X_Randr_Refresh_Rate *ret = NULL, *rates = NULL;
@ -306,7 +307,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
EAPI Eina_Bool
ecore_x_randr_screen_primary_output_refresh_rate_set(
Ecore_X_Window root,
int size_index,
int size_index,
Ecore_X_Randr_Refresh_Rate
rate)
{

View File

@ -19,7 +19,8 @@
#define RANDR_VALIDATE_ROOT(screen, root) \
((screen = XRRRootToScreen(_ecore_x_disp, root)) != -1)
#define RANDR_CHECK_1_2_RET(ret) if(_randr_version < RANDR_1_2) return ret
#define RANDR_CHECK_1_2_RET(ret) if (_randr_version < RANDR_1_2) \
return ret
#define RANDR_PROPERTY_EDID "EDID"
#define RANDR_PROPERTY_BACKLIGHT "Backlight"
@ -45,7 +46,7 @@ extern int _randr_version;
*/
EAPI void
ecore_x_randr_events_select(Ecore_X_Window win,
Eina_Bool on)
Eina_Bool on)
{
#ifdef ECORE_XRANDR
int mask;
@ -73,7 +74,7 @@ ecore_x_randr_events_select(Ecore_X_Window win,
* @return in case it is found EINA_TRUE will be returned. Else EINA_FALSE is returned.
*/
static inline Eina_Bool
_ecore_x_randr_crtc_validate(Ecore_X_Window root,
_ecore_x_randr_crtc_validate(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc)
{
#ifdef ECORE_XRANDR
@ -108,7 +109,7 @@ _ecore_x_randr_crtc_validate(Ecore_X_Window root,
}
Eina_Bool
_ecore_x_randr_output_validate(Ecore_X_Window root,
_ecore_x_randr_output_validate(Ecore_X_Window root,
Ecore_X_Randr_Output output)
{
#ifdef ECORE_XRANDR
@ -139,7 +140,7 @@ _ecore_x_randr_output_validate(Ecore_X_Window root,
}
static inline Eina_Bool
_ecore_x_randr_mode_validate(Ecore_X_Window root,
_ecore_x_randr_mode_validate(Ecore_X_Window root,
Ecore_X_Randr_Mode mode)
{
#ifdef ECORE_XRANDR
@ -175,10 +176,10 @@ _ecore_x_randr_mode_validate(Ecore_X_Window root,
*/
EAPI void
ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
int *w,
int *h,
int *w_mm,
int *h_mm)
int *w,
int *h,
int *w_mm,
int *h_mm)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -211,10 +212,10 @@ ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
*/
EAPI void
ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
int *wmin,
int *hmin,
int *wmax,
int *hmax)
int *wmin,
int *hmin,
int *wmax,
int *hmax)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -249,10 +250,10 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
*/
EAPI Eina_Bool
ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
int w,
int h,
int w_mm,
int h_mm)
int w,
int h,
int w_mm,
int h_mm)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(EINA_FALSE);
@ -281,14 +282,14 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
if (h <= 0)
h = DisplayHeight(_ecore_x_disp, scr);
if(w_mm <= 0)
if (w_mm <= 0)
w_mm =
(int)(((double)(DisplayWidthMM(_ecore_x_disp,
scr) /
(double)DisplayWidth(_ecore_x_disp,
scr))) * (double)w);
if(h_mm <= 0)
if (h_mm <= 0)
h_mm =
(int)(((double)(DisplayHeightMM(_ecore_x_disp,
scr) /
@ -310,7 +311,7 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
*/
EAPI Ecore_X_Randr_Mode_Info **
ecore_x_randr_modes_info_get(Ecore_X_Window root,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -353,7 +354,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root,
}
else
{
while(i > 0)
while (i > 0)
free(ret[--i]);
free(ret);
ret = NULL;
@ -381,7 +382,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root,
* @return mode's detailed information
*/
EAPI Ecore_X_Randr_Mode_Info *
ecore_x_randr_mode_info_get(Ecore_X_Window root,
ecore_x_randr_mode_info_get(Ecore_X_Window root,
Ecore_X_Randr_Mode mode)
{
#ifdef ECORE_XRANDR
@ -461,7 +462,7 @@ ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info)
*/
EAPI Ecore_X_Randr_Crtc *
ecore_x_randr_crtcs_get(Ecore_X_Window root,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -488,7 +489,7 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root,
EAPI Ecore_X_Randr_Output *
ecore_x_randr_outputs_get(Ecore_X_Window root,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -523,9 +524,9 @@ ecore_x_randr_outputs_get(Ecore_X_Window root,
* @param num number of outputs referenced by given CRTC
*/
EAPI Ecore_X_Randr_Output *
ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -567,9 +568,9 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
* @param num number of possible outputs referenced by given CRTC
*/
EAPI Ecore_X_Randr_Output *
ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -581,7 +582,7 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
crtc) &&
(res = _ecore_x_randr_get_screen_resources (_ecore_x_disp, root)))
{
if((crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
if ((crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
{
if ((ret =
malloc(sizeof(Ecore_X_Randr_Output) * crtc_info->npossible)))
@ -605,12 +606,12 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
}
EAPI void
ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
int *x,
int *y,
int *w,
int *h)
int *x,
int *y,
int *w,
int *h)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -652,10 +653,10 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
* @return EINA_TRUE if position could be successfully be altered.
*/
EAPI Eina_Bool
ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
int x,
int y)
int x,
int y)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(EINA_FALSE);
@ -706,7 +707,7 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
* Ecore_X_Randr_Unset
*/
EAPI Ecore_X_Randr_Mode
ecore_x_randr_crtc_mode_get(Ecore_X_Window root,
ecore_x_randr_crtc_mode_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc)
{
#ifdef ECORE_XRANDR
@ -746,11 +747,11 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root,
* @return EINA_TRUE if mode setting was successful. Else EINA_FALSE
*/
EAPI Eina_Bool
ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
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)
int noutputs,
Ecore_X_Randr_Mode mode)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(EINA_FALSE);
@ -772,10 +773,10 @@ ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
}
EAPI void
ecore_x_randr_crtc_size_get(Ecore_X_Window root,
ecore_x_randr_crtc_size_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
int *w,
int *h)
int *w,
int *h)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -784,7 +785,7 @@ ecore_x_randr_crtc_size_get(Ecore_X_Window root,
}
EAPI Ecore_X_Randr_Refresh_Rate
ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
Ecore_X_Randr_Mode mode)
{
@ -824,7 +825,7 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
}
EAPI Ecore_X_Randr_Orientation
ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc)
{
#ifdef ECORE_XRANDR
@ -855,7 +856,7 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
}
EAPI Ecore_X_Randr_Orientation
ecore_x_randr_crtc_orientation_get(Ecore_X_Window root,
ecore_x_randr_crtc_orientation_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc)
{
#ifdef ECORE_XRANDR
@ -886,8 +887,8 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root,
}
EAPI Eina_Bool
ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
Ecore_X_Randr_Orientation orientation)
{
#ifdef ECORE_XRANDR
@ -913,10 +914,10 @@ ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
}
EAPI void
ecore_x_randr_crtc_pos_get(Ecore_X_Window root,
ecore_x_randr_crtc_pos_get(Ecore_X_Window root,
Ecore_X_Randr_Crtc crtc,
int *x,
int *y)
int *x,
int *y)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -926,7 +927,7 @@ ecore_x_randr_crtc_pos_get(Ecore_X_Window root,
}
EAPI Eina_Bool
ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
Ecore_X_Randr_Crtc original,
Ecore_X_Randr_Crtc clon)
{
@ -993,13 +994,13 @@ ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
* EINA_FALSE
*/
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_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
@ -1066,10 +1067,10 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root,
* repositioning failed or if position of new crtc would be out of given screen's min/max bounds.
*/
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_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
@ -1360,10 +1361,10 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
}
EAPI Ecore_X_Randr_Mode *
ecore_x_randr_output_modes_get(Ecore_X_Window root,
ecore_x_randr_output_modes_get(Ecore_X_Window root,
Ecore_X_Randr_Output output,
int *num,
int *npreferred)
int *num,
int *npreferred)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -1401,9 +1402,9 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root,
}
EAPI Ecore_X_Randr_Crtc *
ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root,
ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root,
Ecore_X_Randr_Output output,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -1441,9 +1442,9 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root,
* @param num number of possible clones
*/
EAPI Ecore_X_Randr_Output *
ecore_x_randr_output_clones_get(Ecore_X_Window root,
ecore_x_randr_output_clones_get(Ecore_X_Window root,
Ecore_X_Randr_Output output,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -1474,7 +1475,7 @@ ecore_x_randr_output_clones_get(Ecore_X_Window root,
}
EAPI Ecore_X_Randr_Crtc
ecore_x_randr_output_crtc_get(Ecore_X_Window root,
ecore_x_randr_output_crtc_get(Ecore_X_Window root,
Ecore_X_Randr_Output output)
{
#ifdef ECORE_XRANDR
@ -1509,9 +1510,9 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root,
* @return name of the output as reported by X
*/
EAPI char *
ecore_x_randr_output_name_get(Ecore_X_Window root,
ecore_x_randr_output_name_get(Ecore_X_Window root,
Ecore_X_Randr_Output output,
int *len)
int *len)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -1532,10 +1533,10 @@ ecore_x_randr_output_name_get(Ecore_X_Window root,
* *len = output_info->nameLen;
*
*/
if ((ret = strdup(output_info->name)) && len)
*len = strlen(ret);
if ((ret = strdup(output_info->name)) && len)
*len = strlen(ret);
XRRFreeOutputInfo(output_info);
XRRFreeOutputInfo(output_info);
}
if (res)
@ -1554,10 +1555,10 @@ ecore_x_randr_output_name_get(Ecore_X_Window root,
* @param h height of given mode in px
*/
EAPI void
ecore_x_randr_mode_size_get(Ecore_X_Window root,
ecore_x_randr_mode_size_get(Ecore_X_Window root,
Ecore_X_Randr_Mode mode,
int *w,
int *h)
int *w,
int *h)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -1598,9 +1599,9 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root,
* @param length length of the byte-array. If NULL, request will fail.
*/
EAPI unsigned char *
ecore_x_randr_output_edid_get(Ecore_X_Window root,
ecore_x_randr_output_edid_get(Ecore_X_Window root,
Ecore_X_Randr_Output output,
unsigned long *length)
unsigned long *length)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(NULL);
@ -1613,18 +1614,18 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root,
if (!length || !_ecore_x_randr_output_validate(root, output))
return NULL;
if(XRRGetOutputProperty (_ecore_x_disp, output, name,
0, 100, False, False,
AnyPropertyType,
&actual_type, &actual_format,
&nitems, &bytes_after, &prop_data) == Success)
if (XRRGetOutputProperty (_ecore_x_disp, output, name,
0, 100, False, False,
AnyPropertyType,
&actual_type, &actual_format,
&nitems, &bytes_after, &prop_data) == Success)
{
if (actual_type == XA_INTEGER && actual_format == 8)
{
if ((ret = malloc(nitems * sizeof(unsigned char))))
{
if(length &&
(memcpy(ret, prop_data, (nitems * sizeof(unsigned char)))))
if (length &&
(memcpy(ret, prop_data, (nitems * sizeof(unsigned char)))))
*length = nitems;
return ret;
@ -1639,7 +1640,7 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root,
}
EAPI Ecore_X_Randr_Connection_Status
ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
Ecore_X_Randr_Output output)
{
#ifdef ECORE_XRANDR
@ -1669,10 +1670,10 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
}
EAPI void
ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
Ecore_X_Randr_Output output,
int *w_mm,
int *h_mm)
int *w_mm,
int *h_mm)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -1701,11 +1702,11 @@ ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
}
EAPI Eina_Bool
ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
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)
int nnot_moved,
int dx,
int dy)
{
#ifdef ECORE_XRANDR
Ecore_X_Randr_Crtc *crtcs_to_be_moved = NULL;
@ -1754,11 +1755,11 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
* @return EINA_TRUE if all crtcs could be moved successfully.
*/
EAPI Eina_Bool
ecore_x_randr_move_crtcs(Ecore_X_Window root,
ecore_x_randr_move_crtcs(Ecore_X_Window root,
const Ecore_X_Randr_Crtc *crtcs,
int ncrtc,
int dx,
int dy)
int ncrtc,
int dx,
int dy)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(EINA_FALSE);
@ -1821,18 +1822,18 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root,
{
//something went wrong, let's try to move the already moved crtcs
//back.
while ((i--) >= 0)
{
if (crtc_info[i])
ecore_x_randr_crtc_settings_set(root,
crtcs[i],
NULL,
Ecore_X_Randr_Unset,
(crtc_info[i]->x - dx),
(crtc_info[i]->y - dy),
crtc_info[i]->mode,
crtc_info[i]->rotation);
}
while ((i--) >= 0)
{
if (crtc_info[i])
ecore_x_randr_crtc_settings_set(root,
crtcs[i],
NULL,
Ecore_X_Randr_Unset,
(crtc_info[i]->x - dx),
(crtc_info[i]->y - dy),
crtc_info[i]->mode,
crtc_info[i]->rotation);
}
}
for (i = 0; i < ncrtc; i++)
@ -1923,7 +1924,7 @@ ecore_x_randr_screen_reset(Ecore_X_Window root)
EAPI void
ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root,
double level)
double level)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET();
@ -1992,7 +1993,7 @@ ecore_x_randr_output_backlight_available(void)
*/
EAPI double
ecore_x_randr_output_backlight_level_get(Ecore_X_Window root,
ecore_x_randr_output_backlight_level_get(Ecore_X_Window root,
Ecore_X_Randr_Output output)
{
#ifdef ECORE_XRANDR
@ -2045,9 +2046,9 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root,
if ((info->range) && (info->num_values == 2))
{
/* finally convert the current value in the interval [0..1] */
min = info->values[0];
max = info->values[1];
dvalue = ((double)(value - min)) / ((double)(max - min));
min = info->values[0];
max = info->values[1];
dvalue = ((double)(value - min)) / ((double)(max - min));
}
free(info);
return dvalue;
@ -2065,9 +2066,9 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root,
*/
EAPI Eina_Bool
ecore_x_randr_output_backlight_level_set(Ecore_X_Window root,
ecore_x_randr_output_backlight_level_set(Ecore_X_Window root,
Ecore_X_Randr_Output output,
double level)
double level)
{
#ifdef ECORE_XRANDR
RANDR_CHECK_1_2_RET(EINA_FALSE);
@ -2127,7 +2128,7 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root,
EAPI Ecore_X_Randr_Output *
ecore_x_randr_window_outputs_get(Ecore_X_Window window,
int *num)
int *num)
{
#ifdef ECORE_XRANDR
Ecore_X_Window root;
@ -2156,39 +2157,39 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window,
for (i = 0; i < ncrtcs; i++)
{
/* if crtc is not enabled, don't bother about it any further */
mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]);
if (mode == Ecore_X_Randr_None) continue;
mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]);
if (mode == Ecore_X_Randr_None) continue;
ecore_x_randr_crtc_geometry_get(root, crtcs[i],
&c_geo.x, &c_geo.y,
&c_geo.w, &c_geo.h);
if (eina_rectangles_intersect(&w_geo, &c_geo))
{
outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i],
&noutputs);
/* The case below should be impossible, but for safety reasons
* remains */
if (!outputs)
{
if (num) *num = 0;
free(ret);
free(crtcs);
return NULL;
}
tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output)));
if (!tret)
{
if (num) *num = 0;
free(outputs);
free(ret);
free(crtcs);
return NULL;
}
ret = tret;
memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output)));
nret += noutputs;
free(outputs);
}
ecore_x_randr_crtc_geometry_get(root, crtcs[i],
&c_geo.x, &c_geo.y,
&c_geo.w, &c_geo.h);
if (eina_rectangles_intersect(&w_geo, &c_geo))
{
outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i],
&noutputs);
/* The case below should be impossible, but for safety reasons
* remains */
if (!outputs)
{
if (num) *num = 0;
free(ret);
free(crtcs);
return NULL;
}
tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output)));
if (!tret)
{
if (num) *num = 0;
free(outputs);
free(ret);
free(crtcs);
return NULL;
}
ret = tret;
memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output)));
nret += noutputs;
free(outputs);
}
}
free(crtcs);
@ -2212,7 +2213,7 @@ _ecore_x_randr_current_output_get_fail:
EINA_DEPRECATED EAPI Ecore_X_Randr_Output *
ecore_x_randr_current_output_get(Ecore_X_Window window,
int *num)
int *num)
{
return ecore_x_randr_window_outputs_get(window, num);
}

View File

@ -100,7 +100,7 @@ typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio_Preferred {
EAPI Eina_Bool
ecore_x_randr_edid_has_valid_header(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
const unsigned char header[] =
{ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
@ -112,7 +112,7 @@ ecore_x_randr_edid_has_valid_header(unsigned char *edid,
EAPI int
ecore_x_randr_edid_version_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
if ((edid_length > _ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR) &&
(ecore_x_randr_edid_has_valid_header(edid, edid_length)))
@ -123,7 +123,7 @@ ecore_x_randr_edid_version_get(unsigned char *edid,
EAPI int
ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
if ((edid_length > 0x0b) &&
(ecore_x_randr_edid_has_valid_header(edid, edid_length)))
@ -133,7 +133,7 @@ ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid,
EAPI int
ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
if ((edid_length > 0x0f) &&
(ecore_x_randr_edid_has_valid_header(edid, edid_length)))
@ -144,7 +144,7 @@ ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid,
EAPI char *
ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
if ((edid_length > (_ECORE_X_RANDR_EDID_OFFSET_MANUFACTURER + 1)) &&
(ecore_x_randr_edid_has_valid_header(edid, edid_length)))
@ -166,7 +166,7 @@ ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid,
EAPI char *
ecore_x_randr_edid_display_name_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
unsigned char *block = NULL;
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -196,7 +196,7 @@ ecore_x_randr_edid_display_name_get(unsigned char *edid,
EAPI Ecore_X_Randr_Edid_Aspect_Ratio
ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
unsigned char *block = NULL;
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -238,7 +238,7 @@ ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid,
EAPI Ecore_X_Randr_Edid_Aspect_Ratio
ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
Ecore_X_Randr_Edid_Aspect_Ratio ret = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
unsigned char *block = NULL;
@ -267,7 +267,7 @@ ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid,
EAPI char *
ecore_x_randr_edid_display_ascii_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
unsigned char *block = NULL;
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -300,7 +300,7 @@ ecore_x_randr_edid_display_ascii_get(unsigned char *edid,
EAPI char *
ecore_x_randr_edid_display_serial_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
unsigned char *block = NULL;
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -333,7 +333,7 @@ ecore_x_randr_edid_display_serial_get(unsigned char *edid,
EAPI Eina_Bool
ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
unsigned char *cea_block_iter = NULL;
char sum = 0;
@ -344,13 +344,15 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid,
if (edid_length < 128) return EINA_FALSE;
/* Check the EDID block itself */
for (i = 0; i < 128; i++) sum += edid[i];
for (i = 0; i < 128; i++)
sum += edid[i];
if (sum) return EINA_FALSE;
/* Check the cea extension blocks */
_ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter)
{
for (i = 0, sum = 0; i < 128; i++) sum += cea_block_iter[i];
for (i = 0, sum = 0; i < 128; i++)
sum += cea_block_iter[i];
}
if (sum) return EINA_FALSE;
return EINA_TRUE;
@ -358,7 +360,7 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid,
EAPI Eina_Bool
ecore_x_randr_edid_dpms_available_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -369,7 +371,7 @@ ecore_x_randr_edid_dpms_available_get(unsigned char *edid,
EAPI Eina_Bool
ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -382,7 +384,7 @@ ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid,
EAPI Eina_Bool
ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -395,7 +397,7 @@ ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid,
EAPI Eina_Bool
ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -408,7 +410,7 @@ ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid,
EAPI Eina_Bool
ecore_x_randr_edid_display_type_digital_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -419,7 +421,7 @@ ecore_x_randr_edid_display_type_digital_get(unsigned char *edid,
EAPI Ecore_X_Randr_Edid_Display_Colorscheme
ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
Ecore_X_Randr_Edid_Display_Colorscheme colorscheme = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
int version = ecore_x_randr_edid_version_get(edid, edid_length);
@ -442,7 +444,7 @@ ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid,
EAPI Ecore_X_Randr_Edid_Display_Interface_Type
ecore_x_randr_edid_display_interface_type_get(unsigned char *edid,
unsigned long edid_length)
unsigned long edid_length)
{
Ecore_X_Randr_Edid_Display_Interface_Type type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
int version = ecore_x_randr_edid_version_get(edid, edid_length);

View File

@ -15,7 +15,8 @@
#ifdef ECORE_XRANDR
#define RANDR_1_3 ((1 << 16) | 3)
#define RANDR_CHECK_1_3_RET(ret) if(_randr_version < RANDR_1_3) return ret
#define RANDR_CHECK_1_3_RET(ret) if (_randr_version < RANDR_1_3) \
return ret
extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display *
dpy,
@ -47,7 +48,7 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root)
* @param output that should be set as given root window's screen primary output
*/
EAPI void
ecore_x_randr_primary_output_set(Ecore_X_Window root,
ecore_x_randr_primary_output_set(Ecore_X_Window root,
Ecore_X_Randr_Output output)
{
#ifdef ECORE_XRANDR

View File

@ -46,7 +46,7 @@ ecore_x_xregion_free(Ecore_X_XRegion *region)
EAPI Eina_Bool
ecore_x_xregion_set(Ecore_X_XRegion *region,
Ecore_X_GC gc)
Ecore_X_GC gc)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XSetRegion(_ecore_x_disp, gc, (Region)region) ? EINA_TRUE : EINA_FALSE;
@ -54,8 +54,8 @@ ecore_x_xregion_set(Ecore_X_XRegion *region,
EAPI void
ecore_x_xregion_translate(Ecore_X_XRegion *region,
int x,
int y)
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!region)
@ -84,8 +84,8 @@ ecore_x_xregion_union(Ecore_X_XRegion *dst,
}
EAPI Eina_Bool
ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
Ecore_X_XRegion *src,
ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
Ecore_X_XRegion *src,
Ecore_X_Rectangle *rect)
{
XRectangle xr;
@ -131,8 +131,8 @@ ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
EAPI Eina_Bool
ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
int x,
int y)
int x,
int y)
{
if (!region)
return EINA_FALSE;
@ -142,7 +142,7 @@ ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
}
EAPI Eina_Bool
ecore_x_xregion_rect_contain(Ecore_X_XRegion *region,
ecore_x_xregion_rect_contain(Ecore_X_XRegion *region,
Ecore_X_Rectangle *rect)
{
if (!region || !rect)

View File

@ -15,29 +15,29 @@ static Ecore_X_Selection_Intern selections[4];
static Ecore_X_Selection_Converter *converters = NULL;
static Ecore_X_Selection_Parser *parsers = NULL;
static Eina_Bool _ecore_x_selection_converter_text(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
static Eina_Bool _ecore_x_selection_converter_text(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *tprop,
int *);
static int _ecore_x_selection_data_default_free(void *data);
static void *_ecore_x_selection_parser_files(const char *target,
void *data,
int size,
int format);
void *data,
int size,
int format);
static int _ecore_x_selection_data_files_free(void *data);
static void *_ecore_x_selection_parser_text(const char *target,
void *data,
int size,
int format);
void *data,
int size,
int format);
static int _ecore_x_selection_data_text_free(void *data);
static void *_ecore_x_selection_parser_targets(const char *target,
void *data,
int size,
int format);
static int _ecore_x_selection_data_targets_free(void *data);
void *data,
int size,
int format);
static int _ecore_x_selection_data_targets_free(void *data);
#define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
@ -45,31 +45,31 @@ void
_ecore_x_selection_data_init(void)
{
/* Initialize global data */
memset(selections, 0, sizeof(selections));
memset(selections, 0, sizeof(selections));
/* Initialize converters */
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
_ecore_x_selection_converter_text);
/* Initialize converters */
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
_ecore_x_selection_converter_text);
#ifdef X_HAVE_UTF8_STRING
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
_ecore_x_selection_converter_text);
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
_ecore_x_selection_converter_text);
#endif /* ifdef X_HAVE_UTF8_STRING */
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
_ecore_x_selection_converter_text);
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
_ecore_x_selection_converter_text);
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
_ecore_x_selection_converter_text);
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
_ecore_x_selection_converter_text);
/* Initialize parsers */
ecore_x_selection_parser_add("text/plain",
_ecore_x_selection_parser_text);
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING,
_ecore_x_selection_parser_text);
ecore_x_selection_parser_add("text/uri-list",
_ecore_x_selection_parser_files);
ecore_x_selection_parser_add("_NETSCAPE_URL",
_ecore_x_selection_parser_files);
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
_ecore_x_selection_parser_targets);
/* Initialize parsers */
ecore_x_selection_parser_add("text/plain",
_ecore_x_selection_parser_text);
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING,
_ecore_x_selection_parser_text);
ecore_x_selection_parser_add("text/uri-list",
_ecore_x_selection_parser_files);
ecore_x_selection_parser_add("_NETSCAPE_URL",
_ecore_x_selection_parser_files);
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
_ecore_x_selection_parser_targets);
}
void
@ -120,9 +120,9 @@ _ecore_x_selection_get(Ecore_X_Atom selection)
}
Eina_Bool
_ecore_x_selection_set(Window w,
const void *data,
int size,
_ecore_x_selection_set(Window w,
const void *data,
int size,
Ecore_X_Atom selection)
{
int in;
@ -174,8 +174,8 @@ _ecore_x_selection_set(Window w,
*/
EAPI Eina_Bool
ecore_x_selection_primary_set(Ecore_X_Window w,
const void *data,
int size)
const void *data,
int size)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY);
@ -204,8 +204,8 @@ ecore_x_selection_primary_clear(void)
*/
EAPI Eina_Bool
ecore_x_selection_secondary_set(Ecore_X_Window w,
const void *data,
int size)
const void *data,
int size)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w,
@ -240,8 +240,8 @@ ecore_x_selection_secondary_clear(void)
*/
EAPI Eina_Bool
ecore_x_selection_xdnd_set(Ecore_X_Window w,
const void *data,
int size)
const void *data,
int size)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND);
@ -273,8 +273,8 @@ ecore_x_selection_xdnd_clear(void)
*/
EAPI Eina_Bool
ecore_x_selection_clipboard_set(Ecore_X_Window w,
const void *data,
int size)
const void *data,
int size)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w,
@ -325,22 +325,22 @@ _ecore_x_selection_target_get(Ecore_X_Atom target)
{
/* FIXME: Should not return mem allocated with strdup or X mixed,
* one should use free to free, the other XFree */
if (target == ECORE_X_ATOM_FILE_NAME)
return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
else if (target == ECORE_X_ATOM_STRING)
return strdup(ECORE_X_SELECTION_TARGET_STRING);
else if (target == ECORE_X_ATOM_UTF8_STRING)
return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
else if (target == ECORE_X_ATOM_TEXT)
return strdup(ECORE_X_SELECTION_TARGET_TEXT);
else
return XGetAtomName(_ecore_x_disp, target);
if (target == ECORE_X_ATOM_FILE_NAME)
return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
else if (target == ECORE_X_ATOM_STRING)
return strdup(ECORE_X_SELECTION_TARGET_STRING);
else if (target == ECORE_X_ATOM_UTF8_STRING)
return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
else if (target == ECORE_X_ATOM_TEXT)
return strdup(ECORE_X_SELECTION_TARGET_TEXT);
else
return XGetAtomName(_ecore_x_disp, target);
}
static void
_ecore_x_selection_request(Ecore_X_Window w,
Ecore_X_Atom selection,
const char *target_str)
Ecore_X_Atom selection,
const char *target_str)
{
Ecore_X_Atom target, prop;
@ -361,7 +361,7 @@ _ecore_x_selection_request(Ecore_X_Window w,
EAPI void
ecore_x_selection_primary_request(Ecore_X_Window w,
const char *target)
const char *target)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target);
@ -369,7 +369,7 @@ ecore_x_selection_primary_request(Ecore_X_Window w,
EAPI void
ecore_x_selection_secondary_request(Ecore_X_Window w,
const char *target)
const char *target)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target);
@ -377,7 +377,7 @@ ecore_x_selection_secondary_request(Ecore_X_Window w,
EAPI void
ecore_x_selection_xdnd_request(Ecore_X_Window w,
const char *target)
const char *target)
{
Ecore_X_Atom atom;
Ecore_X_DND_Target *_target;
@ -392,21 +392,21 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w,
EAPI void
ecore_x_selection_clipboard_request(Ecore_X_Window w,
const char *target)
const char *target)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target);
}
EAPI void
ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
Eina_Bool (*func)(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *ttype,
int *tsize))
ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
Eina_Bool (*func)(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *ttype,
int *tsize))
{
Ecore_X_Selection_Converter *cnv;
@ -444,14 +444,14 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom
}
EAPI void
ecore_x_selection_converter_add(char *target,
Eina_Bool (*func)(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *,
int *))
ecore_x_selection_converter_add(char *target,
Eina_Bool (*func)(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *,
int *))
{
Ecore_X_Atom x_target;
@ -509,10 +509,10 @@ ecore_x_selection_converter_del(char *target)
EAPI Eina_Bool
ecore_x_selection_notify_send(Ecore_X_Window requestor,
Ecore_X_Atom selection,
Ecore_X_Atom target,
Ecore_X_Atom property,
Ecore_X_Time tim)
Ecore_X_Atom selection,
Ecore_X_Atom target,
Ecore_X_Atom property,
Ecore_X_Time tim)
{
XEvent xev;
XSelectionEvent xnotify;
@ -534,12 +534,12 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor,
/* Locate and run conversion callback for specified selection target */
EAPI Eina_Bool
ecore_x_selection_convert(Ecore_X_Atom selection,
Ecore_X_Atom target,
void **data_ret,
int *size,
ecore_x_selection_convert(Ecore_X_Atom selection,
Ecore_X_Atom target,
void **data_ret,
int *size,
Ecore_X_Atom *targtype,
int *typesize)
int *typesize)
{
Ecore_X_Selection_Intern *sel;
Ecore_X_Selection_Converter *cnv;
@ -572,7 +572,7 @@ ecore_x_selection_convert(Ecore_X_Atom selection,
return EINA_FALSE;
/* Default, just return the data
*data_ret = malloc(sel->length);
* data_ret = malloc(sel->length);
memcpy(*data_ret, sel->data, sel->length);
free(tgt_str);
return 1;
@ -583,13 +583,13 @@ ecore_x_selection_convert(Ecore_X_Atom selection,
* locale using Ecore_Txt functions */
/* Converter for standard non-utf8 text targets */
static Eina_Bool
_ecore_x_selection_converter_text(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
_ecore_x_selection_converter_text(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *targprop __UNUSED__,
int *s __UNUSED__)
int *s __UNUSED__)
{
XTextProperty text_prop;
char *mystr;
@ -737,8 +737,8 @@ ecore_x_selection_parser_del(const char *target)
*/
EAPI void
ecore_x_selection_owner_set(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Time tim)
Ecore_X_Atom atom,
Ecore_X_Time tim)
{
XSetSelectionOwner(_ecore_x_disp, atom, win, tim);
}
@ -760,9 +760,9 @@ ecore_x_selection_owner_get(Ecore_X_Atom atom)
/* Locate and run conversion callback for specified selection target */
void *
_ecore_x_selection_parse(const char *target,
void *data,
int size,
int format)
void *data,
int size,
int format)
{
Ecore_X_Selection_Parser *prs;
Ecore_X_Selection_Data *sel;
@ -799,9 +799,9 @@ _ecore_x_selection_data_default_free(void *data)
static void *
_ecore_x_selection_parser_files(const char *target,
void *_data,
int size,
int format __UNUSED__)
void *_data,
int size,
int format __UNUSED__)
{
Ecore_X_Selection_Data_Files *sel;
char *t, *data = _data;
@ -820,15 +820,15 @@ _ecore_x_selection_parser_files(const char *target,
if (data[size - 1])
{
/* Isn't nul terminated */
size++;
t = realloc(data, size);
if (!t)
{
free(sel);
return NULL;
}
data = t;
data[size - 1] = 0;
size++;
t = realloc(data, size);
if (!t)
{
free(sel);
return NULL;
}
data = t;
data[size - 1] = 0;
}
tmp = malloc(size);
@ -850,7 +850,8 @@ _ecore_x_selection_parser_files(const char *target,
tmp[i++] = data[is++];
else
{
while ((data[is] == '\r') || (data[is] == '\n')) is++;
while ((data[is] == '\r') || (data[is] == '\n'))
is++;
tmp[i] = 0;
sel->num_files++;
t2 = realloc(sel->files, sel->num_files * sizeof(char *));
@ -905,9 +906,9 @@ _ecore_x_selection_data_files_free(void *data)
static void *
_ecore_x_selection_parser_text(const char *target __UNUSED__,
void *_data,
int size,
int format __UNUSED__)
void *_data,
int size,
int format __UNUSED__)
{
Ecore_X_Selection_Data_Text *sel;
unsigned char *data = _data;
@ -918,15 +919,15 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__,
if (data[size - 1])
{
/* Isn't nul terminated */
size++;
t = realloc(data, size);
if (!t)
{
free(sel);
return NULL;
}
data = t;
data[size - 1] = 0;
size++;
t = realloc(data, size);
if (!t)
{
free(sel);
return NULL;
}
data = t;
data[size - 1] = 0;
}
sel->text = (char *)data;
@ -950,9 +951,9 @@ _ecore_x_selection_data_text_free(void *data)
static void *
_ecore_x_selection_parser_targets(const char *target __UNUSED__,
void *data,
int size,
int format __UNUSED__)
void *data,
int size,
int format __UNUSED__)
{
Ecore_X_Selection_Data_Targets *sel;
unsigned long *targets;

View File

@ -53,7 +53,7 @@ ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
EAPI Eina_Bool
ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter,
unsigned int *val)
unsigned int *val)
{
XSyncValue value;
@ -88,7 +88,7 @@ ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter)
EAPI void
ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter,
int by)
int by)
{
XSyncValue v;
@ -99,7 +99,7 @@ ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter,
EAPI void
ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter,
int val)
int val)
{
XSyncWaitCondition cond;
XSyncValue v, v2;
@ -119,7 +119,7 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter,
EAPI void
ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter,
int val)
int val)
{
XSyncValue v;
@ -130,8 +130,8 @@ ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter,
EAPI void
ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter,
int val_hi,
unsigned int val_lo)
int val_hi,
unsigned int val_lo)
{
XSyncValue v;
@ -142,8 +142,8 @@ ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter,
EAPI Eina_Bool
ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter,
int *val_hi,
unsigned int *val_lo)
int *val_hi,
unsigned int *val_lo)
{
XSyncValue value;

View File

@ -61,40 +61,40 @@ typedef union _drmVBlank
typedef struct _drmEventContext
{
int version;
void (*vblank_handler)(int fd,
void (*vblank_handler)(int fd,
unsigned int sequence,
unsigned int tv_sec,
unsigned int tv_usec,
void *user_data);
void (*page_flip_handler)(int fd,
void *user_data);
void (*page_flip_handler)(int fd,
unsigned int sequence,
unsigned int tv_sec,
unsigned int tv_usec,
void *user_data);
void *user_data);
} drmEventContext;
static int (*sym_drmClose)(int fd) = NULL;
static int (*sym_drmGetMagic)(int fd,
static int (*sym_drmGetMagic)(int fd,
drm_magic_t *magic) = NULL;
static int (*sym_drmWaitVBlank)(int fd,
static int (*sym_drmWaitVBlank)(int fd,
drmVBlank *vbl) = NULL;
static int (*sym_drmHandleEvent)(int fd,
static int (*sym_drmHandleEvent)(int fd,
drmEventContext *evctx) = NULL;
//// dri
static Bool (*sym_DRI2QueryExtension)(Display *display,
int *eventBase,
int *errorBase) = NULL;
int *eventBase,
int *errorBase) = NULL;
static Bool (*sym_DRI2QueryVersion)(Display *display,
int *major,
int *minor) = NULL;
int *major,
int *minor) = NULL;
static Bool (*sym_DRI2Connect)(Display *display,
XID window,
char **driverName,
char **deviceName) = NULL;
static Bool (*sym_DRI2Authenticate)(Display *display,
XID window,
XID window,
char **driverName,
char **deviceName) = NULL;
static Bool (*sym_DRI2Authenticate)(Display *display,
XID window,
drm_magic_t magic) = NULL;
//// dri/drm data needed
@ -142,18 +142,18 @@ _dri_drm_tick_end(void *data __UNUSED__)
}
static void
_dri_drm_vblank_handler(int fd __UNUSED__,
_dri_drm_vblank_handler(int fd __UNUSED__,
unsigned int frame __UNUSED__,
unsigned int sec __UNUSED__,
unsigned int usec __UNUSED__,
void *data __UNUSED__)
void *data __UNUSED__)
{
ecore_animator_custom_tick();
if (drm_event_is_busy) _dri_drm_tick_schedule();
}
static Eina_Bool
_dri_drm_cb(void *data __UNUSED__,
_dri_drm_cb(void *data __UNUSED__,
Ecore_Fd_Handler *fd_handler __UNUSED__)
{
sym_drmHandleEvent(drm_fd, &drm_evctx);

View File

@ -33,10 +33,10 @@ static Ecore_X_Window *ignore_list = NULL;
*/
EAPI Ecore_X_Window
ecore_x_window_new(Ecore_X_Window parent,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
Window win;
XSetWindowAttributes attr;
@ -102,10 +102,10 @@ ecore_x_window_new(Ecore_X_Window parent,
*/
EAPI Ecore_X_Window
ecore_x_window_override_new(Ecore_X_Window parent,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
Window win;
XSetWindowAttributes attr;
@ -167,10 +167,10 @@ ecore_x_window_override_new(Ecore_X_Window parent,
*/
EAPI Ecore_X_Window
ecore_x_window_input_new(Ecore_X_Window parent,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
Window win;
XSetWindowAttributes attr;
@ -266,15 +266,15 @@ ecore_x_window_defaults_set(Ecore_X_Window win)
}
EAPI void
ecore_x_window_configure(Ecore_X_Window win,
ecore_x_window_configure(Ecore_X_Window win,
Ecore_X_Window_Configure_Mask mask,
int x,
int y,
int w,
int h,
int border_width,
Ecore_X_Window sibling,
int stack_mode)
int x,
int y,
int w,
int h,
int border_width,
Ecore_X_Window sibling,
int stack_mode)
{
XWindowChanges xwc;
@ -311,9 +311,9 @@ ecore_x_window_free(Ecore_X_Window win)
/* sorry sir, deleting the root window doesn't sound like
* a smart idea.
*/
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win)
XDestroyWindow(_ecore_x_disp, win);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win)
XDestroyWindow(_ecore_x_disp, win);
}
/**
@ -323,7 +323,7 @@ ecore_x_window_free(Ecore_X_Window win)
*/
EAPI void
ecore_x_window_ignore_set(Ecore_X_Window win,
int ignore)
int ignore)
{
int i, j, cnt;
Ecore_X_Window *t;
@ -501,8 +501,8 @@ ecore_x_window_hide(Ecore_X_Window win)
*/
EAPI void
ecore_x_window_move(Ecore_X_Window win,
int x,
int y)
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XMoveWindow(_ecore_x_disp, win, x, y);
@ -517,8 +517,8 @@ ecore_x_window_move(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_resize(Ecore_X_Window win,
int w,
int h)
int w,
int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (w < 1)
@ -541,10 +541,10 @@ ecore_x_window_resize(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_move_resize(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (w < 1)
@ -586,7 +586,7 @@ ecore_x_window_focus(Ecore_X_Window win)
*/
EAPI void
ecore_x_window_focus_at_time(Ecore_X_Window win,
Ecore_X_Time t)
Ecore_X_Time t)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0)
@ -660,8 +660,8 @@ ecore_x_window_lower(Ecore_X_Window win)
EAPI void
ecore_x_window_reparent(Ecore_X_Window win,
Ecore_X_Window new_parent,
int x,
int y)
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (new_parent == 0)
@ -679,8 +679,8 @@ ecore_x_window_reparent(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_size_get(Ecore_X_Window win,
int *w,
int *h)
int *w,
int *h)
{
int dummy_x, dummy_y;
@ -709,10 +709,10 @@ ecore_x_window_size_get(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_geometry_get(Ecore_X_Window win,
int *x,
int *y,
int *w,
int *h)
int *x,
int *y,
int *w,
int *h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!win)
@ -746,7 +746,7 @@ ecore_x_window_border_width_get(Ecore_X_Window win)
*/
EAPI void
ecore_x_window_border_width_set(Ecore_X_Window win,
int width)
int width)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
/* doesn't make sense to call this on a root window */
@ -775,7 +775,7 @@ ecore_x_window_depth_get(Ecore_X_Window win)
*/
EAPI void
ecore_x_window_cursor_show(Ecore_X_Window win,
Eina_Bool show)
Eina_Bool show)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0)
@ -1000,7 +1000,7 @@ _ecore_x_window_tree_shadow_populate(void)
static Shadow *
_ecore_x_window_shadow_tree_find_shadow(Shadow *s,
Window win)
Window win)
{
Shadow *ss;
int i;
@ -1040,13 +1040,13 @@ _ecore_x_window_shadow_tree_find(Window base)
}
static int
_inside_rects(Shadow *s,
int x,
int y,
int bx,
int by,
_inside_rects(Shadow *s,
int x,
int y,
int bx,
int by,
Ecore_X_Rectangle *rects,
int num)
int num)
{
int i, inside;
@ -1068,13 +1068,13 @@ _inside_rects(Shadow *s,
}
static Window
_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s,
int bx,
int by,
int x,
int y,
_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s,
int bx,
int by,
int x,
int y,
Ecore_X_Window *skip,
int skip_num)
int skip_num)
{
Window child;
int i, j;
@ -1134,13 +1134,13 @@ onward:
}
static Window
_ecore_x_window_shadow_tree_at_xy_get(Window base,
int bx,
int by,
int x,
int y,
_ecore_x_window_shadow_tree_at_xy_get(Window base,
int bx,
int by,
int x,
int y,
Ecore_X_Window *skip,
int skip_num)
int skip_num)
{
Shadow *s;
@ -1177,11 +1177,11 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base,
* @ingroup Ecore_X_Window_Geometry_Group
*/
EAPI Ecore_X_Window
ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
int x,
int y,
ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
int x,
int y,
Ecore_X_Window *skip,
int skip_num)
int skip_num)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_window_shadow_tree_at_xy_get(base,
@ -1263,13 +1263,13 @@ ecore_x_window_root_get(Ecore_X_Window win)
}
static Window
_ecore_x_window_at_xy_get(Window base,
int bx,
int by,
int x,
int y,
_ecore_x_window_at_xy_get(Window base,
int bx,
int by,
int x,
int y,
Ecore_X_Window *skip,
int skip_num)
int skip_num)
{
Window *list = NULL;
Window parent_win = 0, child = 0, root_win = 0;
@ -1360,10 +1360,10 @@ ecore_x_window_at_xy_get(int x,
* @ingroup Ecore_X_Window_Geometry_Group
*/
EAPI Ecore_X_Window
ecore_x_window_at_xy_with_skip_get(int x,
int y,
ecore_x_window_at_xy_with_skip_get(int x,
int y,
Ecore_X_Window *skip,
int skip_num)
int skip_num)
{
Ecore_X_Window win, root;
@ -1381,8 +1381,8 @@ ecore_x_window_at_xy_with_skip_get(int x,
EAPI Ecore_X_Window
ecore_x_window_at_xy_begin_get(Ecore_X_Window begin,
int x,
int y)
int x,
int y)
{
Ecore_X_Window win;
@ -1446,7 +1446,7 @@ ecore_x_window_background_color_set(Ecore_X_Window win,
}
EAPI void
ecore_x_window_gravity_set(Ecore_X_Window win,
ecore_x_window_gravity_set(Ecore_X_Window win,
Ecore_X_Gravity grav)
{
XSetWindowAttributes att;
@ -1457,7 +1457,7 @@ ecore_x_window_gravity_set(Ecore_X_Window win,
}
EAPI void
ecore_x_window_pixel_gravity_set(Ecore_X_Window win,
ecore_x_window_pixel_gravity_set(Ecore_X_Window win,
Ecore_X_Gravity grav)
{
XSetWindowAttributes att;
@ -1477,10 +1477,10 @@ ecore_x_window_pixmap_set(Ecore_X_Window win,
EAPI void
ecore_x_window_area_clear(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XClearArea(_ecore_x_disp, win, x, y, w, h, False);
@ -1488,10 +1488,10 @@ ecore_x_window_area_clear(Ecore_X_Window win,
EAPI void
ecore_x_window_area_expose(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XClearArea(_ecore_x_disp, win, x, y, w, h, True);
@ -1499,7 +1499,7 @@ ecore_x_window_area_expose(Ecore_X_Window win,
EAPI void
ecore_x_window_override_set(Ecore_X_Window win,
Eina_Bool override)
Eina_Bool override)
{
XSetWindowAttributes att;
@ -1511,12 +1511,12 @@ ecore_x_window_override_set(Ecore_X_Window win,
#ifdef ECORE_XRENDER
static Ecore_X_Window
_ecore_x_window_argb_internal_new(Ecore_X_Window parent,
int x,
int y,
int w,
int h,
Eina_Bool override,
Eina_Bool saveunder)
int x,
int y,
int w,
int h,
Eina_Bool override,
Eina_Bool saveunder)
{
Window win;
XSetWindowAttributes attr;
@ -1535,15 +1535,15 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
else
{
/* ewww - round trip */
XGetWindowAttributes(_ecore_x_disp, parent, &att);
for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
{
if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
{
scr = i;
break;
}
}
XGetWindowAttributes(_ecore_x_disp, parent, &att);
for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
{
if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
{
scr = i;
break;
}
}
}
vi_in.screen = scr;
@ -1656,10 +1656,10 @@ ecore_x_window_argb_get(Ecore_X_Window win)
*/
EAPI Ecore_X_Window
ecore_x_window_manager_argb_new(Ecore_X_Window parent,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
#ifdef ECORE_XRENDER
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -1682,10 +1682,10 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent,
*/
EAPI Ecore_X_Window
ecore_x_window_argb_new(Ecore_X_Window parent,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
#ifdef ECORE_XRENDER
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -1708,10 +1708,10 @@ ecore_x_window_argb_new(Ecore_X_Window parent,
*/
EAPI Ecore_X_Window
ecore_x_window_override_argb_new(Ecore_X_Window parent,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
#ifdef ECORE_XRENDER
LOGFN(__FILE__, __LINE__, __FUNCTION__);

View File

@ -21,9 +21,9 @@
*/
EAPI void
ecore_x_window_prop_card32_set(Ecore_X_Window win,
Ecore_X_Atom atom,
unsigned int *val,
unsigned int num)
Ecore_X_Atom atom,
unsigned int *val,
unsigned int num)
{
#if SIZEOF_INT == SIZEOF_LONG
_ATOM_SET_CARD32(win, atom, val, num);
@ -53,9 +53,9 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win,
*/
EAPI int
ecore_x_window_prop_card32_get(Ecore_X_Window win,
Ecore_X_Atom atom,
unsigned int *val,
unsigned int len)
Ecore_X_Atom atom,
unsigned int *val,
unsigned int len)
{
unsigned char *prop_ret;
Atom type_ret;
@ -100,7 +100,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win,
*/
EAPI int
ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom atom,
unsigned int **plst)
{
unsigned char *prop_ret;
@ -125,7 +125,7 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
else
{
val = malloc(num_ret * sizeof(unsigned int));
if (!val)
if (!val)
{
if (prop_ret) XFree(prop_ret);
return -1;
@ -147,10 +147,10 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_prop_xid_set(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID *lst,
unsigned int num)
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID *lst,
unsigned int num)
{
#if SIZEOF_INT == SIZEOF_LONG
XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
@ -182,10 +182,10 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win,
*/
EAPI int
ecore_x_window_prop_xid_get(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID *lst,
unsigned int len)
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID *lst,
unsigned int len)
{
unsigned char *prop_ret;
Atom type_ret;
@ -231,9 +231,9 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win,
*/
EAPI int
ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID **val)
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID **val)
{
unsigned char *prop_ret;
Atom type_ret;
@ -275,10 +275,10 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID item,
int op)
Ecore_X_Atom atom,
Ecore_X_Atom type,
Ecore_X_ID item,
int op)
{
Ecore_X_ID *lst;
int i, num;
@ -300,22 +300,22 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
if (i < num)
{
/* Was in list */
if (op == ECORE_X_PROP_LIST_ADD)
goto done; /* Remove it */
if (op == ECORE_X_PROP_LIST_ADD)
goto done; /* Remove it */
num--;
for (; i < num; i++)
lst[i] = lst[i + 1];
num--;
for (; i < num; i++)
lst[i] = lst[i + 1];
}
else
{
/* Was not in list */
if (op == ECORE_X_PROP_LIST_REMOVE)
goto done; /* Add it */
if (op == ECORE_X_PROP_LIST_REMOVE)
goto done; /* Add it */
num++;
lst = realloc(lst, num * sizeof(Ecore_X_ID));
lst[i] = item;
num++;
lst = realloc(lst, num * sizeof(Ecore_X_ID));
lst[i] = item;
}
ecore_x_window_prop_xid_set(win, atom, type, lst, num);
@ -330,9 +330,9 @@ done:
*/
EAPI void
ecore_x_window_prop_atom_set(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom *lst,
unsigned int num)
Ecore_X_Atom atom,
Ecore_X_Atom *lst,
unsigned int num)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num);
@ -348,9 +348,9 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win,
*/
EAPI int
ecore_x_window_prop_atom_get(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom *lst,
unsigned int len)
Ecore_X_Atom atom,
Ecore_X_Atom *lst,
unsigned int len)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len);
@ -366,7 +366,7 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win,
*/
EAPI int
ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom atom,
Ecore_X_Atom **plst)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -378,9 +378,9 @@ ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Atom item,
int op)
Ecore_X_Atom atom,
Ecore_X_Atom item,
int op)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op);
@ -390,10 +390,10 @@ ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
* Set Window (array) property
*/
EAPI void
ecore_x_window_prop_window_set(Ecore_X_Window win,
Ecore_X_Atom atom,
ecore_x_window_prop_window_set(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Window *lst,
unsigned int num)
unsigned int num)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num);
@ -408,10 +408,10 @@ ecore_x_window_prop_window_set(Ecore_X_Window win,
* Note: Return value 0 means that the property exists but has no elements.
*/
EAPI int
ecore_x_window_prop_window_get(Ecore_X_Window win,
Ecore_X_Atom atom,
ecore_x_window_prop_window_get(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Window *lst,
unsigned int len)
unsigned int len)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len);
@ -426,8 +426,8 @@ ecore_x_window_prop_window_get(Ecore_X_Window win,
* Note: Return value 0 means that the property exists but has no elements.
*/
EAPI int
ecore_x_window_prop_window_list_get(Ecore_X_Window win,
Ecore_X_Atom atom,
ecore_x_window_prop_window_list_get(Ecore_X_Window win,
Ecore_X_Atom atom,
Ecore_X_Window **plst)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -452,11 +452,11 @@ ecore_x_window_prop_any_type(void)
*/
EAPI void
ecore_x_window_prop_property_set(Ecore_X_Window win,
Ecore_X_Atom property,
Ecore_X_Atom type,
int size,
void *data,
int number)
Ecore_X_Atom property,
Ecore_X_Atom type,
int size,
void *data,
int number)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0)
@ -479,7 +479,8 @@ ecore_x_window_prop_property_set(Ecore_X_Window win,
dat = malloc(sizeof(unsigned long) * number);
if (dat)
{
for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i];
for (ptr = (int *)data, i = 0; i < number; i++)
dat[i] = ptr[i];
XChangeProperty(_ecore_x_disp, win, property, type, size,
PropModeReplace, (unsigned char *)dat, number);
free(dat);
@ -493,12 +494,12 @@ ecore_x_window_prop_property_set(Ecore_X_Window win,
* FIXME: To be fixed.
*/
EAPI int
ecore_x_window_prop_property_get(Ecore_X_Window win,
Ecore_X_Atom property,
Ecore_X_Atom type,
int size __UNUSED__,
ecore_x_window_prop_property_get(Ecore_X_Window win,
Ecore_X_Atom property,
Ecore_X_Atom type,
int size __UNUSED__,
unsigned char **data,
int *num)
int *num)
{
Atom type_ret = 0;
int ret, size_ret = 0;
@ -564,7 +565,7 @@ ecore_x_window_prop_property_get(Ecore_X_Window win,
EAPI void
ecore_x_window_prop_property_del(Ecore_X_Window win,
Ecore_X_Atom property)
Ecore_X_Atom property)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XDeleteProperty(_ecore_x_disp, win, property);
@ -572,7 +573,7 @@ ecore_x_window_prop_property_del(Ecore_X_Window win,
EAPI Ecore_X_Atom *
ecore_x_window_prop_list(Ecore_X_Window win,
int *num_ret)
int *num_ret)
{
Ecore_X_Atom *atoms;
Atom *atom_ret;
@ -589,7 +590,8 @@ ecore_x_window_prop_list(Ecore_X_Window win,
atoms = malloc(num * sizeof(Ecore_X_Atom));
if (atoms)
{
for (i = 0; i < num; i++) atoms[i] = atom_ret[i];
for (i = 0; i < num; i++)
atoms[i] = atom_ret[i];
if (num_ret)
*num_ret = num;
}
@ -608,8 +610,8 @@ ecore_x_window_prop_list(Ecore_X_Window win,
*/
EAPI void
ecore_x_window_prop_string_set(Ecore_X_Window win,
Ecore_X_Atom type,
const char *str)
Ecore_X_Atom type,
const char *str)
{
XTextProperty xtp;
@ -633,7 +635,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win,
*/
EAPI char *
ecore_x_window_prop_string_get(Ecore_X_Window win,
Ecore_X_Atom type)
Ecore_X_Atom type)
{
XTextProperty xtp;
char *str = NULL;
@ -676,7 +678,7 @@ ecore_x_window_prop_string_get(Ecore_X_Window win,
}
EAPI Eina_Bool
ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
Ecore_X_WM_Protocol protocol)
{
Atom proto, *protos = NULL;
@ -712,7 +714,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
*/
EAPI Ecore_X_WM_Protocol *
ecore_x_window_prop_protocol_list_get(Ecore_X_Window win,
int *num_ret)
int *num_ret)
{
Atom *protos = NULL;
int i, protos_count = 0;

View File

@ -88,8 +88,8 @@ ecore_x_window_shape_input_window_set(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
Ecore_X_Window shape_win,
int x,
int y)
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XShapeCombineShape(_ecore_x_disp,
@ -105,8 +105,8 @@ ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win,
Ecore_X_Window shape_win,
int x,
int y)
int x,
int y)
{
#ifdef ShapeInput
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -126,10 +126,10 @@ ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
XRectangle rect;
@ -151,10 +151,10 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
#ifdef ShapeInput
XRectangle rect;
@ -180,9 +180,9 @@ ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win,
}
EAPI void
ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
Ecore_X_Rectangle *rects,
int num)
int num)
{
#ifdef ShapeInput
XRectangle *rect = NULL;
@ -219,9 +219,9 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
}
EAPI void
ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win,
ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win,
Ecore_X_Rectangle *rects,
int num)
int num)
{
#ifdef ShapeInput
XRectangle *rect = NULL;
@ -259,10 +259,10 @@ ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
XRectangle rect;
@ -284,10 +284,10 @@ ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
#ifdef ShapeInput
XRectangle rect;
@ -330,8 +330,8 @@ ecore_x_window_shape_window_add(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
Ecore_X_Window shape_win,
int x,
int y)
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XShapeCombineShape(_ecore_x_disp,
@ -347,8 +347,8 @@ ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win,
Ecore_X_Window shape_win,
int x,
int y)
int x,
int y)
{
#ifdef ShapeInput
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -368,10 +368,10 @@ ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
XRectangle rect;
@ -393,10 +393,10 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
#ifdef ShapeInput
XRectangle rect;
@ -423,10 +423,10 @@ ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
XRectangle rect;
@ -448,10 +448,10 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
#ifdef ShapeInput
XRectangle rect;
@ -477,9 +477,9 @@ ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win,
}
EAPI void
ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
Ecore_X_Rectangle *rects,
int num)
int num)
{
XRectangle *rect = NULL;
int i;
@ -511,9 +511,9 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
}
EAPI void
ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win,
ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win,
Ecore_X_Rectangle *rects,
int num)
int num)
{
#ifdef ShapeInput
XRectangle *rect = NULL;
@ -551,7 +551,7 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win,
EAPI Ecore_X_Rectangle *
ecore_x_window_shape_rectangles_get(Ecore_X_Window win,
int *num_ret)
int *num_ret)
{
XRectangle *rect;
Ecore_X_Rectangle *rects = NULL;
@ -589,7 +589,7 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win,
EAPI Ecore_X_Rectangle *
ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win,
int *num_ret)
int *num_ret)
{
Ecore_X_Rectangle *rects = NULL;
#ifdef ShapeInput
@ -647,7 +647,7 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win,
EAPI void
ecore_x_window_shape_events_select(Ecore_X_Window win,
Eina_Bool on)
Eina_Bool on)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (on)

View File

@ -39,7 +39,7 @@ ecore_x_xinerama_screen_count_get(void)
}
EAPI Eina_Bool
ecore_x_xinerama_screen_geometry_get(int screen,
ecore_x_xinerama_screen_geometry_get(int screen,
int *x,
int *y,
int *w,