parent
faa7644e22
commit
d07a90f62a
File diff suppressed because it is too large
Load Diff
|
@ -210,7 +210,6 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
|
|||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
|
||||
|
||||
|
||||
/* Illume specific atoms */
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE_LIST;
|
||||
|
@ -242,7 +241,6 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR;
|
|||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE;
|
||||
|
||||
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED;
|
||||
|
|
|
@ -6,81 +6,81 @@
|
|||
* @brief Defines the various cursor types for the X Windows system.
|
||||
*/
|
||||
|
||||
#define ECORE_X_CURSOR_X 0
|
||||
#define ECORE_X_CURSOR_ARROW 2
|
||||
#define ECORE_X_CURSOR_BASED_ARROW_DOWN 4
|
||||
#define ECORE_X_CURSOR_UP 6
|
||||
#define ECORE_X_CURSOR_BOAT 8
|
||||
#define ECORE_X_CURSOR_BOTTOM_LEFT_CORNER 12
|
||||
#define ECORE_X_CURSOR_X 0
|
||||
#define ECORE_X_CURSOR_ARROW 2
|
||||
#define ECORE_X_CURSOR_BASED_ARROW_DOWN 4
|
||||
#define ECORE_X_CURSOR_UP 6
|
||||
#define ECORE_X_CURSOR_BOAT 8
|
||||
#define ECORE_X_CURSOR_BOTTOM_LEFT_CORNER 12
|
||||
#define ECORE_X_CURSOR_BOTTOM_RIGHT_CORNER 14
|
||||
#define ECORE_X_CURSOR_BOTTOM_SIDE 16
|
||||
#define ECORE_X_CURSOR_BOTTOM_TEE 18
|
||||
#define ECORE_X_CURSOR_BOX_SPIRAL 20
|
||||
#define ECORE_X_CURSOR_CENTER_PTR 22
|
||||
#define ECORE_X_CURSOR_CIRCLE 24
|
||||
#define ECORE_X_CURSOR_CLOCK 26
|
||||
#define ECORE_X_CURSOR_COFFEE_MUG 28
|
||||
#define ECORE_X_CURSOR_CROSS 30
|
||||
#define ECORE_X_CURSOR_CROSS_REVERSE 32
|
||||
#define ECORE_X_CURSOR_CROSSHAIR 34
|
||||
#define ECORE_X_CURSOR_DIAMOND_CROSS 36
|
||||
#define ECORE_X_CURSOR_DOT 38
|
||||
#define ECORE_X_CURSOR_DOT_BOX_MASK 40
|
||||
#define ECORE_X_CURSOR_DOUBLE_ARROW 42
|
||||
#define ECORE_X_CURSOR_DRAFT_LARGE 44
|
||||
#define ECORE_X_CURSOR_DRAFT_SMALL 46
|
||||
#define ECORE_X_CURSOR_DRAPED_BOX 48
|
||||
#define ECORE_X_CURSOR_EXCHANGE 50
|
||||
#define ECORE_X_CURSOR_FLEUR 52
|
||||
#define ECORE_X_CURSOR_GOBBLER 54
|
||||
#define ECORE_X_CURSOR_GUMBY 56
|
||||
#define ECORE_X_CURSOR_HAND1 58
|
||||
#define ECORE_X_CURSOR_HAND2 60
|
||||
#define ECORE_X_CURSOR_HEART 62
|
||||
#define ECORE_X_CURSOR_ICON 64
|
||||
#define ECORE_X_CURSOR_IRON_CROSS 66
|
||||
#define ECORE_X_CURSOR_LEFT_PTR 68
|
||||
#define ECORE_X_CURSOR_LEFT_SIDE 70
|
||||
#define ECORE_X_CURSOR_LEFT_TEE 72
|
||||
#define ECORE_X_CURSOR_LEFTBUTTON 74
|
||||
#define ECORE_X_CURSOR_LL_ANGLE 76
|
||||
#define ECORE_X_CURSOR_LR_ANGLE 78
|
||||
#define ECORE_X_CURSOR_MAN 80
|
||||
#define ECORE_X_CURSOR_MIDDLEBUTTON 82
|
||||
#define ECORE_X_CURSOR_MOUSE 84
|
||||
#define ECORE_X_CURSOR_PENCIL 86
|
||||
#define ECORE_X_CURSOR_PIRATE 88
|
||||
#define ECORE_X_CURSOR_PLUS 90
|
||||
#define ECORE_X_CURSOR_QUESTION_ARROW 92
|
||||
#define ECORE_X_CURSOR_RIGHT_PTR 94
|
||||
#define ECORE_X_CURSOR_RIGHT_SIDE 96
|
||||
#define ECORE_X_CURSOR_RIGHT_TEE 98
|
||||
#define ECORE_X_CURSOR_RIGHTBUTTON 100
|
||||
#define ECORE_X_CURSOR_RTL_LOGO 102
|
||||
#define ECORE_X_CURSOR_SAILBOAT 104
|
||||
#define ECORE_X_CURSOR_SB_DOWN_ARROW 106
|
||||
#define ECORE_X_CURSOR_SB_H_DOUBLE_ARROW 108
|
||||
#define ECORE_X_CURSOR_SB_LEFT_ARROW 110
|
||||
#define ECORE_X_CURSOR_SB_RIGHT_ARROW 112
|
||||
#define ECORE_X_CURSOR_SB_UP_ARROW 114
|
||||
#define ECORE_X_CURSOR_SB_V_DOUBLE_ARROW 116
|
||||
#define ECORE_X_CURSOR_SHUTTLE 118
|
||||
#define ECORE_X_CURSOR_SIZING 120
|
||||
#define ECORE_X_CURSOR_SPIDER 122
|
||||
#define ECORE_X_CURSOR_SPRAYCAN 124
|
||||
#define ECORE_X_CURSOR_STAR 126
|
||||
#define ECORE_X_CURSOR_TARGET 128
|
||||
#define ECORE_X_CURSOR_TCROSS 130
|
||||
#define ECORE_X_CURSOR_TOP_LEFT_ARROW 132
|
||||
#define ECORE_X_CURSOR_TOP_LEFT_CORNER 134
|
||||
#define ECORE_X_CURSOR_TOP_RIGHT_CORNER 136
|
||||
#define ECORE_X_CURSOR_TOP_SIDE 138
|
||||
#define ECORE_X_CURSOR_TOP_TEE 140
|
||||
#define ECORE_X_CURSOR_TREK 142
|
||||
#define ECORE_X_CURSOR_UL_ANGLE 144
|
||||
#define ECORE_X_CURSOR_UMBRELLA 146
|
||||
#define ECORE_X_CURSOR_UR_ANGLE 148
|
||||
#define ECORE_X_CURSOR_WATCH 150
|
||||
#define ECORE_X_CURSOR_XTERM 152
|
||||
#define ECORE_X_CURSOR_BOTTOM_SIDE 16
|
||||
#define ECORE_X_CURSOR_BOTTOM_TEE 18
|
||||
#define ECORE_X_CURSOR_BOX_SPIRAL 20
|
||||
#define ECORE_X_CURSOR_CENTER_PTR 22
|
||||
#define ECORE_X_CURSOR_CIRCLE 24
|
||||
#define ECORE_X_CURSOR_CLOCK 26
|
||||
#define ECORE_X_CURSOR_COFFEE_MUG 28
|
||||
#define ECORE_X_CURSOR_CROSS 30
|
||||
#define ECORE_X_CURSOR_CROSS_REVERSE 32
|
||||
#define ECORE_X_CURSOR_CROSSHAIR 34
|
||||
#define ECORE_X_CURSOR_DIAMOND_CROSS 36
|
||||
#define ECORE_X_CURSOR_DOT 38
|
||||
#define ECORE_X_CURSOR_DOT_BOX_MASK 40
|
||||
#define ECORE_X_CURSOR_DOUBLE_ARROW 42
|
||||
#define ECORE_X_CURSOR_DRAFT_LARGE 44
|
||||
#define ECORE_X_CURSOR_DRAFT_SMALL 46
|
||||
#define ECORE_X_CURSOR_DRAPED_BOX 48
|
||||
#define ECORE_X_CURSOR_EXCHANGE 50
|
||||
#define ECORE_X_CURSOR_FLEUR 52
|
||||
#define ECORE_X_CURSOR_GOBBLER 54
|
||||
#define ECORE_X_CURSOR_GUMBY 56
|
||||
#define ECORE_X_CURSOR_HAND1 58
|
||||
#define ECORE_X_CURSOR_HAND2 60
|
||||
#define ECORE_X_CURSOR_HEART 62
|
||||
#define ECORE_X_CURSOR_ICON 64
|
||||
#define ECORE_X_CURSOR_IRON_CROSS 66
|
||||
#define ECORE_X_CURSOR_LEFT_PTR 68
|
||||
#define ECORE_X_CURSOR_LEFT_SIDE 70
|
||||
#define ECORE_X_CURSOR_LEFT_TEE 72
|
||||
#define ECORE_X_CURSOR_LEFTBUTTON 74
|
||||
#define ECORE_X_CURSOR_LL_ANGLE 76
|
||||
#define ECORE_X_CURSOR_LR_ANGLE 78
|
||||
#define ECORE_X_CURSOR_MAN 80
|
||||
#define ECORE_X_CURSOR_MIDDLEBUTTON 82
|
||||
#define ECORE_X_CURSOR_MOUSE 84
|
||||
#define ECORE_X_CURSOR_PENCIL 86
|
||||
#define ECORE_X_CURSOR_PIRATE 88
|
||||
#define ECORE_X_CURSOR_PLUS 90
|
||||
#define ECORE_X_CURSOR_QUESTION_ARROW 92
|
||||
#define ECORE_X_CURSOR_RIGHT_PTR 94
|
||||
#define ECORE_X_CURSOR_RIGHT_SIDE 96
|
||||
#define ECORE_X_CURSOR_RIGHT_TEE 98
|
||||
#define ECORE_X_CURSOR_RIGHTBUTTON 100
|
||||
#define ECORE_X_CURSOR_RTL_LOGO 102
|
||||
#define ECORE_X_CURSOR_SAILBOAT 104
|
||||
#define ECORE_X_CURSOR_SB_DOWN_ARROW 106
|
||||
#define ECORE_X_CURSOR_SB_H_DOUBLE_ARROW 108
|
||||
#define ECORE_X_CURSOR_SB_LEFT_ARROW 110
|
||||
#define ECORE_X_CURSOR_SB_RIGHT_ARROW 112
|
||||
#define ECORE_X_CURSOR_SB_UP_ARROW 114
|
||||
#define ECORE_X_CURSOR_SB_V_DOUBLE_ARROW 116
|
||||
#define ECORE_X_CURSOR_SHUTTLE 118
|
||||
#define ECORE_X_CURSOR_SIZING 120
|
||||
#define ECORE_X_CURSOR_SPIDER 122
|
||||
#define ECORE_X_CURSOR_SPRAYCAN 124
|
||||
#define ECORE_X_CURSOR_STAR 126
|
||||
#define ECORE_X_CURSOR_TARGET 128
|
||||
#define ECORE_X_CURSOR_TCROSS 130
|
||||
#define ECORE_X_CURSOR_TOP_LEFT_ARROW 132
|
||||
#define ECORE_X_CURSOR_TOP_LEFT_CORNER 134
|
||||
#define ECORE_X_CURSOR_TOP_RIGHT_CORNER 136
|
||||
#define ECORE_X_CURSOR_TOP_SIDE 138
|
||||
#define ECORE_X_CURSOR_TOP_TEE 140
|
||||
#define ECORE_X_CURSOR_TREK 142
|
||||
#define ECORE_X_CURSOR_UL_ANGLE 144
|
||||
#define ECORE_X_CURSOR_UMBRELLA 146
|
||||
#define ECORE_X_CURSOR_UR_ANGLE 148
|
||||
#define ECORE_X_CURSOR_WATCH 150
|
||||
#define ECORE_X_CURSOR_XTERM 152
|
||||
|
||||
#endif
|
||||
#endif // ifndef _ECORE_X_CURSOR_H
|
||||
|
|
|
@ -264,7 +264,6 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0;
|
|||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0;
|
||||
|
||||
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED = 0;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
#ifdef LOGRT
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#endif /* ifdef LOGRT */
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_private.h"
|
||||
|
@ -23,11 +23,11 @@
|
|||
#include "Ecore_X_Atoms.h"
|
||||
#include "Ecore_Input.h"
|
||||
|
||||
static Eina_Bool _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
|
||||
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);
|
||||
static Eina_Bool _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
|
||||
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);
|
||||
|
||||
static Ecore_Fd_Handler *_ecore_x_fd_handler_handle = NULL;
|
||||
|
||||
|
@ -43,13 +43,13 @@ int _ecore_xlib_log_dom = -1;
|
|||
|
||||
#ifdef ECORE_XRANDR
|
||||
static int _ecore_x_event_randr_id = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
#ifdef ECORE_XFIXES
|
||||
static int _ecore_x_event_fixes_selection_id = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
#ifdef ECORE_XDAMAGE
|
||||
static int _ecore_x_event_damage_id = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
static int _ecore_x_event_handlers_num = 0;
|
||||
static void (**_ecore_x_event_handlers) (XEvent * event) = NULL;
|
||||
|
||||
|
@ -160,7 +160,8 @@ _logrt_init(void)
|
|||
|
||||
_logrt_real_reply = dlsym(lib, "_XReply");
|
||||
t0 = ecore_time_get();
|
||||
}
|
||||
} /* _logrt_init */
|
||||
|
||||
Status
|
||||
_XReply(Display *disp, void *rep, int extra, Bool discard)
|
||||
{
|
||||
|
@ -190,22 +191,23 @@ _XReply(Display *disp, void *rep, int extra, Bool discard)
|
|||
printf("%s", tsym);
|
||||
}
|
||||
else
|
||||
printf("???");
|
||||
printf("???");
|
||||
}
|
||||
else
|
||||
printf("???");
|
||||
printf("???");
|
||||
|
||||
if (i > 1)
|
||||
printf(" > ");
|
||||
printf(" > ");
|
||||
}
|
||||
printf("\n");
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
// fixme: logme
|
||||
return _logrt_real_reply(disp, rep, extra, discard);
|
||||
}
|
||||
#endif
|
||||
} /* _XReply */
|
||||
|
||||
#endif /* ifdef LOGRT */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Init_Group X Library Init and Shutdown Functions
|
||||
|
@ -230,21 +232,21 @@ ecore_x_init(const char *name)
|
|||
#ifdef ECORE_XSS
|
||||
int screensaver_base = 0;
|
||||
int screensaver_err_base = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XSS */
|
||||
int sync_base = 0;
|
||||
int sync_err_base = 0;
|
||||
#ifdef ECORE_XRANDR
|
||||
int randr_base = 0;
|
||||
int randr_err_base = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
#ifdef ECORE_XFIXES
|
||||
int fixes_base = 0;
|
||||
int fixes_err_base = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
#ifdef ECORE_XDAMAGE
|
||||
int damage_base = 0;
|
||||
int damage_err_base = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
|
||||
if (++_ecore_x_init_count != 1)
|
||||
return _ecore_x_init_count;
|
||||
|
@ -252,7 +254,7 @@ ecore_x_init(const char *name)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
#ifdef LOGRT
|
||||
_logrt_init();
|
||||
#endif
|
||||
#endif /* ifdef LOGRT */
|
||||
|
||||
_ecore_xlib_log_dom = eina_log_domain_register("EcoreX11",
|
||||
ECORE_XLIB_DEFAULT_LOG_COLOR);
|
||||
|
@ -272,7 +274,7 @@ ecore_x_init(const char *name)
|
|||
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
XInitThreads();
|
||||
#endif
|
||||
#endif /* ifdef EVAS_FRAME_QUEUING */
|
||||
_ecore_x_disp = XOpenDisplay((char *)name);
|
||||
if (!_ecore_x_disp)
|
||||
goto shutdown_ecore_event;
|
||||
|
@ -280,10 +282,10 @@ ecore_x_init(const char *name)
|
|||
_ecore_x_error_handler_init();
|
||||
_ecore_x_event_handlers_num = LASTEvent;
|
||||
|
||||
#define ECORE_X_EVENT_HANDLERS_GROW(ext_base, ext_num_events) \
|
||||
do { \
|
||||
if (_ecore_x_event_handlers_num < (ext_base + ext_num_events)) { \
|
||||
_ecore_x_event_handlers_num = (ext_base + ext_num_events); } \
|
||||
#define ECORE_X_EVENT_HANDLERS_GROW(ext_base, ext_num_events)\
|
||||
do {\
|
||||
if (_ecore_x_event_handlers_num < (ext_base + ext_num_events)) {\
|
||||
_ecore_x_event_handlers_num = (ext_base + ext_num_events); }\
|
||||
} while (0)
|
||||
|
||||
if (XShapeQueryExtension(_ecore_x_disp, &shape_base, &shape_err_base))
|
||||
|
@ -297,7 +299,7 @@ ecore_x_init(const char *name)
|
|||
_ecore_x_event_screensaver_id = screensaver_base;
|
||||
|
||||
ECORE_X_EVENT_HANDLERS_GROW(screensaver_base, ScreenSaverNumberEvents);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XSS */
|
||||
|
||||
if (XSyncQueryExtension(_ecore_x_disp, &sync_base, &sync_err_base))
|
||||
{
|
||||
|
@ -315,21 +317,21 @@ ecore_x_init(const char *name)
|
|||
_ecore_x_event_randr_id = randr_base;
|
||||
|
||||
ECORE_X_EVENT_HANDLERS_GROW(randr_base, RRNumberEvents);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
|
||||
#ifdef ECORE_XFIXES
|
||||
if (XFixesQueryExtension(_ecore_x_disp, &fixes_base, &fixes_err_base))
|
||||
_ecore_x_event_fixes_selection_id = fixes_base;
|
||||
|
||||
ECORE_X_EVENT_HANDLERS_GROW(fixes_base, XFixesNumberEvents);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
|
||||
#ifdef ECORE_XDAMAGE
|
||||
if (XDamageQueryExtension(_ecore_x_disp, &damage_base, &damage_err_base))
|
||||
_ecore_x_event_damage_id = damage_base;
|
||||
|
||||
ECORE_X_EVENT_HANDLERS_GROW(damage_base, XDamageNumberEvents);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
|
||||
_ecore_x_event_handlers = calloc(_ecore_x_event_handlers_num, sizeof(void *));
|
||||
if (!_ecore_x_event_handlers)
|
||||
|
@ -337,7 +339,7 @@ ecore_x_init(const char *name)
|
|||
|
||||
#ifdef ECORE_XCURSOR
|
||||
_ecore_x_xcursor = XcursorSupportsARGB(_ecore_x_disp);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XCURSOR */
|
||||
_ecore_x_event_handlers[AnyXEvent] = _ecore_x_event_handle_any_event;
|
||||
_ecore_x_event_handlers[KeyPress] = _ecore_x_event_handle_key_press;
|
||||
_ecore_x_event_handlers[KeyRelease] = _ecore_x_event_handle_key_release;
|
||||
|
@ -391,7 +393,7 @@ ecore_x_init(const char *name)
|
|||
_ecore_x_event_handle_mapping_notify;
|
||||
#ifdef GenericEvent
|
||||
_ecore_x_event_handlers[GenericEvent] = _ecore_x_event_handle_generic_event;
|
||||
#endif
|
||||
#endif /* ifdef GenericEvent */
|
||||
|
||||
if (_ecore_x_event_shape_id)
|
||||
_ecore_x_event_handlers[_ecore_x_event_shape_id] =
|
||||
|
@ -419,19 +421,19 @@ ecore_x_init(const char *name)
|
|||
RRNotify] = _ecore_x_event_handle_randr_notify;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
#ifdef ECORE_XFIXES
|
||||
if (_ecore_x_event_fixes_selection_id)
|
||||
_ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] =
|
||||
_ecore_x_event_handle_fixes_selection_notify;
|
||||
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
#ifdef ECORE_XDAMAGE
|
||||
if (_ecore_x_event_damage_id)
|
||||
_ecore_x_event_handlers[_ecore_x_event_damage_id] =
|
||||
_ecore_x_event_handle_damage_notify;
|
||||
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
#ifdef ECORE_XKB
|
||||
// set x autorepeat detection to on. that means instead of
|
||||
// press-release-press-release-press-release
|
||||
|
@ -443,7 +445,7 @@ ecore_x_init(const char *name)
|
|||
XkbSetDetectableAutoRepeat(_ecore_x_disp, 1, &works);
|
||||
}
|
||||
while (0);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XKB */
|
||||
|
||||
if (!ECORE_X_EVENT_ANY)
|
||||
{
|
||||
|
@ -629,7 +631,7 @@ _im_create_error:
|
|||
}
|
||||
|
||||
_im_create_end:
|
||||
#endif
|
||||
#endif /* ifdef ENABLE_XIM */
|
||||
return _ecore_x_init_count;
|
||||
|
||||
free_event_handlers:
|
||||
|
@ -642,7 +644,7 @@ close_display:
|
|||
shutdown_ecore_event:
|
||||
ecore_event_shutdown();
|
||||
return --_ecore_x_init_count;
|
||||
}
|
||||
} /* ecore_x_init */
|
||||
|
||||
static int
|
||||
_ecore_x_shutdown(int close_display)
|
||||
|
@ -668,7 +670,7 @@ _ecore_x_shutdown(int close_display)
|
|||
_ecore_x_im = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* ifdef ENABLE_XIM */
|
||||
ecore_main_fd_handler_del(_ecore_x_fd_handler_handle);
|
||||
if (close_display)
|
||||
XCloseDisplay(_ecore_x_disp);
|
||||
|
@ -687,7 +689,7 @@ _ecore_x_shutdown(int close_display)
|
|||
eina_log_domain_unregister(_ecore_xlib_log_dom);
|
||||
_ecore_xlib_log_dom = -1;
|
||||
return _ecore_x_init_count;
|
||||
}
|
||||
} /* _ecore_x_shutdown */
|
||||
|
||||
/**
|
||||
* Shuts down the Ecore X library.
|
||||
|
@ -703,7 +705,7 @@ EAPI int
|
|||
ecore_x_shutdown(void)
|
||||
{
|
||||
return _ecore_x_shutdown(1);
|
||||
}
|
||||
} /* ecore_x_shutdown */
|
||||
|
||||
/**
|
||||
* Shuts down the Ecore X library.
|
||||
|
@ -716,7 +718,7 @@ EAPI int
|
|||
ecore_x_disconnect(void)
|
||||
{
|
||||
return _ecore_x_shutdown(0);
|
||||
}
|
||||
} /* ecore_x_disconnect */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Display_Attr_Group X Display Attributes
|
||||
|
@ -733,7 +735,7 @@ EAPI Ecore_X_Display *
|
|||
ecore_x_display_get(void)
|
||||
{
|
||||
return (Ecore_X_Display *)_ecore_x_disp;
|
||||
}
|
||||
} /* ecore_x_display_get */
|
||||
|
||||
/**
|
||||
* Retrieves the X display file descriptor.
|
||||
|
@ -745,7 +747,7 @@ ecore_x_fd_get(void)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ConnectionNumber(_ecore_x_disp);
|
||||
}
|
||||
} /* ecore_x_fd_get */
|
||||
|
||||
/**
|
||||
* Retrieves the Ecore_X_Screen handle used for the current X connection.
|
||||
|
@ -757,7 +759,7 @@ ecore_x_default_screen_get(void)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp);
|
||||
}
|
||||
} /* ecore_x_default_screen_get */
|
||||
|
||||
/**
|
||||
* Sets the timeout for a double and triple clicks to be flagged.
|
||||
|
@ -776,7 +778,7 @@ ecore_x_double_click_time_set(double t)
|
|||
t = 0.0;
|
||||
|
||||
_ecore_x_double_click_time = t;
|
||||
}
|
||||
} /* ecore_x_double_click_time_set */
|
||||
|
||||
/**
|
||||
* Retrieves the double and triple click flag timeout.
|
||||
|
@ -790,7 +792,7 @@ EAPI double
|
|||
ecore_x_double_click_time_get(void)
|
||||
{
|
||||
return _ecore_x_double_click_time;
|
||||
}
|
||||
} /* ecore_x_double_click_time_get */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Flush_Group X Synchronization Functions
|
||||
|
@ -808,7 +810,7 @@ ecore_x_flush(void)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFlush(_ecore_x_disp);
|
||||
}
|
||||
} /* ecore_x_flush */
|
||||
|
||||
/**
|
||||
* Flushes the command buffer and waits until all requests have been
|
||||
|
@ -820,7 +822,7 @@ ecore_x_sync(void)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XSync(_ecore_x_disp, False);
|
||||
}
|
||||
} /* ecore_x_sync */
|
||||
|
||||
/**
|
||||
* Kill all clients with subwindows under a given window.
|
||||
|
@ -856,7 +858,7 @@ ecore_x_killall(Ecore_X_Window root)
|
|||
}
|
||||
XUngrabServer(_ecore_x_disp);
|
||||
XSync(_ecore_x_disp, False);
|
||||
}
|
||||
} /* ecore_x_killall */
|
||||
|
||||
/**
|
||||
* Kill a specific client
|
||||
|
@ -870,7 +872,7 @@ ecore_x_kill(Ecore_X_Window win)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XKillClient(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_kill */
|
||||
|
||||
/**
|
||||
* Return the last event time
|
||||
|
@ -879,7 +881,7 @@ EAPI Ecore_X_Time
|
|||
ecore_x_current_time_get(void)
|
||||
{
|
||||
return _ecore_x_event_last_time;
|
||||
}
|
||||
} /* ecore_x_current_time_get */
|
||||
|
||||
/**
|
||||
* Return the screen DPI
|
||||
|
@ -901,7 +903,7 @@ ecore_x_dpi_get(void)
|
|||
return 75;
|
||||
|
||||
return (((s->width * 254) / s->mwidth) + 5) / 10;
|
||||
}
|
||||
} /* ecore_x_dpi_get */
|
||||
|
||||
/**
|
||||
* Invoke the standard system beep to alert users
|
||||
|
@ -925,7 +927,7 @@ ecore_x_bell(int percent)
|
|||
return EINA_FALSE;
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
} /* ecore_x_bell */
|
||||
|
||||
static Eina_Bool
|
||||
_ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
|
||||
|
@ -944,7 +946,7 @@ _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
|
|||
if (XFilterEvent(&ev, ev.xkey.window))
|
||||
continue;
|
||||
|
||||
#endif
|
||||
#endif /* ifdef ENABLE_XIM */
|
||||
|
||||
if ((ev.type >= 0) && (ev.type < _ecore_x_event_handlers_num))
|
||||
{
|
||||
|
@ -956,7 +958,7 @@ _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
|
|||
}
|
||||
}
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
} /* _ecore_x_fd_handler */
|
||||
|
||||
static Eina_Bool
|
||||
_ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
|
||||
|
@ -968,7 +970,7 @@ _ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
|
|||
return ECORE_CALLBACK_RENEW;
|
||||
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
} /* _ecore_x_fd_handler_buf */
|
||||
|
||||
static int
|
||||
_ecore_x_key_mask_get(KeySym sym)
|
||||
|
@ -1000,7 +1002,7 @@ _ecore_x_key_mask_get(KeySym sym)
|
|||
if (mod->modifiermap)
|
||||
XFree(mod->modifiermap);
|
||||
|
||||
XFree(mod);
|
||||
XFree(mod);
|
||||
return mask;
|
||||
}
|
||||
}
|
||||
|
@ -1008,34 +1010,13 @@ _ecore_x_key_mask_get(KeySym sym)
|
|||
if (mod)
|
||||
{
|
||||
if (mod->modifiermap)
|
||||
XFree(mod->modifiermap);
|
||||
XFree(mod->modifiermap);
|
||||
|
||||
XFree(mod);
|
||||
XFree(mod);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} /* _ecore_x_key_mask_get */
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -1058,7 +1039,7 @@ ecore_x_window_root_list(int *num_ret)
|
|||
Ecore_X_Window *roots;
|
||||
#ifdef ECORE_XPRINT
|
||||
int xp_base, xp_err_base;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XPRINT */
|
||||
|
||||
if (!num_ret)
|
||||
return NULL;
|
||||
|
@ -1139,7 +1120,7 @@ ecore_x_window_root_list(int *num_ret)
|
|||
roots[i] = RootWindow(_ecore_x_disp, i);
|
||||
}
|
||||
|
||||
#else
|
||||
#else /* ifdef ECORE_XPRINT */
|
||||
num = ScreenCount(_ecore_x_disp);
|
||||
roots = malloc(num * sizeof(Window));
|
||||
if (!roots)
|
||||
|
@ -1148,9 +1129,9 @@ ecore_x_window_root_list(int *num_ret)
|
|||
*num_ret = num;
|
||||
for (i = 0; i < num; i++)
|
||||
roots[i] = RootWindow(_ecore_x_disp, i);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XPRINT */
|
||||
return roots;
|
||||
}
|
||||
} /* ecore_x_window_root_list */
|
||||
|
||||
EAPI Ecore_X_Window
|
||||
ecore_x_window_root_first_get(void)
|
||||
|
@ -1172,10 +1153,9 @@ ecore_x_window_root_first_get(void)
|
|||
free(roots);
|
||||
return root;
|
||||
*/
|
||||
}
|
||||
} /* ecore_x_window_root_first_get */
|
||||
|
||||
|
||||
static void _ecore_x_window_manage_error(void *data);
|
||||
static void _ecore_x_window_manage_error(void *data);
|
||||
|
||||
static int _ecore_x_window_manage_failed = 0;
|
||||
static void
|
||||
|
@ -1184,7 +1164,7 @@ _ecore_x_window_manage_error(void *data __UNUSED__)
|
|||
if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) &&
|
||||
(ecore_x_error_code_get() == BadAccess))
|
||||
_ecore_x_window_manage_failed = 1;
|
||||
}
|
||||
} /* _ecore_x_window_manage_error */
|
||||
|
||||
EAPI int
|
||||
ecore_x_window_manage(Ecore_X_Window win)
|
||||
|
@ -1218,7 +1198,7 @@ ecore_x_window_manage(Ecore_X_Window win)
|
|||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_window_manage */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_container_manage(Ecore_X_Window win)
|
||||
|
@ -1227,7 +1207,7 @@ ecore_x_window_container_manage(Ecore_X_Window win)
|
|||
XSelectInput(_ecore_x_disp, win,
|
||||
SubstructureRedirectMask |
|
||||
SubstructureNotifyMask);
|
||||
}
|
||||
} /* ecore_x_window_container_manage */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_client_manage(Ecore_X_Window win)
|
||||
|
@ -1243,7 +1223,7 @@ ecore_x_window_client_manage(Ecore_X_Window win)
|
|||
SubstructureNotifyMask
|
||||
);
|
||||
XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
|
||||
}
|
||||
} /* ecore_x_window_client_manage */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_sniff(Ecore_X_Window win)
|
||||
|
@ -1252,7 +1232,7 @@ ecore_x_window_sniff(Ecore_X_Window win)
|
|||
XSelectInput(_ecore_x_disp, win,
|
||||
PropertyChangeMask |
|
||||
SubstructureNotifyMask);
|
||||
}
|
||||
} /* ecore_x_window_sniff */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_client_sniff(Ecore_X_Window win)
|
||||
|
@ -1266,15 +1246,10 @@ ecore_x_window_client_sniff(Ecore_X_Window win)
|
|||
StructureNotifyMask |
|
||||
SubstructureNotifyMask);
|
||||
XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} /* ecore_x_window_client_sniff */
|
||||
|
||||
EAPI int
|
||||
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;
|
||||
|
@ -1314,21 +1289,21 @@ ecore_x_window_attributes_get(Ecore_X_Window win,
|
|||
att_ret->colormap = att.colormap;
|
||||
att_ret->visual = att.visual;
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_window_attributes_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_save_set_add(Ecore_X_Window win)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XAddToSaveSet(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_window_save_set_add */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_save_set_del(Ecore_X_Window win)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XRemoveFromSaveSet(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_window_save_set_del */
|
||||
|
||||
EAPI Ecore_X_Window *
|
||||
ecore_x_window_children_get(Ecore_X_Window win, int *num)
|
||||
|
@ -1358,7 +1333,7 @@ ecore_x_window_children_get(Ecore_X_Window win, int *num)
|
|||
}
|
||||
|
||||
return windows;
|
||||
}
|
||||
} /* ecore_x_window_children_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
|
||||
|
@ -1366,7 +1341,7 @@ ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XChangePointerControl(_ecore_x_disp, 1, 1,
|
||||
accel_num, accel_denom, threshold);
|
||||
}
|
||||
} /* ecore_x_pointer_control_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
|
||||
|
@ -1374,21 +1349,21 @@ ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XGetPointerControl(_ecore_x_disp,
|
||||
accel_num, accel_denom, threshold);
|
||||
}
|
||||
} /* ecore_x_pointer_control_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_pointer_mapping_set(unsigned char *map, int nmap)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XSetPointerMapping(_ecore_x_disp, map, nmap);
|
||||
}
|
||||
} /* ecore_x_pointer_mapping_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_pointer_mapping_get(unsigned char *map, int nmap)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XGetPointerMapping(_ecore_x_disp, map, nmap);
|
||||
}
|
||||
} /* ecore_x_pointer_mapping_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_pointer_grab(Ecore_X_Window win)
|
||||
|
@ -1402,7 +1377,7 @@ ecore_x_pointer_grab(Ecore_X_Window win)
|
|||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_pointer_grab */
|
||||
|
||||
EAPI int
|
||||
ecore_x_pointer_confine_grab(Ecore_X_Window win)
|
||||
|
@ -1416,21 +1391,21 @@ ecore_x_pointer_confine_grab(Ecore_X_Window win)
|
|||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_pointer_confine_grab */
|
||||
|
||||
EAPI void
|
||||
ecore_x_pointer_ungrab(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XUngrabPointer(_ecore_x_disp, CurrentTime);
|
||||
}
|
||||
} /* ecore_x_pointer_ungrab */
|
||||
|
||||
EAPI int
|
||||
ecore_x_pointer_warp(Ecore_X_Window win, int x, int y)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y);
|
||||
}
|
||||
} /* ecore_x_pointer_warp */
|
||||
|
||||
EAPI int
|
||||
ecore_x_keyboard_grab(Ecore_X_Window win)
|
||||
|
@ -1442,14 +1417,14 @@ ecore_x_keyboard_grab(Ecore_X_Window win)
|
|||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_keyboard_grab */
|
||||
|
||||
EAPI void
|
||||
ecore_x_keyboard_ungrab(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XUngrabKeyboard(_ecore_x_disp, CurrentTime);
|
||||
}
|
||||
} /* ecore_x_keyboard_ungrab */
|
||||
|
||||
EAPI void
|
||||
ecore_x_grab(void)
|
||||
|
@ -1458,7 +1433,7 @@ ecore_x_grab(void)
|
|||
_ecore_x_grab_count++;
|
||||
if (_ecore_x_grab_count == 1)
|
||||
XGrabServer(_ecore_x_disp);
|
||||
}
|
||||
} /* ecore_x_grab */
|
||||
|
||||
EAPI void
|
||||
ecore_x_ungrab(void)
|
||||
|
@ -1470,7 +1445,7 @@ ecore_x_ungrab(void)
|
|||
|
||||
if (_ecore_x_grab_count == 0)
|
||||
XUngrabServer(_ecore_x_disp);
|
||||
}
|
||||
} /* ecore_x_ungrab */
|
||||
|
||||
int _ecore_window_grabs_num = 0;
|
||||
Window *_ecore_window_grabs = NULL;
|
||||
|
@ -1486,7 +1461,7 @@ ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_window_grab_replay_func = func;
|
||||
_ecore_window_grab_replay_data = data;
|
||||
}
|
||||
} /* ecore_x_passive_grab_replay_func_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_button_grab(Ecore_X_Window win, int button,
|
||||
|
@ -1523,7 +1498,7 @@ ecore_x_window_button_grab(Ecore_X_Window win, int button,
|
|||
_ecore_window_grabs = realloc(_ecore_window_grabs,
|
||||
_ecore_window_grabs_num * sizeof(Window));
|
||||
_ecore_window_grabs[_ecore_window_grabs_num - 1] = win;
|
||||
}
|
||||
} /* ecore_x_window_button_grab */
|
||||
|
||||
void
|
||||
_ecore_x_sync_magic_send(int val, Ecore_X_Window swin)
|
||||
|
@ -1541,7 +1516,7 @@ _ecore_x_sync_magic_send(int val, Ecore_X_Window swin)
|
|||
xev.xclient.data.l[1] = 0x10000000 + val;
|
||||
xev.xclient.data.l[2] = swin;
|
||||
XSendEvent(_ecore_x_disp, _ecore_x_private_win, False, NoEventMask, &xev);
|
||||
}
|
||||
} /* _ecore_x_sync_magic_send */
|
||||
|
||||
void
|
||||
_ecore_x_window_grab_remove(Ecore_X_Window win)
|
||||
|
@ -1566,7 +1541,7 @@ _ecore_x_window_grab_remove(Ecore_X_Window win)
|
|||
sizeof(Window));
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_window_grab_remove */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_button_ungrab(Ecore_X_Window win, int button,
|
||||
|
@ -1597,7 +1572,7 @@ ecore_x_window_button_ungrab(Ecore_X_Window win, int button,
|
|||
for (i = 0; i < 8; i++)
|
||||
XUngrabButton(_ecore_x_disp, b, m | locks[i], win);
|
||||
_ecore_x_sync_magic_send(1, win);
|
||||
}
|
||||
} /* ecore_x_window_button_ungrab */
|
||||
|
||||
int _ecore_key_grabs_num = 0;
|
||||
Window *_ecore_key_grabs = NULL;
|
||||
|
@ -1646,7 +1621,7 @@ ecore_x_window_key_grab(Ecore_X_Window win, const char *key,
|
|||
_ecore_key_grabs = realloc(_ecore_key_grabs,
|
||||
_ecore_key_grabs_num * sizeof(Window));
|
||||
_ecore_key_grabs[_ecore_key_grabs_num - 1] = win;
|
||||
}
|
||||
} /* ecore_x_window_key_grab */
|
||||
|
||||
void
|
||||
_ecore_x_key_grab_remove(Ecore_X_Window win)
|
||||
|
@ -1670,7 +1645,7 @@ _ecore_x_key_grab_remove(Ecore_X_Window win)
|
|||
_ecore_key_grabs_num * sizeof(Window));
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_key_grab_remove */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
|
||||
|
@ -1712,7 +1687,7 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
|
|||
for (i = 0; i < 8; i++)
|
||||
XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win);
|
||||
_ecore_x_sync_magic_send(2, win);
|
||||
}
|
||||
} /* ecore_x_window_key_ungrab */
|
||||
|
||||
/**
|
||||
* Send client message with given type and format 32.
|
||||
|
@ -1746,7 +1721,7 @@ ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type,
|
|||
xev.xclient.data.l[4] = d4;
|
||||
|
||||
return XSendEvent(_ecore_x_disp, win, False, mask, &xev);
|
||||
}
|
||||
} /* ecore_x_client_message32_send */
|
||||
|
||||
/**
|
||||
* Send client message with given type and format 8.
|
||||
|
@ -1776,7 +1751,7 @@ ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type,
|
|||
memset(xev.xclient.data.b + len, 0, 20 - len);
|
||||
|
||||
return XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
|
||||
}
|
||||
} /* ecore_x_client_message8_send */
|
||||
|
||||
EAPI int
|
||||
ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
|
||||
|
@ -1802,7 +1777,7 @@ ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
|
|||
xev.xmotion.is_hint = 0;
|
||||
xev.xmotion.same_screen = 1;
|
||||
return XSendEvent(_ecore_x_disp, win, True, PointerMotionMask, &xev);
|
||||
}
|
||||
} /* ecore_x_mouse_move_send */
|
||||
|
||||
EAPI int
|
||||
ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
|
||||
|
@ -1828,7 +1803,7 @@ ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
|
|||
xev.xbutton.button = b;
|
||||
xev.xbutton.same_screen = 1;
|
||||
return XSendEvent(_ecore_x_disp, win, True, ButtonPressMask, &xev);
|
||||
}
|
||||
} /* ecore_x_mouse_down_send */
|
||||
|
||||
EAPI int
|
||||
ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b)
|
||||
|
@ -1854,21 +1829,21 @@ ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b)
|
|||
xev.xbutton.button = b;
|
||||
xev.xbutton.same_screen = 1;
|
||||
return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev);
|
||||
}
|
||||
} /* ecore_x_mouse_up_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_focus_reset(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XSetInputFocus(_ecore_x_disp, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||
}
|
||||
} /* ecore_x_focus_reset */
|
||||
|
||||
EAPI void
|
||||
ecore_x_events_allow_all(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XAllowEvents(_ecore_x_disp, AsyncBoth, CurrentTime);
|
||||
}
|
||||
} /* ecore_x_events_allow_all */
|
||||
|
||||
EAPI void
|
||||
ecore_x_pointer_last_xy_get(int *x, int *y)
|
||||
|
@ -1878,7 +1853,7 @@ ecore_x_pointer_last_xy_get(int *x, int *y)
|
|||
|
||||
if (y)
|
||||
*y = _ecore_x_event_last_root_y;
|
||||
}
|
||||
} /* ecore_x_pointer_last_xy_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
|
||||
|
@ -1905,7 +1880,8 @@ ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
|
|||
|
||||
if (y)
|
||||
*y = wy;
|
||||
}
|
||||
} /* ecore_x_pointer_xy_get */
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -1937,4 +1913,5 @@ _ecore_x_event_modifier(unsigned int state)
|
|||
xmodifiers |= ECORE_X_LOCK_CAPS;
|
||||
|
||||
return xmodifiers;
|
||||
}
|
||||
} /* _ecore_x_event_modifier */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
|
@ -15,13 +15,13 @@
|
|||
#elif defined _MSC_VER
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
#else
|
||||
#else /* ifdef HAVE_ALLOCA_H */
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
void *alloca (size_t);
|
||||
#endif
|
||||
# endif /* ifdef __cplusplus */
|
||||
void * alloca (size_t);
|
||||
#endif /* ifdef HAVE_ALLOCA_H */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -34,7 +34,7 @@ void *alloca (size_t);
|
|||
|
||||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
const char *name;
|
||||
Ecore_X_Atom *atom;
|
||||
} Atom_Item;
|
||||
|
||||
|
@ -296,7 +296,7 @@ _ecore_x_atoms_init(void)
|
|||
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];
|
||||
}
|
||||
} /* _ecore_x_atoms_init */
|
||||
|
||||
/**
|
||||
* Retrieves the atom value associated with the given name.
|
||||
|
@ -311,7 +311,7 @@ ecore_x_atom_get(const char *name)
|
|||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XInternAtom(_ecore_x_disp, name, False);
|
||||
}
|
||||
} /* ecore_x_atom_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms)
|
||||
|
@ -327,7 +327,7 @@ ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms)
|
|||
XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int);
|
||||
for (i = 0; i < num; i++)
|
||||
atoms[i] = atoms_int[i];
|
||||
}
|
||||
} /* ecore_x_atoms_get */
|
||||
|
||||
EAPI char *
|
||||
ecore_x_atom_name_get(Ecore_X_Atom atom)
|
||||
|
@ -348,4 +348,5 @@ ecore_x_atom_name_get(Ecore_X_Atom atom)
|
|||
XFree(xname);
|
||||
|
||||
return name;
|
||||
}
|
||||
} /* ecore_x_atom_name_get */
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
#include "Ecore_X.h"
|
||||
|
@ -23,18 +22,18 @@ _ecore_x_composite_init(void)
|
|||
if (XCompositeQueryVersion(_ecore_x_disp, &major, &minor))
|
||||
_composite_available = 1;
|
||||
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
} /* _ecore_x_composite_init */
|
||||
|
||||
EAPI int
|
||||
ecore_x_composite_query(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _composite_available;
|
||||
}
|
||||
} /* ecore_x_composite_query */
|
||||
|
||||
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
|
||||
|
@ -50,13 +49,13 @@ ecore_x_composite_redirect_window(Ecore_X_Window win,
|
|||
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
|
||||
update = CompositeRedirectManual;
|
||||
break;
|
||||
}
|
||||
} /* switch */
|
||||
XCompositeRedirectWindow(_ecore_x_disp, win, update);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
} /* ecore_x_composite_redirect_window */
|
||||
|
||||
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
|
||||
|
@ -72,13 +71,13 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
|
|||
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
|
||||
update = CompositeRedirectManual;
|
||||
break;
|
||||
}
|
||||
} /* switch */
|
||||
XCompositeRedirectSubwindows(_ecore_x_disp, win, update);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
} /* ecore_x_composite_redirect_subwindows */
|
||||
|
||||
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
|
||||
|
@ -94,13 +93,13 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win,
|
|||
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
|
||||
update = CompositeRedirectManual;
|
||||
break;
|
||||
}
|
||||
} /* switch */
|
||||
XCompositeUnredirectWindow(_ecore_x_disp, win, update);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
} /* ecore_x_composite_unredirect_window */
|
||||
|
||||
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
|
||||
|
@ -116,10 +115,10 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
|
|||
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
|
||||
update = CompositeRedirectManual;
|
||||
break;
|
||||
}
|
||||
} /* switch */
|
||||
XCompositeUnredirectSubwindows(_ecore_x_disp, win, update);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
} /* ecore_x_composite_unredirect_subwindows */
|
||||
|
||||
EAPI Ecore_X_Pixmap
|
||||
ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win)
|
||||
|
@ -129,10 +128,10 @@ ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win)
|
|||
#ifdef ECORE_XCOMPOSITE
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
|
||||
return pixmap;
|
||||
}
|
||||
} /* ecore_x_composite_name_window_pixmap_get */
|
||||
|
||||
EAPI Ecore_X_Window
|
||||
ecore_x_composite_render_window_enable(Ecore_X_Window root)
|
||||
|
@ -149,9 +148,9 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root)
|
|||
rect.height = 1;
|
||||
XShapeCombineRectangles(_ecore_x_disp, win, ShapeInput, 0, 0, &rect, 1,
|
||||
ShapeSet, Unsorted);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
return win;
|
||||
}
|
||||
} /* ecore_x_composite_render_window_enable */
|
||||
|
||||
EAPI void
|
||||
ecore_x_composite_render_window_disable(Ecore_X_Window root)
|
||||
|
@ -159,5 +158,6 @@ ecore_x_composite_render_window_disable(Ecore_X_Window root)
|
|||
#ifdef ECORE_XCOMPOSITE
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XCompositeReleaseOverlayWindow(_ecore_x_disp, root);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
} /* ecore_x_composite_render_window_disable */
|
||||
|
||||
|
|
|
@ -4,26 +4,25 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
|
||||
|
||||
EAPI int
|
||||
ecore_x_cursor_color_supported_get(void)
|
||||
{
|
||||
return _ecore_x_xcursor;
|
||||
}
|
||||
} /* ecore_x_cursor_color_supported_get */
|
||||
|
||||
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__);
|
||||
|
@ -57,7 +56,7 @@ ecore_x_cursor_new(Ecore_X_Window win,
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XCURSOR */
|
||||
{
|
||||
XColor c1, c2;
|
||||
Cursor c;
|
||||
|
@ -205,14 +204,14 @@ ecore_x_cursor_new(Ecore_X_Window win,
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_cursor_new */
|
||||
|
||||
EAPI void
|
||||
ecore_x_cursor_free(Ecore_X_Cursor c)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFreeCursor(_ecore_x_disp, c);
|
||||
}
|
||||
} /* ecore_x_cursor_free */
|
||||
|
||||
/*
|
||||
* Returns the cursor for the given shape.
|
||||
|
@ -225,7 +224,7 @@ ecore_x_cursor_shape_get(int shape)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
/* Shapes are defined in Ecore_X_Cursor.h */
|
||||
return XCreateFontCursor(_ecore_x_disp, shape);
|
||||
}
|
||||
} /* ecore_x_cursor_shape_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_cursor_size_set(int size)
|
||||
|
@ -233,10 +232,10 @@ ecore_x_cursor_size_set(int size)
|
|||
#ifdef ECORE_XCURSOR
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XcursorSetDefaultSize(_ecore_x_disp, size);
|
||||
#else
|
||||
#else /* ifdef ECORE_XCURSOR */
|
||||
size = 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCURSOR */
|
||||
} /* ecore_x_cursor_size_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_cursor_size_get(void)
|
||||
|
@ -244,7 +243,8 @@ ecore_x_cursor_size_get(void)
|
|||
#ifdef ECORE_XCURSOR
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XcursorGetDefaultSize(_ecore_x_disp);
|
||||
#else
|
||||
#else /* ifdef ECORE_XCURSOR */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XCURSOR */
|
||||
} /* ecore_x_cursor_size_get */
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
#include "Ecore_X.h"
|
||||
|
@ -13,7 +12,7 @@
|
|||
static int _damage_available;
|
||||
#ifdef ECORE_XDAMAGE
|
||||
static int _damage_major, _damage_minor;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
|
||||
void
|
||||
_ecore_x_damage_init(void)
|
||||
|
@ -28,16 +27,16 @@ _ecore_x_damage_init(void)
|
|||
else
|
||||
_damage_available = 0;
|
||||
|
||||
#else
|
||||
#else /* ifdef ECORE_XDAMAGE */
|
||||
_damage_available = 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
} /* _ecore_x_damage_init */
|
||||
|
||||
EAPI int
|
||||
ecore_x_damage_query(void)
|
||||
{
|
||||
return _damage_available;
|
||||
}
|
||||
} /* ecore_x_damage_query */
|
||||
|
||||
EAPI Ecore_X_Damage
|
||||
ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level)
|
||||
|
@ -48,10 +47,10 @@ ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
damage = XDamageCreate(_ecore_x_disp, d, level);
|
||||
return damage;
|
||||
#else
|
||||
#else /* ifdef ECORE_XDAMAGE */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
} /* ecore_x_damage_new */
|
||||
|
||||
EAPI void
|
||||
ecore_x_damage_free(Ecore_X_Damage damage)
|
||||
|
@ -59,8 +58,8 @@ ecore_x_damage_free(Ecore_X_Damage damage)
|
|||
#ifdef ECORE_XDAMAGE
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XDamageDestroy(_ecore_x_disp, damage);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
} /* ecore_x_damage_free */
|
||||
|
||||
EAPI void
|
||||
ecore_x_damage_subtract(Ecore_X_Damage damage,
|
||||
|
@ -70,6 +69,6 @@ ecore_x_damage_subtract(Ecore_X_Damage damage,
|
|||
#ifdef ECORE_XDAMAGE
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XDamageSubtract(_ecore_x_disp, damage, repair, parts);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
} /* ecore_x_damage_subtract */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -28,7 +28,7 @@ static int _ecore_x_dnd_init_count = 0;
|
|||
typedef struct _Version_Cache_Item
|
||||
{
|
||||
Ecore_X_Window win;
|
||||
int ver;
|
||||
int ver;
|
||||
} Version_Cache_Item;
|
||||
static Version_Cache_Item *_version_cache = NULL;
|
||||
static int _version_cache_num = 0, _version_cache_alloc = 0;
|
||||
|
@ -59,7 +59,7 @@ _ecore_x_dnd_init(void)
|
|||
}
|
||||
|
||||
_ecore_x_dnd_init_count++;
|
||||
}
|
||||
} /* _ecore_x_dnd_init */
|
||||
|
||||
void
|
||||
_ecore_x_dnd_shutdown(void)
|
||||
|
@ -79,16 +79,16 @@ _ecore_x_dnd_shutdown(void)
|
|||
_target = NULL;
|
||||
|
||||
_ecore_x_dnd_init_count = 0;
|
||||
}
|
||||
} /* _ecore_x_dnd_shutdown */
|
||||
|
||||
static int
|
||||
_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,
|
||||
int *count)
|
||||
int *count)
|
||||
{
|
||||
XTextProperty text_prop;
|
||||
char *mystr;
|
||||
|
@ -101,7 +101,7 @@ _ecore_x_dnd_converter_copy(char *target __UNUSED__,
|
|||
if (!mystr)
|
||||
return 0;
|
||||
|
||||
memcpy(mystr, data, size);
|
||||
memcpy(mystr, data, size);
|
||||
|
||||
if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
|
||||
&text_prop) == Success)
|
||||
|
@ -119,7 +119,7 @@ _ecore_x_dnd_converter_copy(char *target __UNUSED__,
|
|||
free(mystr);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_dnd_converter_copy */
|
||||
|
||||
EAPI void
|
||||
ecore_x_dnd_aware_set(Ecore_X_Window win, int on)
|
||||
|
@ -132,7 +132,7 @@ ecore_x_dnd_aware_set(Ecore_X_Window win, int on)
|
|||
XA_ATOM, 32, &prop_data, 1);
|
||||
else
|
||||
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE);
|
||||
}
|
||||
} /* ecore_x_dnd_aware_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_dnd_version_get(Ecore_X_Window win)
|
||||
|
@ -192,7 +192,7 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_dnd_version_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
|
||||
|
@ -220,7 +220,7 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
|
|||
|
||||
XFree(data);
|
||||
return ret;
|
||||
}
|
||||
} /* ecore_x_dnd_type_isset */
|
||||
|
||||
EAPI void
|
||||
ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
|
||||
|
@ -286,12 +286,12 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
|
|||
|
||||
XFree(oldset);
|
||||
free(newset);
|
||||
}
|
||||
} /* ecore_x_dnd_type_set */
|
||||
|
||||
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;
|
||||
|
@ -317,12 +317,12 @@ ecore_x_dnd_types_set(Ecore_X_Window win,
|
|||
XA_ATOM, 32, data, num_types);
|
||||
free(newset);
|
||||
}
|
||||
}
|
||||
} /* ecore_x_dnd_types_set */
|
||||
|
||||
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;
|
||||
|
@ -341,24 +341,23 @@ ecore_x_dnd_actions_set(Ecore_X_Window win,
|
|||
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST,
|
||||
XA_ATOM, 32, data, num_actions);
|
||||
}
|
||||
}
|
||||
} /* ecore_x_dnd_actions_set */
|
||||
|
||||
Ecore_X_DND_Source *
|
||||
_ecore_x_dnd_source_get(void)
|
||||
{
|
||||
return _source;
|
||||
}
|
||||
} /* _ecore_x_dnd_source_get */
|
||||
|
||||
Ecore_X_DND_Target *
|
||||
_ecore_x_dnd_target_get(void)
|
||||
{
|
||||
return _target;
|
||||
}
|
||||
} /* _ecore_x_dnd_target_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
|
||||
{
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (!ecore_x_dnd_version_get(source))
|
||||
return 0;
|
||||
|
@ -389,7 +388,7 @@ ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
|
|||
_source->dest = None;
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_dnd_begin */
|
||||
|
||||
EAPI int
|
||||
ecore_x_dnd_drop(void)
|
||||
|
@ -436,13 +435,13 @@ ecore_x_dnd_drop(void)
|
|||
_source->prev.window = 0;
|
||||
|
||||
return status;
|
||||
}
|
||||
} /* ecore_x_dnd_drop */
|
||||
|
||||
EAPI void
|
||||
ecore_x_dnd_send_status(int will_accept,
|
||||
int suppress,
|
||||
ecore_x_dnd_send_status(int will_accept,
|
||||
int suppress,
|
||||
Ecore_X_Rectangle rectangle,
|
||||
Ecore_X_Atom action)
|
||||
Ecore_X_Atom action)
|
||||
{
|
||||
XEvent xev;
|
||||
|
||||
|
@ -488,7 +487,7 @@ ecore_x_dnd_send_status(int will_accept,
|
|||
}
|
||||
|
||||
XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
|
||||
}
|
||||
} /* ecore_x_dnd_send_status */
|
||||
|
||||
EAPI void
|
||||
ecore_x_dnd_send_finished(void)
|
||||
|
@ -517,7 +516,7 @@ ecore_x_dnd_send_finished(void)
|
|||
XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
|
||||
|
||||
_target->state = ECORE_X_DND_TARGET_IDLE;
|
||||
}
|
||||
} /* ecore_x_dnd_send_finished */
|
||||
|
||||
void
|
||||
ecore_x_dnd_source_action_set(Ecore_X_Atom action)
|
||||
|
@ -525,13 +524,13 @@ ecore_x_dnd_source_action_set(Ecore_X_Atom action)
|
|||
_source->action = action;
|
||||
if (_source->prev.window)
|
||||
_ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
|
||||
}
|
||||
} /* ecore_x_dnd_source_action_set */
|
||||
|
||||
Ecore_X_Atom
|
||||
ecore_x_dnd_source_action_get(void)
|
||||
{
|
||||
return _source->action;
|
||||
}
|
||||
} /* ecore_x_dnd_source_action_get */
|
||||
|
||||
void
|
||||
_ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
|
||||
|
@ -645,4 +644,5 @@ _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
|
|||
_source->prev.y = y;
|
||||
_source->prev.window = root;
|
||||
_source->dest = win;
|
||||
}
|
||||
} /* _ecore_x_dnd_drag */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
|
||||
|
@ -24,10 +24,10 @@ _ecore_x_dpms_init(void)
|
|||
else
|
||||
_dpms_available = 0;
|
||||
|
||||
#else
|
||||
#else /* ifdef ECORE_XDPMS */
|
||||
_dpms_available = 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* _ecore_x_dpms_init */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_DPMS_Group X DPMS Extension Functions
|
||||
|
@ -44,7 +44,7 @@ EAPI int
|
|||
ecore_x_dpms_query(void)
|
||||
{
|
||||
return _dpms_available;
|
||||
}
|
||||
} /* ecore_x_dpms_query */
|
||||
|
||||
/**
|
||||
* Checks if the X server is capable of DPMS.
|
||||
|
@ -57,10 +57,10 @@ ecore_x_dpms_capable_get(void)
|
|||
#ifdef ECORE_XDPMS
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return DPMSCapable(_ecore_x_disp);
|
||||
#else
|
||||
#else /* ifdef ECORE_XDPMS */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_capable_get */
|
||||
|
||||
/**
|
||||
* Checks the DPMS state of the display.
|
||||
|
@ -77,10 +77,10 @@ ecore_x_dpms_enabled_get(void)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSInfo(_ecore_x_disp, &power_lvl, &state);
|
||||
return state;
|
||||
#else
|
||||
#else /* ifdef ECORE_XDPMS */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_enabled_get */
|
||||
|
||||
/**
|
||||
* Sets the DPMS state of the display.
|
||||
|
@ -97,8 +97,8 @@ ecore_x_dpms_enabled_set(int enabled)
|
|||
else
|
||||
DPMSDisable(_ecore_x_disp);
|
||||
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_enabled_set */
|
||||
|
||||
/**
|
||||
* Gets the timeouts. The values are in unit of seconds.
|
||||
|
@ -116,8 +116,8 @@ ecore_x_dpms_timeouts_get(unsigned int *standby,
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby,
|
||||
(unsigned short *)suspend, (unsigned short *)off);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeouts_get */
|
||||
|
||||
/**
|
||||
* Sets the timeouts. The values are in unit of seconds.
|
||||
|
@ -134,10 +134,10 @@ ecore_x_dpms_timeouts_set(unsigned int standby,
|
|||
#ifdef ECORE_XDPMS
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return DPMSSetTimeouts(_ecore_x_disp, standby, suspend, off);
|
||||
#else
|
||||
#else /* ifdef ECORE_XDPMS */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeouts_set */
|
||||
|
||||
/**
|
||||
* Returns the amount of time of inactivity before standby mode is invoked.
|
||||
|
@ -153,10 +153,10 @@ ecore_x_dpms_timeout_standby_get()
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
|
||||
return standby;
|
||||
#else
|
||||
#else /* ifdef ECORE_XDPMS */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeout_standby_get */
|
||||
|
||||
/**
|
||||
* Returns the amount of time of inactivity before the second level of
|
||||
|
@ -173,10 +173,10 @@ ecore_x_dpms_timeout_suspend_get()
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
|
||||
return suspend;
|
||||
#else
|
||||
#else /* ifdef ECORE_XDPMS */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeout_suspend_get */
|
||||
|
||||
/**
|
||||
* Returns the amount of time of inactivity before the third and final
|
||||
|
@ -193,10 +193,10 @@ ecore_x_dpms_timeout_off_get()
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
|
||||
return off;
|
||||
#else
|
||||
#else /* ifdef ECORE_XDPMS */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeout_off_get */
|
||||
|
||||
/**
|
||||
* Sets the standby timeout (in unit of seconds).
|
||||
|
@ -212,8 +212,8 @@ ecore_x_dpms_timeout_standby_set(unsigned int new_timeout)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
|
||||
DPMSSetTimeouts(_ecore_x_disp, new_timeout, suspend, off);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeout_standby_set */
|
||||
|
||||
/**
|
||||
* Sets the suspend timeout (in unit of seconds).
|
||||
|
@ -229,8 +229,8 @@ ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
|
||||
DPMSSetTimeouts(_ecore_x_disp, standby, new_timeout, off);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeout_suspend_set */
|
||||
|
||||
/**
|
||||
* Sets the off timeout (in unit of seconds).
|
||||
|
@ -246,5 +246,6 @@ ecore_x_dpms_timeout_off_set(unsigned int new_timeout)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
|
||||
DPMSSetTimeouts(_ecore_x_disp, standby, suspend, new_timeout);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
} /* ecore_x_dpms_timeout_off_set */
|
||||
|
||||
|
|
|
@ -4,18 +4,16 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Drawable_Group X Drawable Functions
|
||||
*
|
||||
* Functions that operate on drawables.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the geometry of the given drawable.
|
||||
* @param d The given drawable.
|
||||
|
@ -27,10 +25,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;
|
||||
|
@ -57,7 +55,7 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
|
|||
|
||||
if (h)
|
||||
*h = (int)ret_h;
|
||||
}
|
||||
} /* ecore_x_drawable_geometry_get */
|
||||
|
||||
/**
|
||||
* Retrieves the width of the border of the given drawable.
|
||||
|
@ -78,7 +76,7 @@ ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
|
|||
border_ret = 0;
|
||||
|
||||
return (int)border_ret;
|
||||
}
|
||||
} /* ecore_x_drawable_border_width_get */
|
||||
|
||||
/**
|
||||
* Retrieves the depth of the given drawable.
|
||||
|
@ -99,7 +97,7 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
|
|||
depth_ret = 0;
|
||||
|
||||
return (int)depth_ret;
|
||||
}
|
||||
} /* ecore_x_drawable_depth_get */
|
||||
|
||||
/**
|
||||
* Fill the specified rectangle on a drawable.
|
||||
|
@ -112,12 +110,13 @@ 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);
|
||||
}
|
||||
} /* ecore_x_drawable_rectangle_fill */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_x_private.h"
|
||||
|
@ -18,7 +18,7 @@
|
|||
EAPI void
|
||||
ecore_x_e_init(void)
|
||||
{
|
||||
}
|
||||
} /* ecore_x_e_init */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
|
||||
|
@ -31,7 +31,7 @@ ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
|
|||
frames[2] = ft;
|
||||
frames[3] = fb;
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_FRAME_SIZE, frames, 4);
|
||||
}
|
||||
} /* ecore_x_e_frame_size_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard)
|
||||
|
@ -39,7 +39,7 @@ ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
|
||||
&is_keyboard, 1);
|
||||
}
|
||||
} /* ecore_x_e_virtual_keyboard_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_virtual_keyboard_get(Ecore_X_Window win)
|
||||
|
@ -52,7 +52,7 @@ ecore_x_e_virtual_keyboard_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_virtual_keyboard_get */
|
||||
|
||||
static Ecore_X_Virtual_Keyboard_State
|
||||
_ecore_x_e_vkbd_state_get(Ecore_X_Atom atom)
|
||||
|
@ -103,7 +103,7 @@ _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom)
|
|||
return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME;
|
||||
|
||||
return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
|
||||
}
|
||||
} /* _ecore_x_e_vkbd_state_get */
|
||||
|
||||
static Ecore_X_Atom
|
||||
_ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
|
||||
|
@ -156,12 +156,12 @@ _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
|
|||
return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
|
||||
|
||||
default: return 0;
|
||||
}
|
||||
} /* switch */
|
||||
return 0;
|
||||
}
|
||||
} /* _ecore_x_e_vkbd_atom_get */
|
||||
|
||||
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;
|
||||
|
@ -170,7 +170,7 @@ ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
|
|||
atom = _ecore_x_e_vkbd_atom_get(state);
|
||||
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
|
||||
&atom, 1);
|
||||
}
|
||||
} /* ecore_x_e_virtual_keyboard_state_set */
|
||||
|
||||
EAPI Ecore_X_Virtual_Keyboard_State
|
||||
ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
|
||||
|
@ -183,10 +183,10 @@ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
|
|||
return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
|
||||
|
||||
return _ecore_x_e_vkbd_state_get(atom);
|
||||
}
|
||||
} /* ecore_x_e_virtual_keyboard_state_get */
|
||||
|
||||
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__);
|
||||
|
@ -194,7 +194,7 @@ ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
|
|||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
_ecore_x_e_vkbd_atom_get(state),
|
||||
0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_virtual_keyboard_state_send */
|
||||
|
||||
static Ecore_X_Atom
|
||||
_ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode)
|
||||
|
@ -212,9 +212,9 @@ _ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode)
|
|||
|
||||
default:
|
||||
return ECORE_X_ILLUME_MODE_UNKNOWN;
|
||||
}
|
||||
} /* switch */
|
||||
return ECORE_X_ILLUME_MODE_UNKNOWN;
|
||||
}
|
||||
} /* _ecore_x_e_illume_atom_get */
|
||||
|
||||
static Ecore_X_Illume_Mode
|
||||
_ecore_x_e_illume_mode_get(Ecore_X_Atom atom)
|
||||
|
@ -229,7 +229,7 @@ _ecore_x_e_illume_mode_get(Ecore_X_Atom atom)
|
|||
return ECORE_X_ILLUME_MODE_DUAL_LEFT;
|
||||
|
||||
return ECORE_X_ILLUME_MODE_UNKNOWN;
|
||||
}
|
||||
} /* _ecore_x_e_illume_mode_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone)
|
||||
|
@ -237,7 +237,7 @@ ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE,
|
||||
&zone, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_zone_set */
|
||||
|
||||
EAPI Ecore_X_Window
|
||||
ecore_x_e_illume_zone_get(Ecore_X_Window win)
|
||||
|
@ -250,17 +250,17 @@ ecore_x_e_illume_zone_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return zone;
|
||||
}
|
||||
} /* ecore_x_e_illume_zone_get */
|
||||
|
||||
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,
|
||||
zones, n_zones);
|
||||
}
|
||||
} /* ecore_x_e_illume_zone_list_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant)
|
||||
|
@ -268,7 +268,7 @@ ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
|
||||
&is_conformant, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_conformant_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_illume_conformant_get(Ecore_X_Window win)
|
||||
|
@ -281,7 +281,7 @@ ecore_x_e_illume_conformant_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_illume_conformant_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
|
||||
|
@ -292,7 +292,7 @@ ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
|
|||
atom = _ecore_x_e_illume_atom_get(mode);
|
||||
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE,
|
||||
&atom, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_mode_set */
|
||||
|
||||
EAPI Ecore_X_Illume_Mode
|
||||
ecore_x_e_illume_mode_get(Ecore_X_Window win)
|
||||
|
@ -304,7 +304,7 @@ ecore_x_e_illume_mode_get(Ecore_X_Window win)
|
|||
return ECORE_X_ILLUME_MODE_UNKNOWN;
|
||||
|
||||
return _ecore_x_e_illume_mode_get(atom);
|
||||
}
|
||||
} /* ecore_x_e_illume_mode_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
|
||||
|
@ -314,7 +314,7 @@ ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
|
|||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
_ecore_x_e_illume_atom_get(mode),
|
||||
0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_mode_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_focus_back_send(Ecore_X_Window win)
|
||||
|
@ -323,7 +323,7 @@ ecore_x_e_illume_focus_back_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_focus_back_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_focus_forward_send(Ecore_X_Window win)
|
||||
|
@ -332,7 +332,7 @@ ecore_x_e_illume_focus_forward_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_focus_forward_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_focus_home_send(Ecore_X_Window win)
|
||||
|
@ -341,7 +341,7 @@ ecore_x_e_illume_focus_home_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_focus_home_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_close_send(Ecore_X_Window win)
|
||||
|
@ -350,7 +350,7 @@ ecore_x_e_illume_close_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_close_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_home_new_send(Ecore_X_Window win)
|
||||
|
@ -359,7 +359,7 @@ ecore_x_e_illume_home_new_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_home_new_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_home_del_send(Ecore_X_Window win)
|
||||
|
@ -368,14 +368,14 @@ ecore_x_e_illume_home_del_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_home_del_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_drag_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_illume_drag_get(Ecore_X_Window win)
|
||||
|
@ -387,7 +387,7 @@ ecore_x_e_illume_drag_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_illume_drag_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked)
|
||||
|
@ -395,7 +395,7 @@ ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
|
||||
&is_locked, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_drag_locked_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_illume_drag_locked_get(Ecore_X_Window win)
|
||||
|
@ -408,7 +408,7 @@ ecore_x_e_illume_drag_locked_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_illume_drag_locked_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_drag_start_send(Ecore_X_Window win)
|
||||
|
@ -417,7 +417,7 @@ ecore_x_e_illume_drag_start_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_drag_start_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_drag_end_send(Ecore_X_Window win)
|
||||
|
@ -426,14 +426,14 @@ ecore_x_e_illume_drag_end_send(Ecore_X_Window win)
|
|||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_drag_end_send */
|
||||
|
||||
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];
|
||||
|
||||
|
@ -444,14 +444,14 @@ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
|
|||
geom[3] = h;
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
|
||||
geom, 4);
|
||||
}
|
||||
} /* ecore_x_e_illume_indicator_geometry_set */
|
||||
|
||||
EAPI int
|
||||
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];
|
||||
|
@ -477,14 +477,14 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
|
|||
*h = geom[3];
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_e_illume_indicator_geometry_get */
|
||||
|
||||
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];
|
||||
|
||||
|
@ -495,14 +495,14 @@ ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
|
|||
geom[3] = h;
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
|
||||
geom, 4);
|
||||
}
|
||||
} /* ecore_x_e_illume_softkey_geometry_set */
|
||||
|
||||
EAPI int
|
||||
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];
|
||||
|
@ -528,14 +528,14 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
|
|||
*h = geom[3];
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_e_illume_softkey_geometry_get */
|
||||
|
||||
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];
|
||||
|
||||
|
@ -546,14 +546,14 @@ ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
|
|||
geom[3] = h;
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
|
||||
geom, 4);
|
||||
}
|
||||
} /* ecore_x_e_illume_keyboard_geometry_set */
|
||||
|
||||
EAPI int
|
||||
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];
|
||||
|
@ -579,7 +579,7 @@ ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
|
|||
*h = geom[3];
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_e_illume_keyboard_geometry_get */
|
||||
|
||||
static Ecore_X_Atom
|
||||
_ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state)
|
||||
|
@ -594,9 +594,9 @@ _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state)
|
|||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
} /* switch */
|
||||
return 0;
|
||||
}
|
||||
} /* _ecore_x_e_quickpanel_atom_get */
|
||||
|
||||
static Ecore_X_Illume_Quickpanel_State
|
||||
_ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom)
|
||||
|
@ -608,7 +608,7 @@ _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom)
|
|||
return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF;
|
||||
|
||||
return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
|
||||
}
|
||||
} /* _ecore_x_e_quickpanel_state_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel)
|
||||
|
@ -616,7 +616,7 @@ ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
|
||||
&is_quickpanel, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
|
||||
|
@ -629,10 +629,10 @@ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_get */
|
||||
|
||||
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;
|
||||
|
@ -641,7 +641,7 @@ ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
|
|||
atom = _ecore_x_e_quickpanel_atom_get(state);
|
||||
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
|
||||
&atom, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_state_set */
|
||||
|
||||
EAPI Ecore_X_Illume_Quickpanel_State
|
||||
ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
|
||||
|
@ -655,10 +655,10 @@ ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
|
|||
return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
|
||||
|
||||
return _ecore_x_e_quickpanel_state_get(atom);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_state_get */
|
||||
|
||||
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__);
|
||||
|
@ -666,7 +666,7 @@ ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
|
|||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
_ecore_x_e_quickpanel_atom_get(state),
|
||||
0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_state_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win)
|
||||
|
@ -676,11 +676,11 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win)
|
|||
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
0, 0, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_state_toggle */
|
||||
|
||||
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(
|
||||
|
@ -688,7 +688,7 @@ ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
|
|||
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR,
|
||||
&priority,
|
||||
1);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_priority_major_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
|
||||
|
@ -702,11 +702,11 @@ ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_priority_major_get */
|
||||
|
||||
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(
|
||||
|
@ -714,7 +714,7 @@ ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
|
|||
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR,
|
||||
&priority,
|
||||
1);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_priority_minor_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win)
|
||||
|
@ -728,7 +728,7 @@ ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_priority_minor_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone)
|
||||
|
@ -737,7 +737,7 @@ ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone)
|
|||
ecore_x_window_prop_card32_set(win,
|
||||
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE,
|
||||
&zone, 1);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_zone_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win)
|
||||
|
@ -751,7 +751,7 @@ ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_zone_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win)
|
||||
|
@ -766,10 +766,10 @@ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win)
|
|||
0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
} /* ecore_x_e_illume_quickpanel_position_update_send */
|
||||
|
||||
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__);
|
||||
|
@ -778,7 +778,7 @@ ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
|
|||
ECORE_X_ATOM_CARDINAL, &counter, 1);
|
||||
else
|
||||
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER);
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_counter_set */
|
||||
|
||||
EAPI Ecore_X_Sync_Counter
|
||||
ecore_x_e_comp_sync_counter_get(Ecore_X_Window win)
|
||||
|
@ -796,7 +796,7 @@ ecore_x_e_comp_sync_counter_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return counter;
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_counter_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
|
||||
|
@ -821,7 +821,7 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
|
|||
XSendEvent(_ecore_x_disp, root, False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_draw_done_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
|
||||
|
@ -857,7 +857,7 @@ ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
|
|||
ecore_x_window_free(win);
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_supported_set */
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
|
||||
|
@ -870,7 +870,7 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
|
|||
root = DefaultRootWindow(_ecore_x_disp);
|
||||
|
||||
ret =
|
||||
ecore_x_window_prop_xid_get(root,
|
||||
ecore_x_window_prop_xid_get(root,
|
||||
ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
|
||||
ECORE_X_ATOM_WINDOW,
|
||||
&win, 1);
|
||||
|
@ -886,7 +886,7 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_supported_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_sync_begin_send(Ecore_X_Window win)
|
||||
|
@ -908,7 +908,7 @@ ecore_x_e_comp_sync_begin_send(Ecore_X_Window win)
|
|||
XSendEvent(_ecore_x_disp, win, False,
|
||||
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_begin_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_sync_end_send(Ecore_X_Window win)
|
||||
|
@ -930,7 +930,7 @@ ecore_x_e_comp_sync_end_send(Ecore_X_Window win)
|
|||
XSendEvent(_ecore_x_disp, win, False,
|
||||
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_end_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win)
|
||||
|
@ -952,7 +952,7 @@ ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win)
|
|||
XSendEvent(_ecore_x_disp, win, False,
|
||||
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
}
|
||||
} /* ecore_x_e_comp_sync_cancel_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_flush_send(Ecore_X_Window win)
|
||||
|
@ -974,7 +974,7 @@ ecore_x_e_comp_flush_send(Ecore_X_Window win)
|
|||
XSendEvent(_ecore_x_disp, win, False,
|
||||
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
}
|
||||
} /* ecore_x_e_comp_flush_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_dump_send(Ecore_X_Window win)
|
||||
|
@ -996,7 +996,7 @@ ecore_x_e_comp_dump_send(Ecore_X_Window win)
|
|||
XSendEvent(_ecore_x_disp, win, False,
|
||||
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&xev);
|
||||
}
|
||||
} /* ecore_x_e_comp_dump_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap)
|
||||
|
@ -1007,7 +1007,7 @@ ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap)
|
|||
ECORE_X_ATOM_PIXMAP, &pixmap, 1);
|
||||
else
|
||||
ecore_x_window_prop_property_del(win, pixmap);
|
||||
}
|
||||
} /* ecore_x_e_comp_pixmap_set */
|
||||
|
||||
EAPI Ecore_X_Pixmap
|
||||
ecore_x_e_comp_pixmap_get(Ecore_X_Window win)
|
||||
|
@ -1025,5 +1025,5 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return pixmap;
|
||||
}
|
||||
} /* ecore_x_e_comp_pixmap_get */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
|||
#include "ecore_x_private.h"
|
||||
#include "Ecore_X.h"
|
||||
|
||||
static void _ecore_x_error_handle(Display *d, XErrorEvent *ev);
|
||||
static int _ecore_x_io_error_handle(Display *d);
|
||||
static void _ecore_x_error_handle(Display *d, XErrorEvent *ev);
|
||||
static int _ecore_x_io_error_handle(Display *d);
|
||||
|
||||
static void (*_error_func)(void *data) = NULL;
|
||||
static void *_error_data = NULL;
|
||||
|
@ -35,7 +35,7 @@ ecore_x_error_handler_set(void (*func)(void *data), const void *data)
|
|||
{
|
||||
_error_func = func;
|
||||
_error_data = (void *)data;
|
||||
}
|
||||
} /* ecore_x_error_handler_set */
|
||||
|
||||
/**
|
||||
* Set the I/O error handler.
|
||||
|
@ -49,7 +49,7 @@ ecore_x_io_error_handler_set(void (*func)(void *data), const void *data)
|
|||
{
|
||||
_io_error_func = func;
|
||||
_io_error_data = (void *)data;
|
||||
}
|
||||
} /* ecore_x_io_error_handler_set */
|
||||
|
||||
/**
|
||||
* Get the request code that caused the error.
|
||||
|
@ -61,7 +61,7 @@ EAPI int
|
|||
ecore_x_error_request_get(void)
|
||||
{
|
||||
return _error_request_code;
|
||||
}
|
||||
} /* ecore_x_error_request_get */
|
||||
|
||||
/**
|
||||
* Get the error code from the error.
|
||||
|
@ -73,14 +73,14 @@ EAPI int
|
|||
ecore_x_error_code_get(void)
|
||||
{
|
||||
return _error_code;
|
||||
}
|
||||
} /* ecore_x_error_code_get */
|
||||
|
||||
void
|
||||
_ecore_x_error_handler_init(void)
|
||||
{
|
||||
XSetErrorHandler((XErrorHandler)_ecore_x_error_handle);
|
||||
XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle);
|
||||
}
|
||||
} /* _ecore_x_error_handler_init */
|
||||
|
||||
static void
|
||||
_ecore_x_error_handle(Display *d, XErrorEvent *ev)
|
||||
|
@ -92,7 +92,7 @@ _ecore_x_error_handle(Display *d, XErrorEvent *ev)
|
|||
if (_error_func)
|
||||
_error_func(_error_data);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_error_handle */
|
||||
|
||||
static int
|
||||
_ecore_x_io_error_handle(Display *d)
|
||||
|
@ -106,4 +106,5 @@ _ecore_x_io_error_handle(Display *d)
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* _ecore_x_io_error_handle */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -24,21 +24,21 @@
|
|||
|
||||
#ifndef CODESET
|
||||
#define CODESET "INVALID"
|
||||
#endif
|
||||
#endif /* ifndef CODESET */
|
||||
|
||||
#if 0
|
||||
static void _ecore_x_event_free_window_prop_name_class_change(void *data,
|
||||
void *ev);
|
||||
static void _ecore_x_event_free_window_prop_title_change(void *data, void *ev);
|
||||
static void _ecore_x_event_free_window_prop_visible_title_change(void *data,
|
||||
void *ev);
|
||||
static void _ecore_x_event_free_window_prop_icon_name_change(void *data,
|
||||
void *ev);
|
||||
static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data,
|
||||
void *ev);
|
||||
static void _ecore_x_event_free_window_prop_client_machine_change(void *data,
|
||||
static void _ecore_x_event_free_window_prop_name_class_change(void *data,
|
||||
void *ev);
|
||||
static void _ecore_x_event_free_window_prop_title_change(void *data, void *ev);
|
||||
static void _ecore_x_event_free_window_prop_visible_title_change(void *data,
|
||||
void *ev);
|
||||
static void _ecore_x_event_free_window_prop_icon_name_change(void *data,
|
||||
void *ev);
|
||||
#endif
|
||||
static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data,
|
||||
void *ev);
|
||||
static void _ecore_x_event_free_window_prop_client_machine_change(void *data,
|
||||
void *ev);
|
||||
#endif /* if 0 */
|
||||
|
||||
static Window _ecore_x_mouse_down_last_win = 0;
|
||||
static Window _ecore_x_mouse_down_last_last_win = 0;
|
||||
|
@ -64,7 +64,7 @@ _ecore_x_event_free_mouse_move(void *data __UNUSED__, void *ev)
|
|||
}
|
||||
|
||||
free(e);
|
||||
}
|
||||
} /* _ecore_x_event_free_mouse_move */
|
||||
|
||||
EAPI void
|
||||
ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask)
|
||||
|
@ -80,7 +80,7 @@ ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask)
|
|||
XGetWindowAttributes(_ecore_x_disp, w, &attr);
|
||||
s_attr.event_mask = mask | attr.your_event_mask;
|
||||
XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr);
|
||||
}
|
||||
} /* ecore_x_event_mask_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask)
|
||||
|
@ -96,7 +96,7 @@ ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask)
|
|||
XGetWindowAttributes(_ecore_x_disp, w, &attr);
|
||||
s_attr.event_mask = attr.your_event_mask & ~mask;
|
||||
XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr);
|
||||
}
|
||||
} /* ecore_x_event_mask_unset */
|
||||
|
||||
#if 0
|
||||
static void
|
||||
|
@ -111,8 +111,8 @@ _ecore_x_event_free_window_prop_name_class_change(void *data, void *ev)
|
|||
if (e->clas)
|
||||
free(e->clas);
|
||||
|
||||
free(e);
|
||||
}
|
||||
free(e);
|
||||
} /* _ecore_x_event_free_window_prop_name_class_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_window_prop_title_change(void *data, void *ev)
|
||||
|
@ -123,8 +123,8 @@ _ecore_x_event_free_window_prop_title_change(void *data, void *ev)
|
|||
if (e->title)
|
||||
free(e->title);
|
||||
|
||||
free(e);
|
||||
}
|
||||
free(e);
|
||||
} /* _ecore_x_event_free_window_prop_title_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
|
||||
|
@ -135,8 +135,8 @@ _ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
|
|||
if (e->title)
|
||||
free(e->title);
|
||||
|
||||
free(e);
|
||||
}
|
||||
free(e);
|
||||
} /* _ecore_x_event_free_window_prop_visible_title_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev)
|
||||
|
@ -147,8 +147,8 @@ _ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev)
|
|||
if (e->name)
|
||||
free(e->name);
|
||||
|
||||
free(e);
|
||||
}
|
||||
free(e);
|
||||
} /* _ecore_x_event_free_window_prop_icon_name_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
|
||||
|
@ -159,8 +159,8 @@ _ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
|
|||
if (e->name)
|
||||
free(e->name);
|
||||
|
||||
free(e);
|
||||
}
|
||||
free(e);
|
||||
} /* _ecore_x_event_free_window_prop_visible_icon_name_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev)
|
||||
|
@ -171,9 +171,10 @@ _ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev)
|
|||
if (e->name)
|
||||
free(e->name);
|
||||
|
||||
free(e);
|
||||
}
|
||||
#endif
|
||||
free(e);
|
||||
} /* _ecore_x_event_free_window_prop_client_machine_change */
|
||||
|
||||
#endif /* if 0 */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_xdnd_enter(void *data __UNUSED__, void *ev)
|
||||
|
@ -186,7 +187,7 @@ _ecore_x_event_free_xdnd_enter(void *data __UNUSED__, void *ev)
|
|||
XFree(e->types[i]);
|
||||
free(e->types);
|
||||
free(e);
|
||||
}
|
||||
} /* _ecore_x_event_free_xdnd_enter */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev)
|
||||
|
@ -201,7 +202,7 @@ _ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev)
|
|||
|
||||
free(e->target);
|
||||
free(e);
|
||||
}
|
||||
} /* _ecore_x_event_free_selection_notify */
|
||||
|
||||
static unsigned int
|
||||
_ecore_x_event_modifiers(unsigned int state)
|
||||
|
@ -230,28 +231,28 @@ _ecore_x_event_modifiers(unsigned int state)
|
|||
modifiers |= ECORE_EVENT_LOCK_CAPS;
|
||||
|
||||
return modifiers;
|
||||
}
|
||||
} /* _ecore_x_event_modifiers */
|
||||
|
||||
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;
|
||||
|
@ -294,7 +295,7 @@ _ecore_mouse_move(unsigned int timestamp,
|
|||
_ecore_x_event_last_root_y = y_root;
|
||||
|
||||
_ecore_x_last_event_mouse_move_event = event;
|
||||
}
|
||||
} /* _ecore_mouse_move */
|
||||
|
||||
static void
|
||||
_ecore_key_press(int event, XKeyEvent *xevent)
|
||||
|
@ -337,14 +338,14 @@ _ecore_key_press(int event, XKeyEvent *xevent)
|
|||
sizeof(compose_buffer) - 1,
|
||||
&sym,
|
||||
&mbstatus);
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
val = XmbLookupString(_ecore_x_ic,
|
||||
(XKeyEvent *)xevent,
|
||||
compose_buffer,
|
||||
sizeof(compose_buffer) - 1,
|
||||
&sym,
|
||||
&mbstatus);
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
if (mbstatus == XBufferOverflow)
|
||||
{
|
||||
tmp = malloc(sizeof (char) * (val + 1));
|
||||
|
@ -360,14 +361,14 @@ _ecore_key_press(int event, XKeyEvent *xevent)
|
|||
val,
|
||||
&sym,
|
||||
&mbstatus);
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
val = XmbLookupString(_ecore_x_ic,
|
||||
(XKeyEvent *)xevent,
|
||||
tmp,
|
||||
val,
|
||||
&sym,
|
||||
&mbstatus);
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
if (val > 0)
|
||||
{
|
||||
tmp[val] = 0;
|
||||
|
@ -376,7 +377,7 @@ _ecore_key_press(int event, XKeyEvent *xevent)
|
|||
compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8", tmp);
|
||||
free(tmp);
|
||||
tmp = compose;
|
||||
#endif
|
||||
#endif /* ifndef X_HAVE_UTF8_STRING */
|
||||
}
|
||||
else
|
||||
compose = NULL;
|
||||
|
@ -387,11 +388,11 @@ _ecore_key_press(int event, XKeyEvent *xevent)
|
|||
compose_buffer[val] = 0;
|
||||
#ifdef X_HAVE_UTF8_STRING
|
||||
compose = compose_buffer;
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
compose = eina_str_convert(nl_langinfo(
|
||||
CODESET), "UTF-8", compose_buffer);
|
||||
tmp = compose;
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -428,8 +429,8 @@ _ecore_key_press(int event, XKeyEvent *xevent)
|
|||
e->compose = (compose) ? e->key + strlen(key) + 1 : NULL;
|
||||
e->string = e->compose;
|
||||
|
||||
strcpy((char *)e->keyname, keyname);
|
||||
strcpy((char *)e->key, key);
|
||||
strcpy((char *)e->keyname, keyname);
|
||||
strcpy((char *)e->key, key);
|
||||
if (compose)
|
||||
strcpy((char *)e->compose, compose);
|
||||
|
||||
|
@ -448,30 +449,30 @@ _ecore_key_press(int event, XKeyEvent *xevent)
|
|||
on_error:
|
||||
if (tmp)
|
||||
free(tmp);
|
||||
}
|
||||
} /* _ecore_key_press */
|
||||
|
||||
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;
|
||||
|
||||
|
@ -542,7 +543,7 @@ _ecore_mouse_button(int event,
|
|||
ecore_event_add(event, e, NULL, NULL);
|
||||
|
||||
return e;
|
||||
}
|
||||
} /* _ecore_mouse_button */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_any_event(XEvent *xevent)
|
||||
|
@ -551,19 +552,19 @@ _ecore_x_event_handle_any_event(XEvent *xevent)
|
|||
|
||||
memcpy(ev, xevent, sizeof(XEvent));
|
||||
ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_any_event */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_key_press(XEvent *xevent)
|
||||
{
|
||||
_ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *)xevent);
|
||||
}
|
||||
} /* _ecore_x_event_handle_key_press */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_key_release(XEvent *xevent)
|
||||
{
|
||||
_ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *)xevent);
|
||||
}
|
||||
} /* _ecore_x_event_handle_key_release */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_button_press(XEvent *xevent)
|
||||
|
@ -592,7 +593,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
|
|||
case 7: e->direction = 1; e->z = 1; break;
|
||||
|
||||
default: e->direction = 0; e->z = 0; break;
|
||||
}
|
||||
} /* switch */
|
||||
|
||||
e->x = xevent->xbutton.x;
|
||||
e->y = xevent->xbutton.y;
|
||||
|
@ -743,7 +744,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_event_handle_button_press */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_button_release(XEvent *xevent)
|
||||
|
@ -782,7 +783,7 @@ _ecore_x_event_handle_button_release(XEvent *xevent)
|
|||
xevent->xbutton.x, xevent->xbutton.y,
|
||||
xevent->xbutton.x_root, xevent->xbutton.y_root);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_event_handle_button_release */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_motion_notify(XEvent *xevent)
|
||||
|
@ -815,7 +816,7 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
|
|||
_ecore_x_dnd_drag(xevent->xmotion.root,
|
||||
xevent->xmotion.x_root,
|
||||
xevent->xmotion.y_root);
|
||||
}
|
||||
} /* _ecore_x_event_handle_motion_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_enter_notify(XEvent *xevent)
|
||||
|
@ -879,7 +880,7 @@ _ecore_x_event_handle_enter_notify(XEvent *xevent)
|
|||
_ecore_x_event_last_time = e->time;
|
||||
ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_event_handle_enter_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_leave_notify(XEvent *xevent)
|
||||
|
@ -946,7 +947,7 @@ _ecore_x_event_handle_leave_notify(XEvent *xevent)
|
|||
_ecore_x_event_last_root_y = e->root.y;
|
||||
ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_event_handle_leave_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_focus_in(XEvent *xevent)
|
||||
|
@ -1000,7 +1001,7 @@ _ecore_x_event_handle_focus_in(XEvent *xevent)
|
|||
e->time = _ecore_x_event_last_time;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_focus_in */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_focus_out(XEvent *xevent)
|
||||
|
@ -1045,15 +1046,15 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
|
|||
|
||||
e->time = _ecore_x_event_last_time;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_focus_out */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__)
|
||||
{
|
||||
_ecore_x_last_event_mouse_move = 0;
|
||||
/* FIXME: handle this event type */
|
||||
}
|
||||
} /* _ecore_x_event_handle_keymap_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_expose(XEvent *xevent)
|
||||
|
@ -1072,8 +1073,8 @@ _ecore_x_event_handle_expose(XEvent *xevent)
|
|||
e->w = xevent->xexpose.width;
|
||||
e->h = xevent->xexpose.height;
|
||||
e->count = xevent->xexpose.count;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_expose */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_graphics_expose(XEvent *xevent)
|
||||
|
@ -1092,8 +1093,8 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
|
|||
e->w = xevent->xgraphicsexpose.width;
|
||||
e->h = xevent->xgraphicsexpose.height;
|
||||
e->count = xevent->xgraphicsexpose.count;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_graphics_expose */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_visibility_notify(XEvent *xevent)
|
||||
|
@ -1116,7 +1117,7 @@ _ecore_x_event_handle_visibility_notify(XEvent *xevent)
|
|||
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_event_handle_visibility_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_create_notify(XEvent *xevent)
|
||||
|
@ -1141,8 +1142,8 @@ _ecore_x_event_handle_create_notify(XEvent *xevent)
|
|||
e->h = xevent->xcreatewindow.height;
|
||||
e->border = xevent->xcreatewindow.border_width;
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_create_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_destroy_notify(XEvent *xevent)
|
||||
|
@ -1160,8 +1161,8 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent)
|
|||
if (e->win == _ecore_x_event_last_win)
|
||||
_ecore_x_event_last_win = 0;
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_destroy_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_unmap_notify(XEvent *xevent)
|
||||
|
@ -1176,8 +1177,8 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent)
|
|||
e->win = xevent->xunmap.window;
|
||||
e->event_win = xevent->xunmap.event;
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_unmap_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_map_notify(XEvent *xevent)
|
||||
|
@ -1192,8 +1193,8 @@ _ecore_x_event_handle_map_notify(XEvent *xevent)
|
|||
e->win = xevent->xmap.window;
|
||||
e->event_win = xevent->xmap.event;
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_map_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_map_request(XEvent *xevent)
|
||||
|
@ -1208,8 +1209,8 @@ _ecore_x_event_handle_map_request(XEvent *xevent)
|
|||
e->win = xevent->xmaprequest.window;
|
||||
e->time = _ecore_x_event_last_time;
|
||||
e->parent = xevent->xmaprequest.parent;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_map_request */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_reparent_notify(XEvent *xevent)
|
||||
|
@ -1225,8 +1226,8 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent)
|
|||
e->event_win = xevent->xreparent.event;
|
||||
e->parent = xevent->xreparent.parent;
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_reparent_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_configure_notify(XEvent *xevent)
|
||||
|
@ -1249,8 +1250,8 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent)
|
|||
e->override = xevent->xconfigure.override_redirect;
|
||||
e->from_wm = xevent->xconfigure.send_event;
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_configure_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_configure_request(XEvent *xevent)
|
||||
|
@ -1284,15 +1285,15 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
|
|||
else if (xevent->xconfigurerequest.detail == Opposite)
|
||||
e->detail = ECORE_X_WINDOW_STACK_OPPOSITE;
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_configure_request */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_gravity_notify(XEvent *xevent __UNUSED__)
|
||||
{
|
||||
_ecore_x_last_event_mouse_move = 0;
|
||||
/* FIXME: handle this event type */
|
||||
}
|
||||
} /* _ecore_x_event_handle_gravity_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_resize_request(XEvent *xevent)
|
||||
|
@ -1308,8 +1309,8 @@ _ecore_x_event_handle_resize_request(XEvent *xevent)
|
|||
e->w = xevent->xresizerequest.width;
|
||||
e->h = xevent->xresizerequest.height;
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_resize_request */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_circulate_notify(XEvent *xevent)
|
||||
|
@ -1329,8 +1330,8 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent)
|
|||
e->detail = ECORE_X_WINDOW_STACK_BELOW;
|
||||
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_circulate_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_circulate_request(XEvent *xevent)
|
||||
|
@ -1350,8 +1351,8 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
|
|||
e->detail = ECORE_X_WINDOW_STACK_BELOW;
|
||||
|
||||
e->time = _ecore_x_event_last_time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_circulate_request */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_property_notify(XEvent *xevent)
|
||||
|
@ -1482,7 +1483,7 @@ _ecore_x_event_handle_property_notify(XEvent *xevent)
|
|||
ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif /* if 0 */
|
||||
{
|
||||
Ecore_X_Event_Window_Property *e;
|
||||
|
||||
|
@ -1494,9 +1495,9 @@ _ecore_x_event_handle_property_notify(XEvent *xevent)
|
|||
e->atom = xevent->xproperty.atom;
|
||||
e->time = xevent->xproperty.time;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL);
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_event_handle_property_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_selection_clear(XEvent *xevent)
|
||||
|
@ -1530,7 +1531,7 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent)
|
|||
e->selection = ECORE_X_SELECTION_OTHER;
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_selection_clear */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_selection_request(XEvent *xevent)
|
||||
|
@ -1600,7 +1601,7 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
|
|||
}
|
||||
|
||||
return;
|
||||
}
|
||||
} /* _ecore_x_event_handle_selection_request */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_selection_notify(XEvent *xevent)
|
||||
|
@ -1654,9 +1655,9 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
|
|||
|
||||
e->data = _ecore_x_selection_parse(e->target, data, num_ret, format);
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e,
|
||||
ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e,
|
||||
_ecore_x_event_free_selection_notify, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_selection_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_colormap_notify(XEvent *xevent)
|
||||
|
@ -1676,8 +1677,8 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
|
|||
else
|
||||
e->installed = 0;
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL);
|
||||
}
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL);
|
||||
} /* _ecore_x_event_handle_colormap_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_client_message(XEvent *xevent)
|
||||
|
@ -1924,7 +1925,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
Ecore_X_DND_Source *source;
|
||||
int completed = 1;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
source = _ecore_x_dnd_source_get();
|
||||
/* Match source/target */
|
||||
if ((source->win != xevent->xclient.window) ||
|
||||
|
@ -1988,7 +1989,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
return;
|
||||
}
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
e->state[0] = _ecore_x_netwm_state_get(xevent->xclient.data.l[1]);
|
||||
if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN)
|
||||
// char *name;
|
||||
|
@ -2009,7 +2010,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
|
||||
e->source = xevent->xclient.data.l[3];
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
|
||||
}
|
||||
else if ((xevent->xclient.message_type == ECORE_X_ATOM_WM_CHANGE_STATE)
|
||||
&& (xevent->xclient.format == 32)
|
||||
|
@ -2025,7 +2026,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
|
||||
e->state[0] = ECORE_X_WINDOW_STATE_ICONIFIED;
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
|
||||
}
|
||||
else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_WM_DESKTOP)
|
||||
&& (xevent->xclient.format == 32))
|
||||
|
@ -2040,7 +2041,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
e->desk = xevent->xclient.data.l[0];
|
||||
e->source = xevent->xclient.data.l[1];
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_DESKTOP_CHANGE, e, NULL, NULL);
|
||||
ecore_event_add(ECORE_X_EVENT_DESKTOP_CHANGE, e, NULL, NULL);
|
||||
}
|
||||
else if ((xevent->xclient.message_type ==
|
||||
ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS))
|
||||
|
@ -2053,7 +2054,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
|
||||
e->win = xevent->xclient.window;
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, e, NULL, NULL);
|
||||
ecore_event_add(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, e, NULL, NULL);
|
||||
}
|
||||
else if ((xevent->xclient.message_type == ECORE_X_ATOM_WM_PROTOCOLS)
|
||||
&& ((Ecore_X_Atom)xevent->xclient.data.l[0] ==
|
||||
|
@ -2072,7 +2073,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
e->event_win = xevent->xclient.data.l[2];
|
||||
|
||||
/* send a reply anyway - we are alive... eventloop at least */
|
||||
ecore_event_add(ECORE_X_EVENT_PING, e, NULL, NULL);
|
||||
ecore_event_add(ECORE_X_EVENT_PING, e, NULL, NULL);
|
||||
if (ScreenCount(_ecore_x_disp) > 1)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
|
@ -2126,14 +2127,14 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
|
||||
ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_event_handle_client_message */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_mapping_notify(XEvent *xevent)
|
||||
{
|
||||
_ecore_x_last_event_mouse_move = 0;
|
||||
XRefreshKeyboardMapping((XMappingEvent *)xevent);
|
||||
}
|
||||
} /* _ecore_x_event_handle_mapping_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_shape_change(XEvent *xevent)
|
||||
|
@ -2150,7 +2151,7 @@ _ecore_x_event_handle_shape_change(XEvent *xevent)
|
|||
e->win = shape_event->window;
|
||||
e->time = shape_event->time;
|
||||
ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_shape_change */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_screensaver_notify(XEvent *xevent)
|
||||
|
@ -2173,10 +2174,10 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent)
|
|||
|
||||
e->time = screensaver_event->time;
|
||||
ecore_event_add(ECORE_X_EVENT_SCREENSAVER_NOTIFY, e, NULL, NULL);
|
||||
#else
|
||||
#else /* ifdef ECORE_XSS */
|
||||
xevent = NULL;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XSS */
|
||||
} /* _ecore_x_event_handle_screensaver_notify */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_sync_counter(XEvent *xevent)
|
||||
|
@ -2192,7 +2193,7 @@ _ecore_x_event_handle_sync_counter(XEvent *xevent)
|
|||
|
||||
e->time = sync_counter_event->time;
|
||||
ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_sync_counter */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_sync_alarm(XEvent *xevent)
|
||||
|
@ -2210,7 +2211,7 @@ _ecore_x_event_handle_sync_alarm(XEvent *xevent)
|
|||
e->time = sync_alarm_event->time;
|
||||
e->alarm = sync_alarm_event->alarm;
|
||||
ecore_event_add(ECORE_X_EVENT_SYNC_ALARM, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_sync_alarm */
|
||||
|
||||
#ifdef ECORE_XRANDR
|
||||
void
|
||||
|
@ -2239,7 +2240,7 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
|
|||
e->rotation = randr_event->rotation;
|
||||
e->subpixel_order = randr_event->subpixel_order;
|
||||
ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_randr_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent)
|
||||
|
@ -2262,7 +2263,7 @@ _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent)
|
|||
e->width = randr_event->width;
|
||||
e->height = randr_event->height;
|
||||
ecore_event_add(ECORE_X_EVENT_RANDR_CRTC_CHANGE, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_randr_notify_crtc_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent)
|
||||
|
@ -2284,7 +2285,7 @@ _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent)
|
|||
e->connection = randr_event->connection;
|
||||
e->subpixel_order = randr_event->subpixel_order;
|
||||
ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_CHANGE, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_randr_notify_output_change */
|
||||
|
||||
static void
|
||||
_ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent)
|
||||
|
@ -2304,7 +2305,7 @@ _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent)
|
|||
e->time = randr_event->timestamp;
|
||||
e->state = randr_event->state;
|
||||
ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL);
|
||||
}
|
||||
} /* _ecore_x_event_handle_randr_notify_output_property */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_randr_notify(XEvent *xevent)
|
||||
|
@ -2332,9 +2333,10 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent)
|
|||
ERR("Unknown XRandR RRNotify subtype: %d.",
|
||||
randr_event->subtype);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} /* switch */
|
||||
} /* _ecore_x_event_handle_randr_notify */
|
||||
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
|
||||
#ifdef ECORE_XFIXES
|
||||
void
|
||||
|
@ -2343,8 +2345,9 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event)
|
|||
_ecore_x_last_event_mouse_move = 0;
|
||||
/* Nothing here yet */
|
||||
event = NULL;
|
||||
}
|
||||
#endif
|
||||
} /* _ecore_x_event_handle_fixes_selection_notify */
|
||||
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
|
||||
#ifdef ECORE_XDAMAGE
|
||||
void
|
||||
|
@ -2375,8 +2378,9 @@ _ecore_x_event_handle_damage_notify(XEvent *event)
|
|||
e->geometry.height = damage_event->geometry.height;
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_DAMAGE_NOTIFY, e, NULL, NULL);
|
||||
}
|
||||
#endif
|
||||
} /* _ecore_x_event_handle_damage_notify */
|
||||
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
|
||||
static void
|
||||
_ecore_x_event_free_generic_event(void *data, void *ev)
|
||||
|
@ -2387,8 +2391,8 @@ _ecore_x_event_free_generic_event(void *data, void *ev)
|
|||
if (e->data)
|
||||
XFreeEventData(_ecore_x_disp, (XGenericEventCookie *)data);
|
||||
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
} /* _ecore_x_event_free_generic_event */
|
||||
|
||||
void
|
||||
_ecore_x_event_handle_generic_event(XEvent *event)
|
||||
|
@ -2425,5 +2429,6 @@ _ecore_x_event_handle_generic_event(XEvent *event)
|
|||
e,
|
||||
_ecore_x_event_free_generic_event,
|
||||
event);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
} /* _ecore_x_event_handle_generic_event */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
|||
static int _fixes_available;
|
||||
#ifdef ECORE_XFIXES
|
||||
static int _fixes_major, _fixes_minor;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
|
||||
void
|
||||
_ecore_x_fixes_init(void)
|
||||
|
@ -29,10 +29,10 @@ _ecore_x_fixes_init(void)
|
|||
else
|
||||
_fixes_available = 0;
|
||||
|
||||
#else
|
||||
#else /* ifdef ECORE_XFIXES */
|
||||
_fixes_available = 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* _ecore_x_fixes_init */
|
||||
|
||||
#ifdef ECORE_XFIXES
|
||||
/* I don't know what to call this function. */
|
||||
|
@ -57,7 +57,7 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, int num)
|
|||
xrect[i].height = rects[i].height;
|
||||
}
|
||||
return xrect;
|
||||
}
|
||||
} /* _ecore_x_rectangle_ecore_to_x */
|
||||
|
||||
static Ecore_X_Rectangle *
|
||||
_ecore_x_rectangle_x_to_ecore(XRectangle *xrect, int num)
|
||||
|
@ -80,8 +80,9 @@ _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, int num)
|
|||
rects[i].height = xrect[i].height;
|
||||
}
|
||||
return rects;
|
||||
}
|
||||
#endif
|
||||
} /* _ecore_x_rectangle_x_to_ecore */
|
||||
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
|
||||
EAPI Ecore_X_Region
|
||||
ecore_x_region_new(Ecore_X_Rectangle *rects, int num)
|
||||
|
@ -95,10 +96,10 @@ ecore_x_region_new(Ecore_X_Rectangle *rects, int num)
|
|||
region = XFixesCreateRegion(_ecore_x_disp, xrect, num);
|
||||
free(xrect);
|
||||
return region;
|
||||
#else
|
||||
#else /* ifdef ECORE_XFIXES */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_new */
|
||||
|
||||
EAPI Ecore_X_Region
|
||||
ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
|
||||
|
@ -109,10 +110,10 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
region = XFixesCreateRegionFromBitmap(_ecore_x_disp, bitmap);
|
||||
return region;
|
||||
#else
|
||||
#else /* ifdef ECORE_XFIXES */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_new_from_bitmap */
|
||||
|
||||
EAPI Ecore_X_Region
|
||||
ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type)
|
||||
|
@ -123,10 +124,10 @@ ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
region = XFixesCreateRegionFromWindow(_ecore_x_disp, win, type);
|
||||
return region;
|
||||
#else
|
||||
#else /* ifdef ECORE_XFIXES */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_new_from_window */
|
||||
|
||||
EAPI Ecore_X_Region
|
||||
ecore_x_region_new_from_gc(Ecore_X_GC gc)
|
||||
|
@ -137,10 +138,10 @@ ecore_x_region_new_from_gc(Ecore_X_GC gc)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
region = XFixesCreateRegionFromGC(_ecore_x_disp, gc);
|
||||
return region;
|
||||
#else
|
||||
#else /* ifdef ECORE_XFIXES */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_new_from_gc */
|
||||
|
||||
EAPI Ecore_X_Region
|
||||
ecore_x_region_new_from_picture(Ecore_X_Picture picture)
|
||||
|
@ -151,10 +152,10 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
region = XFixesCreateRegionFromPicture(_ecore_x_disp, picture);
|
||||
return region;
|
||||
#else
|
||||
#else /* ifdef ECORE_XFIXES */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_new_from_picture */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_free(Ecore_X_Region region)
|
||||
|
@ -162,8 +163,8 @@ ecore_x_region_free(Ecore_X_Region region)
|
|||
#ifdef ECORE_XFIXES
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesDestroyRegion(_ecore_x_disp, region);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_free */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num)
|
||||
|
@ -172,8 +173,8 @@ ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num)
|
|||
XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesSetRegion(_ecore_x_disp, region, xrect, num);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
|
||||
|
@ -181,8 +182,8 @@ ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
|
|||
#ifdef ECORE_XFIXES
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesCopyRegion(_ecore_x_disp, dest, source);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_copy */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_combine(Ecore_X_Region dest,
|
||||
|
@ -192,8 +193,8 @@ ecore_x_region_combine(Ecore_X_Region dest,
|
|||
#ifdef ECORE_XFIXES
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesUnionRegion(_ecore_x_disp, dest, source1, source2);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_combine */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_intersect(Ecore_X_Region dest,
|
||||
|
@ -203,8 +204,8 @@ ecore_x_region_intersect(Ecore_X_Region dest,
|
|||
#ifdef ECORE_XFIXES
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_intersect */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_subtract(Ecore_X_Region dest,
|
||||
|
@ -214,13 +215,13 @@ ecore_x_region_subtract(Ecore_X_Region dest,
|
|||
#ifdef ECORE_XFIXES
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_subtract */
|
||||
|
||||
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;
|
||||
|
@ -231,8 +232,8 @@ ecore_x_region_invert(Ecore_X_Region dest,
|
|||
xbound = _ecore_x_rectangle_ecore_to_x(bounds, num);
|
||||
|
||||
XFixesInvertRegion(_ecore_x_disp, dest, xbound, source);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_invert */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_translate(Ecore_X_Region region, int dx, int dy)
|
||||
|
@ -240,8 +241,8 @@ ecore_x_region_translate(Ecore_X_Region region, int dx, int dy)
|
|||
#ifdef ECORE_XFIXES
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesTranslateRegion(_ecore_x_disp, region, dx, dy);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_translate */
|
||||
|
||||
EAPI void
|
||||
ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
|
||||
|
@ -249,8 +250,8 @@ ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
|
|||
#ifdef ECORE_XFIXES
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFixesRegionExtents(_ecore_x_disp, dest, source);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_extents */
|
||||
|
||||
EAPI Ecore_X_Rectangle *
|
||||
ecore_x_region_fetch(Ecore_X_Region region, int *num,
|
||||
|
@ -267,43 +268,43 @@ ecore_x_region_fetch(Ecore_X_Region region, int *num,
|
|||
(*bounds).width = xbound.width;
|
||||
(*bounds).height = xbound.height;
|
||||
return rects;
|
||||
#else
|
||||
#else /* ifdef ECORE_XFIXES */
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_fetch */
|
||||
|
||||
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__);
|
||||
XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_expand */
|
||||
|
||||
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__);
|
||||
XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_gc_clip_set */
|
||||
|
||||
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__);
|
||||
|
@ -313,14 +314,14 @@ ecore_x_region_window_shape_set(Ecore_X_Region region,
|
|||
x_offset,
|
||||
y_offset,
|
||||
region);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_window_shape_set */
|
||||
|
||||
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__);
|
||||
|
@ -329,6 +330,6 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region,
|
|||
x_origin,
|
||||
y_origin,
|
||||
region);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
} /* ecore_x_region_picture_clip_set */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -23,9 +23,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;
|
||||
|
@ -156,11 +156,11 @@ ecore_x_gc_new(Ecore_X_Drawable draw,
|
|||
gcv.arc_mode = value_list[index];
|
||||
index++;
|
||||
break;
|
||||
}
|
||||
} /* switch */
|
||||
}
|
||||
|
||||
return XCreateGC(_ecore_x_disp, draw, value_mask, &gcv);
|
||||
}
|
||||
} /* ecore_x_gc_new */
|
||||
|
||||
/**
|
||||
* Deletes and frees the given graphics context.
|
||||
|
@ -171,4 +171,5 @@ ecore_x_gc_free(Ecore_X_GC gc)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFreeGC(_ecore_x_disp, gc);
|
||||
}
|
||||
} /* ecore_x_gc_free */
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -21,12 +21,11 @@
|
|||
#include "Ecore_X.h"
|
||||
#include "Ecore_X_Atoms.h"
|
||||
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_init(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
}
|
||||
} /* ecore_x_icccm_init */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
|
||||
|
@ -45,7 +44,7 @@ ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
|
|||
XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE,
|
||||
ECORE_X_ATOM_WM_STATE, 32, PropModeReplace,
|
||||
(unsigned char *)c, 2);
|
||||
}
|
||||
} /* ecore_x_icccm_state_set */
|
||||
|
||||
EAPI Ecore_X_Window_State_Hint
|
||||
ecore_x_icccm_state_get(Ecore_X_Window win)
|
||||
|
@ -76,7 +75,7 @@ ecore_x_icccm_state_get(Ecore_X_Window win)
|
|||
XFree(prop_ret);
|
||||
|
||||
return hint;
|
||||
}
|
||||
} /* ecore_x_icccm_state_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t)
|
||||
|
@ -86,7 +85,7 @@ ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t)
|
|||
ECORE_X_EVENT_MASK_NONE,
|
||||
ECORE_X_ATOM_WM_DELETE_WINDOW,
|
||||
t, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_icccm_delete_window_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t)
|
||||
|
@ -96,7 +95,7 @@ ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t)
|
|||
ECORE_X_EVENT_MASK_NONE,
|
||||
ECORE_X_ATOM_WM_TAKE_FOCUS,
|
||||
t, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_icccm_take_focus_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t)
|
||||
|
@ -106,7 +105,7 @@ ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t)
|
|||
ECORE_X_EVENT_MASK_NONE,
|
||||
ECORE_X_ATOM_WM_SAVE_YOURSELF,
|
||||
t, 0, 0, 0);
|
||||
}
|
||||
} /* ecore_x_icccm_save_yourself_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
|
||||
|
@ -126,7 +125,7 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
|
|||
ev.xconfigure.above = None;
|
||||
ev.xconfigure.override_redirect = False;
|
||||
XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev);
|
||||
}
|
||||
} /* ecore_x_icccm_move_resize_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_hints_set(Ecore_X_Window win,
|
||||
|
@ -182,7 +181,7 @@ ecore_x_icccm_hints_set(Ecore_X_Window win,
|
|||
|
||||
XSetWMHints(_ecore_x_disp, win, hints);
|
||||
XFree(hints);
|
||||
}
|
||||
} /* ecore_x_icccm_hints_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_icccm_hints_get(Ecore_X_Window win,
|
||||
|
@ -258,7 +257,7 @@ ecore_x_icccm_hints_get(Ecore_X_Window win,
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_icccm_hints_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
|
||||
|
@ -325,7 +324,7 @@ ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
|
|||
}
|
||||
|
||||
XSetWMNormalHints(_ecore_x_disp, win, &hint);
|
||||
}
|
||||
} /* ecore_x_icccm_size_pos_hints_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
|
||||
|
@ -445,7 +444,7 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
|
|||
*max_aspect = maxa;
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_icccm_size_pos_hints_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_title_set(Ecore_X_Window win, const char *t)
|
||||
|
@ -464,12 +463,12 @@ ecore_x_icccm_title_set(Ecore_X_Window win, const char *t)
|
|||
ret =
|
||||
Xutf8TextListToTextProperty(_ecore_x_disp, list, 1, XUTF8StringStyle,
|
||||
&xprop);
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
list[0] = strdup(t);
|
||||
ret =
|
||||
XmbTextListToTextProperty(_ecore_x_disp, list, 1, XStdICCTextStyle,
|
||||
&xprop);
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
if (ret >= Success)
|
||||
{
|
||||
XSetWMName(_ecore_x_disp, win, &xprop);
|
||||
|
@ -484,7 +483,7 @@ ecore_x_icccm_title_set(Ecore_X_Window win, const char *t)
|
|||
}
|
||||
|
||||
free(list[0]);
|
||||
}
|
||||
} /* ecore_x_icccm_title_set */
|
||||
|
||||
EAPI char *
|
||||
ecore_x_icccm_title_get(Ecore_X_Window win)
|
||||
|
@ -506,15 +505,14 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
|
|||
t = strdup((char *)xprop.value);
|
||||
else
|
||||
{
|
||||
|
||||
/* convert to utf8 */
|
||||
#ifdef X_HAVE_UTF8_STRING
|
||||
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
|
||||
&list, &num);
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
|
||||
&list, &num);
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
|
||||
if ((ret == XLocaleNotSupported) ||
|
||||
(ret == XNoMemory) || (ret == XConverterNotFound))
|
||||
|
@ -534,7 +532,7 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
|
|||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
} /* ecore_x_icccm_title_get */
|
||||
|
||||
/**
|
||||
* Set protocol atoms explicitly
|
||||
|
@ -544,15 +542,15 @@ 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)
|
||||
XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num);
|
||||
else
|
||||
XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS);
|
||||
}
|
||||
} /* ecore_x_icccm_protocol_atoms_set */
|
||||
|
||||
/**
|
||||
* Set or unset a wm protocol property.
|
||||
|
@ -637,7 +635,7 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
|
|||
leave:
|
||||
if (protos)
|
||||
XFree(protos);
|
||||
}
|
||||
} /* ecore_x_icccm_protocol_set */
|
||||
|
||||
/**
|
||||
* Determines whether a protocol is set for a window.
|
||||
|
@ -672,8 +670,7 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
|
|||
XFree(protos);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
} /* ecore_x_icccm_protocol_isset */
|
||||
|
||||
/**
|
||||
* Set a window name & class.
|
||||
|
@ -697,7 +694,7 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *n, const char *c)
|
|||
xch->res_class = (char *)c;
|
||||
XSetClassHint(_ecore_x_disp, win, xch);
|
||||
XFree(xch);
|
||||
}
|
||||
} /* ecore_x_icccm_name_class_set */
|
||||
|
||||
/**
|
||||
* Get a window name & class.
|
||||
|
@ -734,7 +731,7 @@ ecore_x_icccm_name_class_get(Ecore_X_Window win, char **n, char **c)
|
|||
XFree(xch.res_name);
|
||||
XFree(xch.res_class);
|
||||
}
|
||||
}
|
||||
} /* ecore_x_icccm_name_class_get */
|
||||
|
||||
/**
|
||||
* Get a window client machine string.
|
||||
|
@ -751,7 +748,7 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_CLIENT_MACHINE);
|
||||
return name;
|
||||
}
|
||||
} /* ecore_x_icccm_client_machine_get */
|
||||
|
||||
/**
|
||||
* Sets the WM_COMMAND property for @a win.
|
||||
|
@ -765,7 +762,7 @@ ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XSetCommand(_ecore_x_disp, win, argv, argc);
|
||||
}
|
||||
} /* ecore_x_icccm_command_set */
|
||||
|
||||
/**
|
||||
* Get the WM_COMMAND property for @a win.
|
||||
|
@ -795,7 +792,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
|
|||
if (c < 1)
|
||||
{
|
||||
if (v)
|
||||
XFreeStringList(v);
|
||||
XFreeStringList(v);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -824,8 +821,8 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
|
|||
}
|
||||
}
|
||||
|
||||
XFreeStringList(v);
|
||||
}
|
||||
XFreeStringList(v);
|
||||
} /* ecore_x_icccm_command_get */
|
||||
|
||||
/**
|
||||
* Set a window icon name.
|
||||
|
@ -847,11 +844,11 @@ ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t)
|
|||
list[0] = strdup(t);
|
||||
ret = Xutf8TextListToTextProperty(_ecore_x_disp, list, 1,
|
||||
XUTF8StringStyle, &xprop);
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
list[0] = strdup(t);
|
||||
ret = XmbTextListToTextProperty(_ecore_x_disp, list, 1,
|
||||
XStdICCTextStyle, &xprop);
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
if (ret >= Success)
|
||||
{
|
||||
XSetWMIconName(_ecore_x_disp, win, &xprop);
|
||||
|
@ -866,7 +863,7 @@ ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t)
|
|||
}
|
||||
|
||||
free(list[0]);
|
||||
}
|
||||
} /* ecore_x_icccm_icon_name_set */
|
||||
|
||||
/**
|
||||
* Get a window icon name.
|
||||
|
@ -895,15 +892,14 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
|
|||
t = strdup((char *)xprop.value);
|
||||
else
|
||||
{
|
||||
|
||||
/* convert to utf8 */
|
||||
#ifdef X_HAVE_UTF8_STRING
|
||||
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
|
||||
&list, &num);
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
|
||||
&list, &num);
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
|
||||
if ((ret == XLocaleNotSupported) ||
|
||||
(ret == XNoMemory) || (ret == XConverterNotFound))
|
||||
|
@ -926,7 +922,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
|
|||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
} /* ecore_x_icccm_icon_name_get */
|
||||
|
||||
/**
|
||||
* Add a subwindow to the list of windows that need a different colormap installed.
|
||||
|
@ -988,7 +984,7 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
|
|||
ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
|
||||
XA_WINDOW, 32, data, num);
|
||||
free(newset);
|
||||
}
|
||||
} /* ecore_x_icccm_colormap_window_set */
|
||||
|
||||
/**
|
||||
* Remove a window from the list of colormap windows.
|
||||
|
@ -1052,7 +1048,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
|
|||
|
||||
if (old_data)
|
||||
XFree(old_data);
|
||||
}
|
||||
} /* ecore_x_icccm_colormap_window_unset */
|
||||
|
||||
/**
|
||||
* Specify that a window is transient for another top-level window and should be handled accordingly.
|
||||
|
@ -1064,7 +1060,7 @@ ecore_x_icccm_transient_for_set(Ecore_X_Window win, Ecore_X_Window forwin)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XSetTransientForHint(_ecore_x_disp, win, forwin);
|
||||
}
|
||||
} /* ecore_x_icccm_transient_for_set */
|
||||
|
||||
/**
|
||||
* Remove the transient_for setting from a window.
|
||||
|
@ -1075,7 +1071,7 @@ ecore_x_icccm_transient_for_unset(Ecore_X_Window win)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_TRANSIENT_FOR);
|
||||
}
|
||||
} /* ecore_x_icccm_transient_for_unset */
|
||||
|
||||
/**
|
||||
* Get the window this window is transient for, if any.
|
||||
|
@ -1092,7 +1088,7 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win)
|
|||
return (Ecore_X_Window)forwin;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_icccm_transient_for_get */
|
||||
|
||||
/**
|
||||
* Set the window role hint.
|
||||
|
@ -1105,7 +1101,7 @@ ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE,
|
||||
(char *)role);
|
||||
}
|
||||
} /* ecore_x_icccm_window_role_set */
|
||||
|
||||
/**
|
||||
* Get the window role.
|
||||
|
@ -1117,7 +1113,7 @@ ecore_x_icccm_window_role_get(Ecore_X_Window win)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_WINDOW_ROLE);
|
||||
}
|
||||
} /* ecore_x_icccm_window_role_get */
|
||||
|
||||
/**
|
||||
* Set the window's client leader.
|
||||
|
@ -1133,7 +1129,7 @@ ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window l)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
|
||||
&l, 1);
|
||||
}
|
||||
} /* ecore_x_icccm_client_leader_set */
|
||||
|
||||
/**
|
||||
* Get the window's client leader.
|
||||
|
@ -1150,7 +1146,7 @@ ecore_x_icccm_client_leader_get(Ecore_X_Window win)
|
|||
return l;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_icccm_client_leader_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root)
|
||||
|
@ -1175,7 +1171,7 @@ ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root)
|
|||
|
||||
XSendEvent(_ecore_x_disp, root, False,
|
||||
SubstructureNotifyMask | SubstructureRedirectMask, &xev);
|
||||
}
|
||||
} /* ecore_x_icccm_iconic_request_send */
|
||||
|
||||
/* FIXME: there are older E hints, gnome hints and mwm hints and new netwm */
|
||||
/* hints. each should go in their own file/section so we know which */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
#include "Ecore_X.h"
|
||||
|
@ -22,7 +22,7 @@ static void
|
|||
_ecore_x_image_error_handler(Display *d __UNUSED__, XErrorEvent *ev __UNUSED__)
|
||||
{
|
||||
_ecore_x_image_err = 1;
|
||||
}
|
||||
} /* _ecore_x_image_error_handler */
|
||||
|
||||
static void
|
||||
_ecore_x_image_shm_check(void)
|
||||
|
@ -92,18 +92,18 @@ _ecore_x_image_shm_check(void)
|
|||
shmctl(shminfo.shmid, IPC_RMID, 0);
|
||||
|
||||
_ecore_x_image_shm_can = 1;
|
||||
}
|
||||
} /* _ecore_x_image_shm_check */
|
||||
|
||||
struct _Ecore_X_Image
|
||||
{
|
||||
XShmSegmentInfo shminfo;
|
||||
Ecore_X_Visual vis;
|
||||
XImage *xim;
|
||||
int depth;
|
||||
int w, h;
|
||||
int bpl, bpp, rows;
|
||||
unsigned char *data;
|
||||
Eina_Bool shm : 1;
|
||||
Ecore_X_Visual vis;
|
||||
XImage *xim;
|
||||
int depth;
|
||||
int w, h;
|
||||
int bpl, bpp, rows;
|
||||
unsigned char *data;
|
||||
Eina_Bool shm : 1;
|
||||
};
|
||||
|
||||
EAPI Ecore_X_Image *
|
||||
|
@ -123,7 +123,7 @@ ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth)
|
|||
_ecore_x_image_shm_check();
|
||||
im->shm = _ecore_x_image_shm_can;
|
||||
return im;
|
||||
}
|
||||
} /* ecore_x_image_new */
|
||||
|
||||
EAPI void
|
||||
ecore_x_image_free(Ecore_X_Image *im)
|
||||
|
@ -147,7 +147,7 @@ ecore_x_image_free(Ecore_X_Image *im)
|
|||
}
|
||||
|
||||
free(im);
|
||||
}
|
||||
} /* ecore_x_image_free */
|
||||
|
||||
static void
|
||||
_ecore_x_image_shm_create(Ecore_X_Image *im)
|
||||
|
@ -191,7 +191,7 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
|
|||
im->bpp = 2;
|
||||
else
|
||||
im->bpp = 4;
|
||||
}
|
||||
} /* _ecore_x_image_shm_create */
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
|
||||
|
@ -270,21 +270,21 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
|
|||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
} /* ecore_x_image_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_image_put(Ecore_X_Image *im __UNUSED__,
|
||||
ecore_x_image_put(Ecore_X_Image *im __UNUSED__,
|
||||
Ecore_X_Drawable draw __UNUSED__,
|
||||
int x __UNUSED__,
|
||||
int y __UNUSED__,
|
||||
int sx __UNUSED__,
|
||||
int sy __UNUSED__,
|
||||
int w __UNUSED__,
|
||||
int h __UNUSED__)
|
||||
int x __UNUSED__,
|
||||
int y __UNUSED__,
|
||||
int sx __UNUSED__,
|
||||
int sy __UNUSED__,
|
||||
int w __UNUSED__,
|
||||
int h __UNUSED__)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
printf("ecore_x_image_put: unimplemented!\n");
|
||||
}
|
||||
} /* ecore_x_image_put */
|
||||
|
||||
EAPI void *
|
||||
ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp)
|
||||
|
@ -306,4 +306,5 @@ ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp)
|
|||
*bpp = im->bpp;
|
||||
|
||||
return im->data;
|
||||
}
|
||||
} /* ecore_x_image_data_get */
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -20,24 +20,24 @@
|
|||
#include "Ecore_X.h"
|
||||
#include "Ecore_X_Atoms.h"
|
||||
|
||||
#define ECORE_X_MWM_HINTS_FUNCTIONS (1 << 0)
|
||||
#define ECORE_X_MWM_HINTS_DECORATIONS (1 << 1)
|
||||
#define ECORE_X_MWM_HINTS_INPUT_MODE (1 << 2)
|
||||
#define ECORE_X_MWM_HINTS_STATUS (1 << 3)
|
||||
#define ECORE_X_MWM_HINTS_FUNCTIONS (1 << 0)
|
||||
#define ECORE_X_MWM_HINTS_DECORATIONS (1 << 1)
|
||||
#define ECORE_X_MWM_HINTS_INPUT_MODE (1 << 2)
|
||||
#define ECORE_X_MWM_HINTS_STATUS (1 << 3)
|
||||
|
||||
typedef struct _mwmhints
|
||||
{
|
||||
CARD32 flags;
|
||||
CARD32 functions;
|
||||
CARD32 decorations;
|
||||
INT32 inputmode;
|
||||
INT32 inputmode;
|
||||
CARD32 status;
|
||||
}
|
||||
MWMHints;
|
||||
|
||||
EAPI int
|
||||
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,
|
|||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
} /* ecore_x_mwm_hints_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_mwm_borderless_set(Ecore_X_Window win, int borderless)
|
||||
|
@ -105,5 +105,5 @@ ecore_x_mwm_borderless_set(Ecore_X_Window win, int borderless)
|
|||
ECORE_X_ATOM_MOTIF_WM_HINTS,
|
||||
ECORE_X_ATOM_MOTIF_WM_HINTS,
|
||||
32, (void *)data, 5);
|
||||
}
|
||||
} /* ecore_x_mwm_borderless_set */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -17,55 +17,55 @@
|
|||
#include "ecore_x_private.h"
|
||||
#include "Ecore_X.h"
|
||||
|
||||
typedef struct _Ecore_X_Startup_Info Ecore_X_Startup_Info;
|
||||
typedef struct _Ecore_X_Startup_Info Ecore_X_Startup_Info;
|
||||
|
||||
struct _Ecore_X_Startup_Info
|
||||
{
|
||||
Ecore_X_Window win;
|
||||
|
||||
int init;
|
||||
int init;
|
||||
|
||||
int buffer_size;
|
||||
char *buffer;
|
||||
int buffer_size;
|
||||
char *buffer;
|
||||
|
||||
int length;
|
||||
int length;
|
||||
|
||||
/* These are the sequence info fields */
|
||||
char *id;
|
||||
char *name;
|
||||
int screen;
|
||||
char *bin;
|
||||
char *icon;
|
||||
int desktop;
|
||||
int timestamp;
|
||||
char *description;
|
||||
char *wmclass;
|
||||
int silent;
|
||||
char *id;
|
||||
char *name;
|
||||
int screen;
|
||||
char *bin;
|
||||
char *icon;
|
||||
int desktop;
|
||||
int timestamp;
|
||||
char *description;
|
||||
char *wmclass;
|
||||
int silent;
|
||||
};
|
||||
|
||||
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);
|
||||
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);
|
||||
#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);
|
||||
#endif
|
||||
static void _ecore_x_netwm_startup_info_free(void *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);
|
||||
|
||||
/*
|
||||
* Convenience macros
|
||||
*/
|
||||
#define _ATOM_SET_UTF8_STRING_LIST(win, atom, string, cnt) \
|
||||
XChangeProperty(_ecore_x_disp, \
|
||||
win, \
|
||||
atom, \
|
||||
ECORE_X_ATOM_UTF8_STRING, \
|
||||
8, \
|
||||
PropModeReplace, \
|
||||
(unsigned char *)string, \
|
||||
#define _ATOM_SET_UTF8_STRING_LIST(win, atom, string, cnt)\
|
||||
XChangeProperty(_ecore_x_disp,\
|
||||
win,\
|
||||
atom,\
|
||||
ECORE_X_ATOM_UTF8_STRING,\
|
||||
8,\
|
||||
PropModeReplace,\
|
||||
(unsigned char *)string,\
|
||||
cnt)
|
||||
|
||||
/*
|
||||
|
@ -77,20 +77,20 @@ static Eina_Hash *startup_info = NULL;
|
|||
EAPI void
|
||||
ecore_x_netwm_init(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
startup_info = eina_hash_string_superfast_new(
|
||||
_ecore_x_netwm_startup_info_free);
|
||||
}
|
||||
} /* ecore_x_netwm_init */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_shutdown(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (startup_info)
|
||||
eina_hash_free(startup_info);
|
||||
|
||||
startup_info = NULL;
|
||||
}
|
||||
} /* ecore_x_netwm_shutdown */
|
||||
|
||||
/*
|
||||
* WM identification
|
||||
|
@ -115,27 +115,27 @@ ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check,
|
|||
_ecore_x_window_prop_string_utf8_set(root,
|
||||
ECORE_X_ATOM_NET_WM_NAME,
|
||||
wm_name);
|
||||
}
|
||||
} /* ecore_x_netwm_wm_identify */
|
||||
|
||||
/*
|
||||
* Set supported atoms
|
||||
*/
|
||||
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,
|
||||
ECORE_X_ATOM_NET_SUPPORTED,
|
||||
supported,
|
||||
num);
|
||||
}
|
||||
} /* ecore_x_netwm_supported_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_supported_get(Ecore_X_Window root,
|
||||
Ecore_X_Atom **supported,
|
||||
int *num)
|
||||
int *num)
|
||||
{
|
||||
int num_ret;
|
||||
|
||||
|
@ -155,7 +155,7 @@ ecore_x_netwm_supported_get(Ecore_X_Window root,
|
|||
*num = num_ret;
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_supported_get */
|
||||
|
||||
/*
|
||||
* Desktop configuration and status
|
||||
|
@ -166,7 +166,7 @@ ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS,
|
||||
&n_desks, 1);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_count_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
|
||||
|
@ -177,7 +177,7 @@ ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
|
|||
ECORE_X_ATOM_NET_VIRTUAL_ROOTS,
|
||||
vroots,
|
||||
n_desks);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_roots_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desk_names_set(Ecore_X_Window root,
|
||||
|
@ -211,7 +211,7 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root,
|
|||
_ATOM_SET_UTF8_STRING_LIST(root, ECORE_X_ATOM_NET_DESKTOP_NAMES, buf, len);
|
||||
|
||||
free(buf);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_names_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width,
|
||||
|
@ -224,7 +224,7 @@ ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width,
|
|||
size[1] = height;
|
||||
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, size,
|
||||
2);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_size_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
|
||||
|
@ -233,7 +233,7 @@ ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT,
|
||||
origins, 2 * n_desks);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_viewports_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation,
|
||||
|
@ -249,7 +249,7 @@ ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation,
|
|||
layout[3] = starting_corner;
|
||||
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT,
|
||||
layout, 4);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_layout_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
|
||||
|
@ -258,7 +258,7 @@ ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas,
|
||||
4 * n_desks);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_workareas_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk)
|
||||
|
@ -266,7 +266,7 @@ ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk,
|
||||
1);
|
||||
}
|
||||
} /* ecore_x_netwm_desk_current_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on)
|
||||
|
@ -277,7 +277,7 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on)
|
|||
val = (on) ? 1 : 0;
|
||||
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val,
|
||||
1);
|
||||
}
|
||||
} /* ecore_x_netwm_showing_desktop_set */
|
||||
|
||||
/*
|
||||
* Client status
|
||||
|
@ -291,18 +291,18 @@ ecore_x_netwm_client_list_set(Ecore_X_Window root,
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST,
|
||||
p_clients, n_clients);
|
||||
}
|
||||
} /* ecore_x_netwm_client_list_set */
|
||||
|
||||
/* 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,
|
||||
p_clients, n_clients);
|
||||
}
|
||||
} /* ecore_x_netwm_client_list_stacking_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
|
||||
|
@ -310,12 +310,12 @@ ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW,
|
||||
&win, 1);
|
||||
}
|
||||
} /* ecore_x_netwm_client_active_set */
|
||||
|
||||
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;
|
||||
|
@ -337,14 +337,14 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root,
|
|||
|
||||
XSendEvent(_ecore_x_disp, root, False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
|
||||
}
|
||||
} /* ecore_x_netwm_client_active_request */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_name_set(Ecore_X_Window win, const char *name)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name);
|
||||
}
|
||||
} /* ecore_x_netwm_name_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_name_get(Ecore_X_Window win, char **name)
|
||||
|
@ -355,14 +355,14 @@ ecore_x_netwm_name_get(Ecore_X_Window win, char **name)
|
|||
ECORE_X_ATOM_NET_WM_NAME);
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_name_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_startup_id_set(Ecore_X_Window win, const char *id)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id);
|
||||
}
|
||||
} /* ecore_x_netwm_startup_id_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id)
|
||||
|
@ -373,7 +373,7 @@ ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id)
|
|||
ECORE_X_ATOM_NET_STARTUP_ID);
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_startup_id_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name)
|
||||
|
@ -381,7 +381,7 @@ ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME,
|
||||
name);
|
||||
}
|
||||
} /* ecore_x_netwm_visible_name_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name)
|
||||
|
@ -393,7 +393,7 @@ ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name)
|
|||
ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_visible_name_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name)
|
||||
|
@ -401,7 +401,7 @@ ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME,
|
||||
name);
|
||||
}
|
||||
} /* ecore_x_netwm_icon_name_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name)
|
||||
|
@ -413,7 +413,7 @@ ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name)
|
|||
ECORE_X_ATOM_NET_WM_ICON_NAME);
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_icon_name_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name)
|
||||
|
@ -422,7 +422,7 @@ ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name)
|
|||
_ecore_x_window_prop_string_utf8_set(win,
|
||||
ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME,
|
||||
name);
|
||||
}
|
||||
} /* ecore_x_netwm_visible_icon_name_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name)
|
||||
|
@ -434,14 +434,14 @@ ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name)
|
|||
ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_visible_icon_name_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1);
|
||||
}
|
||||
} /* ecore_x_netwm_desktop_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
|
||||
|
@ -457,7 +457,7 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
|
|||
*desk = tmp;
|
||||
|
||||
return ret == 1 ? 1 : 0;
|
||||
}
|
||||
} /* ecore_x_netwm_desktop_get */
|
||||
|
||||
/*
|
||||
* _NET_WM_STRUT is deprecated
|
||||
|
@ -474,7 +474,7 @@ ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right,
|
|||
strut[2] = top;
|
||||
strut[3] = bottom;
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4);
|
||||
}
|
||||
} /* ecore_x_netwm_strut_set */
|
||||
|
||||
/*
|
||||
* _NET_WM_STRUT is deprecated
|
||||
|
@ -507,22 +507,22 @@ ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right,
|
|||
*bottom = strut[3];
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_strut_get */
|
||||
|
||||
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];
|
||||
|
||||
|
@ -543,22 +543,22 @@ ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
|
|||
ECORE_X_ATOM_NET_WM_STRUT_PARTIAL,
|
||||
strut,
|
||||
12);
|
||||
}
|
||||
} /* ecore_x_netwm_strut_partial_set */
|
||||
|
||||
EAPI int
|
||||
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];
|
||||
|
@ -608,7 +608,7 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
|
|||
*bottom_end_x = strut[11];
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_strut_partial_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
|
||||
|
@ -635,7 +635,7 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
|
|||
|
||||
if (num_ret < 2)
|
||||
{
|
||||
free(data);
|
||||
free(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -648,7 +648,7 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
|
|||
p += (len + 2);
|
||||
if ((p - data) > num_ret)
|
||||
{
|
||||
free(data);
|
||||
free(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
|
|||
/* If the user doesn't want the icons, return */
|
||||
if (!icon)
|
||||
{
|
||||
free(data);
|
||||
free(data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -671,7 +671,7 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
|
|||
*icon = malloc(icons * sizeof(Ecore_X_Icon));
|
||||
if (!(*icon))
|
||||
{
|
||||
free(data);
|
||||
free(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -690,8 +690,8 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
|
|||
{
|
||||
while (i)
|
||||
free(((*icon)[--i]).data);
|
||||
free(*icon);
|
||||
free(data);
|
||||
free(*icon);
|
||||
free(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -712,17 +712,17 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
|
|||
p += (len + 2);
|
||||
}
|
||||
|
||||
free(data);
|
||||
free(data);
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_icons_get */
|
||||
|
||||
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];
|
||||
|
||||
|
@ -735,14 +735,14 @@ ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
|
|||
ECORE_X_ATOM_NET_WM_ICON_GEOMETRY,
|
||||
geometry,
|
||||
4);
|
||||
}
|
||||
} /* ecore_x_netwm_icon_geometry_set */
|
||||
|
||||
EAPI int
|
||||
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];
|
||||
|
@ -768,7 +768,7 @@ ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
|
|||
*height = geometry[3];
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_icon_geometry_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_pid_set(Ecore_X_Window win, int pid)
|
||||
|
@ -779,7 +779,7 @@ ecore_x_netwm_pid_set(Ecore_X_Window win, int pid)
|
|||
tmp = pid;
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID,
|
||||
&tmp, 1);
|
||||
}
|
||||
} /* ecore_x_netwm_pid_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid)
|
||||
|
@ -794,7 +794,7 @@ ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid)
|
|||
*pid = tmp;
|
||||
|
||||
return ret == 1 ? 1 : 0;
|
||||
}
|
||||
} /* ecore_x_netwm_pid_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_handled_icons_set(Ecore_X_Window win)
|
||||
|
@ -802,7 +802,7 @@ ecore_x_netwm_handled_icons_set(Ecore_X_Window win)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
|
||||
NULL, 0);
|
||||
}
|
||||
} /* ecore_x_netwm_handled_icons_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_handled_icons_get(Ecore_X_Window win)
|
||||
|
@ -812,7 +812,7 @@ ecore_x_netwm_handled_icons_get(Ecore_X_Window win)
|
|||
ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
|
||||
NULL, 0);
|
||||
return ret == 0 ? 1 : 0;
|
||||
}
|
||||
} /* ecore_x_netwm_handled_icons_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int time)
|
||||
|
@ -820,7 +820,7 @@ ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int time)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME,
|
||||
&time, 1);
|
||||
}
|
||||
} /* ecore_x_netwm_user_time_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time)
|
||||
|
@ -828,14 +828,14 @@ ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time)
|
|||
int ret;
|
||||
unsigned int tmp;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_USER_TIME,
|
||||
&tmp, 1);
|
||||
if (time)
|
||||
*time = tmp;
|
||||
|
||||
return ret == 1 ? 1 : 0;
|
||||
}
|
||||
} /* ecore_x_netwm_user_time_get */
|
||||
|
||||
Ecore_X_Window_State
|
||||
_ecore_x_netwm_state_get(Ecore_X_Atom a)
|
||||
|
@ -866,7 +866,7 @@ _ecore_x_netwm_state_get(Ecore_X_Atom a)
|
|||
return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
|
||||
else
|
||||
return ECORE_X_WINDOW_STATE_UNKNOWN;
|
||||
}
|
||||
} /* _ecore_x_netwm_state_get */
|
||||
|
||||
static Ecore_X_Atom
|
||||
_ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
|
||||
|
@ -911,18 +911,18 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
|
|||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} /* switch */
|
||||
} /* _ecore_x_netwm_state_atom_get */
|
||||
|
||||
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;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (!num)
|
||||
{
|
||||
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_NET_WM_STATE);
|
||||
|
@ -939,12 +939,12 @@ ecore_x_netwm_window_state_set(Ecore_X_Window win,
|
|||
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num);
|
||||
|
||||
free(set);
|
||||
}
|
||||
} /* ecore_x_netwm_window_state_set */
|
||||
|
||||
EAPI int
|
||||
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;
|
||||
|
@ -974,7 +974,7 @@ ecore_x_netwm_window_state_get(Ecore_X_Window win,
|
|||
|
||||
free(atoms);
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_window_state_get */
|
||||
|
||||
static Ecore_X_Window_Type
|
||||
_ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom)
|
||||
|
@ -1009,7 +1009,7 @@ _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom)
|
|||
return ECORE_X_WINDOW_TYPE_DND;
|
||||
else
|
||||
return ECORE_X_WINDOW_TYPE_UNKNOWN;
|
||||
}
|
||||
} /* _ecore_x_netwm_window_type_type_get */
|
||||
|
||||
static Ecore_X_Atom
|
||||
_ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type)
|
||||
|
@ -1060,8 +1060,8 @@ _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type)
|
|||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} /* switch */
|
||||
} /* _ecore_x_netwm_window_type_atom_get */
|
||||
|
||||
/*
|
||||
* FIXME: We should set WM_TRANSIENT_FOR if type is ECORE_X_WINDOW_TYPE_TOOLBAR
|
||||
|
@ -1076,7 +1076,7 @@ ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type)
|
|||
atom = _ecore_x_netwm_window_type_atom_get(type);
|
||||
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
|
||||
&atom, 1);
|
||||
}
|
||||
} /* ecore_x_netwm_window_type_set */
|
||||
|
||||
/* FIXME: Maybe return 0 on some conditions? */
|
||||
EAPI int
|
||||
|
@ -1100,7 +1100,7 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type)
|
|||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_netwm_window_type_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
|
||||
|
@ -1130,14 +1130,14 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
|
|||
|
||||
for (i = 0; i < num; i++)
|
||||
atoms2[i] = _ecore_x_netwm_window_type_type_get(atoms[i]);
|
||||
free(atoms);
|
||||
free(atoms);
|
||||
if (types)
|
||||
*types = atoms2;
|
||||
else
|
||||
free(atoms2);
|
||||
free(atoms2);
|
||||
|
||||
return num;
|
||||
}
|
||||
} /* ecore_x_netwm_window_types_get */
|
||||
|
||||
static Ecore_X_Atom
|
||||
_ecore_x_netwm_action_atom_get(Ecore_X_Action action)
|
||||
|
@ -1182,8 +1182,8 @@ _ecore_x_netwm_action_atom_get(Ecore_X_Action action)
|
|||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} /* switch */
|
||||
} /* _ecore_x_netwm_action_atom_get */
|
||||
|
||||
/* FIXME: Get complete list */
|
||||
EAPI int
|
||||
|
@ -1211,13 +1211,13 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
|
|||
|
||||
free(atoms);
|
||||
return ret;
|
||||
}
|
||||
} /* ecore_x_netwm_allowed_action_isset */
|
||||
|
||||
/* 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;
|
||||
|
@ -1243,12 +1243,12 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
|
|||
num);
|
||||
|
||||
free(set);
|
||||
}
|
||||
} /* ecore_x_netwm_allowed_action_set */
|
||||
|
||||
EAPI int
|
||||
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;
|
||||
|
@ -1280,7 +1280,7 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
|
|||
|
||||
free(atoms);
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_allowed_action_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity)
|
||||
|
@ -1288,7 +1288,7 @@ ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
|
||||
&opacity, 1);
|
||||
}
|
||||
} /* ecore_x_netwm_opacity_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
|
||||
|
@ -1303,7 +1303,7 @@ ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
|
|||
*opacity = tmp;
|
||||
|
||||
return ret == 1 ? 1 : 0;
|
||||
}
|
||||
} /* ecore_x_netwm_opacity_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
|
||||
|
@ -1319,14 +1319,14 @@ ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
|
|||
ECORE_X_ATOM_NET_FRAME_EXTENTS,
|
||||
frames,
|
||||
4);
|
||||
}
|
||||
} /* ecore_x_netwm_frame_size_set */
|
||||
|
||||
EAPI int
|
||||
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];
|
||||
|
@ -1352,10 +1352,10 @@ ecore_x_netwm_frame_size_get(Ecore_X_Window win,
|
|||
*fb = frames[3];
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* ecore_x_netwm_frame_size_get */
|
||||
|
||||
EAPI int
|
||||
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;
|
||||
|
@ -1372,7 +1372,7 @@ ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
|
|||
*counter = tmp;
|
||||
|
||||
return ret == 1 ? 1 : 0;
|
||||
}
|
||||
} /* ecore_x_netwm_sync_counter_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_ping_send(Ecore_X_Window win)
|
||||
|
@ -1395,7 +1395,7 @@ ecore_x_netwm_ping_send(Ecore_X_Window win)
|
|||
xev.xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
|
||||
}
|
||||
} /* ecore_x_netwm_ping_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
|
||||
|
@ -1421,14 +1421,14 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
|
|||
xev.xclient.data.l[4] = 0;
|
||||
|
||||
XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
|
||||
}
|
||||
} /* ecore_x_netwm_sync_request_send */
|
||||
|
||||
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,
|
||||
int set)
|
||||
int set)
|
||||
{
|
||||
XEvent xev;
|
||||
|
||||
|
@ -1456,12 +1456,12 @@ ecore_x_netwm_state_request_send(Ecore_X_Window win,
|
|||
|
||||
XSendEvent(_ecore_x_disp, root, False,
|
||||
SubstructureNotifyMask | SubstructureRedirectMask, &xev);
|
||||
}
|
||||
} /* ecore_x_netwm_state_request_send */
|
||||
|
||||
EAPI void
|
||||
ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
|
||||
Ecore_X_Window root,
|
||||
unsigned int desktop)
|
||||
unsigned int desktop)
|
||||
{
|
||||
XEvent xev;
|
||||
|
||||
|
@ -1483,11 +1483,11 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
|
|||
|
||||
XSendEvent(_ecore_x_disp, root, False,
|
||||
SubstructureNotifyMask | SubstructureRedirectMask, &xev);
|
||||
}
|
||||
} /* ecore_x_netwm_desktop_request_send */
|
||||
|
||||
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;
|
||||
|
@ -1530,13 +1530,13 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
|
|||
/* We have a '\0' in there, the message is done */
|
||||
_ecore_x_netwm_startup_info_process(info);
|
||||
|
||||
#endif
|
||||
#endif /* if 0 */
|
||||
return 1;
|
||||
}
|
||||
} /* _ecore_x_netwm_startup_info_begin */
|
||||
|
||||
int
|
||||
_ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
|
||||
char *data __UNUSED__)
|
||||
char *data __UNUSED__)
|
||||
{
|
||||
#if 0
|
||||
Ecore_X_Startup_Info *info;
|
||||
|
@ -1569,9 +1569,9 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
|
|||
/* We have a '\0' in there, the message is done */
|
||||
_ecore_x_netwm_startup_info_process(info);
|
||||
|
||||
#endif
|
||||
#endif /* if 0 */
|
||||
return 1;
|
||||
}
|
||||
} /* _ecore_x_netwm_startup_info */
|
||||
|
||||
/*
|
||||
* Set UTF-8 string property
|
||||
|
@ -1582,7 +1582,7 @@ _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8,
|
||||
PropModeReplace, (unsigned char *)str, strlen(str));
|
||||
}
|
||||
} /* _ecore_x_window_prop_string_utf8_set */
|
||||
|
||||
/*
|
||||
* Get UTF-8 string property
|
||||
|
@ -1615,7 +1615,7 @@ _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, Ecore_X_Atom atom)
|
|||
XFree(prop_ret);
|
||||
|
||||
return str;
|
||||
}
|
||||
} /* _ecore_x_window_prop_string_utf8_get */
|
||||
|
||||
#if 0 /* Unused */
|
||||
/*
|
||||
|
@ -1693,7 +1693,7 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
|
|||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* _ecore_x_netwm_startup_info_process */
|
||||
|
||||
/*
|
||||
* Parse startup info
|
||||
|
@ -1849,8 +1849,9 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
|
|||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
} /* _ecore_x_netwm_startup_info_parse */
|
||||
|
||||
#endif /* if 0 */
|
||||
|
||||
/*
|
||||
* Free startup info struct
|
||||
|
@ -1885,8 +1886,8 @@ _ecore_x_netwm_startup_info_free(void *data)
|
|||
if (info->wmclass)
|
||||
free(info->wmclass);
|
||||
|
||||
free(info);
|
||||
}
|
||||
free(info);
|
||||
} /* _ecore_x_netwm_startup_info_free */
|
||||
|
||||
/*
|
||||
* Is screen composited?
|
||||
|
@ -1909,7 +1910,7 @@ ecore_x_screen_is_composited(int screen)
|
|||
win = XGetSelectionOwner(_ecore_x_disp, atom);
|
||||
|
||||
return win != None;
|
||||
}
|
||||
} /* ecore_x_screen_is_composited */
|
||||
|
||||
EAPI void
|
||||
ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
|
||||
|
@ -1926,4 +1927,5 @@ ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
|
|||
return;
|
||||
|
||||
XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time);
|
||||
}
|
||||
} /* ecore_x_screen_is_composited_set */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_x_private.h"
|
||||
|
@ -39,7 +39,7 @@ ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
|
|||
dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
|
||||
|
||||
return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
|
||||
}
|
||||
} /* ecore_x_pixmap_new */
|
||||
|
||||
/**
|
||||
* Deletes the reference to the given pixmap.
|
||||
|
@ -55,7 +55,7 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XFreePixmap(_ecore_x_disp, pmap);
|
||||
}
|
||||
} /* ecore_x_pixmap_free */
|
||||
|
||||
/**
|
||||
* Pastes a rectangular area of the given pixmap onto the given drawable.
|
||||
|
@ -78,7 +78,7 @@ ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
|
||||
}
|
||||
} /* ecore_x_pixmap_paste */
|
||||
|
||||
/**
|
||||
* Retrieves the size of the given pixmap.
|
||||
|
@ -95,7 +95,7 @@ ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (pmap)
|
||||
ecore_x_drawable_geometry_get(pmap, x, y, w, h);
|
||||
}
|
||||
} /* ecore_x_pixmap_geometry_get */
|
||||
|
||||
/**
|
||||
* Retrieves the depth of the given pixmap.
|
||||
|
@ -108,5 +108,5 @@ ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ecore_x_drawable_depth_get(pmap);
|
||||
}
|
||||
} /* ecore_x_pixmap_depth_get */
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#include <sys/param.h>
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 256
|
||||
#endif
|
||||
#endif /* ifndef MAXHOSTNAMELEN */
|
||||
|
||||
#define XK_MISCELLANY 1
|
||||
#define XK_MISCELLANY 1
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
@ -19,40 +19,40 @@
|
|||
#include <X11/extensions/dpms.h>
|
||||
#ifdef ECORE_XCURSOR
|
||||
#include <X11/Xcursor/Xcursor.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XCURSOR */
|
||||
#ifdef ECORE_XPRINT
|
||||
#include <X11/extensions/Print.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XPRINT */
|
||||
#ifdef ECORE_XINERAMA
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XINERAMA */
|
||||
#ifdef ECORE_XRANDR
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
#ifdef ECORE_XSS
|
||||
#include <X11/extensions/scrnsaver.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XSS */
|
||||
#ifdef ECORE_XRENDER
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRENDER */
|
||||
#ifdef ECORE_XFIXES
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
#ifdef ECORE_XCOMPOSITE
|
||||
#include <X11/extensions/Xcomposite.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XCOMPOSITE */
|
||||
#ifdef ECORE_XDAMAGE
|
||||
#include <X11/extensions/Xdamage.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
#ifdef ECORE_XDPMS
|
||||
#include <X11/extensions/dpms.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XDPMS */
|
||||
#ifdef ECORE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XKB */
|
||||
#ifdef ECORE_XI2
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_private.h"
|
||||
|
@ -62,68 +62,68 @@
|
|||
extern int _ecore_xlib_log_dom;
|
||||
#ifdef ECORE_XLIB_DEFAULT_LOG_COLOR
|
||||
# undef ECORE_XLIB_DEFAULT_LOG_COLOR
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XLIB_DEFAULT_LOG_COLOR */
|
||||
#define ECORE_XLIB_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
|
||||
|
||||
#ifdef ERR
|
||||
# undef ERR
|
||||
#endif
|
||||
#endif /* ifdef ERR */
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_ecore_xlib_log_dom, __VA_ARGS__)
|
||||
|
||||
#ifdef DBG
|
||||
# undef DBG
|
||||
#endif
|
||||
#endif /* ifdef DBG */
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_ecore_xlib_log_dom, __VA_ARGS__)
|
||||
|
||||
#ifdef INF
|
||||
# undef INF
|
||||
#endif
|
||||
#endif /* ifdef INF */
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_ecore_xlib_log_dom, __VA_ARGS__)
|
||||
|
||||
#ifdef WRN
|
||||
# undef WRN
|
||||
#endif
|
||||
#endif /* ifdef WRN */
|
||||
#define WRN(...) EINA_LOG_DOM_WARN(_ecore_xlib_log_dom, __VA_ARGS__)
|
||||
|
||||
#ifdef CRIT
|
||||
# undef CRIT
|
||||
#endif
|
||||
#endif /* ifdef CRIT */
|
||||
#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_xlib_log_dom, __VA_ARGS__)
|
||||
|
||||
typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
|
||||
typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
|
||||
|
||||
struct _Ecore_X_Selection_Intern
|
||||
{
|
||||
Ecore_X_Window win;
|
||||
Ecore_X_Atom selection;
|
||||
Ecore_X_Atom selection;
|
||||
unsigned char *data;
|
||||
int length;
|
||||
Time time;
|
||||
int length;
|
||||
Time time;
|
||||
};
|
||||
|
||||
typedef struct _Ecore_X_Selection_Converter Ecore_X_Selection_Converter;
|
||||
typedef struct _Ecore_X_Selection_Converter Ecore_X_Selection_Converter;
|
||||
|
||||
struct _Ecore_X_Selection_Converter
|
||||
{
|
||||
Ecore_X_Atom target;
|
||||
int (*convert)(char *target, void *data, int size,
|
||||
void **data_ret, int *size_ret,
|
||||
Ecore_X_Atom *type, int *typeseize);
|
||||
Ecore_X_Atom target;
|
||||
int (*convert)(char *target, void *data, int size,
|
||||
void **data_ret, int *size_ret,
|
||||
Ecore_X_Atom *type, int *typeseize);
|
||||
Ecore_X_Selection_Converter *next;
|
||||
};
|
||||
|
||||
typedef struct _Ecore_X_Selection_Parser Ecore_X_Selection_Parser;
|
||||
typedef struct _Ecore_X_Selection_Parser Ecore_X_Selection_Parser;
|
||||
|
||||
struct _Ecore_X_Selection_Parser
|
||||
{
|
||||
char *target;
|
||||
void *(*parse)(const char *target, void *data, int size, int format);
|
||||
char *target;
|
||||
void *(*parse)(const char *target, void *data, int size, int format);
|
||||
Ecore_X_Selection_Parser *next;
|
||||
};
|
||||
|
||||
typedef struct _Ecore_X_DND_Source
|
||||
{
|
||||
int version;
|
||||
int version;
|
||||
Ecore_X_Window win, dest;
|
||||
|
||||
enum {
|
||||
|
@ -135,29 +135,29 @@ typedef struct _Ecore_X_DND_Source
|
|||
|
||||
struct
|
||||
{
|
||||
short x, y;
|
||||
short x, y;
|
||||
unsigned short width, height;
|
||||
} rectangle;
|
||||
|
||||
struct
|
||||
{
|
||||
Ecore_X_Window window;
|
||||
int x, y;
|
||||
int x, y;
|
||||
} prev;
|
||||
|
||||
Time time;
|
||||
Time time;
|
||||
|
||||
Ecore_X_Atom action, accepted_action;
|
||||
|
||||
int will_accept;
|
||||
int suppress;
|
||||
int will_accept;
|
||||
int suppress;
|
||||
|
||||
int await_status;
|
||||
int await_status;
|
||||
} Ecore_X_DND_Source;
|
||||
|
||||
typedef struct _Ecore_X_DND_Target
|
||||
{
|
||||
int version;
|
||||
int version;
|
||||
Ecore_X_Window win, source;
|
||||
|
||||
enum {
|
||||
|
@ -170,14 +170,13 @@ typedef struct _Ecore_X_DND_Target
|
|||
int x, y;
|
||||
} pos;
|
||||
|
||||
Time time;
|
||||
Time time;
|
||||
|
||||
Ecore_X_Atom action, accepted_action;
|
||||
|
||||
int will_accept;
|
||||
int will_accept;
|
||||
} Ecore_X_DND_Target;
|
||||
|
||||
|
||||
extern int ECORE_X_MODIFIER_SHIFT;
|
||||
extern int ECORE_X_MODIFIER_CTRL;
|
||||
extern int ECORE_X_MODIFIER_ALT;
|
||||
|
@ -206,165 +205,165 @@ extern void *_ecore_window_grab_replay_data;
|
|||
|
||||
extern Ecore_X_Window _ecore_x_private_win;
|
||||
|
||||
void _ecore_x_error_handler_init(void);
|
||||
void _ecore_x_event_handle_any_event(XEvent *xevent);
|
||||
void _ecore_x_event_handle_key_press(XEvent *xevent);
|
||||
void _ecore_x_event_handle_key_release(XEvent *xevent);
|
||||
void _ecore_x_event_handle_button_press(XEvent *xevent);
|
||||
void _ecore_x_event_handle_button_release(XEvent *xevent);
|
||||
void _ecore_x_event_handle_motion_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_enter_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_leave_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_focus_in(XEvent *xevent);
|
||||
void _ecore_x_event_handle_focus_out(XEvent *xevent);
|
||||
void _ecore_x_event_handle_keymap_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_expose(XEvent *xevent);
|
||||
void _ecore_x_event_handle_graphics_expose(XEvent *xevent);
|
||||
void _ecore_x_event_handle_visibility_notify(
|
||||
void _ecore_x_error_handler_init(void);
|
||||
void _ecore_x_event_handle_any_event(XEvent *xevent);
|
||||
void _ecore_x_event_handle_key_press(XEvent *xevent);
|
||||
void _ecore_x_event_handle_key_release(XEvent *xevent);
|
||||
void _ecore_x_event_handle_button_press(XEvent *xevent);
|
||||
void _ecore_x_event_handle_button_release(XEvent *xevent);
|
||||
void _ecore_x_event_handle_motion_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_enter_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_leave_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_focus_in(XEvent *xevent);
|
||||
void _ecore_x_event_handle_focus_out(XEvent *xevent);
|
||||
void _ecore_x_event_handle_keymap_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_expose(XEvent *xevent);
|
||||
void _ecore_x_event_handle_graphics_expose(XEvent *xevent);
|
||||
void _ecore_x_event_handle_visibility_notify(
|
||||
XEvent *xevent);
|
||||
void _ecore_x_event_handle_create_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_destroy_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_unmap_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_map_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_map_request(XEvent *xevent);
|
||||
void _ecore_x_event_handle_reparent_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_configure_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_configure_request(
|
||||
void _ecore_x_event_handle_create_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_destroy_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_unmap_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_map_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_map_request(XEvent *xevent);
|
||||
void _ecore_x_event_handle_reparent_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_configure_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_configure_request(
|
||||
XEvent *xevent);
|
||||
void _ecore_x_event_handle_gravity_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_resize_request(XEvent *xevent);
|
||||
void _ecore_x_event_handle_circulate_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_circulate_request(
|
||||
void _ecore_x_event_handle_gravity_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_resize_request(XEvent *xevent);
|
||||
void _ecore_x_event_handle_circulate_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_circulate_request(
|
||||
XEvent *xevent);
|
||||
void _ecore_x_event_handle_property_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_selection_clear(XEvent *xevent);
|
||||
void _ecore_x_event_handle_selection_request(
|
||||
void _ecore_x_event_handle_property_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_selection_clear(XEvent *xevent);
|
||||
void _ecore_x_event_handle_selection_request(
|
||||
XEvent *xevent);
|
||||
void _ecore_x_event_handle_selection_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_colormap_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_client_message(XEvent *xevent);
|
||||
void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_shape_change(XEvent *xevent);
|
||||
void _ecore_x_event_handle_screensaver_notify(
|
||||
void _ecore_x_event_handle_selection_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_colormap_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_client_message(XEvent *xevent);
|
||||
void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
|
||||
void _ecore_x_event_handle_shape_change(XEvent *xevent);
|
||||
void _ecore_x_event_handle_screensaver_notify(
|
||||
XEvent *xevent);
|
||||
void _ecore_x_event_handle_sync_counter(XEvent *xevent);
|
||||
void _ecore_x_event_handle_sync_alarm(XEvent *xevent);
|
||||
void _ecore_x_event_handle_sync_counter(XEvent *xevent);
|
||||
void _ecore_x_event_handle_sync_alarm(XEvent *xevent);
|
||||
#ifdef ECORE_XRANDR
|
||||
void _ecore_x_event_handle_randr_change(XEvent *xevent);
|
||||
void _ecore_x_event_handle_randr_notify(XEvent *xevent);
|
||||
#endif
|
||||
void _ecore_x_event_handle_randr_change(XEvent *xevent);
|
||||
void _ecore_x_event_handle_randr_notify(XEvent *xevent);
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
#ifdef ECORE_XFIXES
|
||||
void _ecore_x_event_handle_fixes_selection_notify(
|
||||
void _ecore_x_event_handle_fixes_selection_notify(
|
||||
XEvent *xevent);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XFIXES */
|
||||
#ifdef ECORE_XDAMAGE
|
||||
void _ecore_x_event_handle_damage_notify(XEvent *xevent);
|
||||
#endif
|
||||
void _ecore_x_event_handle_generic_event(XEvent *xevent);
|
||||
void _ecore_x_event_handle_damage_notify(XEvent *xevent);
|
||||
#endif /* ifdef ECORE_XDAMAGE */
|
||||
void _ecore_x_event_handle_generic_event(XEvent *xevent);
|
||||
|
||||
void _ecore_x_selection_data_init(void);
|
||||
void _ecore_x_selection_shutdown(void);
|
||||
void _ecore_x_selection_data_init(void);
|
||||
void _ecore_x_selection_shutdown(void);
|
||||
Ecore_X_Atom
|
||||
_ecore_x_selection_target_atom_get(const char *target);
|
||||
char * _ecore_x_selection_target_get(Ecore_X_Atom target);
|
||||
_ecore_x_selection_target_atom_get(const char *target);
|
||||
char * _ecore_x_selection_target_get(Ecore_X_Atom target);
|
||||
Ecore_X_Selection_Intern *
|
||||
_ecore_x_selection_get(Ecore_X_Atom selection);
|
||||
int _ecore_x_selection_set(Window w,
|
||||
const void *data,
|
||||
int len,
|
||||
Ecore_X_Atom selection);
|
||||
int _ecore_x_selection_convert(Ecore_X_Atom selection,
|
||||
Ecore_X_Atom target,
|
||||
void **data_ret,
|
||||
Ecore_X_Atom *targettype,
|
||||
int *targetsize);
|
||||
void * _ecore_x_selection_parse(const char *target,
|
||||
void *data,
|
||||
int size,
|
||||
int format);
|
||||
_ecore_x_selection_get(Ecore_X_Atom selection);
|
||||
int _ecore_x_selection_set(Window w,
|
||||
const void *data,
|
||||
int len,
|
||||
Ecore_X_Atom selection);
|
||||
int _ecore_x_selection_convert(Ecore_X_Atom selection,
|
||||
Ecore_X_Atom target,
|
||||
void **data_ret,
|
||||
Ecore_X_Atom *targettype,
|
||||
int *targetsize);
|
||||
void * _ecore_x_selection_parse(const char *target,
|
||||
void *data,
|
||||
int size,
|
||||
int format);
|
||||
|
||||
void _ecore_x_sync_magic_send(int val, Ecore_X_Window swin);
|
||||
void _ecore_x_window_grab_remove(Ecore_X_Window win);
|
||||
void _ecore_x_key_grab_remove(Ecore_X_Window win);
|
||||
void _ecore_x_sync_magic_send(int val, Ecore_X_Window swin);
|
||||
void _ecore_x_window_grab_remove(Ecore_X_Window win);
|
||||
void _ecore_x_key_grab_remove(Ecore_X_Window win);
|
||||
|
||||
/* from dnd */
|
||||
void _ecore_x_dnd_init(void);
|
||||
Ecore_X_DND_Source * _ecore_x_dnd_source_get(void);
|
||||
Ecore_X_DND_Target * _ecore_x_dnd_target_get(void);
|
||||
void _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y);
|
||||
void _ecore_x_dnd_shutdown(void);
|
||||
void _ecore_x_dnd_init(void);
|
||||
Ecore_X_DND_Source * _ecore_x_dnd_source_get(void);
|
||||
Ecore_X_DND_Target * _ecore_x_dnd_target_get(void);
|
||||
void _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y);
|
||||
void _ecore_x_dnd_shutdown(void);
|
||||
|
||||
/* from netwm */
|
||||
Ecore_X_Window_State _ecore_x_netwm_state_get(Ecore_X_Atom a);
|
||||
int _ecore_x_netwm_startup_info_begin(Ecore_X_Window win,
|
||||
char *data);
|
||||
int _ecore_x_netwm_startup_info(Ecore_X_Window win,
|
||||
char *data);
|
||||
Ecore_X_Window_State _ecore_x_netwm_state_get(Ecore_X_Atom a);
|
||||
int _ecore_x_netwm_startup_info_begin(Ecore_X_Window win,
|
||||
char *data);
|
||||
int _ecore_x_netwm_startup_info(Ecore_X_Window win,
|
||||
char *data);
|
||||
|
||||
/* Fixes * Damage * Composite * DPMS */
|
||||
void _ecore_x_fixes_init(void);
|
||||
void _ecore_x_damage_init(void);
|
||||
void _ecore_x_composite_init(void);
|
||||
void _ecore_x_dpms_init(void);
|
||||
void _ecore_x_randr_init(void);
|
||||
void _ecore_x_fixes_init(void);
|
||||
void _ecore_x_damage_init(void);
|
||||
void _ecore_x_composite_init(void);
|
||||
void _ecore_x_dpms_init(void);
|
||||
void _ecore_x_randr_init(void);
|
||||
|
||||
void _ecore_x_atoms_init(void);
|
||||
void _ecore_x_atoms_init(void);
|
||||
|
||||
extern int _ecore_x_xi2_opcode;
|
||||
|
||||
void _ecore_x_input_init(void);
|
||||
void _ecore_x_input_shutdown(void);
|
||||
void _ecore_x_input_handler(XEvent *xevent);
|
||||
void _ecore_x_input_init(void);
|
||||
void _ecore_x_input_shutdown(void);
|
||||
void _ecore_x_input_handler(XEvent *xevent);
|
||||
/* from sync */
|
||||
|
||||
void _ecore_mouse_move(unsigned int timestamp,
|
||||
unsigned int xmodifiers,
|
||||
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);
|
||||
Ecore_Event_Mouse_Button *_ecore_mouse_button(int event,
|
||||
unsigned int timestamp,
|
||||
unsigned int xmodifiers,
|
||||
unsigned int buttons,
|
||||
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);
|
||||
void _ecore_mouse_move(unsigned int timestamp,
|
||||
unsigned int xmodifiers,
|
||||
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);
|
||||
Ecore_Event_Mouse_Button * _ecore_mouse_button(int event,
|
||||
unsigned int timestamp,
|
||||
unsigned int xmodifiers,
|
||||
unsigned int buttons,
|
||||
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);
|
||||
|
||||
//#define LOGFNS 1
|
||||
|
||||
#ifdef LOGFNS
|
||||
#include <stdio.h>
|
||||
#define LOGFN(fl, ln, fn) printf("-ECORE-X: %25s: %5i - %s\n", fl, ln, fn);
|
||||
#else
|
||||
#else /* ifdef LOGFNS */
|
||||
#define LOGFN(fl, ln, fn)
|
||||
#endif
|
||||
#endif /* ifdef LOGFNS */
|
||||
|
||||
#endif
|
||||
#endif /* ifndef _ECORE_X_PRIVATE_H */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -15,7 +15,7 @@ static int _randr_available = 0;
|
|||
static int _randr_major, _randr_minor, _randr_version;
|
||||
#define RANDR_1_2 ((1 << 16) | 2)
|
||||
#define RANDR_1_3 ((1 << 16) | 3)
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
|
||||
void
|
||||
_ecore_x_randr_init(void)
|
||||
|
@ -33,17 +33,17 @@ _ecore_x_randr_init(void)
|
|||
else
|
||||
_randr_available = 0;
|
||||
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
_randr_available = 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* _ecore_x_randr_init */
|
||||
|
||||
EAPI int
|
||||
ecore_x_randr_query(void)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _randr_available;
|
||||
}
|
||||
} /* ecore_x_randr_query */
|
||||
|
||||
EAPI int
|
||||
ecore_x_randr_events_select(Ecore_X_Window win, int on)
|
||||
|
@ -66,10 +66,10 @@ ecore_x_randr_events_select(Ecore_X_Window win, int on)
|
|||
XRRSelectInput(_ecore_x_disp, win, mask);
|
||||
|
||||
return 1;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_events_select */
|
||||
|
||||
EAPI Ecore_X_Randr_Rotation
|
||||
ecore_x_randr_screen_rotations_get(Ecore_X_Window root)
|
||||
|
@ -81,10 +81,10 @@ ecore_x_randr_screen_rotations_get(Ecore_X_Window root)
|
|||
rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
|
||||
root), &crot);
|
||||
return rot;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_screen_rotations_get */
|
||||
|
||||
EAPI Ecore_X_Randr_Rotation
|
||||
ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
|
||||
|
@ -95,13 +95,13 @@ ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
|
||||
return crot;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_screen_rotation_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_randr_screen_rotation_set(Ecore_X_Window root,
|
||||
ecore_x_randr_screen_rotation_set(Ecore_X_Window root,
|
||||
Ecore_X_Randr_Rotation rot)
|
||||
{
|
||||
#ifdef ECORE_XRANDR
|
||||
|
@ -117,8 +117,8 @@ ecore_x_randr_screen_rotation_set(Ecore_X_Window root,
|
|||
sizeid = XRRConfigCurrentConfiguration(xrrcfg, &crot);
|
||||
XRRSetScreenConfig(_ecore_x_disp, xrrcfg, root, sizeid, rot, CurrentTime);
|
||||
XRRFreeScreenConfigInfo(xrrcfg);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_screen_rotation_set */
|
||||
|
||||
EAPI Ecore_X_Screen_Size *
|
||||
ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num)
|
||||
|
@ -147,13 +147,13 @@ ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num)
|
|||
ret[i].height = sizes[i].height;
|
||||
}
|
||||
return ret;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
if (num)
|
||||
*num = 0;
|
||||
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_screen_sizes_get */
|
||||
|
||||
EAPI Ecore_X_Screen_Size
|
||||
ecore_x_randr_current_screen_size_get(Ecore_X_Window root)
|
||||
|
@ -184,9 +184,9 @@ ecore_x_randr_current_screen_size_get(Ecore_X_Window root)
|
|||
}
|
||||
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
return ret;
|
||||
}
|
||||
} /* ecore_x_randr_current_screen_size_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
|
||||
|
@ -219,12 +219,12 @@ ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
return 1;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_screen_size_set */
|
||||
|
||||
EAPI Ecore_X_Screen_Refresh_Rate
|
||||
ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
|
||||
|
@ -243,14 +243,14 @@ ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
|
|||
|
||||
ret.rate = XRRConfigCurrentRate(sc);
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
return ret;
|
||||
}
|
||||
} /* ecore_x_randr_current_screen_refresh_rate_get */
|
||||
|
||||
EAPI Ecore_X_Screen_Refresh_Rate *
|
||||
ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root,
|
||||
int size_id,
|
||||
int *num)
|
||||
int size_id,
|
||||
int *num)
|
||||
{
|
||||
#ifdef ECORE_XRANDR
|
||||
Ecore_X_Screen_Refresh_Rate *ret = NULL;
|
||||
|
@ -285,19 +285,19 @@ ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root,
|
|||
{
|
||||
ret[i].rate = rates[i];
|
||||
}
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
return ret;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
if (num)
|
||||
*num = 0;
|
||||
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_screen_refresh_rates_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root,
|
||||
Ecore_X_Screen_Size size,
|
||||
ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root,
|
||||
Ecore_X_Screen_Size size,
|
||||
Ecore_X_Screen_Refresh_Rate rate)
|
||||
{
|
||||
#ifdef ECORE_XRANDR
|
||||
|
@ -328,9 +328,10 @@ ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root,
|
|||
return 0;
|
||||
}
|
||||
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
XRRFreeScreenConfigInfo(sc);
|
||||
return 1;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRANDR */
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRANDR */
|
||||
} /* ecore_x_randr_screen_refresh_rate_set */
|
||||
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
|
||||
|
||||
/*
|
||||
* [x] XCreateRegion
|
||||
* [ ] XPolygonRegion
|
||||
|
@ -37,7 +36,7 @@ ecore_x_xregion_new()
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return (Ecore_X_XRegion *)XCreateRegion();
|
||||
}
|
||||
} /* ecore_x_xregion_new */
|
||||
|
||||
EAPI void
|
||||
ecore_x_xregion_free(Ecore_X_XRegion *region)
|
||||
|
@ -47,14 +46,14 @@ ecore_x_xregion_free(Ecore_X_XRegion *region)
|
|||
return;
|
||||
|
||||
XDestroyRegion((Region)region);
|
||||
}
|
||||
} /* ecore_x_xregion_free */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XSetRegion(_ecore_x_disp, gc, (Region)region);
|
||||
}
|
||||
} /* ecore_x_xregion_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
|
||||
|
@ -65,7 +64,7 @@ ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
|
|||
|
||||
/* return value not used */
|
||||
XOffsetRegion((Region)region, x, y);
|
||||
}
|
||||
} /* ecore_x_xregion_translate */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
|
||||
|
@ -74,7 +73,7 @@ ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XIntersectRegion((Region)r1, (Region)r2, (Region)dst);
|
||||
}
|
||||
} /* ecore_x_xregion_intersect */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_union(Ecore_X_XRegion *dst,
|
||||
|
@ -83,11 +82,11 @@ ecore_x_xregion_union(Ecore_X_XRegion *dst,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XUnionRegion((Region)r1, (Region)r2, (Region)dst);
|
||||
}
|
||||
} /* ecore_x_xregion_union */
|
||||
|
||||
EAPI int
|
||||
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;
|
||||
|
@ -99,7 +98,7 @@ ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
|
|||
xr.height = rect->height;
|
||||
|
||||
return XUnionRectWithRegion(&xr, (Region)src, (Region)dst);
|
||||
}
|
||||
} /* ecore_x_xregion_union_rect */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
|
||||
|
@ -108,7 +107,7 @@ ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XSubtractRegion((Region)rm, (Region)rs, (Region)dst);
|
||||
}
|
||||
} /* ecore_x_xregion_subtract */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
|
||||
|
@ -118,7 +117,7 @@ ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
|
|||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return !XEmptyRegion((Region)region);
|
||||
}
|
||||
} /* ecore_x_xregion_is_empty */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
|
||||
|
@ -128,7 +127,7 @@ ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
|
|||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XEqualRegion((Region)r1, (Region)r1);
|
||||
}
|
||||
} /* ecore_x_xregion_is_equal */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
|
||||
|
@ -138,7 +137,7 @@ ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
|
|||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XPointInRegion((Region)region, x, y);
|
||||
}
|
||||
} /* ecore_x_xregion_point_contain */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
|
||||
|
@ -152,4 +151,5 @@ ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
|
|||
rect->y,
|
||||
rect->width,
|
||||
rect->height);
|
||||
}
|
||||
} /* ecore_x_xregion_rect_contain */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_x_private.h"
|
||||
|
@ -36,11 +36,11 @@ ecore_x_screensaver_event_available_get(void)
|
|||
else
|
||||
_screensaver_available = 0;
|
||||
|
||||
#else
|
||||
#else /* ifdef ECORE_XSS */
|
||||
_screensaver_available = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XSS */
|
||||
return _screensaver_available;
|
||||
}
|
||||
} /* ecore_x_screensaver_event_available_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_screensaver_idle_time_get(void)
|
||||
|
@ -58,10 +58,10 @@ ecore_x_screensaver_idle_time_get(void)
|
|||
XFree(xss);
|
||||
|
||||
return idle;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XSS */
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_screensaver_idle_time_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_set(int timeout,
|
||||
|
@ -75,7 +75,7 @@ ecore_x_screensaver_set(int timeout,
|
|||
interval,
|
||||
prefer_blanking,
|
||||
allow_exposures);
|
||||
}
|
||||
} /* ecore_x_screensaver_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_timeout_set(int timeout)
|
||||
|
@ -85,7 +85,7 @@ ecore_x_screensaver_timeout_set(int timeout)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, timeout, pint, pblank, pexpo);
|
||||
}
|
||||
} /* ecore_x_screensaver_timeout_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_screensaver_timeout_get(void)
|
||||
|
@ -95,7 +95,7 @@ ecore_x_screensaver_timeout_get(void)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return pto;
|
||||
}
|
||||
} /* ecore_x_screensaver_timeout_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_blank_set(int blank)
|
||||
|
@ -105,7 +105,7 @@ ecore_x_screensaver_blank_set(int blank)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, pto, pint, blank, pexpo);
|
||||
}
|
||||
} /* ecore_x_screensaver_blank_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_screensaver_blank_get(void)
|
||||
|
@ -115,7 +115,7 @@ ecore_x_screensaver_blank_get(void)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return pblank;
|
||||
}
|
||||
} /* ecore_x_screensaver_blank_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_expose_set(int expose)
|
||||
|
@ -125,7 +125,7 @@ ecore_x_screensaver_expose_set(int expose)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, pto, pint, pblank, expose);
|
||||
}
|
||||
} /* ecore_x_screensaver_expose_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_screensaver_expose_get(void)
|
||||
|
@ -135,7 +135,7 @@ ecore_x_screensaver_expose_get(void)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return pexpo;
|
||||
}
|
||||
} /* ecore_x_screensaver_expose_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_interval_set(int interval)
|
||||
|
@ -145,7 +145,7 @@ ecore_x_screensaver_interval_set(int interval)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, pto, interval, pblank, pexpo);
|
||||
}
|
||||
} /* ecore_x_screensaver_interval_set */
|
||||
|
||||
EAPI int
|
||||
ecore_x_screensaver_interval_get(void)
|
||||
|
@ -155,7 +155,7 @@ ecore_x_screensaver_interval_get(void)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return pint;
|
||||
}
|
||||
} /* ecore_x_screensaver_interval_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_event_listen_set(int on)
|
||||
|
@ -170,5 +170,6 @@ ecore_x_screensaver_event_listen_set(int on)
|
|||
else
|
||||
XScreenSaverSelectInput(_ecore_x_disp, root, 0);
|
||||
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XSS */
|
||||
} /* ecore_x_screensaver_event_listen_set */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -19,29 +19,29 @@ static Ecore_X_Selection_Intern selections[4];
|
|||
static Ecore_X_Selection_Converter *converters = NULL;
|
||||
static Ecore_X_Selection_Parser *parsers = NULL;
|
||||
|
||||
static int _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);
|
||||
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);
|
||||
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);
|
||||
static int _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);
|
||||
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);
|
||||
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);
|
||||
|
||||
#define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
|
||||
|
||||
|
@ -57,7 +57,7 @@ _ecore_x_selection_data_init(void)
|
|||
#ifdef X_HAVE_UTF8_STRING
|
||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
|
||||
_ecore_x_selection_converter_text);
|
||||
#endif
|
||||
#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,
|
||||
|
@ -74,7 +74,7 @@ _ecore_x_selection_data_init(void)
|
|||
_ecore_x_selection_parser_files);
|
||||
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
|
||||
_ecore_x_selection_parser_targets);
|
||||
}
|
||||
} /* _ecore_x_selection_data_init */
|
||||
|
||||
void
|
||||
_ecore_x_selection_shutdown(void)
|
||||
|
@ -106,7 +106,7 @@ _ecore_x_selection_shutdown(void)
|
|||
free(tmp);
|
||||
}
|
||||
parsers = NULL;
|
||||
}
|
||||
} /* _ecore_x_selection_shutdown */
|
||||
|
||||
Ecore_X_Selection_Intern *
|
||||
_ecore_x_selection_get(Ecore_X_Atom selection)
|
||||
|
@ -121,12 +121,12 @@ _ecore_x_selection_get(Ecore_X_Atom selection)
|
|||
return &selections[3];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
} /* _ecore_x_selection_get */
|
||||
|
||||
int
|
||||
_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;
|
||||
|
@ -165,7 +165,7 @@ _ecore_x_selection_set(Window w,
|
|||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
} /* _ecore_x_selection_set */
|
||||
|
||||
/**
|
||||
* Claim ownership of the PRIMARY selection and set its data.
|
||||
|
@ -180,7 +180,7 @@ ecore_x_selection_primary_set(Ecore_X_Window w, const void *data, int size)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY);
|
||||
}
|
||||
} /* ecore_x_selection_primary_set */
|
||||
|
||||
/**
|
||||
* Release ownership of the primary selection
|
||||
|
@ -193,7 +193,7 @@ ecore_x_selection_primary_clear(void)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_PRIMARY);
|
||||
}
|
||||
} /* ecore_x_selection_primary_clear */
|
||||
|
||||
/**
|
||||
* Claim ownership of the SECONDARY selection and set its data.
|
||||
|
@ -211,7 +211,7 @@ ecore_x_selection_secondary_set(Ecore_X_Window w, const void *data, int size)
|
|||
data,
|
||||
size,
|
||||
ECORE_X_ATOM_SELECTION_SECONDARY);
|
||||
}
|
||||
} /* ecore_x_selection_secondary_set */
|
||||
|
||||
/**
|
||||
* Release ownership of the secondary selection
|
||||
|
@ -227,7 +227,7 @@ ecore_x_selection_secondary_clear(void)
|
|||
NULL,
|
||||
0,
|
||||
ECORE_X_ATOM_SELECTION_SECONDARY);
|
||||
}
|
||||
} /* ecore_x_selection_secondary_clear */
|
||||
|
||||
/**
|
||||
* Claim ownership of the XDND selection and set its data.
|
||||
|
@ -242,7 +242,7 @@ ecore_x_selection_xdnd_set(Ecore_X_Window w, const void *data, int size)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND);
|
||||
}
|
||||
} /* ecore_x_selection_xdnd_set */
|
||||
|
||||
/**
|
||||
* Release ownership of the XDND selection
|
||||
|
@ -255,7 +255,7 @@ ecore_x_selection_xdnd_clear(void)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_XDND);
|
||||
}
|
||||
} /* ecore_x_selection_xdnd_clear */
|
||||
|
||||
/**
|
||||
* Claim ownership of the CLIPBOARD selection and set its data.
|
||||
|
@ -276,7 +276,7 @@ ecore_x_selection_clipboard_set(Ecore_X_Window w, const void *data, int size)
|
|||
data,
|
||||
size,
|
||||
ECORE_X_ATOM_SELECTION_CLIPBOARD);
|
||||
}
|
||||
} /* ecore_x_selection_clipboard_set */
|
||||
|
||||
/**
|
||||
* Release ownership of the clipboard selection
|
||||
|
@ -292,7 +292,7 @@ ecore_x_selection_clipboard_clear(void)
|
|||
NULL,
|
||||
0,
|
||||
ECORE_X_ATOM_SELECTION_CLIPBOARD);
|
||||
}
|
||||
} /* ecore_x_selection_clipboard_clear */
|
||||
|
||||
Ecore_X_Atom
|
||||
_ecore_x_selection_target_atom_get(const char *target)
|
||||
|
@ -313,7 +313,7 @@ _ecore_x_selection_target_atom_get(const char *target)
|
|||
x_target = ecore_x_atom_get(target);
|
||||
|
||||
return x_target;
|
||||
}
|
||||
} /* _ecore_x_selection_target_atom_get */
|
||||
|
||||
char *
|
||||
_ecore_x_selection_target_get(Ecore_X_Atom target)
|
||||
|
@ -330,12 +330,12 @@ _ecore_x_selection_target_get(Ecore_X_Atom target)
|
|||
return strdup(ECORE_X_SELECTION_TARGET_TEXT);
|
||||
else
|
||||
return XGetAtomName(_ecore_x_disp, target);
|
||||
}
|
||||
} /* _ecore_x_selection_target_get */
|
||||
|
||||
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;
|
||||
|
||||
|
@ -352,21 +352,21 @@ _ecore_x_selection_request(Ecore_X_Window w,
|
|||
|
||||
XConvertSelection(_ecore_x_disp, selection, target, prop,
|
||||
w, CurrentTime);
|
||||
}
|
||||
} /* _ecore_x_selection_request */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_primary_request(Ecore_X_Window w, const char *target)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target);
|
||||
}
|
||||
} /* ecore_x_selection_primary_request */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target);
|
||||
}
|
||||
} /* ecore_x_selection_secondary_request */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
|
||||
|
@ -380,24 +380,24 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
|
|||
XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom,
|
||||
ECORE_X_ATOM_SELECTION_PROP_XDND, w,
|
||||
_target->time);
|
||||
}
|
||||
} /* ecore_x_selection_xdnd_request */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target);
|
||||
}
|
||||
} /* ecore_x_selection_clipboard_request */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
|
||||
int (*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,
|
||||
int (*func)(char *target,
|
||||
void *data,
|
||||
int size,
|
||||
void **data_ret,
|
||||
int *size_ret,
|
||||
Ecore_X_Atom *ttype,
|
||||
int *tsize))
|
||||
{
|
||||
Ecore_X_Selection_Converter *cnv;
|
||||
|
||||
|
@ -430,17 +430,17 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
|
|||
|
||||
cnv->target = target;
|
||||
cnv->convert = func;
|
||||
}
|
||||
} /* ecore_x_selection_converter_atom_add */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_converter_add(char *target,
|
||||
int (*func)(char *target,
|
||||
void *data,
|
||||
int size,
|
||||
void **data_ret,
|
||||
int *size_ret,
|
||||
Ecore_X_Atom *,
|
||||
int *))
|
||||
ecore_x_selection_converter_add(char *target,
|
||||
int (*func)(char *target,
|
||||
void *data,
|
||||
int size,
|
||||
void **data_ret,
|
||||
int *size_ret,
|
||||
Ecore_X_Atom *,
|
||||
int *))
|
||||
{
|
||||
Ecore_X_Atom x_target;
|
||||
|
||||
|
@ -451,7 +451,7 @@ ecore_x_selection_converter_add(char *target,
|
|||
x_target = _ecore_x_selection_target_atom_get(target);
|
||||
|
||||
ecore_x_selection_converter_atom_add(x_target, func);
|
||||
}
|
||||
} /* ecore_x_selection_converter_add */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
|
||||
|
@ -481,7 +481,7 @@ ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
|
|||
prev_cnv = cnv;
|
||||
cnv = cnv->next;
|
||||
}
|
||||
}
|
||||
} /* ecore_x_selection_converter_atom_del */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_converter_del(char *target)
|
||||
|
@ -494,14 +494,14 @@ ecore_x_selection_converter_del(char *target)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
x_target = _ecore_x_selection_target_atom_get(target);
|
||||
ecore_x_selection_converter_atom_del(x_target);
|
||||
}
|
||||
} /* ecore_x_selection_converter_del */
|
||||
|
||||
EAPI int
|
||||
ecore_x_selection_notify_send(Ecore_X_Window requestor,
|
||||
Ecore_X_Atom selection,
|
||||
Ecore_X_Atom target,
|
||||
Ecore_X_Atom property,
|
||||
Ecore_X_Time time)
|
||||
Ecore_X_Atom selection,
|
||||
Ecore_X_Atom target,
|
||||
Ecore_X_Atom property,
|
||||
Ecore_X_Time time)
|
||||
{
|
||||
XEvent xev;
|
||||
XSelectionEvent xnotify;
|
||||
|
@ -519,16 +519,16 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor,
|
|||
|
||||
xev.xselection = xnotify;
|
||||
return ((XSendEvent(_ecore_x_disp, requestor, False, 0, &xev) > 0) ? 1 : 0);
|
||||
}
|
||||
} /* ecore_x_selection_notify_send */
|
||||
|
||||
/* Locate and run conversion callback for specified selection target */
|
||||
EAPI int
|
||||
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;
|
||||
|
@ -566,19 +566,19 @@ ecore_x_selection_convert(Ecore_X_Atom selection,
|
|||
free(tgt_str);
|
||||
return 1;
|
||||
*/
|
||||
}
|
||||
} /* ecore_x_selection_convert */
|
||||
|
||||
/* TODO: We need to work out a mechanism for automatic conversion to any requested
|
||||
* locale using Ecore_Txt functions */
|
||||
/* Converter for standard non-utf8 text targets */
|
||||
static int
|
||||
_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,
|
||||
int *s)
|
||||
int *s)
|
||||
{
|
||||
XTextProperty text_prop;
|
||||
char *mystr;
|
||||
|
@ -598,7 +598,7 @@ _ecore_x_selection_converter_text(char *target,
|
|||
#ifdef X_HAVE_UTF8_STRING
|
||||
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
|
||||
style = XUTF8StringStyle;
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
else
|
||||
return 0;
|
||||
if (!(mystr = strdup(data)))
|
||||
|
@ -617,7 +617,7 @@ _ecore_x_selection_converter_text(char *target,
|
|||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
|
||||
&text_prop) == Success)
|
||||
{
|
||||
|
@ -630,13 +630,13 @@ _ecore_x_selection_converter_text(char *target,
|
|||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
else
|
||||
{
|
||||
free(mystr);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_selection_converter_text */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_parser_add(const char *target,
|
||||
|
@ -675,7 +675,7 @@ ecore_x_selection_parser_add(const char *target,
|
|||
|
||||
prs->target = strdup(target);
|
||||
prs->parse = func;
|
||||
}
|
||||
} /* ecore_x_selection_parser_add */
|
||||
|
||||
EAPI void
|
||||
ecore_x_selection_parser_del(const char *target)
|
||||
|
@ -709,7 +709,7 @@ ecore_x_selection_parser_del(const char *target)
|
|||
prev_prs = prs;
|
||||
prs = prs->next;
|
||||
}
|
||||
}
|
||||
} /* ecore_x_selection_parser_del */
|
||||
|
||||
/* Locate and run conversion callback for specified selection target */
|
||||
void *
|
||||
|
@ -734,7 +734,7 @@ _ecore_x_selection_parse(const char *target, void *data, int size, int format)
|
|||
sel->format = format;
|
||||
sel->data = data;
|
||||
return sel;
|
||||
}
|
||||
} /* _ecore_x_selection_parse */
|
||||
|
||||
static int
|
||||
_ecore_x_selection_data_default_free(void *data)
|
||||
|
@ -742,16 +742,16 @@ _ecore_x_selection_data_default_free(void *data)
|
|||
Ecore_X_Selection_Data *sel;
|
||||
|
||||
sel = data;
|
||||
free(sel->data);
|
||||
free(sel);
|
||||
free(sel->data);
|
||||
free(sel);
|
||||
return 1;
|
||||
}
|
||||
} /* _ecore_x_selection_data_default_free */
|
||||
|
||||
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 *data = _data;
|
||||
|
@ -813,7 +813,7 @@ _ecore_x_selection_parser_files(const char *target,
|
|||
ECORE_X_SELECTION_DATA(sel)->length = sel->num_files;
|
||||
|
||||
return ECORE_X_SELECTION_DATA(sel);
|
||||
}
|
||||
} /* _ecore_x_selection_parser_files */
|
||||
|
||||
static int
|
||||
_ecore_x_selection_data_files_free(void *data)
|
||||
|
@ -826,18 +826,18 @@ _ecore_x_selection_data_files_free(void *data)
|
|||
{
|
||||
for (i = 0; i < sel->num_files; i++)
|
||||
free(sel->files[i]);
|
||||
free(sel->files);
|
||||
free(sel->files);
|
||||
}
|
||||
|
||||
free(sel);
|
||||
free(sel);
|
||||
return 0;
|
||||
}
|
||||
} /* _ecore_x_selection_data_files_free */
|
||||
|
||||
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;
|
||||
char *data = _data;
|
||||
|
@ -857,7 +857,7 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__,
|
|||
ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TEXT;
|
||||
ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_text_free;
|
||||
return sel;
|
||||
}
|
||||
} /* _ecore_x_selection_parser_text */
|
||||
|
||||
static int
|
||||
_ecore_x_selection_data_text_free(void *data)
|
||||
|
@ -868,13 +868,13 @@ _ecore_x_selection_data_text_free(void *data)
|
|||
free(sel->text);
|
||||
free(sel);
|
||||
return 1;
|
||||
}
|
||||
} /* _ecore_x_selection_data_text_free */
|
||||
|
||||
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;
|
||||
|
@ -888,13 +888,12 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__,
|
|||
for (i = 2; i < size; i++)
|
||||
sel->targets[i - 2] = XGetAtomName(_ecore_x_disp, targets[i]);
|
||||
|
||||
|
||||
ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_targets_free;
|
||||
ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TARGETS;
|
||||
ECORE_X_SELECTION_DATA(sel)->length = size;
|
||||
ECORE_X_SELECTION_DATA(sel)->data = data;
|
||||
return sel;
|
||||
}
|
||||
} /* _ecore_x_selection_parser_targets */
|
||||
|
||||
static int
|
||||
_ecore_x_selection_data_targets_free(void *data)
|
||||
|
@ -911,7 +910,8 @@ _ecore_x_selection_data_targets_free(void *data)
|
|||
free(sel->targets);
|
||||
}
|
||||
|
||||
free(ECORE_X_SELECTION_DATA(sel)->data);
|
||||
free(sel);
|
||||
free(ECORE_X_SELECTION_DATA(sel)->data);
|
||||
free(sel);
|
||||
return 1;
|
||||
}
|
||||
} /* _ecore_x_selection_data_targets_free */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_x_private.h"
|
||||
|
@ -46,14 +46,14 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
|
|||
|
||||
ecore_x_sync();
|
||||
return alarm;
|
||||
}
|
||||
} /* ecore_x_sync_alarm_new */
|
||||
|
||||
EAPI int
|
||||
ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return XSyncDestroyAlarm(_ecore_x_disp, alarm);
|
||||
}
|
||||
} /* ecore_x_sync_alarm_free */
|
||||
|
||||
EAPI int
|
||||
ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val)
|
||||
|
@ -68,7 +68,7 @@ ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val)
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_sync_counter_query */
|
||||
|
||||
EAPI Ecore_X_Sync_Counter
|
||||
ecore_x_sync_counter_new(int val)
|
||||
|
@ -80,14 +80,14 @@ ecore_x_sync_counter_new(int val)
|
|||
XSyncIntToValue(&v, val);
|
||||
counter = XSyncCreateCounter(_ecore_x_disp, v);
|
||||
return counter;
|
||||
}
|
||||
} /* ecore_x_sync_counter_new */
|
||||
|
||||
EAPI void
|
||||
ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XSyncDestroyCounter(_ecore_x_disp, counter);
|
||||
}
|
||||
} /* ecore_x_sync_counter_free */
|
||||
|
||||
EAPI void
|
||||
ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
|
||||
|
@ -97,7 +97,7 @@ ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XSyncIntToValue(&v, by);
|
||||
XSyncChangeCounter(_ecore_x_disp, counter, v);
|
||||
}
|
||||
} /* ecore_x_sync_counter_inc */
|
||||
|
||||
EAPI void
|
||||
ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
|
||||
|
@ -116,4 +116,5 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
|
|||
cond.event_threshold = v2;
|
||||
XSyncAwait(_ecore_x_disp, &cond, 1);
|
||||
// XSync(_ecore_x_disp, False); // dont need this
|
||||
}
|
||||
} /* ecore_x_sync_counter_val_wait */
|
||||
|
||||
|
|
|
@ -4,19 +4,18 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef ECORE_XTEST
|
||||
# include <X11/extensions/XTest.h>
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XTEST */
|
||||
|
||||
#include "ecore_x_private.h"
|
||||
#include "Ecore_X.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
EAPI int
|
||||
ecore_x_test_fake_key_down(const char *key)
|
||||
{
|
||||
|
@ -40,10 +39,10 @@ ecore_x_test_fake_key_down(const char *key)
|
|||
return 0;
|
||||
|
||||
return XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
|
||||
#else
|
||||
#else /* ifdef ECORE_XTEST */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XTEST */
|
||||
} /* ecore_x_test_fake_key_down */
|
||||
|
||||
EAPI int
|
||||
ecore_x_test_fake_key_up(const char *key)
|
||||
|
@ -68,10 +67,10 @@ ecore_x_test_fake_key_up(const char *key)
|
|||
return 0;
|
||||
|
||||
return XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
|
||||
#else
|
||||
#else /* ifdef ECORE_XTEST */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XTEST */
|
||||
} /* ecore_x_test_fake_key_up */
|
||||
|
||||
EAPI int
|
||||
ecore_x_test_fake_key_press(const char *key)
|
||||
|
@ -128,20 +127,21 @@ ecore_x_test_fake_key_press(const char *key)
|
|||
XTestFakeKeyEvent(_ecore_x_disp,
|
||||
XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 1, 0);
|
||||
|
||||
XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
|
||||
XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
|
||||
XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
|
||||
XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
|
||||
if (shift)
|
||||
XTestFakeKeyEvent(_ecore_x_disp,
|
||||
XTestFakeKeyEvent(_ecore_x_disp,
|
||||
XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
|
||||
|
||||
return 1;
|
||||
#else
|
||||
#else /* ifdef ECORE_XTEST */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XTEST */
|
||||
} /* ecore_x_test_fake_key_press */
|
||||
|
||||
EAPI const char *
|
||||
ecore_x_keysym_string_get(int keysym)
|
||||
{
|
||||
return XKeysymToString(keysym);
|
||||
}
|
||||
} /* ecore_x_keysym_string_get */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -87,7 +87,7 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
|
|||
ecore_x_window_defaults_set(win);
|
||||
|
||||
return win;
|
||||
}
|
||||
} /* ecore_x_window_new */
|
||||
|
||||
/**
|
||||
* Creates a window with the override redirect attribute set to @c True.
|
||||
|
@ -148,7 +148,7 @@ ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
|
|||
CWWinGravity,
|
||||
&attr);
|
||||
return win;
|
||||
}
|
||||
} /* ecore_x_window_override_new */
|
||||
|
||||
/**
|
||||
* Creates a new input window.
|
||||
|
@ -201,7 +201,7 @@ ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h)
|
|||
}
|
||||
|
||||
return win;
|
||||
}
|
||||
} /* ecore_x_window_input_new */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Window_Properties_Group X Window Property Functions
|
||||
|
@ -255,7 +255,7 @@ ecore_x_window_defaults_set(Ecore_X_Window win)
|
|||
|
||||
ecore_app_args_get(&argc, &argv);
|
||||
ecore_x_icccm_command_set(win, argc, argv);
|
||||
}
|
||||
} /* ecore_x_window_defaults_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_configure(Ecore_X_Window win,
|
||||
|
@ -280,7 +280,7 @@ ecore_x_window_configure(Ecore_X_Window win,
|
|||
xwc.stack_mode = stack_mode;
|
||||
|
||||
XConfigureWindow(_ecore_x_disp, win, mask, &xwc);
|
||||
}
|
||||
} /* ecore_x_window_configure */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Window_Destroy_Group X Window Destroy Functions
|
||||
|
@ -302,7 +302,7 @@ ecore_x_window_free(Ecore_X_Window win)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (win)
|
||||
XDestroyWindow(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_window_free */
|
||||
|
||||
/**
|
||||
* Set if a window should be ignored.
|
||||
|
@ -352,7 +352,7 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
|
|||
}
|
||||
ignore_list = realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window));
|
||||
}
|
||||
}
|
||||
} /* ecore_x_window_ignore_set */
|
||||
|
||||
/**
|
||||
* Get the ignore list
|
||||
|
@ -366,7 +366,7 @@ ecore_x_window_ignore_list(int *num)
|
|||
*num = ignore_num;
|
||||
|
||||
return ignore_list;
|
||||
}
|
||||
} /* ecore_x_window_ignore_list */
|
||||
|
||||
/**
|
||||
* Sends a delete request to the given window.
|
||||
|
@ -394,7 +394,7 @@ ecore_x_window_delete_request_send(Ecore_X_Window win)
|
|||
xev.xclient.data.l[1] = CurrentTime;
|
||||
|
||||
XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
|
||||
}
|
||||
} /* ecore_x_window_delete_request_send */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Window_Visibility_Group X Window Visibility Functions
|
||||
|
@ -415,7 +415,7 @@ ecore_x_window_show(Ecore_X_Window win)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XMapWindow(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_window_show */
|
||||
|
||||
/**
|
||||
* Hides a window.
|
||||
|
@ -459,7 +459,7 @@ ecore_x_window_hide(Ecore_X_Window win)
|
|||
XSendEvent(_ecore_x_disp, xev.xunmap.event, False,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
|
||||
XUnmapWindow(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_window_hide */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Window_Geometry_Group X Window Geometry Functions
|
||||
|
@ -483,7 +483,7 @@ ecore_x_window_move(Ecore_X_Window win, int x, int y)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XMoveWindow(_ecore_x_disp, win, x, y);
|
||||
}
|
||||
} /* ecore_x_window_move */
|
||||
|
||||
/**
|
||||
* Resizes a window.
|
||||
|
@ -503,7 +503,7 @@ ecore_x_window_resize(Ecore_X_Window win, int w, int h)
|
|||
h = 1;
|
||||
|
||||
XResizeWindow(_ecore_x_disp, win, w, h);
|
||||
}
|
||||
} /* ecore_x_window_resize */
|
||||
|
||||
/**
|
||||
* Moves and resizes a window.
|
||||
|
@ -525,7 +525,7 @@ ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h)
|
|||
h = 1;
|
||||
|
||||
XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h);
|
||||
}
|
||||
} /* ecore_x_window_move_resize */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Window_Focus_Functions X Window Focus Functions
|
||||
|
@ -547,7 +547,7 @@ ecore_x_window_focus(Ecore_X_Window win)
|
|||
|
||||
// XSetInputFocus(_ecore_x_disp, win, RevertToPointerRoot, CurrentTime);
|
||||
XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime);
|
||||
}
|
||||
} /* ecore_x_window_focus */
|
||||
|
||||
/**
|
||||
* Sets the focus to the given window at a specific time.
|
||||
|
@ -564,7 +564,7 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t)
|
|||
|
||||
// XSetInputFocus(_ecore_x_disp, win, PointerRoot, t);
|
||||
XSetInputFocus(_ecore_x_disp, win, RevertToParent, t);
|
||||
}
|
||||
} /* ecore_x_window_focus_at_time */
|
||||
|
||||
/**
|
||||
* gets the focus to the window @p win.
|
||||
|
@ -581,7 +581,7 @@ ecore_x_window_focus_get(void)
|
|||
win = 0;
|
||||
XGetInputFocus(_ecore_x_disp, &win, &revert_mode);
|
||||
return win;
|
||||
}
|
||||
} /* ecore_x_window_focus_get */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Window_Z_Order_Group X Window Z Order Functions
|
||||
|
@ -599,7 +599,7 @@ ecore_x_window_raise(Ecore_X_Window win)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XRaiseWindow(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_window_raise */
|
||||
|
||||
/**
|
||||
* Lowers the given window.
|
||||
|
@ -611,7 +611,7 @@ ecore_x_window_lower(Ecore_X_Window win)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XLowerWindow(_ecore_x_disp, win);
|
||||
}
|
||||
} /* ecore_x_window_lower */
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_X_Window_Parent_Group X Window Parent Functions
|
||||
|
@ -630,15 +630,15 @@ 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)
|
||||
new_parent = DefaultRootWindow(_ecore_x_disp);
|
||||
|
||||
XReparentWindow(_ecore_x_disp, win, new_parent, x, y);
|
||||
}
|
||||
} /* ecore_x_window_reparent */
|
||||
|
||||
/**
|
||||
* Retrieves the size of the given window.
|
||||
|
@ -657,7 +657,7 @@ ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h)
|
|||
win = DefaultRootWindow(_ecore_x_disp);
|
||||
|
||||
ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h);
|
||||
}
|
||||
} /* ecore_x_window_size_get */
|
||||
|
||||
/**
|
||||
* Retrieves the geometry of the given window.
|
||||
|
@ -676,7 +676,7 @@ ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h)
|
|||
win = DefaultRootWindow(_ecore_x_disp);
|
||||
|
||||
ecore_x_drawable_geometry_get(win, x, y, w, h);
|
||||
}
|
||||
} /* ecore_x_window_geometry_get */
|
||||
|
||||
/**
|
||||
* Retrieves the width of the border of the given window.
|
||||
|
@ -693,7 +693,7 @@ ecore_x_window_border_width_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return ecore_x_drawable_border_width_get(win);
|
||||
}
|
||||
} /* ecore_x_window_border_width_get */
|
||||
|
||||
/**
|
||||
* Sets the width of the border of the given window.
|
||||
|
@ -710,7 +710,7 @@ ecore_x_window_border_width_set(Ecore_X_Window win, int width)
|
|||
return;
|
||||
|
||||
XSetWindowBorderWidth (_ecore_x_disp, win, width);
|
||||
}
|
||||
} /* ecore_x_window_border_width_set */
|
||||
|
||||
/**
|
||||
* Retrieves the depth of the given window.
|
||||
|
@ -722,7 +722,7 @@ ecore_x_window_depth_get(Ecore_X_Window win)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ecore_x_drawable_depth_get(win);
|
||||
}
|
||||
} /* ecore_x_window_depth_get */
|
||||
|
||||
/**
|
||||
* To be documented.
|
||||
|
@ -757,8 +757,8 @@ ecore_x_window_cursor_show(Ecore_X_Window win, int show)
|
|||
XFreePixmap(_ecore_x_disp, m);
|
||||
}
|
||||
else
|
||||
XDefineCursor(_ecore_x_disp, win, 0);
|
||||
}
|
||||
XDefineCursor(_ecore_x_disp, win, 0);
|
||||
} /* ecore_x_window_cursor_show */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c)
|
||||
|
@ -768,7 +768,7 @@ ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c)
|
|||
XUndefineCursor(_ecore_x_disp, win);
|
||||
else
|
||||
XDefineCursor(_ecore_x_disp, win, c);
|
||||
}
|
||||
} /* ecore_x_window_cursor_set */
|
||||
|
||||
/**
|
||||
* Finds out whether the given window is currently visible.
|
||||
|
@ -784,18 +784,16 @@ ecore_x_window_visible_get(Ecore_X_Window win)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return (XGetWindowAttributes(_ecore_x_disp, win, &attr) &&
|
||||
(attr.map_state == IsViewable));
|
||||
}
|
||||
} /* ecore_x_window_visible_get */
|
||||
|
||||
|
||||
|
||||
typedef struct _Shadow Shadow;
|
||||
typedef struct _Shadow Shadow;
|
||||
struct _Shadow
|
||||
{
|
||||
Shadow *parent;
|
||||
Shadow **children;
|
||||
Window win;
|
||||
int children_num;
|
||||
short x, y;
|
||||
Shadow *parent;
|
||||
Shadow **children;
|
||||
Window win;
|
||||
int children_num;
|
||||
short x, y;
|
||||
unsigned short w, h;
|
||||
};
|
||||
|
||||
|
@ -870,7 +868,7 @@ _ecore_x_window_tree_walk(Window win)
|
|||
XFree(list);
|
||||
|
||||
return s;
|
||||
}
|
||||
} /* _ecore_x_window_tree_walk */
|
||||
|
||||
static void
|
||||
_ecore_x_window_tree_shadow_free1(Shadow *s)
|
||||
|
@ -890,8 +888,8 @@ _ecore_x_window_tree_shadow_free1(Shadow *s)
|
|||
free(s->children);
|
||||
}
|
||||
|
||||
free(s);
|
||||
}
|
||||
free(s);
|
||||
} /* _ecore_x_window_tree_shadow_free1 */
|
||||
|
||||
static void
|
||||
_ecore_x_window_tree_shadow_free(void)
|
||||
|
@ -908,10 +906,10 @@ _ecore_x_window_tree_shadow_free(void)
|
|||
|
||||
_ecore_x_window_tree_shadow_free1(shadow_base[i]);
|
||||
}
|
||||
free(shadow_base);
|
||||
free(shadow_base);
|
||||
shadow_base = NULL;
|
||||
shadow_num = 0;
|
||||
}
|
||||
} /* _ecore_x_window_tree_shadow_free */
|
||||
|
||||
static void
|
||||
_ecore_x_window_tree_shadow_populate(void)
|
||||
|
@ -932,7 +930,7 @@ _ecore_x_window_tree_shadow_populate(void)
|
|||
|
||||
free(roots);
|
||||
}
|
||||
}
|
||||
} /* _ecore_x_window_tree_shadow_populate */
|
||||
|
||||
/*
|
||||
static int shadow_count = 0;
|
||||
|
@ -975,7 +973,7 @@ _ecore_x_window_shadow_tree_find_shadow(Shadow *s, Window win)
|
|||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
} /* _ecore_x_window_shadow_tree_find_shadow */
|
||||
|
||||
static Shadow *
|
||||
_ecore_x_window_shadow_tree_find(Window base)
|
||||
|
@ -992,16 +990,16 @@ _ecore_x_window_shadow_tree_find(Window base)
|
|||
return s;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
} /* _ecore_x_window_shadow_tree_find */
|
||||
|
||||
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;
|
||||
|
@ -1046,7 +1044,7 @@ onward:
|
|||
}
|
||||
|
||||
return s->win;
|
||||
}
|
||||
} /* _ecore_x_window_shadow_tree_at_xy_get_shadow */
|
||||
|
||||
static Window
|
||||
_ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
|
||||
|
@ -1072,7 +1070,7 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
|
|||
y,
|
||||
skip,
|
||||
skip_num);
|
||||
}
|
||||
} /* _ecore_x_window_shadow_tree_at_xy_get */
|
||||
|
||||
/**
|
||||
* Retrieves the top, visible window at the given location,
|
||||
|
@ -1087,13 +1085,13 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
|
|||
* @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__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _ecore_x_window_shadow_tree_at_xy_get(base,
|
||||
0,
|
||||
0,
|
||||
|
@ -1101,7 +1099,7 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
|
|||
y,
|
||||
skip,
|
||||
skip_num);
|
||||
}
|
||||
} /* ecore_x_window_shadow_tree_at_xy_with_skip_get */
|
||||
|
||||
/**
|
||||
* Retrieves the parent window a given window has. This uses the shadow window
|
||||
|
@ -1113,12 +1111,12 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
|
|||
*/
|
||||
EAPI Ecore_X_Window
|
||||
ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__,
|
||||
Ecore_X_Window win)
|
||||
Ecore_X_Window win)
|
||||
{
|
||||
Shadow *s;
|
||||
int i;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (!shadow_base)
|
||||
{
|
||||
_ecore_x_window_tree_shadow_populate();
|
||||
|
@ -1141,7 +1139,7 @@ ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__,
|
|||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_window_shadow_parent_get */
|
||||
|
||||
/**
|
||||
* Flushes the window shadow tree so nothing is stored.
|
||||
|
@ -1152,7 +1150,7 @@ ecore_x_window_shadow_tree_flush(void)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_window_tree_shadow_free();
|
||||
}
|
||||
} /* ecore_x_window_shadow_tree_flush */
|
||||
|
||||
/**
|
||||
* Retrieves the root window a given window is on.
|
||||
|
@ -1170,7 +1168,7 @@ ecore_x_window_root_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
|
||||
return att.root;
|
||||
}
|
||||
} /* ecore_x_window_root_get */
|
||||
|
||||
static Window
|
||||
_ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
|
||||
|
@ -1226,11 +1224,11 @@ onward:
|
|||
}
|
||||
|
||||
}
|
||||
XFree(list);
|
||||
XFree(list);
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
} /* _ecore_x_window_at_xy_get */
|
||||
|
||||
/**
|
||||
* Retrieves the top, visible window at the given location.
|
||||
|
@ -1254,7 +1252,7 @@ ecore_x_window_at_xy_get(int x, int y)
|
|||
ecore_x_ungrab();
|
||||
|
||||
return win ? win : root;
|
||||
}
|
||||
} /* ecore_x_window_at_xy_get */
|
||||
|
||||
/**
|
||||
* Retrieves the top, visible window at the given location,
|
||||
|
@ -1265,10 +1263,10 @@ ecore_x_window_at_xy_get(int x, int y)
|
|||
* @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;
|
||||
|
||||
|
@ -1282,7 +1280,7 @@ ecore_x_window_at_xy_with_skip_get(int x,
|
|||
ecore_x_ungrab();
|
||||
|
||||
return win ? win : root;
|
||||
}
|
||||
} /* ecore_x_window_at_xy_with_skip_get */
|
||||
|
||||
EAPI Ecore_X_Window
|
||||
ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y)
|
||||
|
@ -1295,7 +1293,7 @@ ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y)
|
|||
ecore_x_ungrab();
|
||||
|
||||
return win ? win : begin;
|
||||
}
|
||||
} /* ecore_x_window_at_xy_begin_get */
|
||||
|
||||
/**
|
||||
* Retrieves the parent window of the given window.
|
||||
|
@ -1317,7 +1315,7 @@ ecore_x_window_parent_get(Ecore_X_Window win)
|
|||
XFree(children);
|
||||
|
||||
return parent;
|
||||
}
|
||||
} /* ecore_x_window_parent_get */
|
||||
|
||||
/**
|
||||
* Sets the background color of the given window.
|
||||
|
@ -1344,7 +1342,7 @@ ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
|
|||
|
||||
attr.background_pixel = col.pixel;
|
||||
XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr);
|
||||
}
|
||||
} /* ecore_x_window_background_color_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
|
||||
|
@ -1354,7 +1352,7 @@ ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
att.win_gravity = grav;
|
||||
XChangeWindowAttributes(_ecore_x_disp, win, CWWinGravity, &att);
|
||||
}
|
||||
} /* ecore_x_window_gravity_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
|
||||
|
@ -1364,28 +1362,28 @@ ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
att.bit_gravity = grav;
|
||||
XChangeWindowAttributes(_ecore_x_disp, win, CWBitGravity, &att);
|
||||
}
|
||||
} /* ecore_x_window_pixel_gravity_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pmap)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XSetWindowBackgroundPixmap(_ecore_x_disp, win, pmap);
|
||||
}
|
||||
} /* ecore_x_window_pixmap_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XClearArea(_ecore_x_disp, win, x, y, w, h, False);
|
||||
}
|
||||
} /* ecore_x_window_area_clear */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XClearArea(_ecore_x_disp, win, x, y, w, h, True);
|
||||
}
|
||||
} /* ecore_x_window_area_expose */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_override_set(Ecore_X_Window win, int override)
|
||||
|
@ -1395,17 +1393,17 @@ ecore_x_window_override_set(Ecore_X_Window win, int override)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
att.override_redirect = override;
|
||||
XChangeWindowAttributes(_ecore_x_disp, win, CWOverrideRedirect, &att);
|
||||
}
|
||||
} /* ecore_x_window_override_set */
|
||||
|
||||
#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,
|
||||
int override,
|
||||
int saveunder)
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
int override,
|
||||
int saveunder)
|
||||
{
|
||||
Window win;
|
||||
XSetWindowAttributes attr;
|
||||
|
@ -1504,8 +1502,9 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
|
|||
ecore_x_window_defaults_set(win);
|
||||
|
||||
return win;
|
||||
}
|
||||
#endif
|
||||
} /* _ecore_x_window_argb_internal_new */
|
||||
|
||||
#endif /* ifdef ECORE_XRENDER */
|
||||
|
||||
EAPI int
|
||||
ecore_x_window_argb_get(Ecore_X_Window win)
|
||||
|
@ -1526,10 +1525,10 @@ ecore_x_window_argb_get(Ecore_X_Window win)
|
|||
return 1;
|
||||
|
||||
return 0;
|
||||
#else
|
||||
#else /* ifdef ECORE_XRENDER */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRENDER */
|
||||
} /* ecore_x_window_argb_get */
|
||||
|
||||
/**
|
||||
* Creates a new window.
|
||||
|
@ -1544,18 +1543,18 @@ 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__);
|
||||
return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
|
||||
#else
|
||||
#else /* ifdef ECORE_XRENDER */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRENDER */
|
||||
} /* ecore_x_window_manager_argb_new */
|
||||
|
||||
/**
|
||||
* Creates a new window.
|
||||
|
@ -1574,10 +1573,10 @@ ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
|
|||
#ifdef ECORE_XRENDER
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 0, 0);
|
||||
#else
|
||||
#else /* ifdef ECORE_XRENDER */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRENDER */
|
||||
} /* ecore_x_window_argb_new */
|
||||
|
||||
/**
|
||||
* Creates a window with the override redirect attribute set to @c True.
|
||||
|
@ -1592,15 +1591,16 @@ ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
|
|||
*/
|
||||
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__);
|
||||
return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
|
||||
#else
|
||||
#else /* ifdef ECORE_XRENDER */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XRENDER */
|
||||
} /* ecore_x_window_override_argb_new */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -16,8 +16,8 @@
|
|||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define _ATOM_SET_CARD32(win, atom, p_val, cnt) \
|
||||
XChangeProperty(_ecore_x_disp, win, atom, XA_CARDINAL, 32, PropModeReplace, \
|
||||
#define _ATOM_SET_CARD32(win, atom, p_val, cnt)\
|
||||
XChangeProperty(_ecore_x_disp, win, atom, XA_CARDINAL, 32, PropModeReplace,\
|
||||
(unsigned char *)p_val, cnt)
|
||||
|
||||
/*
|
||||
|
@ -29,7 +29,7 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
#if SIZEOF_INT == SIZEOF_LONG
|
||||
_ATOM_SET_CARD32(win, atom, val, num);
|
||||
#else
|
||||
#else /* if SIZEOF_INT == SIZEOF_LONG */
|
||||
long *v2;
|
||||
unsigned int i;
|
||||
|
||||
|
@ -42,8 +42,8 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
v2[i] = val[i];
|
||||
_ATOM_SET_CARD32(win, atom, v2, num);
|
||||
free(v2);
|
||||
#endif
|
||||
}
|
||||
#endif /* if SIZEOF_INT == SIZEOF_LONG */
|
||||
} /* ecore_x_window_prop_card32_set */
|
||||
|
||||
/*
|
||||
* Get CARD32 (array) property
|
||||
|
@ -89,7 +89,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
XFree(prop_ret);
|
||||
|
||||
return num;
|
||||
}
|
||||
} /* ecore_x_window_prop_card32_get */
|
||||
|
||||
/*
|
||||
* Get CARD32 (array) property of any length
|
||||
|
@ -134,7 +134,7 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
XFree(prop_ret);
|
||||
|
||||
return num;
|
||||
}
|
||||
} /* ecore_x_window_prop_card32_list_get */
|
||||
|
||||
/*
|
||||
* Set X ID (array) property
|
||||
|
@ -147,7 +147,7 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
#if SIZEOF_INT == SIZEOF_LONG
|
||||
XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
|
||||
(unsigned char *)lst, num);
|
||||
#else
|
||||
#else /* if SIZEOF_INT == SIZEOF_LONG */
|
||||
unsigned long *pl;
|
||||
unsigned int i;
|
||||
|
||||
|
@ -161,8 +161,8 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
|
||||
(unsigned char *)pl, num);
|
||||
free(pl);
|
||||
#endif
|
||||
}
|
||||
#endif /* if SIZEOF_INT == SIZEOF_LONG */
|
||||
} /* ecore_x_window_prop_xid_set */
|
||||
|
||||
/*
|
||||
* Get X ID (array) property
|
||||
|
@ -209,7 +209,7 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
XFree(prop_ret);
|
||||
|
||||
return num;
|
||||
}
|
||||
} /* ecore_x_window_prop_xid_get */
|
||||
|
||||
/*
|
||||
* Get X ID (array) property
|
||||
|
@ -256,7 +256,7 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
XFree(prop_ret);
|
||||
|
||||
return num;
|
||||
}
|
||||
} /* ecore_x_window_prop_xid_list_get */
|
||||
|
||||
/*
|
||||
* Remove/add/toggle X ID list item.
|
||||
|
@ -273,7 +273,6 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
if (num < 0)
|
||||
{
|
||||
return; /* Error - assuming invalid window */
|
||||
|
||||
}
|
||||
|
||||
/* Is it there? */
|
||||
|
@ -309,7 +308,7 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
done:
|
||||
if (lst)
|
||||
free(lst);
|
||||
}
|
||||
} /* ecore_x_window_prop_xid_list_change */
|
||||
|
||||
/*
|
||||
* Set Atom (array) property
|
||||
|
@ -320,7 +319,7 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num);
|
||||
}
|
||||
} /* ecore_x_window_prop_atom_set */
|
||||
|
||||
/*
|
||||
* Get Atom (array) property
|
||||
|
@ -336,7 +335,7 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len);
|
||||
}
|
||||
} /* ecore_x_window_prop_atom_get */
|
||||
|
||||
/*
|
||||
* Get Atom (array) property
|
||||
|
@ -352,7 +351,7 @@ ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst);
|
||||
}
|
||||
} /* ecore_x_window_prop_atom_list_get */
|
||||
|
||||
/*
|
||||
* Remove/add/toggle atom list item.
|
||||
|
@ -363,7 +362,7 @@ ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op);
|
||||
}
|
||||
} /* ecore_x_window_prop_atom_list_change */
|
||||
|
||||
/*
|
||||
* Set Window (array) property
|
||||
|
@ -374,7 +373,7 @@ ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num);
|
||||
}
|
||||
} /* ecore_x_window_prop_window_set */
|
||||
|
||||
/*
|
||||
* Get Window (array) property
|
||||
|
@ -390,7 +389,7 @@ ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len);
|
||||
}
|
||||
} /* ecore_x_window_prop_window_get */
|
||||
|
||||
/*
|
||||
* Get Window (array) property
|
||||
|
@ -406,7 +405,7 @@ ecore_x_window_prop_window_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst);
|
||||
}
|
||||
} /* ecore_x_window_prop_window_list_get */
|
||||
|
||||
/**
|
||||
* To be documented.
|
||||
|
@ -417,7 +416,7 @@ EAPI Ecore_X_Atom
|
|||
ecore_x_window_prop_any_type(void)
|
||||
{
|
||||
return AnyPropertyType;
|
||||
}
|
||||
} /* ecore_x_window_prop_any_type */
|
||||
|
||||
/**
|
||||
* To be documented.
|
||||
|
@ -426,18 +425,18 @@ 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)
|
||||
win = DefaultRootWindow(_ecore_x_disp);
|
||||
|
||||
if (size != 32)
|
||||
XChangeProperty(_ecore_x_disp,
|
||||
XChangeProperty(_ecore_x_disp,
|
||||
win,
|
||||
property,
|
||||
type,
|
||||
|
@ -459,7 +458,7 @@ ecore_x_window_prop_property_set(Ecore_X_Window win,
|
|||
free(dat);
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* ecore_x_window_prop_property_set */
|
||||
|
||||
/**
|
||||
* To be documented.
|
||||
|
@ -467,12 +466,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;
|
||||
|
@ -526,22 +525,22 @@ ecore_x_window_prop_property_get(Ecore_X_Window win,
|
|||
for (i = 0; i < num_ret; i++)
|
||||
((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i];
|
||||
break;
|
||||
}
|
||||
} /* switch */
|
||||
|
||||
XFree(prop_ret);
|
||||
XFree(prop_ret);
|
||||
|
||||
if (num)
|
||||
*num = num_ret;
|
||||
|
||||
return size_ret;
|
||||
}
|
||||
} /* ecore_x_window_prop_property_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XDeleteProperty(_ecore_x_disp, win, property);
|
||||
}
|
||||
} /* ecore_x_window_prop_property_del */
|
||||
|
||||
EAPI Ecore_X_Atom *
|
||||
ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
|
||||
|
@ -568,7 +567,7 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
|
|||
|
||||
XFree(atom_ret);
|
||||
return atoms;
|
||||
}
|
||||
} /* ecore_x_window_prop_list */
|
||||
|
||||
/**
|
||||
* Set a window string property.
|
||||
|
@ -580,8 +579,8 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
|
|||
*/
|
||||
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;
|
||||
|
||||
|
@ -594,7 +593,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win,
|
|||
xtp.encoding = ECORE_X_ATOM_UTF8_STRING;
|
||||
xtp.nitems = strlen(str);
|
||||
XSetTextProperty(_ecore_x_disp, win, &xtp, type);
|
||||
}
|
||||
} /* ecore_x_window_prop_string_set */
|
||||
|
||||
/**
|
||||
* Get a window string property.
|
||||
|
@ -626,10 +625,10 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
|
|||
#ifdef X_HAVE_UTF8_STRING
|
||||
s = Xutf8TextPropertyToTextList(_ecore_x_disp, &xtp,
|
||||
&list, &items);
|
||||
#else
|
||||
#else /* ifdef X_HAVE_UTF8_STRING */
|
||||
s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp,
|
||||
&list, &items);
|
||||
#endif
|
||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||
if ((s == XLocaleNotSupported) ||
|
||||
(s == XNoMemory) || (s == XConverterNotFound))
|
||||
str = strdup((char *)xtp.value);
|
||||
|
@ -644,10 +643,10 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
|
|||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
} /* ecore_x_window_prop_string_get */
|
||||
|
||||
EAPI int
|
||||
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;
|
||||
|
@ -673,7 +672,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
|
|||
XFree(protos);
|
||||
|
||||
return ret;
|
||||
}
|
||||
} /* ecore_x_window_prop_protocol_isset */
|
||||
|
||||
/**
|
||||
* To be documented.
|
||||
|
@ -712,7 +711,8 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
|
|||
prot_ret[i] = j;
|
||||
}
|
||||
}
|
||||
XFree(protos);
|
||||
XFree(protos);
|
||||
*num_ret = protos_count;
|
||||
return prot_ret;
|
||||
}
|
||||
} /* ecore_x_window_prop_protocol_list_get */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -31,7 +31,7 @@ ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
|
|||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet);
|
||||
}
|
||||
} /* ecore_x_window_shape_mask_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
|
||||
|
@ -45,13 +45,13 @@ ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
|
|||
shape_win,
|
||||
ShapeBounding,
|
||||
ShapeSet);
|
||||
}
|
||||
} /* ecore_x_window_shape_window_set */
|
||||
|
||||
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,
|
||||
|
@ -62,14 +62,14 @@ ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
|
|||
shape_win,
|
||||
ShapeBounding,
|
||||
ShapeSet);
|
||||
}
|
||||
} /* ecore_x_window_shape_window_set_xy */
|
||||
|
||||
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;
|
||||
|
||||
|
@ -87,12 +87,12 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
|
|||
1,
|
||||
ShapeSet,
|
||||
Unsorted);
|
||||
}
|
||||
} /* ecore_x_window_shape_rectangle_set */
|
||||
|
||||
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)
|
||||
{
|
||||
XRectangle *rect = NULL;
|
||||
int i;
|
||||
|
@ -124,7 +124,7 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
|
|||
Unsorted);
|
||||
if (rect)
|
||||
free(rect);
|
||||
}
|
||||
} /* ecore_x_window_shape_rectangles_set */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
|
||||
|
@ -138,13 +138,13 @@ ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
|
|||
shape_win,
|
||||
ShapeBounding,
|
||||
ShapeUnion);
|
||||
}
|
||||
} /* ecore_x_window_shape_window_add */
|
||||
|
||||
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,
|
||||
|
@ -155,14 +155,14 @@ ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
|
|||
shape_win,
|
||||
ShapeBounding,
|
||||
ShapeUnion);
|
||||
}
|
||||
} /* ecore_x_window_shape_window_add_xy */
|
||||
|
||||
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;
|
||||
|
||||
|
@ -180,14 +180,14 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
|
|||
1,
|
||||
ShapeUnion,
|
||||
Unsorted);
|
||||
}
|
||||
} /* ecore_x_window_shape_rectangle_add */
|
||||
|
||||
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;
|
||||
|
||||
|
@ -205,12 +205,12 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
|
|||
1,
|
||||
ShapeIntersect,
|
||||
Unsorted);
|
||||
}
|
||||
} /* ecore_x_window_shape_rectangle_clip */
|
||||
|
||||
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;
|
||||
|
@ -242,7 +242,7 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
|
|||
Unsorted);
|
||||
if (rect)
|
||||
free(rect);
|
||||
}
|
||||
} /* ecore_x_window_shape_rectangles_add */
|
||||
|
||||
EAPI Ecore_X_Rectangle *
|
||||
ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
|
||||
|
@ -272,7 +272,7 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
|
|||
*num_ret = num;
|
||||
|
||||
return rects;
|
||||
}
|
||||
} /* ecore_x_window_shape_rectangles_get */
|
||||
|
||||
EAPI void
|
||||
ecore_x_window_shape_events_select(Ecore_X_Window win, int on)
|
||||
|
@ -282,7 +282,7 @@ ecore_x_window_shape_events_select(Ecore_X_Window win, int on)
|
|||
XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
|
||||
else
|
||||
XShapeSelectInput(_ecore_x_disp, win, 0);
|
||||
}
|
||||
} /* ecore_x_window_shape_events_select */
|
||||
|
||||
/**
|
||||
* Sets the input shape of the given window to that given by the pixmap @p mask.
|
||||
|
@ -297,8 +297,8 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
|
|||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
#ifdef ShapeInput
|
||||
XShapeCombineMask(_ecore_x_disp, win, ShapeInput, 0, 0, mask, ShapeSet);
|
||||
#else
|
||||
#else /* ifdef ShapeInput */
|
||||
XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ShapeInput */
|
||||
} /* ecore_x_window_shape_input_mask_set */
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -14,14 +14,14 @@
|
|||
|
||||
#ifdef ECORE_XI2
|
||||
#include "Ecore_Input.h"
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
|
||||
int _ecore_x_xi2_opcode = -1;
|
||||
|
||||
#ifdef ECORE_XI2
|
||||
static XIDeviceInfo *_ecore_x_xi2_devs = NULL;
|
||||
static int _ecore_x_xi2_num = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
|
||||
void
|
||||
_ecore_x_input_init(void)
|
||||
|
@ -45,8 +45,8 @@ _ecore_x_input_init(void)
|
|||
|
||||
_ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices,
|
||||
&_ecore_x_xi2_num);
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
} /* _ecore_x_input_init */
|
||||
|
||||
void
|
||||
_ecore_x_input_shutdown(void)
|
||||
|
@ -60,8 +60,8 @@ _ecore_x_input_shutdown(void)
|
|||
|
||||
_ecore_x_xi2_num = 0;
|
||||
_ecore_x_xi2_opcode = -1;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
} /* _ecore_x_input_shutdown */
|
||||
|
||||
void
|
||||
_ecore_x_input_handler(XEvent *xevent)
|
||||
|
@ -127,9 +127,9 @@ _ecore_x_input_handler(XEvent *xevent)
|
|||
evd->event_x, evd->event_y,
|
||||
evd->root_x, evd->root_y);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} /* switch */
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
} /* _ecore_x_input_handler */
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_x_input_multi_select(Ecore_X_Window win)
|
||||
|
@ -162,7 +162,8 @@ ecore_x_input_multi_select(Ecore_X_Window win)
|
|||
}
|
||||
|
||||
return find;
|
||||
#else
|
||||
#else /* ifdef ECORE_XI2 */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif /* ifdef ECORE_XI2 */
|
||||
} /* ecore_x_input_multi_select */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#endif /* ifdef HAVE_CONFIG_H */
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_x_private.h"
|
||||
|
@ -18,7 +18,7 @@
|
|||
#ifdef ECORE_XINERAMA
|
||||
static XineramaScreenInfo *_xin_info = NULL;
|
||||
static int _xin_scr_num = 0;
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XINERAMA */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xinerama_screen_count_get(void)
|
||||
|
@ -26,7 +26,7 @@ ecore_x_xinerama_screen_count_get(void)
|
|||
#ifdef ECORE_XINERAMA
|
||||
int event_base, error_base;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (_xin_info)
|
||||
XFree(_xin_info);
|
||||
|
||||
|
@ -38,9 +38,9 @@ ecore_x_xinerama_screen_count_get(void)
|
|||
return _xin_scr_num;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XINERAMA */
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_xinerama_screen_count_get */
|
||||
|
||||
EAPI int
|
||||
ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
|
||||
|
@ -72,7 +72,7 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* ifdef ECORE_XINERAMA */
|
||||
if (x)
|
||||
*x = 0;
|
||||
|
||||
|
@ -86,4 +86,5 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
|
|||
*h = DisplayHeight(_ecore_x_disp, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
} /* ecore_x_xinerama_screen_geometry_get */
|
||||
|
||||
|
|
Loading…
Reference in New Issue