re-uncrustify

SVN revision: 50745
This commit is contained in:
Mike Blumenkrantz 2010-08-02 17:47:49 +00:00
parent faa7644e22
commit d07a90f62a
34 changed files with 2948 additions and 2969 deletions

View File

@ -9,25 +9,25 @@
#ifdef EAPI #ifdef EAPI
# undef EAPI # undef EAPI
#endif #endif // ifdef EAPI
#ifdef _MSC_VER #ifdef _MSC_VER
# ifdef BUILDING_DLL # ifdef BUILDING_DLL
# define EAPI __declspec(dllexport) # define EAPI __declspec(dllexport)
# else # else // ifdef BUILDING_DLL
# define EAPI __declspec(dllimport) # define EAPI __declspec(dllimport)
# endif # endif // ifdef BUILDING_DLL
#else #else // ifdef _MSC_VER
# ifdef __GNUC__ # ifdef __GNUC__
# if __GNUC__ >= 4 # if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default"))) # define EAPI __attribute__ ((visibility("default")))
# else # else // if __GNUC__ >= 4
# define EAPI # define EAPI
# endif # endif // if __GNUC__ >= 4
# else # else // ifdef __GNUC__
# define EAPI # define EAPI
# endif # endif // ifdef __GNUC__
#endif #endif // ifdef _MSC_VER
#include <sys/types.h> #include <sys/types.h>
@ -43,21 +43,20 @@
* @li @ref Ecore_X_Flush_Group * @li @ref Ecore_X_Flush_Group
*/ */
typedef unsigned int Ecore_X_ID; typedef unsigned int Ecore_X_ID;
#ifndef _ECORE_X_WINDOW_PREDEF #ifndef _ECORE_X_WINDOW_PREDEF
typedef Ecore_X_ID Ecore_X_Window; typedef Ecore_X_ID Ecore_X_Window;
#endif #endif // ifndef _ECORE_X_WINDOW_PREDEF
#ifdef HAVE_ECORE_X_XCB #ifdef HAVE_ECORE_X_XCB
typedef Ecore_X_ID Ecore_X_Visual; typedef Ecore_X_ID Ecore_X_Visual;
#else #else // ifdef HAVE_ECORE_X_XCB
typedef void * Ecore_X_Visual; typedef void * Ecore_X_Visual;
#endif /* HAVE_ECORE_X_XCB */ #endif /* HAVE_ECORE_X_XCB */
typedef Ecore_X_ID Ecore_X_Pixmap; typedef Ecore_X_ID Ecore_X_Pixmap;
typedef Ecore_X_ID Ecore_X_Drawable; typedef Ecore_X_ID Ecore_X_Drawable;
#ifdef HAVE_ECORE_X_XCB #ifdef HAVE_ECORE_X_XCB
typedef Ecore_X_ID Ecore_X_GC; typedef Ecore_X_ID Ecore_X_GC;
#else #else // ifdef HAVE_ECORE_X_XCB
typedef void * Ecore_X_GC; typedef void * Ecore_X_GC;
#endif /* HAVE_ECORE_X_XCB */ #endif /* HAVE_ECORE_X_XCB */
typedef Ecore_X_ID Ecore_X_Atom; typedef Ecore_X_ID Ecore_X_Atom;
@ -80,7 +79,7 @@ typedef Ecore_X_ID Ecore_X_Device;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif // ifdef __cplusplus
typedef struct _Ecore_X_Rectangle typedef struct _Ecore_X_Rectangle
{ {
@ -1655,7 +1654,6 @@ EAPI Ecore_X_Cursor ecore_x_cursor_shape_get(int shape);
EAPI void ecore_x_cursor_size_set(int size); EAPI void ecore_x_cursor_size_set(int size);
EAPI int ecore_x_cursor_size_get(void); EAPI int ecore_x_cursor_size_get(void);
/* FIXME: these funcs need categorising */ /* FIXME: these funcs need categorising */
EAPI Ecore_X_Window * ecore_x_window_root_list(int *num_ret); EAPI Ecore_X_Window * ecore_x_window_root_list(int *num_ret);
EAPI Ecore_X_Window ecore_x_window_root_first_get(void); EAPI Ecore_X_Window ecore_x_window_root_first_get(void);
@ -1675,7 +1673,6 @@ EAPI void ecore_x_get_atom_name_prefetch(Ecore_X_Atom atom)
EAPI void ecore_x_get_atom_name_fetch(void); EAPI void ecore_x_get_atom_name_fetch(void);
EAPI char * ecore_x_atom_name_get(Ecore_X_Atom atom); EAPI char * ecore_x_atom_name_get(Ecore_X_Atom atom);
EAPI void ecore_x_icccm_init(void); EAPI void ecore_x_icccm_init(void);
EAPI void ecore_x_icccm_state_set( EAPI void ecore_x_icccm_state_set(
Ecore_X_Window win, Ecore_X_Window win,
@ -1778,7 +1775,6 @@ EAPI Ecore_X_Window ecore_x_icccm_client_leader_get(Ecore_X_Window win);
EAPI void ecore_x_icccm_iconic_request_send(Ecore_X_Window win, EAPI void ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
Ecore_X_Window root); Ecore_X_Window root);
typedef enum _Ecore_X_MWM_Hint_Func typedef enum _Ecore_X_MWM_Hint_Func
{ {
ECORE_X_MWM_HINT_FUNC_ALL = (1 << 0), ECORE_X_MWM_HINT_FUNC_ALL = (1 << 0),
@ -2116,7 +2112,6 @@ EAPI void ecore_x_netwm_desktop_request_send(
Ecore_X_Window root, Ecore_X_Window root,
unsigned int desktop); unsigned int desktop);
EAPI void ecore_x_e_init(void); EAPI void ecore_x_e_init(void);
EAPI void ecore_x_e_frame_size_set( EAPI void ecore_x_e_frame_size_set(
Ecore_X_Window win, Ecore_X_Window win,
@ -2138,7 +2133,6 @@ EAPI void ecore_x_e_virtual_keyboard_state_send(
Ecore_X_Window win, Ecore_X_Window win,
Ecore_X_Virtual_Keyboard_State state); Ecore_X_Virtual_Keyboard_State state);
/* Illume functions */ /* Illume functions */
EAPI void ecore_x_e_illume_zone_set( EAPI void ecore_x_e_illume_zone_set(
Ecore_X_Window win, Ecore_X_Window win,
@ -2695,9 +2689,9 @@ EAPI Eina_Bool ecore_x_input_multi_select(Ecore_X_Window win);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif // ifdef __cplusplus
#include <Ecore_X_Atoms.h> #include <Ecore_X_Atoms.h>
#include <Ecore_X_Cursor.h> #include <Ecore_X_Cursor.h>
#endif #endif // ifndef _ECORE_X_H

View File

@ -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_KEYPAD;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
/* Illume specific atoms */ /* 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;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE_LIST; 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_ZONE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE; 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_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_DRAW_DONE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED;

View File

@ -83,4 +83,4 @@
#define ECORE_X_CURSOR_WATCH 150 #define ECORE_X_CURSOR_WATCH 150
#define ECORE_X_CURSOR_XTERM 152 #define ECORE_X_CURSOR_XTERM 152
#endif #endif // ifndef _ECORE_X_CURSOR_H

View File

@ -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_ZONE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 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_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_DRAW_DONE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED = 0;

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -14,7 +14,7 @@
#ifdef LOGRT #ifdef LOGRT
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif /* ifdef LOGRT */
#include "Ecore.h" #include "Ecore.h"
#include "ecore_private.h" #include "ecore_private.h"
@ -43,13 +43,13 @@ int _ecore_xlib_log_dom = -1;
#ifdef ECORE_XRANDR #ifdef ECORE_XRANDR
static int _ecore_x_event_randr_id = 0; static int _ecore_x_event_randr_id = 0;
#endif #endif /* ifdef ECORE_XRANDR */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
static int _ecore_x_event_fixes_selection_id = 0; static int _ecore_x_event_fixes_selection_id = 0;
#endif #endif /* ifdef ECORE_XFIXES */
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
static int _ecore_x_event_damage_id = 0; static int _ecore_x_event_damage_id = 0;
#endif #endif /* ifdef ECORE_XDAMAGE */
static int _ecore_x_event_handlers_num = 0; static int _ecore_x_event_handlers_num = 0;
static void (**_ecore_x_event_handlers) (XEvent * event) = NULL; static void (**_ecore_x_event_handlers) (XEvent * event) = NULL;
@ -160,7 +160,8 @@ _logrt_init(void)
_logrt_real_reply = dlsym(lib, "_XReply"); _logrt_real_reply = dlsym(lib, "_XReply");
t0 = ecore_time_get(); t0 = ecore_time_get();
} } /* _logrt_init */
Status Status
_XReply(Display *disp, void *rep, int extra, Bool discard) _XReply(Display *disp, void *rep, int extra, Bool discard)
{ {
@ -204,8 +205,9 @@ _XReply(Display *disp, void *rep, int extra, Bool discard)
// fixme: logme // fixme: logme
return _logrt_real_reply(disp, rep, extra, discard); return _logrt_real_reply(disp, rep, extra, discard);
} } /* _XReply */
#endif
#endif /* ifdef LOGRT */
/** /**
* @defgroup Ecore_X_Init_Group X Library Init and Shutdown Functions * @defgroup Ecore_X_Init_Group X Library Init and Shutdown Functions
@ -230,21 +232,21 @@ ecore_x_init(const char *name)
#ifdef ECORE_XSS #ifdef ECORE_XSS
int screensaver_base = 0; int screensaver_base = 0;
int screensaver_err_base = 0; int screensaver_err_base = 0;
#endif #endif /* ifdef ECORE_XSS */
int sync_base = 0; int sync_base = 0;
int sync_err_base = 0; int sync_err_base = 0;
#ifdef ECORE_XRANDR #ifdef ECORE_XRANDR
int randr_base = 0; int randr_base = 0;
int randr_err_base = 0; int randr_err_base = 0;
#endif #endif /* ifdef ECORE_XRANDR */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
int fixes_base = 0; int fixes_base = 0;
int fixes_err_base = 0; int fixes_err_base = 0;
#endif #endif /* ifdef ECORE_XFIXES */
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
int damage_base = 0; int damage_base = 0;
int damage_err_base = 0; int damage_err_base = 0;
#endif #endif /* ifdef ECORE_XDAMAGE */
if (++_ecore_x_init_count != 1) if (++_ecore_x_init_count != 1)
return _ecore_x_init_count; return _ecore_x_init_count;
@ -252,7 +254,7 @@ ecore_x_init(const char *name)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
#ifdef LOGRT #ifdef LOGRT
_logrt_init(); _logrt_init();
#endif #endif /* ifdef LOGRT */
_ecore_xlib_log_dom = eina_log_domain_register("EcoreX11", _ecore_xlib_log_dom = eina_log_domain_register("EcoreX11",
ECORE_XLIB_DEFAULT_LOG_COLOR); ECORE_XLIB_DEFAULT_LOG_COLOR);
@ -272,7 +274,7 @@ ecore_x_init(const char *name)
#ifdef EVAS_FRAME_QUEUING #ifdef EVAS_FRAME_QUEUING
XInitThreads(); XInitThreads();
#endif #endif /* ifdef EVAS_FRAME_QUEUING */
_ecore_x_disp = XOpenDisplay((char *)name); _ecore_x_disp = XOpenDisplay((char *)name);
if (!_ecore_x_disp) if (!_ecore_x_disp)
goto shutdown_ecore_event; goto shutdown_ecore_event;
@ -297,7 +299,7 @@ ecore_x_init(const char *name)
_ecore_x_event_screensaver_id = screensaver_base; _ecore_x_event_screensaver_id = screensaver_base;
ECORE_X_EVENT_HANDLERS_GROW(screensaver_base, ScreenSaverNumberEvents); ECORE_X_EVENT_HANDLERS_GROW(screensaver_base, ScreenSaverNumberEvents);
#endif #endif /* ifdef ECORE_XSS */
if (XSyncQueryExtension(_ecore_x_disp, &sync_base, &sync_err_base)) 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_randr_id = randr_base;
ECORE_X_EVENT_HANDLERS_GROW(randr_base, RRNumberEvents); ECORE_X_EVENT_HANDLERS_GROW(randr_base, RRNumberEvents);
#endif #endif /* ifdef ECORE_XRANDR */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
if (XFixesQueryExtension(_ecore_x_disp, &fixes_base, &fixes_err_base)) if (XFixesQueryExtension(_ecore_x_disp, &fixes_base, &fixes_err_base))
_ecore_x_event_fixes_selection_id = fixes_base; _ecore_x_event_fixes_selection_id = fixes_base;
ECORE_X_EVENT_HANDLERS_GROW(fixes_base, XFixesNumberEvents); ECORE_X_EVENT_HANDLERS_GROW(fixes_base, XFixesNumberEvents);
#endif #endif /* ifdef ECORE_XFIXES */
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
if (XDamageQueryExtension(_ecore_x_disp, &damage_base, &damage_err_base)) if (XDamageQueryExtension(_ecore_x_disp, &damage_base, &damage_err_base))
_ecore_x_event_damage_id = damage_base; _ecore_x_event_damage_id = damage_base;
ECORE_X_EVENT_HANDLERS_GROW(damage_base, XDamageNumberEvents); 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 *)); _ecore_x_event_handlers = calloc(_ecore_x_event_handlers_num, sizeof(void *));
if (!_ecore_x_event_handlers) if (!_ecore_x_event_handlers)
@ -337,7 +339,7 @@ ecore_x_init(const char *name)
#ifdef ECORE_XCURSOR #ifdef ECORE_XCURSOR
_ecore_x_xcursor = XcursorSupportsARGB(_ecore_x_disp); _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[AnyXEvent] = _ecore_x_event_handle_any_event;
_ecore_x_event_handlers[KeyPress] = _ecore_x_event_handle_key_press; _ecore_x_event_handlers[KeyPress] = _ecore_x_event_handle_key_press;
_ecore_x_event_handlers[KeyRelease] = _ecore_x_event_handle_key_release; _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; _ecore_x_event_handle_mapping_notify;
#ifdef GenericEvent #ifdef GenericEvent
_ecore_x_event_handlers[GenericEvent] = _ecore_x_event_handle_generic_event; _ecore_x_event_handlers[GenericEvent] = _ecore_x_event_handle_generic_event;
#endif #endif /* ifdef GenericEvent */
if (_ecore_x_event_shape_id) if (_ecore_x_event_shape_id)
_ecore_x_event_handlers[_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; RRNotify] = _ecore_x_event_handle_randr_notify;
} }
#endif #endif /* ifdef ECORE_XRANDR */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
if (_ecore_x_event_fixes_selection_id) if (_ecore_x_event_fixes_selection_id)
_ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] = _ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] =
_ecore_x_event_handle_fixes_selection_notify; _ecore_x_event_handle_fixes_selection_notify;
#endif #endif /* ifdef ECORE_XFIXES */
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
if (_ecore_x_event_damage_id) if (_ecore_x_event_damage_id)
_ecore_x_event_handlers[_ecore_x_event_damage_id] = _ecore_x_event_handlers[_ecore_x_event_damage_id] =
_ecore_x_event_handle_damage_notify; _ecore_x_event_handle_damage_notify;
#endif #endif /* ifdef ECORE_XDAMAGE */
#ifdef ECORE_XKB #ifdef ECORE_XKB
// set x autorepeat detection to on. that means instead of // set x autorepeat detection to on. that means instead of
// press-release-press-release-press-release // press-release-press-release-press-release
@ -443,7 +445,7 @@ ecore_x_init(const char *name)
XkbSetDetectableAutoRepeat(_ecore_x_disp, 1, &works); XkbSetDetectableAutoRepeat(_ecore_x_disp, 1, &works);
} }
while (0); while (0);
#endif #endif /* ifdef ECORE_XKB */
if (!ECORE_X_EVENT_ANY) if (!ECORE_X_EVENT_ANY)
{ {
@ -629,7 +631,7 @@ _im_create_error:
} }
_im_create_end: _im_create_end:
#endif #endif /* ifdef ENABLE_XIM */
return _ecore_x_init_count; return _ecore_x_init_count;
free_event_handlers: free_event_handlers:
@ -642,7 +644,7 @@ close_display:
shutdown_ecore_event: shutdown_ecore_event:
ecore_event_shutdown(); ecore_event_shutdown();
return --_ecore_x_init_count; return --_ecore_x_init_count;
} } /* ecore_x_init */
static int static int
_ecore_x_shutdown(int close_display) _ecore_x_shutdown(int close_display)
@ -668,7 +670,7 @@ _ecore_x_shutdown(int close_display)
_ecore_x_im = NULL; _ecore_x_im = NULL;
} }
#endif #endif /* ifdef ENABLE_XIM */
ecore_main_fd_handler_del(_ecore_x_fd_handler_handle); ecore_main_fd_handler_del(_ecore_x_fd_handler_handle);
if (close_display) if (close_display)
XCloseDisplay(_ecore_x_disp); XCloseDisplay(_ecore_x_disp);
@ -687,7 +689,7 @@ _ecore_x_shutdown(int close_display)
eina_log_domain_unregister(_ecore_xlib_log_dom); eina_log_domain_unregister(_ecore_xlib_log_dom);
_ecore_xlib_log_dom = -1; _ecore_xlib_log_dom = -1;
return _ecore_x_init_count; return _ecore_x_init_count;
} } /* _ecore_x_shutdown */
/** /**
* Shuts down the Ecore X library. * Shuts down the Ecore X library.
@ -703,7 +705,7 @@ EAPI int
ecore_x_shutdown(void) ecore_x_shutdown(void)
{ {
return _ecore_x_shutdown(1); return _ecore_x_shutdown(1);
} } /* ecore_x_shutdown */
/** /**
* Shuts down the Ecore X library. * Shuts down the Ecore X library.
@ -716,7 +718,7 @@ EAPI int
ecore_x_disconnect(void) ecore_x_disconnect(void)
{ {
return _ecore_x_shutdown(0); return _ecore_x_shutdown(0);
} } /* ecore_x_disconnect */
/** /**
* @defgroup Ecore_X_Display_Attr_Group X Display Attributes * @defgroup Ecore_X_Display_Attr_Group X Display Attributes
@ -733,7 +735,7 @@ EAPI Ecore_X_Display *
ecore_x_display_get(void) ecore_x_display_get(void)
{ {
return (Ecore_X_Display *)_ecore_x_disp; return (Ecore_X_Display *)_ecore_x_disp;
} } /* ecore_x_display_get */
/** /**
* Retrieves the X display file descriptor. * Retrieves the X display file descriptor.
@ -745,7 +747,7 @@ ecore_x_fd_get(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ConnectionNumber(_ecore_x_disp); return ConnectionNumber(_ecore_x_disp);
} } /* ecore_x_fd_get */
/** /**
* Retrieves the Ecore_X_Screen handle used for the current X connection. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp); 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. * 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; t = 0.0;
_ecore_x_double_click_time = t; _ecore_x_double_click_time = t;
} } /* ecore_x_double_click_time_set */
/** /**
* Retrieves the double and triple click flag timeout. * Retrieves the double and triple click flag timeout.
@ -790,7 +792,7 @@ EAPI double
ecore_x_double_click_time_get(void) ecore_x_double_click_time_get(void)
{ {
return _ecore_x_double_click_time; return _ecore_x_double_click_time;
} } /* ecore_x_double_click_time_get */
/** /**
* @defgroup Ecore_X_Flush_Group X Synchronization Functions * @defgroup Ecore_X_Flush_Group X Synchronization Functions
@ -808,7 +810,7 @@ ecore_x_flush(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFlush(_ecore_x_disp); XFlush(_ecore_x_disp);
} } /* ecore_x_flush */
/** /**
* Flushes the command buffer and waits until all requests have been * Flushes the command buffer and waits until all requests have been
@ -820,7 +822,7 @@ ecore_x_sync(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSync(_ecore_x_disp, False); XSync(_ecore_x_disp, False);
} } /* ecore_x_sync */
/** /**
* Kill all clients with subwindows under a given window. * Kill all clients with subwindows under a given window.
@ -856,7 +858,7 @@ ecore_x_killall(Ecore_X_Window root)
} }
XUngrabServer(_ecore_x_disp); XUngrabServer(_ecore_x_disp);
XSync(_ecore_x_disp, False); XSync(_ecore_x_disp, False);
} } /* ecore_x_killall */
/** /**
* Kill a specific client * Kill a specific client
@ -870,7 +872,7 @@ ecore_x_kill(Ecore_X_Window win)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XKillClient(_ecore_x_disp, win); XKillClient(_ecore_x_disp, win);
} } /* ecore_x_kill */
/** /**
* Return the last event time * Return the last event time
@ -879,7 +881,7 @@ EAPI Ecore_X_Time
ecore_x_current_time_get(void) ecore_x_current_time_get(void)
{ {
return _ecore_x_event_last_time; return _ecore_x_event_last_time;
} } /* ecore_x_current_time_get */
/** /**
* Return the screen DPI * Return the screen DPI
@ -901,7 +903,7 @@ ecore_x_dpi_get(void)
return 75; return 75;
return (((s->width * 254) / s->mwidth) + 5) / 10; return (((s->width * 254) / s->mwidth) + 5) / 10;
} } /* ecore_x_dpi_get */
/** /**
* Invoke the standard system beep to alert users * Invoke the standard system beep to alert users
@ -925,7 +927,7 @@ ecore_x_bell(int percent)
return EINA_FALSE; return EINA_FALSE;
return EINA_TRUE; return EINA_TRUE;
} } /* ecore_x_bell */
static Eina_Bool static Eina_Bool
_ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__) _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)) if (XFilterEvent(&ev, ev.xkey.window))
continue; continue;
#endif #endif /* ifdef ENABLE_XIM */
if ((ev.type >= 0) && (ev.type < _ecore_x_event_handlers_num)) 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; return ECORE_CALLBACK_RENEW;
} } /* _ecore_x_fd_handler */
static Eina_Bool static Eina_Bool
_ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__) _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_RENEW;
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
} } /* _ecore_x_fd_handler_buf */
static int static int
_ecore_x_key_mask_get(KeySym sym) _ecore_x_key_mask_get(KeySym sym)
@ -1014,28 +1016,7 @@ _ecore_x_key_mask_get(KeySym sym)
} }
return 0; return 0;
} } /* _ecore_x_key_mask_get */
/*****************************************************************************/ /*****************************************************************************/
/*****************************************************************************/ /*****************************************************************************/
@ -1058,7 +1039,7 @@ ecore_x_window_root_list(int *num_ret)
Ecore_X_Window *roots; Ecore_X_Window *roots;
#ifdef ECORE_XPRINT #ifdef ECORE_XPRINT
int xp_base, xp_err_base; int xp_base, xp_err_base;
#endif #endif /* ifdef ECORE_XPRINT */
if (!num_ret) if (!num_ret)
return NULL; return NULL;
@ -1139,7 +1120,7 @@ ecore_x_window_root_list(int *num_ret)
roots[i] = RootWindow(_ecore_x_disp, i); roots[i] = RootWindow(_ecore_x_disp, i);
} }
#else #else /* ifdef ECORE_XPRINT */
num = ScreenCount(_ecore_x_disp); num = ScreenCount(_ecore_x_disp);
roots = malloc(num * sizeof(Window)); roots = malloc(num * sizeof(Window));
if (!roots) if (!roots)
@ -1148,9 +1129,9 @@ ecore_x_window_root_list(int *num_ret)
*num_ret = num; *num_ret = num;
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
roots[i] = RootWindow(_ecore_x_disp, i); roots[i] = RootWindow(_ecore_x_disp, i);
#endif #endif /* ifdef ECORE_XPRINT */
return roots; return roots;
} } /* ecore_x_window_root_list */
EAPI Ecore_X_Window EAPI Ecore_X_Window
ecore_x_window_root_first_get(void) ecore_x_window_root_first_get(void)
@ -1172,8 +1153,7 @@ ecore_x_window_root_first_get(void)
free(roots); free(roots);
return root; 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);
@ -1184,7 +1164,7 @@ _ecore_x_window_manage_error(void *data __UNUSED__)
if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) && if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) &&
(ecore_x_error_code_get() == BadAccess)) (ecore_x_error_code_get() == BadAccess))
_ecore_x_window_manage_failed = 1; _ecore_x_window_manage_failed = 1;
} } /* _ecore_x_window_manage_error */
EAPI int EAPI int
ecore_x_window_manage(Ecore_X_Window win) ecore_x_window_manage(Ecore_X_Window win)
@ -1218,7 +1198,7 @@ ecore_x_window_manage(Ecore_X_Window win)
} }
return 1; return 1;
} } /* ecore_x_window_manage */
EAPI void EAPI void
ecore_x_window_container_manage(Ecore_X_Window win) 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, XSelectInput(_ecore_x_disp, win,
SubstructureRedirectMask | SubstructureRedirectMask |
SubstructureNotifyMask); SubstructureNotifyMask);
} } /* ecore_x_window_container_manage */
EAPI void EAPI void
ecore_x_window_client_manage(Ecore_X_Window win) ecore_x_window_client_manage(Ecore_X_Window win)
@ -1243,7 +1223,7 @@ ecore_x_window_client_manage(Ecore_X_Window win)
SubstructureNotifyMask SubstructureNotifyMask
); );
XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
} } /* ecore_x_window_client_manage */
EAPI void EAPI void
ecore_x_window_sniff(Ecore_X_Window win) 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, XSelectInput(_ecore_x_disp, win,
PropertyChangeMask | PropertyChangeMask |
SubstructureNotifyMask); SubstructureNotifyMask);
} } /* ecore_x_window_sniff */
EAPI void EAPI void
ecore_x_window_client_sniff(Ecore_X_Window win) ecore_x_window_client_sniff(Ecore_X_Window win)
@ -1266,12 +1246,7 @@ ecore_x_window_client_sniff(Ecore_X_Window win)
StructureNotifyMask | StructureNotifyMask |
SubstructureNotifyMask); SubstructureNotifyMask);
XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
} } /* ecore_x_window_client_sniff */
EAPI int EAPI int
ecore_x_window_attributes_get(Ecore_X_Window win, ecore_x_window_attributes_get(Ecore_X_Window win,
@ -1314,21 +1289,21 @@ ecore_x_window_attributes_get(Ecore_X_Window win,
att_ret->colormap = att.colormap; att_ret->colormap = att.colormap;
att_ret->visual = att.visual; att_ret->visual = att.visual;
return 1; return 1;
} } /* ecore_x_window_attributes_get */
EAPI void EAPI void
ecore_x_window_save_set_add(Ecore_X_Window win) ecore_x_window_save_set_add(Ecore_X_Window win)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XAddToSaveSet(_ecore_x_disp, win); XAddToSaveSet(_ecore_x_disp, win);
} } /* ecore_x_window_save_set_add */
EAPI void EAPI void
ecore_x_window_save_set_del(Ecore_X_Window win) ecore_x_window_save_set_del(Ecore_X_Window win)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XRemoveFromSaveSet(_ecore_x_disp, win); XRemoveFromSaveSet(_ecore_x_disp, win);
} } /* ecore_x_window_save_set_del */
EAPI Ecore_X_Window * EAPI Ecore_X_Window *
ecore_x_window_children_get(Ecore_X_Window win, int *num) 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; return windows;
} } /* ecore_x_window_children_get */
EAPI int EAPI int
ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XChangePointerControl(_ecore_x_disp, 1, 1, return XChangePointerControl(_ecore_x_disp, 1, 1,
accel_num, accel_denom, threshold); accel_num, accel_denom, threshold);
} } /* ecore_x_pointer_control_set */
EAPI int EAPI int
ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XGetPointerControl(_ecore_x_disp, return XGetPointerControl(_ecore_x_disp,
accel_num, accel_denom, threshold); accel_num, accel_denom, threshold);
} } /* ecore_x_pointer_control_get */
EAPI int EAPI int
ecore_x_pointer_mapping_set(unsigned char *map, int nmap) ecore_x_pointer_mapping_set(unsigned char *map, int nmap)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XSetPointerMapping(_ecore_x_disp, map, nmap); return XSetPointerMapping(_ecore_x_disp, map, nmap);
} } /* ecore_x_pointer_mapping_set */
EAPI int EAPI int
ecore_x_pointer_mapping_get(unsigned char *map, int nmap) ecore_x_pointer_mapping_get(unsigned char *map, int nmap)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XGetPointerMapping(_ecore_x_disp, map, nmap); return XGetPointerMapping(_ecore_x_disp, map, nmap);
} } /* ecore_x_pointer_mapping_get */
EAPI int EAPI int
ecore_x_pointer_grab(Ecore_X_Window win) ecore_x_pointer_grab(Ecore_X_Window win)
@ -1402,7 +1377,7 @@ ecore_x_pointer_grab(Ecore_X_Window win)
return 1; return 1;
return 0; return 0;
} } /* ecore_x_pointer_grab */
EAPI int EAPI int
ecore_x_pointer_confine_grab(Ecore_X_Window win) 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 1;
return 0; return 0;
} } /* ecore_x_pointer_confine_grab */
EAPI void EAPI void
ecore_x_pointer_ungrab(void) ecore_x_pointer_ungrab(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XUngrabPointer(_ecore_x_disp, CurrentTime); XUngrabPointer(_ecore_x_disp, CurrentTime);
} } /* ecore_x_pointer_ungrab */
EAPI int EAPI int
ecore_x_pointer_warp(Ecore_X_Window win, int x, int y) ecore_x_pointer_warp(Ecore_X_Window win, int x, int y)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y); return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y);
} } /* ecore_x_pointer_warp */
EAPI int EAPI int
ecore_x_keyboard_grab(Ecore_X_Window win) ecore_x_keyboard_grab(Ecore_X_Window win)
@ -1442,14 +1417,14 @@ ecore_x_keyboard_grab(Ecore_X_Window win)
return 1; return 1;
return 0; return 0;
} } /* ecore_x_keyboard_grab */
EAPI void EAPI void
ecore_x_keyboard_ungrab(void) ecore_x_keyboard_ungrab(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XUngrabKeyboard(_ecore_x_disp, CurrentTime); XUngrabKeyboard(_ecore_x_disp, CurrentTime);
} } /* ecore_x_keyboard_ungrab */
EAPI void EAPI void
ecore_x_grab(void) ecore_x_grab(void)
@ -1458,7 +1433,7 @@ ecore_x_grab(void)
_ecore_x_grab_count++; _ecore_x_grab_count++;
if (_ecore_x_grab_count == 1) if (_ecore_x_grab_count == 1)
XGrabServer(_ecore_x_disp); XGrabServer(_ecore_x_disp);
} } /* ecore_x_grab */
EAPI void EAPI void
ecore_x_ungrab(void) ecore_x_ungrab(void)
@ -1470,7 +1445,7 @@ ecore_x_ungrab(void)
if (_ecore_x_grab_count == 0) if (_ecore_x_grab_count == 0)
XUngrabServer(_ecore_x_disp); XUngrabServer(_ecore_x_disp);
} } /* ecore_x_ungrab */
int _ecore_window_grabs_num = 0; int _ecore_window_grabs_num = 0;
Window *_ecore_window_grabs = NULL; 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_window_grab_replay_func = func; _ecore_window_grab_replay_func = func;
_ecore_window_grab_replay_data = data; _ecore_window_grab_replay_data = data;
} } /* ecore_x_passive_grab_replay_func_set */
EAPI void EAPI void
ecore_x_window_button_grab(Ecore_X_Window win, int button, 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 = realloc(_ecore_window_grabs,
_ecore_window_grabs_num * sizeof(Window)); _ecore_window_grabs_num * sizeof(Window));
_ecore_window_grabs[_ecore_window_grabs_num - 1] = win; _ecore_window_grabs[_ecore_window_grabs_num - 1] = win;
} } /* ecore_x_window_button_grab */
void void
_ecore_x_sync_magic_send(int val, Ecore_X_Window swin) _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[1] = 0x10000000 + val;
xev.xclient.data.l[2] = swin; xev.xclient.data.l[2] = swin;
XSendEvent(_ecore_x_disp, _ecore_x_private_win, False, NoEventMask, &xev); XSendEvent(_ecore_x_disp, _ecore_x_private_win, False, NoEventMask, &xev);
} } /* _ecore_x_sync_magic_send */
void void
_ecore_x_window_grab_remove(Ecore_X_Window win) _ecore_x_window_grab_remove(Ecore_X_Window win)
@ -1566,7 +1541,7 @@ _ecore_x_window_grab_remove(Ecore_X_Window win)
sizeof(Window)); sizeof(Window));
} }
} }
} } /* _ecore_x_window_grab_remove */
EAPI void EAPI void
ecore_x_window_button_ungrab(Ecore_X_Window win, int button, 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++) for (i = 0; i < 8; i++)
XUngrabButton(_ecore_x_disp, b, m | locks[i], win); XUngrabButton(_ecore_x_disp, b, m | locks[i], win);
_ecore_x_sync_magic_send(1, win); _ecore_x_sync_magic_send(1, win);
} } /* ecore_x_window_button_ungrab */
int _ecore_key_grabs_num = 0; int _ecore_key_grabs_num = 0;
Window *_ecore_key_grabs = NULL; 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 = realloc(_ecore_key_grabs,
_ecore_key_grabs_num * sizeof(Window)); _ecore_key_grabs_num * sizeof(Window));
_ecore_key_grabs[_ecore_key_grabs_num - 1] = win; _ecore_key_grabs[_ecore_key_grabs_num - 1] = win;
} } /* ecore_x_window_key_grab */
void void
_ecore_x_key_grab_remove(Ecore_X_Window win) _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_key_grabs_num * sizeof(Window));
} }
} }
} } /* _ecore_x_key_grab_remove */
EAPI void EAPI void
ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key, 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++) for (i = 0; i < 8; i++)
XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win); XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win);
_ecore_x_sync_magic_send(2, win); _ecore_x_sync_magic_send(2, win);
} } /* ecore_x_window_key_ungrab */
/** /**
* Send client message with given type and format 32. * 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; xev.xclient.data.l[4] = d4;
return XSendEvent(_ecore_x_disp, win, False, mask, &xev); return XSendEvent(_ecore_x_disp, win, False, mask, &xev);
} } /* ecore_x_client_message32_send */
/** /**
* Send client message with given type and format 8. * 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); memset(xev.xclient.data.b + len, 0, 20 - len);
return XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); return XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
} } /* ecore_x_client_message8_send */
EAPI int EAPI int
ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y) 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.is_hint = 0;
xev.xmotion.same_screen = 1; xev.xmotion.same_screen = 1;
return XSendEvent(_ecore_x_disp, win, True, PointerMotionMask, &xev); return XSendEvent(_ecore_x_disp, win, True, PointerMotionMask, &xev);
} } /* ecore_x_mouse_move_send */
EAPI int EAPI int
ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b) 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.button = b;
xev.xbutton.same_screen = 1; xev.xbutton.same_screen = 1;
return XSendEvent(_ecore_x_disp, win, True, ButtonPressMask, &xev); return XSendEvent(_ecore_x_disp, win, True, ButtonPressMask, &xev);
} } /* ecore_x_mouse_down_send */
EAPI int EAPI int
ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b) 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.button = b;
xev.xbutton.same_screen = 1; xev.xbutton.same_screen = 1;
return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev); return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev);
} } /* ecore_x_mouse_up_send */
EAPI void EAPI void
ecore_x_focus_reset(void) ecore_x_focus_reset(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSetInputFocus(_ecore_x_disp, PointerRoot, RevertToPointerRoot, CurrentTime); XSetInputFocus(_ecore_x_disp, PointerRoot, RevertToPointerRoot, CurrentTime);
} } /* ecore_x_focus_reset */
EAPI void EAPI void
ecore_x_events_allow_all(void) ecore_x_events_allow_all(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XAllowEvents(_ecore_x_disp, AsyncBoth, CurrentTime); XAllowEvents(_ecore_x_disp, AsyncBoth, CurrentTime);
} } /* ecore_x_events_allow_all */
EAPI void EAPI void
ecore_x_pointer_last_xy_get(int *x, int *y) 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) if (y)
*y = _ecore_x_event_last_root_y; *y = _ecore_x_event_last_root_y;
} } /* ecore_x_pointer_last_xy_get */
EAPI void EAPI void
ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y) 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) if (y)
*y = wy; *y = wy;
} } /* ecore_x_pointer_xy_get */
/*****************************************************************************/ /*****************************************************************************/
/*****************************************************************************/ /*****************************************************************************/
/*****************************************************************************/ /*****************************************************************************/
@ -1937,4 +1913,5 @@ _ecore_x_event_modifier(unsigned int state)
xmodifiers |= ECORE_X_LOCK_CAPS; xmodifiers |= ECORE_X_LOCK_CAPS;
return xmodifiers; return xmodifiers;
} } /* _ecore_x_event_modifier */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#ifdef HAVE_ALLOCA_H #ifdef HAVE_ALLOCA_H
# include <alloca.h> # include <alloca.h>
@ -15,13 +15,13 @@
#elif defined _MSC_VER #elif defined _MSC_VER
# include <malloc.h> # include <malloc.h>
# define alloca _alloca # define alloca _alloca
#else #else /* ifdef HAVE_ALLOCA_H */
# include <stddef.h> # include <stddef.h>
# ifdef __cplusplus # ifdef __cplusplus
extern "C" extern "C"
# endif # endif /* ifdef __cplusplus */
void * alloca (size_t); void * alloca (size_t);
#endif #endif /* ifdef HAVE_ALLOCA_H */
#include <string.h> #include <string.h>
@ -296,7 +296,7 @@ _ecore_x_atoms_init(void)
for (i = 0; i < num; i++) names[i] = (char *)items[i].name; for (i = 0; i < num; i++) names[i] = (char *)items[i].name;
XInternAtoms(_ecore_x_disp, names, num, False, atoms); XInternAtoms(_ecore_x_disp, names, num, False, atoms);
for (i = 0; i < num; i++) *(items[i].atom) = atoms[i]; for (i = 0; i < num; i++) *(items[i].atom) = atoms[i];
} } /* _ecore_x_atoms_init */
/** /**
* Retrieves the atom value associated with the given name. * Retrieves the atom value associated with the given name.
@ -311,7 +311,7 @@ ecore_x_atom_get(const char *name)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XInternAtom(_ecore_x_disp, name, False); return XInternAtom(_ecore_x_disp, name, False);
} } /* ecore_x_atom_get */
EAPI void EAPI void
ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms) 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); XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int);
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
atoms[i] = atoms_int[i]; atoms[i] = atoms_int[i];
} } /* ecore_x_atoms_get */
EAPI char * EAPI char *
ecore_x_atom_name_get(Ecore_X_Atom atom) ecore_x_atom_name_get(Ecore_X_Atom atom)
@ -348,4 +348,5 @@ ecore_x_atom_name_get(Ecore_X_Atom atom)
XFree(xname); XFree(xname);
return name; return name;
} } /* ecore_x_atom_name_get */

View File

@ -4,8 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "ecore_x_private.h" #include "ecore_x_private.h"
#include "Ecore_X.h" #include "Ecore_X.h"
@ -23,15 +22,15 @@ _ecore_x_composite_init(void)
if (XCompositeQueryVersion(_ecore_x_disp, &major, &minor)) if (XCompositeQueryVersion(_ecore_x_disp, &major, &minor))
_composite_available = 1; _composite_available = 1;
#endif #endif /* ifdef ECORE_XCOMPOSITE */
} } /* _ecore_x_composite_init */
EAPI int EAPI int
ecore_x_composite_query(void) ecore_x_composite_query(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _composite_available; return _composite_available;
} } /* ecore_x_composite_query */
EAPI void EAPI void
ecore_x_composite_redirect_window(Ecore_X_Window win, ecore_x_composite_redirect_window(Ecore_X_Window win,
@ -50,10 +49,10 @@ ecore_x_composite_redirect_window(Ecore_X_Window win,
case ECORE_X_COMPOSITE_UPDATE_MANUAL: case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual; update = CompositeRedirectManual;
break; break;
} } /* switch */
XCompositeRedirectWindow(_ecore_x_disp, win, update); XCompositeRedirectWindow(_ecore_x_disp, win, update);
#endif #endif /* ifdef ECORE_XCOMPOSITE */
} } /* ecore_x_composite_redirect_window */
EAPI void EAPI void
ecore_x_composite_redirect_subwindows(Ecore_X_Window win, ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
@ -72,10 +71,10 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
case ECORE_X_COMPOSITE_UPDATE_MANUAL: case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual; update = CompositeRedirectManual;
break; break;
} } /* switch */
XCompositeRedirectSubwindows(_ecore_x_disp, win, update); XCompositeRedirectSubwindows(_ecore_x_disp, win, update);
#endif #endif /* ifdef ECORE_XCOMPOSITE */
} } /* ecore_x_composite_redirect_subwindows */
EAPI void EAPI void
ecore_x_composite_unredirect_window(Ecore_X_Window win, ecore_x_composite_unredirect_window(Ecore_X_Window win,
@ -94,10 +93,10 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win,
case ECORE_X_COMPOSITE_UPDATE_MANUAL: case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual; update = CompositeRedirectManual;
break; break;
} } /* switch */
XCompositeUnredirectWindow(_ecore_x_disp, win, update); XCompositeUnredirectWindow(_ecore_x_disp, win, update);
#endif #endif /* ifdef ECORE_XCOMPOSITE */
} } /* ecore_x_composite_unredirect_window */
EAPI void EAPI void
ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
@ -116,10 +115,10 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
case ECORE_X_COMPOSITE_UPDATE_MANUAL: case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual; update = CompositeRedirectManual;
break; break;
} } /* switch */
XCompositeUnredirectSubwindows(_ecore_x_disp, win, update); XCompositeUnredirectSubwindows(_ecore_x_disp, win, update);
#endif #endif /* ifdef ECORE_XCOMPOSITE */
} } /* ecore_x_composite_unredirect_subwindows */
EAPI Ecore_X_Pixmap EAPI Ecore_X_Pixmap
ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win) 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 #ifdef ECORE_XCOMPOSITE
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win); pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win);
#endif #endif /* ifdef ECORE_XCOMPOSITE */
return pixmap; return pixmap;
} } /* ecore_x_composite_name_window_pixmap_get */
EAPI Ecore_X_Window EAPI Ecore_X_Window
ecore_x_composite_render_window_enable(Ecore_X_Window root) 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; rect.height = 1;
XShapeCombineRectangles(_ecore_x_disp, win, ShapeInput, 0, 0, &rect, 1, XShapeCombineRectangles(_ecore_x_disp, win, ShapeInput, 0, 0, &rect, 1,
ShapeSet, Unsorted); ShapeSet, Unsorted);
#endif #endif /* ifdef ECORE_XCOMPOSITE */
return win; return win;
} } /* ecore_x_composite_render_window_enable */
EAPI void EAPI void
ecore_x_composite_render_window_disable(Ecore_X_Window root) 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 #ifdef ECORE_XCOMPOSITE
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XCompositeReleaseOverlayWindow(_ecore_x_disp, root); XCompositeReleaseOverlayWindow(_ecore_x_disp, root);
#endif #endif /* ifdef ECORE_XCOMPOSITE */
} } /* ecore_x_composite_render_window_disable */

View File

@ -4,18 +4,17 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include "ecore_x_private.h" #include "ecore_x_private.h"
EAPI int EAPI int
ecore_x_cursor_color_supported_get(void) ecore_x_cursor_color_supported_get(void)
{ {
return _ecore_x_xcursor; return _ecore_x_xcursor;
} } /* ecore_x_cursor_color_supported_get */
EAPI Ecore_X_Cursor EAPI Ecore_X_Cursor
ecore_x_cursor_new(Ecore_X_Window win, ecore_x_cursor_new(Ecore_X_Window win,
@ -57,7 +56,7 @@ ecore_x_cursor_new(Ecore_X_Window win,
} }
} }
else else
#endif #endif /* ifdef ECORE_XCURSOR */
{ {
XColor c1, c2; XColor c1, c2;
Cursor c; Cursor c;
@ -205,14 +204,14 @@ ecore_x_cursor_new(Ecore_X_Window win,
} }
return 0; return 0;
} } /* ecore_x_cursor_new */
EAPI void EAPI void
ecore_x_cursor_free(Ecore_X_Cursor c) ecore_x_cursor_free(Ecore_X_Cursor c)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFreeCursor(_ecore_x_disp, c); XFreeCursor(_ecore_x_disp, c);
} } /* ecore_x_cursor_free */
/* /*
* Returns the cursor for the given shape. * Returns the cursor for the given shape.
@ -225,7 +224,7 @@ ecore_x_cursor_shape_get(int shape)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
/* Shapes are defined in Ecore_X_Cursor.h */ /* Shapes are defined in Ecore_X_Cursor.h */
return XCreateFontCursor(_ecore_x_disp, shape); return XCreateFontCursor(_ecore_x_disp, shape);
} } /* ecore_x_cursor_shape_get */
EAPI void EAPI void
ecore_x_cursor_size_set(int size) ecore_x_cursor_size_set(int size)
@ -233,10 +232,10 @@ ecore_x_cursor_size_set(int size)
#ifdef ECORE_XCURSOR #ifdef ECORE_XCURSOR
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XcursorSetDefaultSize(_ecore_x_disp, size); XcursorSetDefaultSize(_ecore_x_disp, size);
#else #else /* ifdef ECORE_XCURSOR */
size = 0; size = 0;
#endif #endif /* ifdef ECORE_XCURSOR */
} } /* ecore_x_cursor_size_set */
EAPI int EAPI int
ecore_x_cursor_size_get(void) ecore_x_cursor_size_get(void)
@ -244,7 +243,8 @@ ecore_x_cursor_size_get(void)
#ifdef ECORE_XCURSOR #ifdef ECORE_XCURSOR
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XcursorGetDefaultSize(_ecore_x_disp); return XcursorGetDefaultSize(_ecore_x_disp);
#else #else /* ifdef ECORE_XCURSOR */
return 0; return 0;
#endif #endif /* ifdef ECORE_XCURSOR */
} } /* ecore_x_cursor_size_get */

View File

@ -4,8 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "ecore_x_private.h" #include "ecore_x_private.h"
#include "Ecore_X.h" #include "Ecore_X.h"
@ -13,7 +12,7 @@
static int _damage_available; static int _damage_available;
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
static int _damage_major, _damage_minor; static int _damage_major, _damage_minor;
#endif #endif /* ifdef ECORE_XDAMAGE */
void void
_ecore_x_damage_init(void) _ecore_x_damage_init(void)
@ -28,16 +27,16 @@ _ecore_x_damage_init(void)
else else
_damage_available = 0; _damage_available = 0;
#else #else /* ifdef ECORE_XDAMAGE */
_damage_available = 0; _damage_available = 0;
#endif #endif /* ifdef ECORE_XDAMAGE */
} } /* _ecore_x_damage_init */
EAPI int EAPI int
ecore_x_damage_query(void) ecore_x_damage_query(void)
{ {
return _damage_available; return _damage_available;
} } /* ecore_x_damage_query */
EAPI Ecore_X_Damage EAPI Ecore_X_Damage
ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
damage = XDamageCreate(_ecore_x_disp, d, level); damage = XDamageCreate(_ecore_x_disp, d, level);
return damage; return damage;
#else #else /* ifdef ECORE_XDAMAGE */
return 0; return 0;
#endif #endif /* ifdef ECORE_XDAMAGE */
} } /* ecore_x_damage_new */
EAPI void EAPI void
ecore_x_damage_free(Ecore_X_Damage damage) ecore_x_damage_free(Ecore_X_Damage damage)
@ -59,8 +58,8 @@ ecore_x_damage_free(Ecore_X_Damage damage)
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XDamageDestroy(_ecore_x_disp, damage); XDamageDestroy(_ecore_x_disp, damage);
#endif #endif /* ifdef ECORE_XDAMAGE */
} } /* ecore_x_damage_free */
EAPI void EAPI void
ecore_x_damage_subtract(Ecore_X_Damage damage, ecore_x_damage_subtract(Ecore_X_Damage damage,
@ -70,6 +69,6 @@ ecore_x_damage_subtract(Ecore_X_Damage damage,
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XDamageSubtract(_ecore_x_disp, damage, repair, parts); XDamageSubtract(_ecore_x_disp, damage, repair, parts);
#endif #endif /* ifdef ECORE_XDAMAGE */
} } /* ecore_x_damage_subtract */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -59,7 +59,7 @@ _ecore_x_dnd_init(void)
} }
_ecore_x_dnd_init_count++; _ecore_x_dnd_init_count++;
} } /* _ecore_x_dnd_init */
void void
_ecore_x_dnd_shutdown(void) _ecore_x_dnd_shutdown(void)
@ -79,7 +79,7 @@ _ecore_x_dnd_shutdown(void)
_target = NULL; _target = NULL;
_ecore_x_dnd_init_count = 0; _ecore_x_dnd_init_count = 0;
} } /* _ecore_x_dnd_shutdown */
static int static int
_ecore_x_dnd_converter_copy(char *target __UNUSED__, _ecore_x_dnd_converter_copy(char *target __UNUSED__,
@ -119,7 +119,7 @@ _ecore_x_dnd_converter_copy(char *target __UNUSED__,
free(mystr); free(mystr);
return 0; return 0;
} }
} } /* _ecore_x_dnd_converter_copy */
EAPI void EAPI void
ecore_x_dnd_aware_set(Ecore_X_Window win, int on) 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); XA_ATOM, 32, &prop_data, 1);
else else
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE); ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE);
} } /* ecore_x_dnd_aware_set */
EAPI int EAPI int
ecore_x_dnd_version_get(Ecore_X_Window win) ecore_x_dnd_version_get(Ecore_X_Window win)
@ -192,7 +192,7 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
} }
return 0; return 0;
} } /* ecore_x_dnd_version_get */
EAPI int EAPI int
ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type) 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); XFree(data);
return ret; return ret;
} } /* ecore_x_dnd_type_isset */
EAPI void EAPI void
ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on) ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
@ -286,7 +286,7 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
XFree(oldset); XFree(oldset);
free(newset); free(newset);
} } /* ecore_x_dnd_type_set */
EAPI void EAPI void
ecore_x_dnd_types_set(Ecore_X_Window win, ecore_x_dnd_types_set(Ecore_X_Window win,
@ -317,7 +317,7 @@ ecore_x_dnd_types_set(Ecore_X_Window win,
XA_ATOM, 32, data, num_types); XA_ATOM, 32, data, num_types);
free(newset); free(newset);
} }
} } /* ecore_x_dnd_types_set */
EAPI void EAPI void
ecore_x_dnd_actions_set(Ecore_X_Window win, ecore_x_dnd_actions_set(Ecore_X_Window win,
@ -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, ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST,
XA_ATOM, 32, data, num_actions); XA_ATOM, 32, data, num_actions);
} }
} } /* ecore_x_dnd_actions_set */
Ecore_X_DND_Source * Ecore_X_DND_Source *
_ecore_x_dnd_source_get(void) _ecore_x_dnd_source_get(void)
{ {
return _source; return _source;
} } /* _ecore_x_dnd_source_get */
Ecore_X_DND_Target * Ecore_X_DND_Target *
_ecore_x_dnd_target_get(void) _ecore_x_dnd_target_get(void)
{ {
return _target; return _target;
} } /* _ecore_x_dnd_target_get */
EAPI int EAPI int
ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size) ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_dnd_version_get(source)) if (!ecore_x_dnd_version_get(source))
return 0; return 0;
@ -389,7 +388,7 @@ ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
_source->dest = None; _source->dest = None;
return 1; return 1;
} } /* ecore_x_dnd_begin */
EAPI int EAPI int
ecore_x_dnd_drop(void) ecore_x_dnd_drop(void)
@ -436,7 +435,7 @@ ecore_x_dnd_drop(void)
_source->prev.window = 0; _source->prev.window = 0;
return status; return status;
} } /* ecore_x_dnd_drop */
EAPI void EAPI void
ecore_x_dnd_send_status(int will_accept, ecore_x_dnd_send_status(int will_accept,
@ -488,7 +487,7 @@ ecore_x_dnd_send_status(int will_accept,
} }
XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev); XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
} } /* ecore_x_dnd_send_status */
EAPI void EAPI void
ecore_x_dnd_send_finished(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); XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
_target->state = ECORE_X_DND_TARGET_IDLE; _target->state = ECORE_X_DND_TARGET_IDLE;
} } /* ecore_x_dnd_send_finished */
void void
ecore_x_dnd_source_action_set(Ecore_X_Atom action) 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; _source->action = action;
if (_source->prev.window) if (_source->prev.window)
_ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y); _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
} } /* ecore_x_dnd_source_action_set */
Ecore_X_Atom Ecore_X_Atom
ecore_x_dnd_source_action_get(void) ecore_x_dnd_source_action_get(void)
{ {
return _source->action; return _source->action;
} } /* ecore_x_dnd_source_action_get */
void void
_ecore_x_dnd_drag(Ecore_X_Window root, int x, int y) _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.y = y;
_source->prev.window = root; _source->prev.window = root;
_source->dest = win; _source->dest = win;
} } /* _ecore_x_dnd_drag */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "ecore_x_private.h" #include "ecore_x_private.h"
@ -24,10 +24,10 @@ _ecore_x_dpms_init(void)
else else
_dpms_available = 0; _dpms_available = 0;
#else #else /* ifdef ECORE_XDPMS */
_dpms_available = 0; _dpms_available = 0;
#endif #endif /* ifdef ECORE_XDPMS */
} } /* _ecore_x_dpms_init */
/** /**
* @defgroup Ecore_X_DPMS_Group X DPMS Extension Functions * @defgroup Ecore_X_DPMS_Group X DPMS Extension Functions
@ -44,7 +44,7 @@ EAPI int
ecore_x_dpms_query(void) ecore_x_dpms_query(void)
{ {
return _dpms_available; return _dpms_available;
} } /* ecore_x_dpms_query */
/** /**
* Checks if the X server is capable of DPMS. * Checks if the X server is capable of DPMS.
@ -57,10 +57,10 @@ ecore_x_dpms_capable_get(void)
#ifdef ECORE_XDPMS #ifdef ECORE_XDPMS
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return DPMSCapable(_ecore_x_disp); return DPMSCapable(_ecore_x_disp);
#else #else /* ifdef ECORE_XDPMS */
return 0; return 0;
#endif #endif /* ifdef ECORE_XDPMS */
} } /* ecore_x_dpms_capable_get */
/** /**
* Checks the DPMS state of the display. * Checks the DPMS state of the display.
@ -77,10 +77,10 @@ ecore_x_dpms_enabled_get(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSInfo(_ecore_x_disp, &power_lvl, &state); DPMSInfo(_ecore_x_disp, &power_lvl, &state);
return state; return state;
#else #else /* ifdef ECORE_XDPMS */
return 0; return 0;
#endif #endif /* ifdef ECORE_XDPMS */
} } /* ecore_x_dpms_enabled_get */
/** /**
* Sets the DPMS state of the display. * Sets the DPMS state of the display.
@ -97,8 +97,8 @@ ecore_x_dpms_enabled_set(int enabled)
else else
DPMSDisable(_ecore_x_disp); DPMSDisable(_ecore_x_disp);
#endif #endif /* ifdef ECORE_XDPMS */
} } /* ecore_x_dpms_enabled_set */
/** /**
* Gets the timeouts. The values are in unit of seconds. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby, DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby,
(unsigned short *)suspend, (unsigned short *)off); (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. * 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 #ifdef ECORE_XDPMS
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return DPMSSetTimeouts(_ecore_x_disp, standby, suspend, off); return DPMSSetTimeouts(_ecore_x_disp, standby, suspend, off);
#else #else /* ifdef ECORE_XDPMS */
return 0; return 0;
#endif #endif /* ifdef ECORE_XDPMS */
} } /* ecore_x_dpms_timeouts_set */
/** /**
* Returns the amount of time of inactivity before standby mode is invoked. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
return standby; return standby;
#else #else /* ifdef ECORE_XDPMS */
return 0; 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 * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
return suspend; return suspend;
#else #else /* ifdef ECORE_XDPMS */
return 0; 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 * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
return off; return off;
#else #else /* ifdef ECORE_XDPMS */
return 0; return 0;
#endif #endif /* ifdef ECORE_XDPMS */
} } /* ecore_x_dpms_timeout_off_get */
/** /**
* Sets the standby timeout (in unit of seconds). * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
DPMSSetTimeouts(_ecore_x_disp, new_timeout, 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). * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
DPMSSetTimeouts(_ecore_x_disp, standby, new_timeout, 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). * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off);
DPMSSetTimeouts(_ecore_x_disp, standby, suspend, new_timeout); DPMSSetTimeouts(_ecore_x_disp, standby, suspend, new_timeout);
#endif #endif /* ifdef ECORE_XDPMS */
} } /* ecore_x_dpms_timeout_off_set */

View File

@ -4,18 +4,16 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "ecore_x_private.h" #include "ecore_x_private.h"
/** /**
* @defgroup Ecore_X_Drawable_Group X Drawable Functions * @defgroup Ecore_X_Drawable_Group X Drawable Functions
* *
* Functions that operate on drawables. * Functions that operate on drawables.
*/ */
/** /**
* Retrieves the geometry of the given drawable. * Retrieves the geometry of the given drawable.
* @param d The given drawable. * @param d The given drawable.
@ -57,7 +55,7 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
if (h) if (h)
*h = (int)ret_h; *h = (int)ret_h;
} } /* ecore_x_drawable_geometry_get */
/** /**
* Retrieves the width of the border of the given drawable. * 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; border_ret = 0;
return (int)border_ret; return (int)border_ret;
} } /* ecore_x_drawable_border_width_get */
/** /**
* Retrieves the depth of the given drawable. * Retrieves the depth of the given drawable.
@ -99,7 +97,7 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
depth_ret = 0; depth_ret = 0;
return (int)depth_ret; return (int)depth_ret;
} } /* ecore_x_drawable_depth_get */
/** /**
* Fill the specified rectangle on a drawable. * Fill the specified rectangle on a drawable.
@ -120,4 +118,5 @@ ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d,
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height); XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);
} } /* ecore_x_drawable_rectangle_fill */

View File

@ -8,7 +8,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "Ecore.h" #include "Ecore.h"
#include "ecore_x_private.h" #include "ecore_x_private.h"
@ -18,7 +18,7 @@
EAPI void EAPI void
ecore_x_e_init(void) ecore_x_e_init(void)
{ {
} } /* ecore_x_e_init */
EAPI void EAPI void
ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb) 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[2] = ft;
frames[3] = fb; frames[3] = fb;
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_FRAME_SIZE, frames, 4); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_FRAME_SIZE, frames, 4);
} } /* ecore_x_e_frame_size_set */
EAPI void EAPI void
ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
&is_keyboard, 1); &is_keyboard, 1);
} } /* ecore_x_e_virtual_keyboard_set */
EAPI int EAPI int
ecore_x_e_virtual_keyboard_get(Ecore_X_Window win) 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 0;
return val; return val;
} } /* ecore_x_e_virtual_keyboard_get */
static Ecore_X_Virtual_Keyboard_State static Ecore_X_Virtual_Keyboard_State
_ecore_x_e_vkbd_state_get(Ecore_X_Atom atom) _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_J2ME;
return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
} } /* _ecore_x_e_vkbd_state_get */
static Ecore_X_Atom static Ecore_X_Atom
_ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state) _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
@ -156,9 +156,9 @@ _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME; return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
default: return 0; default: return 0;
} } /* switch */
return 0; return 0;
} } /* _ecore_x_e_vkbd_atom_get */
EAPI void EAPI void
ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
@ -170,7 +170,7 @@ ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
atom = _ecore_x_e_vkbd_atom_get(state); atom = _ecore_x_e_vkbd_atom_get(state);
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE, ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
&atom, 1); &atom, 1);
} } /* ecore_x_e_virtual_keyboard_state_set */
EAPI Ecore_X_Virtual_Keyboard_State EAPI Ecore_X_Virtual_Keyboard_State
ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win) ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
@ -183,7 +183,7 @@ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
return _ecore_x_e_vkbd_state_get(atom); return _ecore_x_e_vkbd_state_get(atom);
} } /* ecore_x_e_virtual_keyboard_state_get */
EAPI void EAPI void
ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
@ -194,7 +194,7 @@ ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
_ecore_x_e_vkbd_atom_get(state), _ecore_x_e_vkbd_atom_get(state),
0, 0, 0, 0); 0, 0, 0, 0);
} } /* ecore_x_e_virtual_keyboard_state_send */
static Ecore_X_Atom static Ecore_X_Atom
_ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode) _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: default:
return ECORE_X_ILLUME_MODE_UNKNOWN; return ECORE_X_ILLUME_MODE_UNKNOWN;
} } /* switch */
return ECORE_X_ILLUME_MODE_UNKNOWN; return ECORE_X_ILLUME_MODE_UNKNOWN;
} } /* _ecore_x_e_illume_atom_get */
static Ecore_X_Illume_Mode static Ecore_X_Illume_Mode
_ecore_x_e_illume_mode_get(Ecore_X_Atom atom) _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_DUAL_LEFT;
return ECORE_X_ILLUME_MODE_UNKNOWN; return ECORE_X_ILLUME_MODE_UNKNOWN;
} } /* _ecore_x_e_illume_mode_get */
EAPI void EAPI void
ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE, ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE,
&zone, 1); &zone, 1);
} } /* ecore_x_e_illume_zone_set */
EAPI Ecore_X_Window EAPI Ecore_X_Window
ecore_x_e_illume_zone_get(Ecore_X_Window win) ecore_x_e_illume_zone_get(Ecore_X_Window win)
@ -250,7 +250,7 @@ ecore_x_e_illume_zone_get(Ecore_X_Window win)
return 0; return 0;
return zone; return zone;
} } /* ecore_x_e_illume_zone_get */
EAPI void EAPI void
ecore_x_e_illume_zone_list_set(Ecore_X_Window win, ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
@ -260,7 +260,7 @@ ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST, ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST,
zones, n_zones); zones, n_zones);
} } /* ecore_x_e_illume_zone_list_set */
EAPI void EAPI void
ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
&is_conformant, 1); &is_conformant, 1);
} } /* ecore_x_e_illume_conformant_set */
EAPI int EAPI int
ecore_x_e_illume_conformant_get(Ecore_X_Window win) 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 0;
return val; return val;
} } /* ecore_x_e_illume_conformant_get */
EAPI void EAPI void
ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode) 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); atom = _ecore_x_e_illume_atom_get(mode);
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE, ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE,
&atom, 1); &atom, 1);
} } /* ecore_x_e_illume_mode_set */
EAPI Ecore_X_Illume_Mode EAPI Ecore_X_Illume_Mode
ecore_x_e_illume_mode_get(Ecore_X_Window win) 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_ILLUME_MODE_UNKNOWN;
return _ecore_x_e_illume_mode_get(atom); return _ecore_x_e_illume_mode_get(atom);
} } /* ecore_x_e_illume_mode_get */
EAPI void EAPI void
ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode) 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_EVENT_MASK_WINDOW_CONFIGURE,
_ecore_x_e_illume_atom_get(mode), _ecore_x_e_illume_atom_get(mode),
0, 0, 0, 0); 0, 0, 0, 0);
} } /* ecore_x_e_illume_mode_send */
EAPI void EAPI void
ecore_x_e_illume_focus_back_send(Ecore_X_Window win) 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_focus_back_send */
EAPI void EAPI void
ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_focus_forward_send */
EAPI void EAPI void
ecore_x_e_illume_focus_home_send(Ecore_X_Window win) 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_focus_home_send */
EAPI void EAPI void
ecore_x_e_illume_close_send(Ecore_X_Window win) 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_close_send */
EAPI void EAPI void
ecore_x_e_illume_home_new_send(Ecore_X_Window win) 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_home_new_send */
EAPI void EAPI void
ecore_x_e_illume_home_del_send(Ecore_X_Window win) 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_home_del_send */
EAPI void EAPI void
ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag) ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1);
} } /* ecore_x_e_illume_drag_set */
EAPI int EAPI int
ecore_x_e_illume_drag_get(Ecore_X_Window win) 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 0;
return val; return val;
} } /* ecore_x_e_illume_drag_get */
EAPI void EAPI void
ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
&is_locked, 1); &is_locked, 1);
} } /* ecore_x_e_illume_drag_locked_set */
EAPI int EAPI int
ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) 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 0;
return val; return val;
} } /* ecore_x_e_illume_drag_locked_get */
EAPI void EAPI void
ecore_x_e_illume_drag_start_send(Ecore_X_Window win) 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_drag_start_send */
EAPI void EAPI void
ecore_x_e_illume_drag_end_send(Ecore_X_Window win) ecore_x_e_illume_drag_end_send(Ecore_X_Window win)
@ -426,7 +426,7 @@ 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_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
1, 0, 0, 0, 0); 1, 0, 0, 0, 0);
} } /* ecore_x_e_illume_drag_end_send */
EAPI void EAPI void
ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
@ -444,7 +444,7 @@ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
geom[3] = h; geom[3] = h;
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
geom, 4); geom, 4);
} } /* ecore_x_e_illume_indicator_geometry_set */
EAPI int EAPI int
ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
@ -477,7 +477,7 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
*h = geom[3]; *h = geom[3];
return 1; return 1;
} } /* ecore_x_e_illume_indicator_geometry_get */
EAPI void EAPI void
ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
@ -495,7 +495,7 @@ ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
geom[3] = h; geom[3] = h;
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
geom, 4); geom, 4);
} } /* ecore_x_e_illume_softkey_geometry_set */
EAPI int EAPI int
ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
@ -528,7 +528,7 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
*h = geom[3]; *h = geom[3];
return 1; return 1;
} } /* ecore_x_e_illume_softkey_geometry_get */
EAPI void EAPI void
ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
@ -546,7 +546,7 @@ ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
geom[3] = h; geom[3] = h;
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
geom, 4); geom, 4);
} } /* ecore_x_e_illume_keyboard_geometry_set */
EAPI int EAPI int
ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
@ -579,7 +579,7 @@ ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
*h = geom[3]; *h = geom[3];
return 1; return 1;
} } /* ecore_x_e_illume_keyboard_geometry_get */
static Ecore_X_Atom static Ecore_X_Atom
_ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state) _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: default:
return 0; return 0;
} } /* switch */
return 0; return 0;
} } /* _ecore_x_e_quickpanel_atom_get */
static Ecore_X_Illume_Quickpanel_State static Ecore_X_Illume_Quickpanel_State
_ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom) _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_OFF;
return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
} } /* _ecore_x_e_quickpanel_state_get */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
&is_quickpanel, 1); &is_quickpanel, 1);
} } /* ecore_x_e_illume_quickpanel_set */
EAPI int EAPI int
ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
@ -629,7 +629,7 @@ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
return 0; return 0;
return val; return val;
} } /* ecore_x_e_illume_quickpanel_get */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
@ -641,7 +641,7 @@ ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
atom = _ecore_x_e_quickpanel_atom_get(state); atom = _ecore_x_e_quickpanel_atom_get(state);
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE, ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
&atom, 1); &atom, 1);
} } /* ecore_x_e_illume_quickpanel_state_set */
EAPI Ecore_X_Illume_Quickpanel_State EAPI Ecore_X_Illume_Quickpanel_State
ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
@ -655,7 +655,7 @@ ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
return _ecore_x_e_quickpanel_state_get(atom); return _ecore_x_e_quickpanel_state_get(atom);
} } /* ecore_x_e_illume_quickpanel_state_get */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
@ -666,7 +666,7 @@ ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
_ecore_x_e_quickpanel_atom_get(state), _ecore_x_e_quickpanel_atom_get(state),
0, 0, 0, 0); 0, 0, 0, 0);
} } /* ecore_x_e_illume_quickpanel_state_send */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win)
@ -676,7 +676,7 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win)
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
0, 0, 0, 0, 0); 0, 0, 0, 0, 0);
} } /* ecore_x_e_illume_quickpanel_state_toggle */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
@ -688,7 +688,7 @@ ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR,
&priority, &priority,
1); 1);
} } /* ecore_x_e_illume_quickpanel_priority_major_set */
EAPI int EAPI int
ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
@ -702,7 +702,7 @@ ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
return 0; return 0;
return val; return val;
} } /* ecore_x_e_illume_quickpanel_priority_major_get */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
@ -714,7 +714,7 @@ ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR,
&priority, &priority,
1); 1);
} } /* ecore_x_e_illume_quickpanel_priority_minor_set */
EAPI int EAPI int
ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) 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 0;
return val; return val;
} } /* ecore_x_e_illume_quickpanel_priority_minor_get */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone) 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_window_prop_card32_set(win,
ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE,
&zone, 1); &zone, 1);
} } /* ecore_x_e_illume_quickpanel_zone_set */
EAPI int EAPI int
ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) 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 0;
return val; return val;
} } /* ecore_x_e_illume_quickpanel_zone_get */
EAPI void EAPI void
ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win)
@ -766,7 +766,7 @@ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win)
0, 0,
0, 0,
0); 0);
} } /* ecore_x_e_illume_quickpanel_position_update_send */
EAPI void EAPI void
ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
@ -778,7 +778,7 @@ ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
ECORE_X_ATOM_CARDINAL, &counter, 1); ECORE_X_ATOM_CARDINAL, &counter, 1);
else else
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER); 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 EAPI Ecore_X_Sync_Counter
ecore_x_e_comp_sync_counter_get(Ecore_X_Window win) 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 0;
return counter; return counter;
} } /* ecore_x_e_comp_sync_counter_get */
EAPI void EAPI void
ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win) 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, XSendEvent(_ecore_x_disp, root, False,
SubstructureRedirectMask | SubstructureNotifyMask, SubstructureRedirectMask | SubstructureNotifyMask,
&xev); &xev);
} } /* ecore_x_e_comp_sync_draw_done_send */
EAPI void EAPI void
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled) 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_window_free(win);
} }
} }
} } /* ecore_x_e_comp_sync_supported_set */
EAPI Eina_Bool EAPI Eina_Bool
ecore_x_e_comp_sync_supported_get(Ecore_X_Window root) ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
@ -886,7 +886,7 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
} }
return 0; return 0;
} } /* ecore_x_e_comp_sync_supported_get */
EAPI void EAPI void
ecore_x_e_comp_sync_begin_send(Ecore_X_Window win) 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, XSendEvent(_ecore_x_disp, win, False,
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
&xev); &xev);
} } /* ecore_x_e_comp_sync_begin_send */
EAPI void EAPI void
ecore_x_e_comp_sync_end_send(Ecore_X_Window win) 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, XSendEvent(_ecore_x_disp, win, False,
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
&xev); &xev);
} } /* ecore_x_e_comp_sync_end_send */
EAPI void EAPI void
ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win) 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, XSendEvent(_ecore_x_disp, win, False,
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
&xev); &xev);
} } /* ecore_x_e_comp_sync_cancel_send */
EAPI void EAPI void
ecore_x_e_comp_flush_send(Ecore_X_Window win) 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, XSendEvent(_ecore_x_disp, win, False,
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
&xev); &xev);
} } /* ecore_x_e_comp_flush_send */
EAPI void EAPI void
ecore_x_e_comp_dump_send(Ecore_X_Window win) 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, XSendEvent(_ecore_x_disp, win, False,
NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask,
&xev); &xev);
} } /* ecore_x_e_comp_dump_send */
EAPI void EAPI void
ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap) 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); ECORE_X_ATOM_PIXMAP, &pixmap, 1);
else else
ecore_x_window_prop_property_del(win, pixmap); ecore_x_window_prop_property_del(win, pixmap);
} } /* ecore_x_e_comp_pixmap_set */
EAPI Ecore_X_Pixmap EAPI Ecore_X_Pixmap
ecore_x_e_comp_pixmap_get(Ecore_X_Window win) 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 0;
return pixmap; return pixmap;
} } /* ecore_x_e_comp_pixmap_get */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
@ -35,7 +35,7 @@ ecore_x_error_handler_set(void (*func)(void *data), const void *data)
{ {
_error_func = func; _error_func = func;
_error_data = (void *)data; _error_data = (void *)data;
} } /* ecore_x_error_handler_set */
/** /**
* Set the I/O error handler. * 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_func = func;
_io_error_data = (void *)data; _io_error_data = (void *)data;
} } /* ecore_x_io_error_handler_set */
/** /**
* Get the request code that caused the error. * Get the request code that caused the error.
@ -61,7 +61,7 @@ EAPI int
ecore_x_error_request_get(void) ecore_x_error_request_get(void)
{ {
return _error_request_code; return _error_request_code;
} } /* ecore_x_error_request_get */
/** /**
* Get the error code from the error. * Get the error code from the error.
@ -73,14 +73,14 @@ EAPI int
ecore_x_error_code_get(void) ecore_x_error_code_get(void)
{ {
return _error_code; return _error_code;
} } /* ecore_x_error_code_get */
void void
_ecore_x_error_handler_init(void) _ecore_x_error_handler_init(void)
{ {
XSetErrorHandler((XErrorHandler)_ecore_x_error_handle); XSetErrorHandler((XErrorHandler)_ecore_x_error_handle);
XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle); XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle);
} } /* _ecore_x_error_handler_init */
static void static void
_ecore_x_error_handle(Display *d, XErrorEvent *ev) _ecore_x_error_handle(Display *d, XErrorEvent *ev)
@ -92,7 +92,7 @@ _ecore_x_error_handle(Display *d, XErrorEvent *ev)
if (_error_func) if (_error_func)
_error_func(_error_data); _error_func(_error_data);
} }
} } /* _ecore_x_error_handle */
static int static int
_ecore_x_io_error_handle(Display *d) _ecore_x_io_error_handle(Display *d)
@ -106,4 +106,5 @@ _ecore_x_io_error_handle(Display *d)
} }
return 0; return 0;
} } /* _ecore_x_io_error_handle */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -24,7 +24,7 @@
#ifndef CODESET #ifndef CODESET
#define CODESET "INVALID" #define CODESET "INVALID"
#endif #endif /* ifndef CODESET */
#if 0 #if 0
static void _ecore_x_event_free_window_prop_name_class_change(void *data, static void _ecore_x_event_free_window_prop_name_class_change(void *data,
@ -38,7 +38,7 @@ static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data,
void *ev); void *ev);
static void _ecore_x_event_free_window_prop_client_machine_change(void *data, static void _ecore_x_event_free_window_prop_client_machine_change(void *data,
void *ev); void *ev);
#endif #endif /* if 0 */
static Window _ecore_x_mouse_down_last_win = 0; static Window _ecore_x_mouse_down_last_win = 0;
static Window _ecore_x_mouse_down_last_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); free(e);
} } /* _ecore_x_event_free_mouse_move */
EAPI void EAPI void
ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask) 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); XGetWindowAttributes(_ecore_x_disp, w, &attr);
s_attr.event_mask = mask | attr.your_event_mask; s_attr.event_mask = mask | attr.your_event_mask;
XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr);
} } /* ecore_x_event_mask_set */
EAPI void EAPI void
ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask) 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); XGetWindowAttributes(_ecore_x_disp, w, &attr);
s_attr.event_mask = attr.your_event_mask & ~mask; s_attr.event_mask = attr.your_event_mask & ~mask;
XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr);
} } /* ecore_x_event_mask_unset */
#if 0 #if 0
static void static void
@ -112,7 +112,7 @@ _ecore_x_event_free_window_prop_name_class_change(void *data, void *ev)
free(e->clas); free(e->clas);
free(e); free(e);
} } /* _ecore_x_event_free_window_prop_name_class_change */
static void static void
_ecore_x_event_free_window_prop_title_change(void *data, void *ev) _ecore_x_event_free_window_prop_title_change(void *data, void *ev)
@ -124,7 +124,7 @@ _ecore_x_event_free_window_prop_title_change(void *data, void *ev)
free(e->title); free(e->title);
free(e); free(e);
} } /* _ecore_x_event_free_window_prop_title_change */
static void static void
_ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev) _ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
@ -136,7 +136,7 @@ _ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
free(e->title); free(e->title);
free(e); free(e);
} } /* _ecore_x_event_free_window_prop_visible_title_change */
static void static void
_ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev) _ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev)
@ -148,7 +148,7 @@ _ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev)
free(e->name); free(e->name);
free(e); free(e);
} } /* _ecore_x_event_free_window_prop_icon_name_change */
static void static void
_ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev) _ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
@ -160,7 +160,7 @@ _ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
free(e->name); free(e->name);
free(e); free(e);
} } /* _ecore_x_event_free_window_prop_visible_icon_name_change */
static void static void
_ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev) _ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev)
@ -172,8 +172,9 @@ _ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev)
free(e->name); free(e->name);
free(e); free(e);
} } /* _ecore_x_event_free_window_prop_client_machine_change */
#endif
#endif /* if 0 */
static void static void
_ecore_x_event_free_xdnd_enter(void *data __UNUSED__, void *ev) _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]); XFree(e->types[i]);
free(e->types); free(e->types);
free(e); free(e);
} } /* _ecore_x_event_free_xdnd_enter */
static void static void
_ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev) _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->target);
free(e); free(e);
} } /* _ecore_x_event_free_selection_notify */
static unsigned int static unsigned int
_ecore_x_event_modifiers(unsigned int state) _ecore_x_event_modifiers(unsigned int state)
@ -230,7 +231,7 @@ _ecore_x_event_modifiers(unsigned int state)
modifiers |= ECORE_EVENT_LOCK_CAPS; modifiers |= ECORE_EVENT_LOCK_CAPS;
return modifiers; return modifiers;
} } /* _ecore_x_event_modifiers */
void void
_ecore_mouse_move(unsigned int timestamp, _ecore_mouse_move(unsigned int timestamp,
@ -294,7 +295,7 @@ _ecore_mouse_move(unsigned int timestamp,
_ecore_x_event_last_root_y = y_root; _ecore_x_event_last_root_y = y_root;
_ecore_x_last_event_mouse_move_event = event; _ecore_x_last_event_mouse_move_event = event;
} } /* _ecore_mouse_move */
static void static void
_ecore_key_press(int event, XKeyEvent *xevent) _ecore_key_press(int event, XKeyEvent *xevent)
@ -337,14 +338,14 @@ _ecore_key_press(int event, XKeyEvent *xevent)
sizeof(compose_buffer) - 1, sizeof(compose_buffer) - 1,
&sym, &sym,
&mbstatus); &mbstatus);
#else #else /* ifdef X_HAVE_UTF8_STRING */
val = XmbLookupString(_ecore_x_ic, val = XmbLookupString(_ecore_x_ic,
(XKeyEvent *)xevent, (XKeyEvent *)xevent,
compose_buffer, compose_buffer,
sizeof(compose_buffer) - 1, sizeof(compose_buffer) - 1,
&sym, &sym,
&mbstatus); &mbstatus);
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
if (mbstatus == XBufferOverflow) if (mbstatus == XBufferOverflow)
{ {
tmp = malloc(sizeof (char) * (val + 1)); tmp = malloc(sizeof (char) * (val + 1));
@ -360,14 +361,14 @@ _ecore_key_press(int event, XKeyEvent *xevent)
val, val,
&sym, &sym,
&mbstatus); &mbstatus);
#else #else /* ifdef X_HAVE_UTF8_STRING */
val = XmbLookupString(_ecore_x_ic, val = XmbLookupString(_ecore_x_ic,
(XKeyEvent *)xevent, (XKeyEvent *)xevent,
tmp, tmp,
val, val,
&sym, &sym,
&mbstatus); &mbstatus);
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
if (val > 0) if (val > 0)
{ {
tmp[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); compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8", tmp);
free(tmp); free(tmp);
tmp = compose; tmp = compose;
#endif #endif /* ifndef X_HAVE_UTF8_STRING */
} }
else else
compose = NULL; compose = NULL;
@ -387,11 +388,11 @@ _ecore_key_press(int event, XKeyEvent *xevent)
compose_buffer[val] = 0; compose_buffer[val] = 0;
#ifdef X_HAVE_UTF8_STRING #ifdef X_HAVE_UTF8_STRING
compose = compose_buffer; compose = compose_buffer;
#else #else /* ifdef X_HAVE_UTF8_STRING */
compose = eina_str_convert(nl_langinfo( compose = eina_str_convert(nl_langinfo(
CODESET), "UTF-8", compose_buffer); CODESET), "UTF-8", compose_buffer);
tmp = compose; tmp = compose;
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
} }
} }
else else
@ -448,7 +449,7 @@ _ecore_key_press(int event, XKeyEvent *xevent)
on_error: on_error:
if (tmp) if (tmp)
free(tmp); free(tmp);
} } /* _ecore_key_press */
Ecore_Event_Mouse_Button * Ecore_Event_Mouse_Button *
_ecore_mouse_button(int event, _ecore_mouse_button(int event,
@ -542,7 +543,7 @@ _ecore_mouse_button(int event,
ecore_event_add(event, e, NULL, NULL); ecore_event_add(event, e, NULL, NULL);
return e; return e;
} } /* _ecore_mouse_button */
void void
_ecore_x_event_handle_any_event(XEvent *xevent) _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)); memcpy(ev, xevent, sizeof(XEvent));
ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL); ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL);
} } /* _ecore_x_event_handle_any_event */
void void
_ecore_x_event_handle_key_press(XEvent *xevent) _ecore_x_event_handle_key_press(XEvent *xevent)
{ {
_ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *)xevent); _ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *)xevent);
} } /* _ecore_x_event_handle_key_press */
void void
_ecore_x_event_handle_key_release(XEvent *xevent) _ecore_x_event_handle_key_release(XEvent *xevent)
{ {
_ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *)xevent); _ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *)xevent);
} } /* _ecore_x_event_handle_key_release */
void void
_ecore_x_event_handle_button_press(XEvent *xevent) _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; case 7: e->direction = 1; e->z = 1; break;
default: e->direction = 0; e->z = 0; break; default: e->direction = 0; e->z = 0; break;
} } /* switch */
e->x = xevent->xbutton.x; e->x = xevent->xbutton.x;
e->y = xevent->xbutton.y; e->y = xevent->xbutton.y;
@ -743,7 +744,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
} }
} }
} } /* _ecore_x_event_handle_button_press */
void void
_ecore_x_event_handle_button_release(XEvent *xevent) _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, xevent->xbutton.y,
xevent->xbutton.x_root, xevent->xbutton.y_root); xevent->xbutton.x_root, xevent->xbutton.y_root);
} }
} } /* _ecore_x_event_handle_button_release */
void void
_ecore_x_event_handle_motion_notify(XEvent *xevent) _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, _ecore_x_dnd_drag(xevent->xmotion.root,
xevent->xmotion.x_root, xevent->xmotion.x_root,
xevent->xmotion.y_root); xevent->xmotion.y_root);
} } /* _ecore_x_event_handle_motion_notify */
void void
_ecore_x_event_handle_enter_notify(XEvent *xevent) _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_x_event_last_time = e->time;
ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL);
} }
} } /* _ecore_x_event_handle_enter_notify */
void void
_ecore_x_event_handle_leave_notify(XEvent *xevent) _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_x_event_last_root_y = e->root.y;
ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL);
} }
} } /* _ecore_x_event_handle_leave_notify */
void void
_ecore_x_event_handle_focus_in(XEvent *xevent) _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; e->time = _ecore_x_event_last_time;
_ecore_x_event_last_time = e->time; _ecore_x_event_last_time = e->time;
ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL);
} } /* _ecore_x_event_handle_focus_in */
void void
_ecore_x_event_handle_focus_out(XEvent *xevent) _ecore_x_event_handle_focus_out(XEvent *xevent)
@ -1046,14 +1047,14 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
e->time = _ecore_x_event_last_time; e->time = _ecore_x_event_last_time;
_ecore_x_event_last_time = e->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 void
_ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__) _ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__)
{ {
_ecore_x_last_event_mouse_move = 0; _ecore_x_last_event_mouse_move = 0;
/* FIXME: handle this event type */ /* FIXME: handle this event type */
} } /* _ecore_x_event_handle_keymap_notify */
void void
_ecore_x_event_handle_expose(XEvent *xevent) _ecore_x_event_handle_expose(XEvent *xevent)
@ -1073,7 +1074,7 @@ _ecore_x_event_handle_expose(XEvent *xevent)
e->h = xevent->xexpose.height; e->h = xevent->xexpose.height;
e->count = xevent->xexpose.count; 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 void
_ecore_x_event_handle_graphics_expose(XEvent *xevent) _ecore_x_event_handle_graphics_expose(XEvent *xevent)
@ -1093,7 +1094,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
e->h = xevent->xgraphicsexpose.height; e->h = xevent->xgraphicsexpose.height;
e->count = xevent->xgraphicsexpose.count; 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 void
_ecore_x_event_handle_visibility_notify(XEvent *xevent) _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_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL);
} }
} } /* _ecore_x_event_handle_visibility_notify */
void void
_ecore_x_event_handle_create_notify(XEvent *xevent) _ecore_x_event_handle_create_notify(XEvent *xevent)
@ -1142,7 +1143,7 @@ _ecore_x_event_handle_create_notify(XEvent *xevent)
e->border = xevent->xcreatewindow.border_width; e->border = xevent->xcreatewindow.border_width;
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_destroy_notify(XEvent *xevent) _ecore_x_event_handle_destroy_notify(XEvent *xevent)
@ -1161,7 +1162,7 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent)
_ecore_x_event_last_win = 0; _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 void
_ecore_x_event_handle_unmap_notify(XEvent *xevent) _ecore_x_event_handle_unmap_notify(XEvent *xevent)
@ -1177,7 +1178,7 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent)
e->event_win = xevent->xunmap.event; e->event_win = xevent->xunmap.event;
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_map_notify(XEvent *xevent) _ecore_x_event_handle_map_notify(XEvent *xevent)
@ -1193,7 +1194,7 @@ _ecore_x_event_handle_map_notify(XEvent *xevent)
e->event_win = xevent->xmap.event; e->event_win = xevent->xmap.event;
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_map_request(XEvent *xevent) _ecore_x_event_handle_map_request(XEvent *xevent)
@ -1209,7 +1210,7 @@ _ecore_x_event_handle_map_request(XEvent *xevent)
e->time = _ecore_x_event_last_time; e->time = _ecore_x_event_last_time;
e->parent = xevent->xmaprequest.parent; 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 void
_ecore_x_event_handle_reparent_notify(XEvent *xevent) _ecore_x_event_handle_reparent_notify(XEvent *xevent)
@ -1226,7 +1227,7 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent)
e->parent = xevent->xreparent.parent; e->parent = xevent->xreparent.parent;
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_configure_notify(XEvent *xevent) _ecore_x_event_handle_configure_notify(XEvent *xevent)
@ -1250,7 +1251,7 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent)
e->from_wm = xevent->xconfigure.send_event; e->from_wm = xevent->xconfigure.send_event;
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_configure_request(XEvent *xevent) _ecore_x_event_handle_configure_request(XEvent *xevent)
@ -1285,14 +1286,14 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
e->detail = ECORE_X_WINDOW_STACK_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 void
_ecore_x_event_handle_gravity_notify(XEvent *xevent __UNUSED__) _ecore_x_event_handle_gravity_notify(XEvent *xevent __UNUSED__)
{ {
_ecore_x_last_event_mouse_move = 0; _ecore_x_last_event_mouse_move = 0;
/* FIXME: handle this event type */ /* FIXME: handle this event type */
} } /* _ecore_x_event_handle_gravity_notify */
void void
_ecore_x_event_handle_resize_request(XEvent *xevent) _ecore_x_event_handle_resize_request(XEvent *xevent)
@ -1309,7 +1310,7 @@ _ecore_x_event_handle_resize_request(XEvent *xevent)
e->h = xevent->xresizerequest.height; e->h = xevent->xresizerequest.height;
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_circulate_notify(XEvent *xevent) _ecore_x_event_handle_circulate_notify(XEvent *xevent)
@ -1330,7 +1331,7 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent)
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_circulate_request(XEvent *xevent) _ecore_x_event_handle_circulate_request(XEvent *xevent)
@ -1351,7 +1352,7 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
e->time = _ecore_x_event_last_time; 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 void
_ecore_x_event_handle_property_notify(XEvent *xevent) _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); ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
} }
else else
#endif #endif /* if 0 */
{ {
Ecore_X_Event_Window_Property *e; Ecore_X_Event_Window_Property *e;
@ -1496,7 +1497,7 @@ _ecore_x_event_handle_property_notify(XEvent *xevent)
_ecore_x_event_last_time = e->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 void
_ecore_x_event_handle_selection_clear(XEvent *xevent) _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; e->selection = ECORE_X_SELECTION_OTHER;
ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
} } /* _ecore_x_event_handle_selection_clear */
void void
_ecore_x_event_handle_selection_request(XEvent *xevent) _ecore_x_event_handle_selection_request(XEvent *xevent)
@ -1600,7 +1601,7 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
} }
return; return;
} } /* _ecore_x_event_handle_selection_request */
void void
_ecore_x_event_handle_selection_notify(XEvent *xevent) _ecore_x_event_handle_selection_notify(XEvent *xevent)
@ -1656,7 +1657,7 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
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_free_selection_notify, NULL);
} } /* _ecore_x_event_handle_selection_notify */
void void
_ecore_x_event_handle_colormap_notify(XEvent *xevent) _ecore_x_event_handle_colormap_notify(XEvent *xevent)
@ -1677,7 +1678,7 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
e->installed = 0; 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 void
_ecore_x_event_handle_client_message(XEvent *xevent) _ecore_x_event_handle_client_message(XEvent *xevent)
@ -2126,14 +2127,14 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL);
} }
} } /* _ecore_x_event_handle_client_message */
void void
_ecore_x_event_handle_mapping_notify(XEvent *xevent) _ecore_x_event_handle_mapping_notify(XEvent *xevent)
{ {
_ecore_x_last_event_mouse_move = 0; _ecore_x_last_event_mouse_move = 0;
XRefreshKeyboardMapping((XMappingEvent *)xevent); XRefreshKeyboardMapping((XMappingEvent *)xevent);
} } /* _ecore_x_event_handle_mapping_notify */
void void
_ecore_x_event_handle_shape_change(XEvent *xevent) _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->win = shape_event->window;
e->time = shape_event->time; e->time = shape_event->time;
ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL);
} } /* _ecore_x_event_handle_shape_change */
void void
_ecore_x_event_handle_screensaver_notify(XEvent *xevent) _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; e->time = screensaver_event->time;
ecore_event_add(ECORE_X_EVENT_SCREENSAVER_NOTIFY, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_SCREENSAVER_NOTIFY, e, NULL, NULL);
#else #else /* ifdef ECORE_XSS */
xevent = NULL; xevent = NULL;
#endif #endif /* ifdef ECORE_XSS */
} } /* _ecore_x_event_handle_screensaver_notify */
void void
_ecore_x_event_handle_sync_counter(XEvent *xevent) _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; e->time = sync_counter_event->time;
ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL);
} } /* _ecore_x_event_handle_sync_counter */
void void
_ecore_x_event_handle_sync_alarm(XEvent *xevent) _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->time = sync_alarm_event->time;
e->alarm = sync_alarm_event->alarm; e->alarm = sync_alarm_event->alarm;
ecore_event_add(ECORE_X_EVENT_SYNC_ALARM, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_SYNC_ALARM, e, NULL, NULL);
} } /* _ecore_x_event_handle_sync_alarm */
#ifdef ECORE_XRANDR #ifdef ECORE_XRANDR
void void
@ -2239,7 +2240,7 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
e->rotation = randr_event->rotation; e->rotation = randr_event->rotation;
e->subpixel_order = randr_event->subpixel_order; e->subpixel_order = randr_event->subpixel_order;
ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL);
} } /* _ecore_x_event_handle_randr_change */
static void static void
_ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent) _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->width = randr_event->width;
e->height = randr_event->height; e->height = randr_event->height;
ecore_event_add(ECORE_X_EVENT_RANDR_CRTC_CHANGE, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_RANDR_CRTC_CHANGE, e, NULL, NULL);
} } /* _ecore_x_event_handle_randr_notify_crtc_change */
static void static void
_ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent) _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->connection = randr_event->connection;
e->subpixel_order = randr_event->subpixel_order; e->subpixel_order = randr_event->subpixel_order;
ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_CHANGE, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_CHANGE, e, NULL, NULL);
} } /* _ecore_x_event_handle_randr_notify_output_change */
static void static void
_ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent) _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->time = randr_event->timestamp;
e->state = randr_event->state; e->state = randr_event->state;
ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL);
} } /* _ecore_x_event_handle_randr_notify_output_property */
void void
_ecore_x_event_handle_randr_notify(XEvent *xevent) _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.", ERR("Unknown XRandR RRNotify subtype: %d.",
randr_event->subtype); randr_event->subtype);
break; break;
} } /* switch */
} } /* _ecore_x_event_handle_randr_notify */
#endif
#endif /* ifdef ECORE_XRANDR */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
void void
@ -2343,8 +2345,9 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event)
_ecore_x_last_event_mouse_move = 0; _ecore_x_last_event_mouse_move = 0;
/* Nothing here yet */ /* Nothing here yet */
event = NULL; event = NULL;
} } /* _ecore_x_event_handle_fixes_selection_notify */
#endif
#endif /* ifdef ECORE_XFIXES */
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
void void
@ -2375,8 +2378,9 @@ _ecore_x_event_handle_damage_notify(XEvent *event)
e->geometry.height = damage_event->geometry.height; e->geometry.height = damage_event->geometry.height;
ecore_event_add(ECORE_X_EVENT_DAMAGE_NOTIFY, e, NULL, NULL); ecore_event_add(ECORE_X_EVENT_DAMAGE_NOTIFY, e, NULL, NULL);
} } /* _ecore_x_event_handle_damage_notify */
#endif
#endif /* ifdef ECORE_XDAMAGE */
static void static void
_ecore_x_event_free_generic_event(void *data, void *ev) _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) if (e->data)
XFreeEventData(_ecore_x_disp, (XGenericEventCookie *)data); XFreeEventData(_ecore_x_disp, (XGenericEventCookie *)data);
#endif #endif /* ifdef ECORE_XI2 */
} } /* _ecore_x_event_free_generic_event */
void void
_ecore_x_event_handle_generic_event(XEvent *event) _ecore_x_event_handle_generic_event(XEvent *event)
@ -2425,5 +2429,6 @@ _ecore_x_event_handle_generic_event(XEvent *event)
e, e,
_ecore_x_event_free_generic_event, _ecore_x_event_free_generic_event,
event); event);
#endif #endif /* ifdef ECORE_XI2 */
} } /* _ecore_x_event_handle_generic_event */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
@ -14,7 +14,7 @@
static int _fixes_available; static int _fixes_available;
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
static int _fixes_major, _fixes_minor; static int _fixes_major, _fixes_minor;
#endif #endif /* ifdef ECORE_XFIXES */
void void
_ecore_x_fixes_init(void) _ecore_x_fixes_init(void)
@ -29,10 +29,10 @@ _ecore_x_fixes_init(void)
else else
_fixes_available = 0; _fixes_available = 0;
#else #else /* ifdef ECORE_XFIXES */
_fixes_available = 0; _fixes_available = 0;
#endif #endif /* ifdef ECORE_XFIXES */
} } /* _ecore_x_fixes_init */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
/* I don't know what to call this function. */ /* 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; xrect[i].height = rects[i].height;
} }
return xrect; return xrect;
} } /* _ecore_x_rectangle_ecore_to_x */
static Ecore_X_Rectangle * static Ecore_X_Rectangle *
_ecore_x_rectangle_x_to_ecore(XRectangle *xrect, int num) _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; rects[i].height = xrect[i].height;
} }
return rects; return rects;
} } /* _ecore_x_rectangle_x_to_ecore */
#endif
#endif /* ifdef ECORE_XFIXES */
EAPI Ecore_X_Region EAPI Ecore_X_Region
ecore_x_region_new(Ecore_X_Rectangle *rects, int num) 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); region = XFixesCreateRegion(_ecore_x_disp, xrect, num);
free(xrect); free(xrect);
return region; return region;
#else #else /* ifdef ECORE_XFIXES */
return 0; return 0;
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_new */
EAPI Ecore_X_Region EAPI Ecore_X_Region
ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
region = XFixesCreateRegionFromBitmap(_ecore_x_disp, bitmap); region = XFixesCreateRegionFromBitmap(_ecore_x_disp, bitmap);
return region; return region;
#else #else /* ifdef ECORE_XFIXES */
return 0; return 0;
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_new_from_bitmap */
EAPI Ecore_X_Region EAPI Ecore_X_Region
ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
region = XFixesCreateRegionFromWindow(_ecore_x_disp, win, type); region = XFixesCreateRegionFromWindow(_ecore_x_disp, win, type);
return region; return region;
#else #else /* ifdef ECORE_XFIXES */
return 0; return 0;
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_new_from_window */
EAPI Ecore_X_Region EAPI Ecore_X_Region
ecore_x_region_new_from_gc(Ecore_X_GC gc) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
region = XFixesCreateRegionFromGC(_ecore_x_disp, gc); region = XFixesCreateRegionFromGC(_ecore_x_disp, gc);
return region; return region;
#else #else /* ifdef ECORE_XFIXES */
return 0; return 0;
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_new_from_gc */
EAPI Ecore_X_Region EAPI Ecore_X_Region
ecore_x_region_new_from_picture(Ecore_X_Picture picture) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
region = XFixesCreateRegionFromPicture(_ecore_x_disp, picture); region = XFixesCreateRegionFromPicture(_ecore_x_disp, picture);
return region; return region;
#else #else /* ifdef ECORE_XFIXES */
return 0; return 0;
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_new_from_picture */
EAPI void EAPI void
ecore_x_region_free(Ecore_X_Region region) ecore_x_region_free(Ecore_X_Region region)
@ -162,8 +163,8 @@ ecore_x_region_free(Ecore_X_Region region)
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesDestroyRegion(_ecore_x_disp, region); XFixesDestroyRegion(_ecore_x_disp, region);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_free */
EAPI void EAPI void
ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num) 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); XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num);
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesSetRegion(_ecore_x_disp, region, xrect, num); XFixesSetRegion(_ecore_x_disp, region, xrect, num);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_set */
EAPI void EAPI void
ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source) 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 #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesCopyRegion(_ecore_x_disp, dest, source); XFixesCopyRegion(_ecore_x_disp, dest, source);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_copy */
EAPI void EAPI void
ecore_x_region_combine(Ecore_X_Region dest, ecore_x_region_combine(Ecore_X_Region dest,
@ -192,8 +193,8 @@ ecore_x_region_combine(Ecore_X_Region dest,
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesUnionRegion(_ecore_x_disp, dest, source1, source2); XFixesUnionRegion(_ecore_x_disp, dest, source1, source2);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_combine */
EAPI void EAPI void
ecore_x_region_intersect(Ecore_X_Region dest, ecore_x_region_intersect(Ecore_X_Region dest,
@ -203,8 +204,8 @@ ecore_x_region_intersect(Ecore_X_Region dest,
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2); XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_intersect */
EAPI void EAPI void
ecore_x_region_subtract(Ecore_X_Region dest, ecore_x_region_subtract(Ecore_X_Region dest,
@ -214,8 +215,8 @@ ecore_x_region_subtract(Ecore_X_Region dest,
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2); XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_subtract */
EAPI void EAPI void
ecore_x_region_invert(Ecore_X_Region dest, ecore_x_region_invert(Ecore_X_Region dest,
@ -231,8 +232,8 @@ ecore_x_region_invert(Ecore_X_Region dest,
xbound = _ecore_x_rectangle_ecore_to_x(bounds, num); xbound = _ecore_x_rectangle_ecore_to_x(bounds, num);
XFixesInvertRegion(_ecore_x_disp, dest, xbound, source); XFixesInvertRegion(_ecore_x_disp, dest, xbound, source);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_invert */
EAPI void EAPI void
ecore_x_region_translate(Ecore_X_Region region, int dx, int dy) 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 #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesTranslateRegion(_ecore_x_disp, region, dx, dy); XFixesTranslateRegion(_ecore_x_disp, region, dx, dy);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_translate */
EAPI void EAPI void
ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source) 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 #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesRegionExtents(_ecore_x_disp, dest, source); XFixesRegionExtents(_ecore_x_disp, dest, source);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_extents */
EAPI Ecore_X_Rectangle * EAPI Ecore_X_Rectangle *
ecore_x_region_fetch(Ecore_X_Region region, int *num, ecore_x_region_fetch(Ecore_X_Region region, int *num,
@ -267,10 +268,10 @@ ecore_x_region_fetch(Ecore_X_Region region, int *num,
(*bounds).width = xbound.width; (*bounds).width = xbound.width;
(*bounds).height = xbound.height; (*bounds).height = xbound.height;
return rects; return rects;
#else #else /* ifdef ECORE_XFIXES */
return NULL; return NULL;
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_fetch */
EAPI void EAPI void
ecore_x_region_expand(Ecore_X_Region dest, ecore_x_region_expand(Ecore_X_Region dest,
@ -283,8 +284,8 @@ ecore_x_region_expand(Ecore_X_Region dest,
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom); XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_expand */
EAPI void EAPI void
ecore_x_region_gc_clip_set(Ecore_X_Region region, ecore_x_region_gc_clip_set(Ecore_X_Region region,
@ -295,8 +296,8 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region,
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region); XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_gc_clip_set */
EAPI void EAPI void
ecore_x_region_window_shape_set(Ecore_X_Region region, ecore_x_region_window_shape_set(Ecore_X_Region region,
@ -313,8 +314,8 @@ ecore_x_region_window_shape_set(Ecore_X_Region region,
x_offset, x_offset,
y_offset, y_offset,
region); region);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_window_shape_set */
EAPI void EAPI void
ecore_x_region_picture_clip_set(Ecore_X_Region region, ecore_x_region_picture_clip_set(Ecore_X_Region region,
@ -329,6 +330,6 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region,
x_origin, x_origin,
y_origin, y_origin,
region); region);
#endif #endif /* ifdef ECORE_XFIXES */
} } /* ecore_x_region_picture_clip_set */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <string.h> #include <string.h>
@ -156,11 +156,11 @@ ecore_x_gc_new(Ecore_X_Drawable draw,
gcv.arc_mode = value_list[index]; gcv.arc_mode = value_list[index];
index++; index++;
break; break;
} } /* switch */
} }
return XCreateGC(_ecore_x_disp, draw, value_mask, &gcv); return XCreateGC(_ecore_x_disp, draw, value_mask, &gcv);
} } /* ecore_x_gc_new */
/** /**
* Deletes and frees the given graphics context. * Deletes and frees the given graphics context.
@ -171,4 +171,5 @@ ecore_x_gc_free(Ecore_X_GC gc)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFreeGC(_ecore_x_disp, gc); XFreeGC(_ecore_x_disp, gc);
} } /* ecore_x_gc_free */

View File

@ -11,7 +11,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -21,12 +21,11 @@
#include "Ecore_X.h" #include "Ecore_X.h"
#include "Ecore_X_Atoms.h" #include "Ecore_X_Atoms.h"
EAPI void EAPI void
ecore_x_icccm_init(void) ecore_x_icccm_init(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
} } /* ecore_x_icccm_init */
EAPI void EAPI void
ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state) 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, XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE,
ECORE_X_ATOM_WM_STATE, 32, PropModeReplace, ECORE_X_ATOM_WM_STATE, 32, PropModeReplace,
(unsigned char *)c, 2); (unsigned char *)c, 2);
} } /* ecore_x_icccm_state_set */
EAPI Ecore_X_Window_State_Hint EAPI Ecore_X_Window_State_Hint
ecore_x_icccm_state_get(Ecore_X_Window win) 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); XFree(prop_ret);
return hint; return hint;
} } /* ecore_x_icccm_state_get */
EAPI void EAPI void
ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t) 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_EVENT_MASK_NONE,
ECORE_X_ATOM_WM_DELETE_WINDOW, ECORE_X_ATOM_WM_DELETE_WINDOW,
t, 0, 0, 0); t, 0, 0, 0);
} } /* ecore_x_icccm_delete_window_send */
EAPI void EAPI void
ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t) 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_EVENT_MASK_NONE,
ECORE_X_ATOM_WM_TAKE_FOCUS, ECORE_X_ATOM_WM_TAKE_FOCUS,
t, 0, 0, 0); t, 0, 0, 0);
} } /* ecore_x_icccm_take_focus_send */
EAPI void EAPI void
ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t) 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_EVENT_MASK_NONE,
ECORE_X_ATOM_WM_SAVE_YOURSELF, ECORE_X_ATOM_WM_SAVE_YOURSELF,
t, 0, 0, 0); t, 0, 0, 0);
} } /* ecore_x_icccm_save_yourself_send */
EAPI void EAPI void
ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h) 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.above = None;
ev.xconfigure.override_redirect = False; ev.xconfigure.override_redirect = False;
XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev); XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev);
} } /* ecore_x_icccm_move_resize_send */
EAPI void EAPI void
ecore_x_icccm_hints_set(Ecore_X_Window win, 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); XSetWMHints(_ecore_x_disp, win, hints);
XFree(hints); XFree(hints);
} } /* ecore_x_icccm_hints_set */
EAPI int EAPI int
ecore_x_icccm_hints_get(Ecore_X_Window win, ecore_x_icccm_hints_get(Ecore_X_Window win,
@ -258,7 +257,7 @@ ecore_x_icccm_hints_get(Ecore_X_Window win,
} }
return 0; return 0;
} } /* ecore_x_icccm_hints_get */
EAPI void EAPI void
ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, 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); XSetWMNormalHints(_ecore_x_disp, win, &hint);
} } /* ecore_x_icccm_size_pos_hints_set */
EAPI int EAPI int
ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, 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; *max_aspect = maxa;
return 1; return 1;
} } /* ecore_x_icccm_size_pos_hints_get */
EAPI void EAPI void
ecore_x_icccm_title_set(Ecore_X_Window win, const char *t) 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 = ret =
Xutf8TextListToTextProperty(_ecore_x_disp, list, 1, XUTF8StringStyle, Xutf8TextListToTextProperty(_ecore_x_disp, list, 1, XUTF8StringStyle,
&xprop); &xprop);
#else #else /* ifdef X_HAVE_UTF8_STRING */
list[0] = strdup(t); list[0] = strdup(t);
ret = ret =
XmbTextListToTextProperty(_ecore_x_disp, list, 1, XStdICCTextStyle, XmbTextListToTextProperty(_ecore_x_disp, list, 1, XStdICCTextStyle,
&xprop); &xprop);
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
if (ret >= Success) if (ret >= Success)
{ {
XSetWMName(_ecore_x_disp, win, &xprop); 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]); free(list[0]);
} } /* ecore_x_icccm_title_set */
EAPI char * EAPI char *
ecore_x_icccm_title_get(Ecore_X_Window win) 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); t = strdup((char *)xprop.value);
else else
{ {
/* convert to utf8 */ /* convert to utf8 */
#ifdef X_HAVE_UTF8_STRING #ifdef X_HAVE_UTF8_STRING
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num); &list, &num);
#else #else /* ifdef X_HAVE_UTF8_STRING */
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num); &list, &num);
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
if ((ret == XLocaleNotSupported) || if ((ret == XLocaleNotSupported) ||
(ret == XNoMemory) || (ret == XConverterNotFound)) (ret == XNoMemory) || (ret == XConverterNotFound))
@ -534,7 +532,7 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
} }
return NULL; return NULL;
} } /* ecore_x_icccm_title_get */
/** /**
* Set protocol atoms explicitly * Set protocol atoms explicitly
@ -552,7 +550,7 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num); XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num);
else else
XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS); XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS);
} } /* ecore_x_icccm_protocol_atoms_set */
/** /**
* Set or unset a wm protocol property. * Set or unset a wm protocol property.
@ -637,7 +635,7 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
leave: leave:
if (protos) if (protos)
XFree(protos); XFree(protos);
} } /* ecore_x_icccm_protocol_set */
/** /**
* Determines whether a protocol is set for a window. * 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); XFree(protos);
return ret; return ret;
} /* ecore_x_icccm_protocol_isset */
}
/** /**
* Set a window name & class. * 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; xch->res_class = (char *)c;
XSetClassHint(_ecore_x_disp, win, xch); XSetClassHint(_ecore_x_disp, win, xch);
XFree(xch); XFree(xch);
} } /* ecore_x_icccm_name_class_set */
/** /**
* Get a window name & class. * 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_name);
XFree(xch.res_class); XFree(xch.res_class);
} }
} } /* ecore_x_icccm_name_class_get */
/** /**
* Get a window client machine string. * Get a window client machine string.
@ -751,7 +748,7 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_CLIENT_MACHINE); name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_CLIENT_MACHINE);
return name; return name;
} } /* ecore_x_icccm_client_machine_get */
/** /**
* Sets the WM_COMMAND property for @a win. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSetCommand(_ecore_x_disp, win, argv, argc); XSetCommand(_ecore_x_disp, win, argv, argc);
} } /* ecore_x_icccm_command_set */
/** /**
* Get the WM_COMMAND property for @a win. * Get the WM_COMMAND property for @a win.
@ -825,7 +822,7 @@ 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. * 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); list[0] = strdup(t);
ret = Xutf8TextListToTextProperty(_ecore_x_disp, list, 1, ret = Xutf8TextListToTextProperty(_ecore_x_disp, list, 1,
XUTF8StringStyle, &xprop); XUTF8StringStyle, &xprop);
#else #else /* ifdef X_HAVE_UTF8_STRING */
list[0] = strdup(t); list[0] = strdup(t);
ret = XmbTextListToTextProperty(_ecore_x_disp, list, 1, ret = XmbTextListToTextProperty(_ecore_x_disp, list, 1,
XStdICCTextStyle, &xprop); XStdICCTextStyle, &xprop);
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
if (ret >= Success) if (ret >= Success)
{ {
XSetWMIconName(_ecore_x_disp, win, &xprop); 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]); free(list[0]);
} } /* ecore_x_icccm_icon_name_set */
/** /**
* Get a window icon name. * Get a window icon name.
@ -895,15 +892,14 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
t = strdup((char *)xprop.value); t = strdup((char *)xprop.value);
else else
{ {
/* convert to utf8 */ /* convert to utf8 */
#ifdef X_HAVE_UTF8_STRING #ifdef X_HAVE_UTF8_STRING
ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num); &list, &num);
#else #else /* ifdef X_HAVE_UTF8_STRING */
ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
&list, &num); &list, &num);
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
if ((ret == XLocaleNotSupported) || if ((ret == XLocaleNotSupported) ||
(ret == XNoMemory) || (ret == XConverterNotFound)) (ret == XNoMemory) || (ret == XConverterNotFound))
@ -926,7 +922,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
} }
return NULL; return NULL;
} } /* ecore_x_icccm_icon_name_get */
/** /**
* Add a subwindow to the list of windows that need a different colormap installed. * 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, ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
XA_WINDOW, 32, data, num); XA_WINDOW, 32, data, num);
free(newset); free(newset);
} } /* ecore_x_icccm_colormap_window_set */
/** /**
* Remove a window from the list of colormap windows. * 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) if (old_data)
XFree(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. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSetTransientForHint(_ecore_x_disp, win, forwin); XSetTransientForHint(_ecore_x_disp, win, forwin);
} } /* ecore_x_icccm_transient_for_set */
/** /**
* Remove the transient_for setting from a window. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_TRANSIENT_FOR); 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. * 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; return (Ecore_X_Window)forwin;
else else
return 0; return 0;
} } /* ecore_x_icccm_transient_for_get */
/** /**
* Set the window role hint. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE, ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE,
(char *)role); (char *)role);
} } /* ecore_x_icccm_window_role_set */
/** /**
* Get the window role. * Get the window role.
@ -1117,7 +1113,7 @@ ecore_x_icccm_window_role_get(Ecore_X_Window win)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_WINDOW_ROLE); 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. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER, ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
&l, 1); &l, 1);
} } /* ecore_x_icccm_client_leader_set */
/** /**
* Get the window's client leader. * Get the window's client leader.
@ -1150,7 +1146,7 @@ ecore_x_icccm_client_leader_get(Ecore_X_Window win)
return l; return l;
return 0; return 0;
} } /* ecore_x_icccm_client_leader_get */
EAPI void EAPI void
ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root) 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, XSendEvent(_ecore_x_disp, root, False,
SubstructureNotifyMask | SubstructureRedirectMask, &xev); SubstructureNotifyMask | SubstructureRedirectMask, &xev);
} } /* ecore_x_icccm_iconic_request_send */
/* FIXME: there are older E hints, gnome hints and mwm hints and new netwm */ /* 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 */ /* hints. each should go in their own file/section so we know which */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "ecore_x_private.h" #include "ecore_x_private.h"
#include "Ecore_X.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_error_handler(Display *d __UNUSED__, XErrorEvent *ev __UNUSED__)
{ {
_ecore_x_image_err = 1; _ecore_x_image_err = 1;
} } /* _ecore_x_image_error_handler */
static void static void
_ecore_x_image_shm_check(void) _ecore_x_image_shm_check(void)
@ -92,7 +92,7 @@ _ecore_x_image_shm_check(void)
shmctl(shminfo.shmid, IPC_RMID, 0); shmctl(shminfo.shmid, IPC_RMID, 0);
_ecore_x_image_shm_can = 1; _ecore_x_image_shm_can = 1;
} } /* _ecore_x_image_shm_check */
struct _Ecore_X_Image struct _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(); _ecore_x_image_shm_check();
im->shm = _ecore_x_image_shm_can; im->shm = _ecore_x_image_shm_can;
return im; return im;
} } /* ecore_x_image_new */
EAPI void EAPI void
ecore_x_image_free(Ecore_X_Image *im) ecore_x_image_free(Ecore_X_Image *im)
@ -147,7 +147,7 @@ ecore_x_image_free(Ecore_X_Image *im)
} }
free(im); free(im);
} } /* ecore_x_image_free */
static void static void
_ecore_x_image_shm_create(Ecore_X_Image *im) _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; im->bpp = 2;
else else
im->bpp = 4; im->bpp = 4;
} } /* _ecore_x_image_shm_create */
EAPI Eina_Bool EAPI Eina_Bool
ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
@ -270,7 +270,7 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
} }
return ret; return ret;
} } /* ecore_x_image_get */
EAPI void EAPI void
ecore_x_image_put(Ecore_X_Image *im __UNUSED__, ecore_x_image_put(Ecore_X_Image *im __UNUSED__,
@ -284,7 +284,7 @@ ecore_x_image_put(Ecore_X_Image *im __UNUSED__,
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
printf("ecore_x_image_put: unimplemented!\n"); printf("ecore_x_image_put: unimplemented!\n");
} } /* ecore_x_image_put */
EAPI void * EAPI void *
ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp) 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; *bpp = im->bpp;
return im->data; return im->data;
} } /* ecore_x_image_data_get */

View File

@ -11,7 +11,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
@ -90,7 +90,7 @@ ecore_x_mwm_hints_get(Ecore_X_Window win,
} }
return ret; return ret;
} } /* ecore_x_mwm_hints_get */
EAPI void EAPI void
ecore_x_mwm_borderless_set(Ecore_X_Window win, int borderless) 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,
ECORE_X_ATOM_MOTIF_WM_HINTS, ECORE_X_ATOM_MOTIF_WM_HINTS,
32, (void *)data, 5); 32, (void *)data, 5);
} } /* ecore_x_mwm_borderless_set */

View File

@ -8,7 +8,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -52,7 +52,7 @@ static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win,
static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info); 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, static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
char *data); char *data);
#endif #endif /* if 0 */
static void _ecore_x_netwm_startup_info_free(void *data); static void _ecore_x_netwm_startup_info_free(void *data);
/* /*
@ -80,7 +80,7 @@ ecore_x_netwm_init(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
startup_info = eina_hash_string_superfast_new( startup_info = eina_hash_string_superfast_new(
_ecore_x_netwm_startup_info_free); _ecore_x_netwm_startup_info_free);
} } /* ecore_x_netwm_init */
EAPI void EAPI void
ecore_x_netwm_shutdown(void) ecore_x_netwm_shutdown(void)
@ -90,7 +90,7 @@ ecore_x_netwm_shutdown(void)
eina_hash_free(startup_info); eina_hash_free(startup_info);
startup_info = NULL; startup_info = NULL;
} } /* ecore_x_netwm_shutdown */
/* /*
* WM identification * WM identification
@ -115,7 +115,7 @@ ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check,
_ecore_x_window_prop_string_utf8_set(root, _ecore_x_window_prop_string_utf8_set(root,
ECORE_X_ATOM_NET_WM_NAME, ECORE_X_ATOM_NET_WM_NAME,
wm_name); wm_name);
} } /* ecore_x_netwm_wm_identify */
/* /*
* Set supported atoms * Set supported atoms
@ -130,7 +130,7 @@ ecore_x_netwm_supported_set(Ecore_X_Window root,
ECORE_X_ATOM_NET_SUPPORTED, ECORE_X_ATOM_NET_SUPPORTED,
supported, supported,
num); num);
} } /* ecore_x_netwm_supported_set */
EAPI int EAPI int
ecore_x_netwm_supported_get(Ecore_X_Window root, ecore_x_netwm_supported_get(Ecore_X_Window root,
@ -155,7 +155,7 @@ ecore_x_netwm_supported_get(Ecore_X_Window root,
*num = num_ret; *num = num_ret;
return 1; return 1;
} } /* ecore_x_netwm_supported_get */
/* /*
* Desktop configuration and status * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS, ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS,
&n_desks, 1); &n_desks, 1);
} } /* ecore_x_netwm_desk_count_set */
EAPI void EAPI void
ecore_x_netwm_desk_roots_set(Ecore_X_Window root, 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, ECORE_X_ATOM_NET_VIRTUAL_ROOTS,
vroots, vroots,
n_desks); n_desks);
} } /* ecore_x_netwm_desk_roots_set */
EAPI void EAPI void
ecore_x_netwm_desk_names_set(Ecore_X_Window root, 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); _ATOM_SET_UTF8_STRING_LIST(root, ECORE_X_ATOM_NET_DESKTOP_NAMES, buf, len);
free(buf); free(buf);
} } /* ecore_x_netwm_desk_names_set */
EAPI void EAPI void
ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width, 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; size[1] = height;
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, size, ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, size,
2); 2);
} } /* ecore_x_netwm_desk_size_set */
EAPI void EAPI void
ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT, ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT,
origins, 2 * n_desks); origins, 2 * n_desks);
} } /* ecore_x_netwm_desk_viewports_set */
EAPI void EAPI void
ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation, 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; layout[3] = starting_corner;
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT, ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT,
layout, 4); layout, 4);
} } /* ecore_x_netwm_desk_layout_set */
EAPI void EAPI void
ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas, ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas,
4 * n_desks); 4 * n_desks);
} } /* ecore_x_netwm_desk_workareas_set */
EAPI void EAPI void
ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk, ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk,
1); 1);
} } /* ecore_x_netwm_desk_current_set */
EAPI void EAPI void
ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, int on) 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; val = (on) ? 1 : 0;
ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val, ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val,
1); 1);
} } /* ecore_x_netwm_showing_desktop_set */
/* /*
* Client status * Client status
@ -291,7 +291,7 @@ ecore_x_netwm_client_list_set(Ecore_X_Window root,
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST, ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST,
p_clients, n_clients); p_clients, n_clients);
} } /* ecore_x_netwm_client_list_set */
/* Stacking order */ /* Stacking order */
EAPI void EAPI void
@ -302,7 +302,7 @@ ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING,
p_clients, n_clients); p_clients, n_clients);
} } /* ecore_x_netwm_client_list_stacking_set */
EAPI void EAPI void
ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win) ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
@ -310,7 +310,7 @@ ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW, ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW,
&win, 1); &win, 1);
} } /* ecore_x_netwm_client_active_set */
EAPI void EAPI void
ecore_x_netwm_client_active_request(Ecore_X_Window root, ecore_x_netwm_client_active_request(Ecore_X_Window root,
@ -337,14 +337,14 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root,
XSendEvent(_ecore_x_disp, root, False, XSendEvent(_ecore_x_disp, root, False,
SubstructureRedirectMask | SubstructureNotifyMask, &xev); SubstructureRedirectMask | SubstructureNotifyMask, &xev);
} } /* ecore_x_netwm_client_active_request */
EAPI void EAPI void
ecore_x_netwm_name_set(Ecore_X_Window win, const char *name) ecore_x_netwm_name_set(Ecore_X_Window win, const char *name)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name); _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name);
} } /* ecore_x_netwm_name_set */
EAPI int EAPI int
ecore_x_netwm_name_get(Ecore_X_Window win, char **name) 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); ECORE_X_ATOM_NET_WM_NAME);
return 1; return 1;
} } /* ecore_x_netwm_name_get */
EAPI void EAPI void
ecore_x_netwm_startup_id_set(Ecore_X_Window win, const char *id) ecore_x_netwm_startup_id_set(Ecore_X_Window win, const char *id)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id); _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id);
} } /* ecore_x_netwm_startup_id_set */
EAPI int EAPI int
ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id) 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); ECORE_X_ATOM_NET_STARTUP_ID);
return 1; return 1;
} } /* ecore_x_netwm_startup_id_get */
EAPI void EAPI void
ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME, _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME,
name); name);
} } /* ecore_x_netwm_visible_name_set */
EAPI int EAPI int
ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name) 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); ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
return 1; return 1;
} } /* ecore_x_netwm_visible_name_get */
EAPI void EAPI void
ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME,
name); name);
} } /* ecore_x_netwm_icon_name_set */
EAPI int EAPI int
ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name) 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); ECORE_X_ATOM_NET_WM_ICON_NAME);
return 1; return 1;
} } /* ecore_x_netwm_icon_name_get */
EAPI void EAPI void
ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name) 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_window_prop_string_utf8_set(win,
ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME,
name); name);
} } /* ecore_x_netwm_visible_icon_name_set */
EAPI int EAPI int
ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name) 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); ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
return 1; return 1;
} } /* ecore_x_netwm_visible_icon_name_get */
EAPI void EAPI void
ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk) ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1);
} } /* ecore_x_netwm_desktop_set */
EAPI int EAPI int
ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk) 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; *desk = tmp;
return ret == 1 ? 1 : 0; return ret == 1 ? 1 : 0;
} } /* ecore_x_netwm_desktop_get */
/* /*
* _NET_WM_STRUT is deprecated * _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[2] = top;
strut[3] = bottom; strut[3] = bottom;
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4); 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 * _NET_WM_STRUT is deprecated
@ -507,7 +507,7 @@ ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right,
*bottom = strut[3]; *bottom = strut[3];
return 1; return 1;
} } /* ecore_x_netwm_strut_get */
EAPI void EAPI void
ecore_x_netwm_strut_partial_set(Ecore_X_Window win, ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
@ -543,7 +543,7 @@ ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, ECORE_X_ATOM_NET_WM_STRUT_PARTIAL,
strut, strut,
12); 12);
} } /* ecore_x_netwm_strut_partial_set */
EAPI int EAPI int
ecore_x_netwm_strut_partial_get(Ecore_X_Window win, ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
@ -608,7 +608,7 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
*bottom_end_x = strut[11]; *bottom_end_x = strut[11];
return 1; return 1;
} } /* ecore_x_netwm_strut_partial_get */
EAPI int EAPI int
ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num) ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
@ -715,7 +715,7 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
free(data); free(data);
return 1; return 1;
} } /* ecore_x_netwm_icons_get */
EAPI void EAPI void
ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
@ -735,7 +735,7 @@ ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY,
geometry, geometry,
4); 4);
} } /* ecore_x_netwm_icon_geometry_set */
EAPI int EAPI int
ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
@ -768,7 +768,7 @@ ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
*height = geometry[3]; *height = geometry[3];
return 1; return 1;
} } /* ecore_x_netwm_icon_geometry_get */
EAPI void EAPI void
ecore_x_netwm_pid_set(Ecore_X_Window win, int pid) 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; tmp = pid;
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID,
&tmp, 1); &tmp, 1);
} } /* ecore_x_netwm_pid_set */
EAPI int EAPI int
ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid) 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; *pid = tmp;
return ret == 1 ? 1 : 0; return ret == 1 ? 1 : 0;
} } /* ecore_x_netwm_pid_get */
EAPI void EAPI void
ecore_x_netwm_handled_icons_set(Ecore_X_Window win) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
NULL, 0); NULL, 0);
} } /* ecore_x_netwm_handled_icons_set */
EAPI int EAPI int
ecore_x_netwm_handled_icons_get(Ecore_X_Window win) 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, ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
NULL, 0); NULL, 0);
return ret == 0 ? 1 : 0; return ret == 0 ? 1 : 0;
} } /* ecore_x_netwm_handled_icons_get */
EAPI void EAPI void
ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int time) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME,
&time, 1); &time, 1);
} } /* ecore_x_netwm_user_time_set */
EAPI int EAPI int
ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time) ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time)
@ -835,7 +835,7 @@ ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time)
*time = tmp; *time = tmp;
return ret == 1 ? 1 : 0; return ret == 1 ? 1 : 0;
} } /* ecore_x_netwm_user_time_get */
Ecore_X_Window_State Ecore_X_Window_State
_ecore_x_netwm_state_get(Ecore_X_Atom a) _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; return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
else else
return ECORE_X_WINDOW_STATE_UNKNOWN; return ECORE_X_WINDOW_STATE_UNKNOWN;
} } /* _ecore_x_netwm_state_get */
static Ecore_X_Atom static Ecore_X_Atom
_ecore_x_netwm_state_atom_get(Ecore_X_Window_State s) _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
@ -911,8 +911,8 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
default: default:
return 0; return 0;
} } /* switch */
} } /* _ecore_x_netwm_state_atom_get */
EAPI void EAPI void
ecore_x_netwm_window_state_set(Ecore_X_Window win, ecore_x_netwm_window_state_set(Ecore_X_Window win,
@ -939,7 +939,7 @@ 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); ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num);
free(set); free(set);
} } /* ecore_x_netwm_window_state_set */
EAPI int EAPI int
ecore_x_netwm_window_state_get(Ecore_X_Window win, ecore_x_netwm_window_state_get(Ecore_X_Window win,
@ -974,7 +974,7 @@ ecore_x_netwm_window_state_get(Ecore_X_Window win,
free(atoms); free(atoms);
return 1; return 1;
} } /* ecore_x_netwm_window_state_get */
static Ecore_X_Window_Type static Ecore_X_Window_Type
_ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom) _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; return ECORE_X_WINDOW_TYPE_DND;
else else
return ECORE_X_WINDOW_TYPE_UNKNOWN; return ECORE_X_WINDOW_TYPE_UNKNOWN;
} } /* _ecore_x_netwm_window_type_type_get */
static Ecore_X_Atom static Ecore_X_Atom
_ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type) _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: default:
return 0; 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 * 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); atom = _ecore_x_netwm_window_type_atom_get(type);
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE, ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
&atom, 1); &atom, 1);
} } /* ecore_x_netwm_window_type_set */
/* FIXME: Maybe return 0 on some conditions? */ /* FIXME: Maybe return 0 on some conditions? */
EAPI int EAPI int
@ -1100,7 +1100,7 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type)
return 1; return 1;
return 0; return 0;
} } /* ecore_x_netwm_window_type_get */
EAPI int EAPI int
ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types) ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
@ -1137,7 +1137,7 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
free(atoms2); free(atoms2);
return num; return num;
} } /* ecore_x_netwm_window_types_get */
static Ecore_X_Atom static Ecore_X_Atom
_ecore_x_netwm_action_atom_get(Ecore_X_Action action) _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: default:
return 0; return 0;
} } /* switch */
} } /* _ecore_x_netwm_action_atom_get */
/* FIXME: Get complete list */ /* FIXME: Get complete list */
EAPI int EAPI int
@ -1211,7 +1211,7 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
free(atoms); free(atoms);
return ret; return ret;
} } /* ecore_x_netwm_allowed_action_isset */
/* FIXME: Set complete list */ /* FIXME: Set complete list */
EAPI void EAPI void
@ -1243,7 +1243,7 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
num); num);
free(set); free(set);
} } /* ecore_x_netwm_allowed_action_set */
EAPI int EAPI int
ecore_x_netwm_allowed_action_get(Ecore_X_Window win, ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
@ -1280,7 +1280,7 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
free(atoms); free(atoms);
return 1; return 1;
} } /* ecore_x_netwm_allowed_action_get */
EAPI void EAPI void
ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
&opacity, 1); &opacity, 1);
} } /* ecore_x_netwm_opacity_set */
EAPI int EAPI int
ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity) 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; *opacity = tmp;
return ret == 1 ? 1 : 0; return ret == 1 ? 1 : 0;
} } /* ecore_x_netwm_opacity_get */
EAPI void EAPI void
ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb) ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
@ -1319,7 +1319,7 @@ ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
ECORE_X_ATOM_NET_FRAME_EXTENTS, ECORE_X_ATOM_NET_FRAME_EXTENTS,
frames, frames,
4); 4);
} } /* ecore_x_netwm_frame_size_set */
EAPI int EAPI int
ecore_x_netwm_frame_size_get(Ecore_X_Window win, ecore_x_netwm_frame_size_get(Ecore_X_Window win,
@ -1352,7 +1352,7 @@ ecore_x_netwm_frame_size_get(Ecore_X_Window win,
*fb = frames[3]; *fb = frames[3];
return 1; return 1;
} } /* ecore_x_netwm_frame_size_get */
EAPI int EAPI int
ecore_x_netwm_sync_counter_get(Ecore_X_Window win, ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
@ -1372,7 +1372,7 @@ ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
*counter = tmp; *counter = tmp;
return ret == 1 ? 1 : 0; return ret == 1 ? 1 : 0;
} } /* ecore_x_netwm_sync_counter_get */
EAPI void EAPI void
ecore_x_netwm_ping_send(Ecore_X_Window win) 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; xev.xclient.data.l[4] = 0;
XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
} } /* ecore_x_netwm_ping_send */
EAPI void EAPI void
ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial) ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
@ -1421,7 +1421,7 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
xev.xclient.data.l[4] = 0; xev.xclient.data.l[4] = 0;
XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
} } /* ecore_x_netwm_sync_request_send */
EAPI void EAPI void
ecore_x_netwm_state_request_send(Ecore_X_Window win, ecore_x_netwm_state_request_send(Ecore_X_Window win,
@ -1456,7 +1456,7 @@ ecore_x_netwm_state_request_send(Ecore_X_Window win,
XSendEvent(_ecore_x_disp, root, False, XSendEvent(_ecore_x_disp, root, False,
SubstructureNotifyMask | SubstructureRedirectMask, &xev); SubstructureNotifyMask | SubstructureRedirectMask, &xev);
} } /* ecore_x_netwm_state_request_send */
EAPI void EAPI void
ecore_x_netwm_desktop_request_send(Ecore_X_Window win, ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
@ -1483,7 +1483,7 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
XSendEvent(_ecore_x_disp, root, False, XSendEvent(_ecore_x_disp, root, False,
SubstructureNotifyMask | SubstructureRedirectMask, &xev); SubstructureNotifyMask | SubstructureRedirectMask, &xev);
} } /* ecore_x_netwm_desktop_request_send */
int int
_ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
@ -1530,9 +1530,9 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
/* We have a '\0' in there, the message is done */ /* We have a '\0' in there, the message is done */
_ecore_x_netwm_startup_info_process(info); _ecore_x_netwm_startup_info_process(info);
#endif #endif /* if 0 */
return 1; return 1;
} } /* _ecore_x_netwm_startup_info_begin */
int int
_ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
@ -1569,9 +1569,9 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
/* We have a '\0' in there, the message is done */ /* We have a '\0' in there, the message is done */
_ecore_x_netwm_startup_info_process(info); _ecore_x_netwm_startup_info_process(info);
#endif #endif /* if 0 */
return 1; return 1;
} } /* _ecore_x_netwm_startup_info */
/* /*
* Set UTF-8 string property * 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, XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str)); PropModeReplace, (unsigned char *)str, strlen(str));
} } /* _ecore_x_window_prop_string_utf8_set */
/* /*
* Get UTF-8 string property * 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); XFree(prop_ret);
return str; return str;
} } /* _ecore_x_window_prop_string_utf8_get */
#if 0 /* Unused */ #if 0 /* Unused */
/* /*
@ -1693,7 +1693,7 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
} }
return 1; return 1;
} } /* _ecore_x_netwm_startup_info_process */
/* /*
* Parse startup info * Parse startup info
@ -1849,8 +1849,9 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
return 0; return 0;
return 1; return 1;
} } /* _ecore_x_netwm_startup_info_parse */
#endif
#endif /* if 0 */
/* /*
* Free startup info struct * Free startup info struct
@ -1886,7 +1887,7 @@ _ecore_x_netwm_startup_info_free(void *data)
free(info->wmclass); free(info->wmclass);
free(info); free(info);
} } /* _ecore_x_netwm_startup_info_free */
/* /*
* Is screen composited? * Is screen composited?
@ -1909,7 +1910,7 @@ ecore_x_screen_is_composited(int screen)
win = XGetSelectionOwner(_ecore_x_disp, atom); win = XGetSelectionOwner(_ecore_x_disp, atom);
return win != None; return win != None;
} } /* ecore_x_screen_is_composited */
EAPI void EAPI void
ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win) 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; return;
XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time); XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time);
} } /* ecore_x_screen_is_composited_set */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "Ecore.h" #include "Ecore.h"
#include "ecore_x_private.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)); dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
return XCreatePixmap(_ecore_x_disp, win, w, h, dep); return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
} } /* ecore_x_pixmap_new */
/** /**
* Deletes the reference to the given pixmap. * Deletes the reference to the given pixmap.
@ -55,7 +55,7 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFreePixmap(_ecore_x_disp, pmap); XFreePixmap(_ecore_x_disp, pmap);
} } /* ecore_x_pixmap_free */
/** /**
* Pastes a rectangular area of the given pixmap onto the given drawable. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy); XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
} } /* ecore_x_pixmap_paste */
/** /**
* Retrieves the size of the given pixmap. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (pmap) if (pmap)
ecore_x_drawable_geometry_get(pmap, x, y, w, h); ecore_x_drawable_geometry_get(pmap, x, y, w, h);
} } /* ecore_x_pixmap_geometry_get */
/** /**
* Retrieves the depth of the given pixmap. * Retrieves the depth of the given pixmap.
@ -108,5 +108,5 @@ ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_drawable_depth_get(pmap); return ecore_x_drawable_depth_get(pmap);
} } /* ecore_x_pixmap_depth_get */

View File

@ -4,7 +4,7 @@
#include <sys/param.h> #include <sys/param.h>
#ifndef MAXHOSTNAMELEN #ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256 #define MAXHOSTNAMELEN 256
#endif #endif /* ifndef MAXHOSTNAMELEN */
#define XK_MISCELLANY 1 #define XK_MISCELLANY 1
#include <X11/Xlib.h> #include <X11/Xlib.h>
@ -19,40 +19,40 @@
#include <X11/extensions/dpms.h> #include <X11/extensions/dpms.h>
#ifdef ECORE_XCURSOR #ifdef ECORE_XCURSOR
#include <X11/Xcursor/Xcursor.h> #include <X11/Xcursor/Xcursor.h>
#endif #endif /* ifdef ECORE_XCURSOR */
#ifdef ECORE_XPRINT #ifdef ECORE_XPRINT
#include <X11/extensions/Print.h> #include <X11/extensions/Print.h>
#endif #endif /* ifdef ECORE_XPRINT */
#ifdef ECORE_XINERAMA #ifdef ECORE_XINERAMA
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif #endif /* ifdef ECORE_XINERAMA */
#ifdef ECORE_XRANDR #ifdef ECORE_XRANDR
#include <X11/extensions/Xrandr.h> #include <X11/extensions/Xrandr.h>
#endif #endif /* ifdef ECORE_XRANDR */
#ifdef ECORE_XSS #ifdef ECORE_XSS
#include <X11/extensions/scrnsaver.h> #include <X11/extensions/scrnsaver.h>
#endif #endif /* ifdef ECORE_XSS */
#ifdef ECORE_XRENDER #ifdef ECORE_XRENDER
#include <X11/extensions/Xrender.h> #include <X11/extensions/Xrender.h>
#endif #endif /* ifdef ECORE_XRENDER */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
#include <X11/extensions/Xfixes.h> #include <X11/extensions/Xfixes.h>
#endif #endif /* ifdef ECORE_XFIXES */
#ifdef ECORE_XCOMPOSITE #ifdef ECORE_XCOMPOSITE
#include <X11/extensions/Xcomposite.h> #include <X11/extensions/Xcomposite.h>
#endif #endif /* ifdef ECORE_XCOMPOSITE */
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
#include <X11/extensions/Xdamage.h> #include <X11/extensions/Xdamage.h>
#endif #endif /* ifdef ECORE_XDAMAGE */
#ifdef ECORE_XDPMS #ifdef ECORE_XDPMS
#include <X11/extensions/dpms.h> #include <X11/extensions/dpms.h>
#endif #endif /* ifdef ECORE_XDPMS */
#ifdef ECORE_XKB #ifdef ECORE_XKB
#include <X11/XKBlib.h> #include <X11/XKBlib.h>
#endif #endif /* ifdef ECORE_XKB */
#ifdef ECORE_XI2 #ifdef ECORE_XI2
#include <X11/extensions/XInput2.h> #include <X11/extensions/XInput2.h>
#endif #endif /* ifdef ECORE_XI2 */
#include "Ecore.h" #include "Ecore.h"
#include "ecore_private.h" #include "ecore_private.h"
@ -62,32 +62,32 @@
extern int _ecore_xlib_log_dom; extern int _ecore_xlib_log_dom;
#ifdef ECORE_XLIB_DEFAULT_LOG_COLOR #ifdef ECORE_XLIB_DEFAULT_LOG_COLOR
# undef 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 #define ECORE_XLIB_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
#ifdef ERR #ifdef ERR
# undef ERR # undef ERR
#endif #endif /* ifdef ERR */
#define ERR(...) EINA_LOG_DOM_ERR(_ecore_xlib_log_dom, __VA_ARGS__) #define ERR(...) EINA_LOG_DOM_ERR(_ecore_xlib_log_dom, __VA_ARGS__)
#ifdef DBG #ifdef DBG
# undef DBG # undef DBG
#endif #endif /* ifdef DBG */
#define DBG(...) EINA_LOG_DOM_DBG(_ecore_xlib_log_dom, __VA_ARGS__) #define DBG(...) EINA_LOG_DOM_DBG(_ecore_xlib_log_dom, __VA_ARGS__)
#ifdef INF #ifdef INF
# undef INF # undef INF
#endif #endif /* ifdef INF */
#define INF(...) EINA_LOG_DOM_INFO(_ecore_xlib_log_dom, __VA_ARGS__) #define INF(...) EINA_LOG_DOM_INFO(_ecore_xlib_log_dom, __VA_ARGS__)
#ifdef WRN #ifdef WRN
# undef WRN # undef WRN
#endif #endif /* ifdef WRN */
#define WRN(...) EINA_LOG_DOM_WARN(_ecore_xlib_log_dom, __VA_ARGS__) #define WRN(...) EINA_LOG_DOM_WARN(_ecore_xlib_log_dom, __VA_ARGS__)
#ifdef CRIT #ifdef CRIT
# undef CRIT # undef CRIT
#endif #endif /* ifdef CRIT */
#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_xlib_log_dom, __VA_ARGS__) #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;
@ -177,7 +177,6 @@ typedef struct _Ecore_X_DND_Target
int will_accept; int will_accept;
} Ecore_X_DND_Target; } Ecore_X_DND_Target;
extern int ECORE_X_MODIFIER_SHIFT; extern int ECORE_X_MODIFIER_SHIFT;
extern int ECORE_X_MODIFIER_CTRL; extern int ECORE_X_MODIFIER_CTRL;
extern int ECORE_X_MODIFIER_ALT; extern int ECORE_X_MODIFIER_ALT;
@ -252,14 +251,14 @@ void _ecore_x_event_handle_sync_alarm(XEvent *xevent);
#ifdef ECORE_XRANDR #ifdef ECORE_XRANDR
void _ecore_x_event_handle_randr_change(XEvent *xevent); void _ecore_x_event_handle_randr_change(XEvent *xevent);
void _ecore_x_event_handle_randr_notify(XEvent *xevent); void _ecore_x_event_handle_randr_notify(XEvent *xevent);
#endif #endif /* ifdef ECORE_XRANDR */
#ifdef ECORE_XFIXES #ifdef ECORE_XFIXES
void _ecore_x_event_handle_fixes_selection_notify( void _ecore_x_event_handle_fixes_selection_notify(
XEvent *xevent); XEvent *xevent);
#endif #endif /* ifdef ECORE_XFIXES */
#ifdef ECORE_XDAMAGE #ifdef ECORE_XDAMAGE
void _ecore_x_event_handle_damage_notify(XEvent *xevent); void _ecore_x_event_handle_damage_notify(XEvent *xevent);
#endif #endif /* ifdef ECORE_XDAMAGE */
void _ecore_x_event_handle_generic_event(XEvent *xevent); void _ecore_x_event_handle_generic_event(XEvent *xevent);
void _ecore_x_selection_data_init(void); void _ecore_x_selection_data_init(void);
@ -363,8 +362,8 @@ Ecore_Event_Mouse_Button *_ecore_mouse_button(int event,
#ifdef LOGFNS #ifdef LOGFNS
#include <stdio.h> #include <stdio.h>
#define LOGFN(fl, ln, fn) printf("-ECORE-X: %25s: %5i - %s\n", fl, ln, fn); #define LOGFN(fl, ln, fn) printf("-ECORE-X: %25s: %5i - %s\n", fl, ln, fn);
#else #else /* ifdef LOGFNS */
#define LOGFN(fl, ln, fn) #define LOGFN(fl, ln, fn)
#endif #endif /* ifdef LOGFNS */
#endif #endif /* ifndef _ECORE_X_PRIVATE_H */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
@ -15,7 +15,7 @@ static int _randr_available = 0;
static int _randr_major, _randr_minor, _randr_version; static int _randr_major, _randr_minor, _randr_version;
#define RANDR_1_2 ((1 << 16) | 2) #define RANDR_1_2 ((1 << 16) | 2)
#define RANDR_1_3 ((1 << 16) | 3) #define RANDR_1_3 ((1 << 16) | 3)
#endif #endif /* ifdef ECORE_XRANDR */
void void
_ecore_x_randr_init(void) _ecore_x_randr_init(void)
@ -33,17 +33,17 @@ _ecore_x_randr_init(void)
else else
_randr_available = 0; _randr_available = 0;
#else #else /* ifdef ECORE_XRANDR */
_randr_available = 0; _randr_available = 0;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* _ecore_x_randr_init */
EAPI int EAPI int
ecore_x_randr_query(void) ecore_x_randr_query(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _randr_available; return _randr_available;
} } /* ecore_x_randr_query */
EAPI int EAPI int
ecore_x_randr_events_select(Ecore_X_Window win, int on) 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); XRRSelectInput(_ecore_x_disp, win, mask);
return 1; return 1;
#else #else /* ifdef ECORE_XRANDR */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_events_select */
EAPI Ecore_X_Randr_Rotation EAPI Ecore_X_Randr_Rotation
ecore_x_randr_screen_rotations_get(Ecore_X_Window root) 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, rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
root), &crot); root), &crot);
return rot; return rot;
#else #else /* ifdef ECORE_XRANDR */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_screen_rotations_get */
EAPI Ecore_X_Randr_Rotation EAPI Ecore_X_Randr_Rotation
ecore_x_randr_screen_rotation_get(Ecore_X_Window root) ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
@ -95,10 +95,10 @@ ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot); XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
return crot; return crot;
#else #else /* ifdef ECORE_XRANDR */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_screen_rotation_get */
EAPI void EAPI void
ecore_x_randr_screen_rotation_set(Ecore_X_Window root, ecore_x_randr_screen_rotation_set(Ecore_X_Window root,
@ -117,8 +117,8 @@ ecore_x_randr_screen_rotation_set(Ecore_X_Window root,
sizeid = XRRConfigCurrentConfiguration(xrrcfg, &crot); sizeid = XRRConfigCurrentConfiguration(xrrcfg, &crot);
XRRSetScreenConfig(_ecore_x_disp, xrrcfg, root, sizeid, rot, CurrentTime); XRRSetScreenConfig(_ecore_x_disp, xrrcfg, root, sizeid, rot, CurrentTime);
XRRFreeScreenConfigInfo(xrrcfg); XRRFreeScreenConfigInfo(xrrcfg);
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_screen_rotation_set */
EAPI Ecore_X_Screen_Size * EAPI Ecore_X_Screen_Size *
ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num) 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; ret[i].height = sizes[i].height;
} }
return ret; return ret;
#else #else /* ifdef ECORE_XRANDR */
if (num) if (num)
*num = 0; *num = 0;
return NULL; return NULL;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_screen_sizes_get */
EAPI Ecore_X_Screen_Size EAPI Ecore_X_Screen_Size
ecore_x_randr_current_screen_size_get(Ecore_X_Window root) 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); XRRFreeScreenConfigInfo(sc);
#endif #endif /* ifdef ECORE_XRANDR */
return ret; return ret;
} } /* ecore_x_randr_current_screen_size_get */
EAPI int EAPI int
ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size) ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
@ -221,10 +221,10 @@ ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
XRRFreeScreenConfigInfo(sc); XRRFreeScreenConfigInfo(sc);
return 1; return 1;
#else #else /* ifdef ECORE_XRANDR */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_screen_size_set */
EAPI Ecore_X_Screen_Refresh_Rate EAPI Ecore_X_Screen_Refresh_Rate
ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root) ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
@ -243,9 +243,9 @@ ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
ret.rate = XRRConfigCurrentRate(sc); ret.rate = XRRConfigCurrentRate(sc);
XRRFreeScreenConfigInfo(sc); XRRFreeScreenConfigInfo(sc);
#endif #endif /* ifdef ECORE_XRANDR */
return ret; return ret;
} } /* ecore_x_randr_current_screen_refresh_rate_get */
EAPI Ecore_X_Screen_Refresh_Rate * EAPI Ecore_X_Screen_Refresh_Rate *
ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root, ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root,
@ -287,13 +287,13 @@ ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root,
} }
XRRFreeScreenConfigInfo(sc); XRRFreeScreenConfigInfo(sc);
return ret; return ret;
#else #else /* ifdef ECORE_XRANDR */
if (num) if (num)
*num = 0; *num = 0;
return NULL; return NULL;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_screen_refresh_rates_get */
EAPI int EAPI int
ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root,
@ -330,7 +330,8 @@ ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root,
XRRFreeScreenConfigInfo(sc); XRRFreeScreenConfigInfo(sc);
return 1; return 1;
#else #else /* ifdef ECORE_XRANDR */
return 1; return 1;
#endif #endif /* ifdef ECORE_XRANDR */
} } /* ecore_x_randr_screen_refresh_rate_set */

View File

@ -4,11 +4,10 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "ecore_x_private.h" #include "ecore_x_private.h"
/* /*
* [x] XCreateRegion * [x] XCreateRegion
* [ ] XPolygonRegion * [ ] XPolygonRegion
@ -37,7 +36,7 @@ ecore_x_xregion_new()
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return (Ecore_X_XRegion *)XCreateRegion(); return (Ecore_X_XRegion *)XCreateRegion();
} } /* ecore_x_xregion_new */
EAPI void EAPI void
ecore_x_xregion_free(Ecore_X_XRegion *region) ecore_x_xregion_free(Ecore_X_XRegion *region)
@ -47,14 +46,14 @@ ecore_x_xregion_free(Ecore_X_XRegion *region)
return; return;
XDestroyRegion((Region)region); XDestroyRegion((Region)region);
} } /* ecore_x_xregion_free */
EAPI int EAPI int
ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc) ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XSetRegion(_ecore_x_disp, gc, (Region)region); return XSetRegion(_ecore_x_disp, gc, (Region)region);
} } /* ecore_x_xregion_set */
EAPI void EAPI void
ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y) 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 */ /* return value not used */
XOffsetRegion((Region)region, x, y); XOffsetRegion((Region)region, x, y);
} } /* ecore_x_xregion_translate */
EAPI int EAPI int
ecore_x_xregion_intersect(Ecore_X_XRegion *dst, ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
@ -74,7 +73,7 @@ ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XIntersectRegion((Region)r1, (Region)r2, (Region)dst); return XIntersectRegion((Region)r1, (Region)r2, (Region)dst);
} } /* ecore_x_xregion_intersect */
EAPI int EAPI int
ecore_x_xregion_union(Ecore_X_XRegion *dst, ecore_x_xregion_union(Ecore_X_XRegion *dst,
@ -83,7 +82,7 @@ ecore_x_xregion_union(Ecore_X_XRegion *dst,
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XUnionRegion((Region)r1, (Region)r2, (Region)dst); return XUnionRegion((Region)r1, (Region)r2, (Region)dst);
} } /* ecore_x_xregion_union */
EAPI int EAPI int
ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
@ -99,7 +98,7 @@ ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
xr.height = rect->height; xr.height = rect->height;
return XUnionRectWithRegion(&xr, (Region)src, (Region)dst); return XUnionRectWithRegion(&xr, (Region)src, (Region)dst);
} } /* ecore_x_xregion_union_rect */
EAPI int EAPI int
ecore_x_xregion_subtract(Ecore_X_XRegion *dst, ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
@ -108,7 +107,7 @@ ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XSubtractRegion((Region)rm, (Region)rs, (Region)dst); return XSubtractRegion((Region)rm, (Region)rs, (Region)dst);
} } /* ecore_x_xregion_subtract */
EAPI int EAPI int
ecore_x_xregion_is_empty(Ecore_X_XRegion *region) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return !XEmptyRegion((Region)region); return !XEmptyRegion((Region)region);
} } /* ecore_x_xregion_is_empty */
EAPI int EAPI int
ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XEqualRegion((Region)r1, (Region)r1); return XEqualRegion((Region)r1, (Region)r1);
} } /* ecore_x_xregion_is_equal */
EAPI int EAPI int
ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XPointInRegion((Region)region, x, y); return XPointInRegion((Region)region, x, y);
} } /* ecore_x_xregion_point_contain */
EAPI int EAPI int
ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect) 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->y,
rect->width, rect->width,
rect->height); rect->height);
} } /* ecore_x_xregion_rect_contain */

View File

@ -8,7 +8,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "Ecore.h" #include "Ecore.h"
#include "ecore_x_private.h" #include "ecore_x_private.h"
@ -36,11 +36,11 @@ ecore_x_screensaver_event_available_get(void)
else else
_screensaver_available = 0; _screensaver_available = 0;
#else #else /* ifdef ECORE_XSS */
_screensaver_available = 0; _screensaver_available = 0;
#endif #endif /* ifdef ECORE_XSS */
return _screensaver_available; return _screensaver_available;
} } /* ecore_x_screensaver_event_available_get */
EAPI int EAPI int
ecore_x_screensaver_idle_time_get(void) ecore_x_screensaver_idle_time_get(void)
@ -58,10 +58,10 @@ ecore_x_screensaver_idle_time_get(void)
XFree(xss); XFree(xss);
return idle; return idle;
#endif #endif /* ifdef ECORE_XSS */
return 0; return 0;
} } /* ecore_x_screensaver_idle_time_get */
EAPI void EAPI void
ecore_x_screensaver_set(int timeout, ecore_x_screensaver_set(int timeout,
@ -75,7 +75,7 @@ ecore_x_screensaver_set(int timeout,
interval, interval,
prefer_blanking, prefer_blanking,
allow_exposures); allow_exposures);
} } /* ecore_x_screensaver_set */
EAPI void EAPI void
ecore_x_screensaver_timeout_set(int timeout) ecore_x_screensaver_timeout_set(int timeout)
@ -85,7 +85,7 @@ ecore_x_screensaver_timeout_set(int timeout)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
XSetScreenSaver(_ecore_x_disp, timeout, pint, pblank, pexpo); XSetScreenSaver(_ecore_x_disp, timeout, pint, pblank, pexpo);
} } /* ecore_x_screensaver_timeout_set */
EAPI int EAPI int
ecore_x_screensaver_timeout_get(void) ecore_x_screensaver_timeout_get(void)
@ -95,7 +95,7 @@ ecore_x_screensaver_timeout_get(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
return pto; return pto;
} } /* ecore_x_screensaver_timeout_get */
EAPI void EAPI void
ecore_x_screensaver_blank_set(int blank) ecore_x_screensaver_blank_set(int blank)
@ -105,7 +105,7 @@ ecore_x_screensaver_blank_set(int blank)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
XSetScreenSaver(_ecore_x_disp, pto, pint, blank, pexpo); XSetScreenSaver(_ecore_x_disp, pto, pint, blank, pexpo);
} } /* ecore_x_screensaver_blank_set */
EAPI int EAPI int
ecore_x_screensaver_blank_get(void) ecore_x_screensaver_blank_get(void)
@ -115,7 +115,7 @@ ecore_x_screensaver_blank_get(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
return pblank; return pblank;
} } /* ecore_x_screensaver_blank_get */
EAPI void EAPI void
ecore_x_screensaver_expose_set(int expose) ecore_x_screensaver_expose_set(int expose)
@ -125,7 +125,7 @@ ecore_x_screensaver_expose_set(int expose)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
XSetScreenSaver(_ecore_x_disp, pto, pint, pblank, expose); XSetScreenSaver(_ecore_x_disp, pto, pint, pblank, expose);
} } /* ecore_x_screensaver_expose_set */
EAPI int EAPI int
ecore_x_screensaver_expose_get(void) ecore_x_screensaver_expose_get(void)
@ -135,7 +135,7 @@ ecore_x_screensaver_expose_get(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
return pexpo; return pexpo;
} } /* ecore_x_screensaver_expose_get */
EAPI void EAPI void
ecore_x_screensaver_interval_set(int interval) ecore_x_screensaver_interval_set(int interval)
@ -145,7 +145,7 @@ ecore_x_screensaver_interval_set(int interval)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
XSetScreenSaver(_ecore_x_disp, pto, interval, pblank, pexpo); XSetScreenSaver(_ecore_x_disp, pto, interval, pblank, pexpo);
} } /* ecore_x_screensaver_interval_set */
EAPI int EAPI int
ecore_x_screensaver_interval_get(void) ecore_x_screensaver_interval_get(void)
@ -155,7 +155,7 @@ ecore_x_screensaver_interval_get(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
return pint; return pint;
} } /* ecore_x_screensaver_interval_get */
EAPI void EAPI void
ecore_x_screensaver_event_listen_set(int on) ecore_x_screensaver_event_listen_set(int on)
@ -170,5 +170,6 @@ ecore_x_screensaver_event_listen_set(int on)
else else
XScreenSaverSelectInput(_ecore_x_disp, root, 0); XScreenSaverSelectInput(_ecore_x_disp, root, 0);
#endif #endif /* ifdef ECORE_XSS */
} } /* ecore_x_screensaver_event_listen_set */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -57,7 +57,7 @@ _ecore_x_selection_data_init(void)
#ifdef X_HAVE_UTF8_STRING #ifdef X_HAVE_UTF8_STRING
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING, ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
_ecore_x_selection_converter_text); _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_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
_ecore_x_selection_converter_text); _ecore_x_selection_converter_text);
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING, 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_files);
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS, ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
_ecore_x_selection_parser_targets); _ecore_x_selection_parser_targets);
} } /* _ecore_x_selection_data_init */
void void
_ecore_x_selection_shutdown(void) _ecore_x_selection_shutdown(void)
@ -106,7 +106,7 @@ _ecore_x_selection_shutdown(void)
free(tmp); free(tmp);
} }
parsers = NULL; parsers = NULL;
} } /* _ecore_x_selection_shutdown */
Ecore_X_Selection_Intern * Ecore_X_Selection_Intern *
_ecore_x_selection_get(Ecore_X_Atom selection) _ecore_x_selection_get(Ecore_X_Atom selection)
@ -121,7 +121,7 @@ _ecore_x_selection_get(Ecore_X_Atom selection)
return &selections[3]; return &selections[3];
else else
return NULL; return NULL;
} } /* _ecore_x_selection_get */
int int
_ecore_x_selection_set(Window w, _ecore_x_selection_set(Window w,
@ -165,7 +165,7 @@ _ecore_x_selection_set(Window w,
} }
return 1; return 1;
} } /* _ecore_x_selection_set */
/** /**
* Claim ownership of the PRIMARY selection and set its data. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY); return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY);
} } /* ecore_x_selection_primary_set */
/** /**
* Release ownership of the primary selection * Release ownership of the primary selection
@ -193,7 +193,7 @@ ecore_x_selection_primary_clear(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_PRIMARY); 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. * 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, data,
size, size,
ECORE_X_ATOM_SELECTION_SECONDARY); ECORE_X_ATOM_SELECTION_SECONDARY);
} } /* ecore_x_selection_secondary_set */
/** /**
* Release ownership of the secondary selection * Release ownership of the secondary selection
@ -227,7 +227,7 @@ ecore_x_selection_secondary_clear(void)
NULL, NULL,
0, 0,
ECORE_X_ATOM_SELECTION_SECONDARY); ECORE_X_ATOM_SELECTION_SECONDARY);
} } /* ecore_x_selection_secondary_clear */
/** /**
* Claim ownership of the XDND selection and set its data. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND); return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND);
} } /* ecore_x_selection_xdnd_set */
/** /**
* Release ownership of the XDND selection * Release ownership of the XDND selection
@ -255,7 +255,7 @@ ecore_x_selection_xdnd_clear(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_XDND); 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. * 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, data,
size, size,
ECORE_X_ATOM_SELECTION_CLIPBOARD); ECORE_X_ATOM_SELECTION_CLIPBOARD);
} } /* ecore_x_selection_clipboard_set */
/** /**
* Release ownership of the clipboard selection * Release ownership of the clipboard selection
@ -292,7 +292,7 @@ ecore_x_selection_clipboard_clear(void)
NULL, NULL,
0, 0,
ECORE_X_ATOM_SELECTION_CLIPBOARD); ECORE_X_ATOM_SELECTION_CLIPBOARD);
} } /* ecore_x_selection_clipboard_clear */
Ecore_X_Atom Ecore_X_Atom
_ecore_x_selection_target_atom_get(const char *target) _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); x_target = ecore_x_atom_get(target);
return x_target; return x_target;
} } /* _ecore_x_selection_target_atom_get */
char * char *
_ecore_x_selection_target_get(Ecore_X_Atom target) _ecore_x_selection_target_get(Ecore_X_Atom target)
@ -330,7 +330,7 @@ _ecore_x_selection_target_get(Ecore_X_Atom target)
return strdup(ECORE_X_SELECTION_TARGET_TEXT); return strdup(ECORE_X_SELECTION_TARGET_TEXT);
else else
return XGetAtomName(_ecore_x_disp, target); return XGetAtomName(_ecore_x_disp, target);
} } /* _ecore_x_selection_target_get */
static void static void
_ecore_x_selection_request(Ecore_X_Window w, _ecore_x_selection_request(Ecore_X_Window w,
@ -352,21 +352,21 @@ _ecore_x_selection_request(Ecore_X_Window w,
XConvertSelection(_ecore_x_disp, selection, target, prop, XConvertSelection(_ecore_x_disp, selection, target, prop,
w, CurrentTime); w, CurrentTime);
} } /* _ecore_x_selection_request */
EAPI void EAPI void
ecore_x_selection_primary_request(Ecore_X_Window w, const char *target) ecore_x_selection_primary_request(Ecore_X_Window w, const char *target)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target); _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target);
} } /* ecore_x_selection_primary_request */
EAPI void EAPI void
ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target) ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target); _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target);
} } /* ecore_x_selection_secondary_request */
EAPI void EAPI void
ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target) ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
@ -380,14 +380,14 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom, XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom,
ECORE_X_ATOM_SELECTION_PROP_XDND, w, ECORE_X_ATOM_SELECTION_PROP_XDND, w,
_target->time); _target->time);
} } /* ecore_x_selection_xdnd_request */
EAPI void EAPI void
ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target) ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target); _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target);
} } /* ecore_x_selection_clipboard_request */
EAPI void EAPI void
ecore_x_selection_converter_atom_add(Ecore_X_Atom target, ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
@ -430,7 +430,7 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
cnv->target = target; cnv->target = target;
cnv->convert = func; cnv->convert = func;
} } /* ecore_x_selection_converter_atom_add */
EAPI void EAPI void
ecore_x_selection_converter_add(char *target, ecore_x_selection_converter_add(char *target,
@ -451,7 +451,7 @@ ecore_x_selection_converter_add(char *target,
x_target = _ecore_x_selection_target_atom_get(target); x_target = _ecore_x_selection_target_atom_get(target);
ecore_x_selection_converter_atom_add(x_target, func); ecore_x_selection_converter_atom_add(x_target, func);
} } /* ecore_x_selection_converter_add */
EAPI void EAPI void
ecore_x_selection_converter_atom_del(Ecore_X_Atom target) 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; prev_cnv = cnv;
cnv = cnv->next; cnv = cnv->next;
} }
} } /* ecore_x_selection_converter_atom_del */
EAPI void EAPI void
ecore_x_selection_converter_del(char *target) ecore_x_selection_converter_del(char *target)
@ -494,7 +494,7 @@ ecore_x_selection_converter_del(char *target)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
x_target = _ecore_x_selection_target_atom_get(target); x_target = _ecore_x_selection_target_atom_get(target);
ecore_x_selection_converter_atom_del(x_target); ecore_x_selection_converter_atom_del(x_target);
} } /* ecore_x_selection_converter_del */
EAPI int EAPI int
ecore_x_selection_notify_send(Ecore_X_Window requestor, ecore_x_selection_notify_send(Ecore_X_Window requestor,
@ -519,7 +519,7 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor,
xev.xselection = xnotify; xev.xselection = xnotify;
return ((XSendEvent(_ecore_x_disp, requestor, False, 0, &xev) > 0) ? 1 : 0); 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 */ /* Locate and run conversion callback for specified selection target */
EAPI int EAPI int
@ -566,7 +566,7 @@ ecore_x_selection_convert(Ecore_X_Atom selection,
free(tgt_str); free(tgt_str);
return 1; return 1;
*/ */
} } /* ecore_x_selection_convert */
/* TODO: We need to work out a mechanism for automatic conversion to any requested /* TODO: We need to work out a mechanism for automatic conversion to any requested
* locale using Ecore_Txt functions */ * locale using Ecore_Txt functions */
@ -598,7 +598,7 @@ _ecore_x_selection_converter_text(char *target,
#ifdef X_HAVE_UTF8_STRING #ifdef X_HAVE_UTF8_STRING
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING)) else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
style = XUTF8StringStyle; style = XUTF8StringStyle;
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
else else
return 0; return 0;
if (!(mystr = strdup(data))) if (!(mystr = strdup(data)))
@ -617,7 +617,7 @@ _ecore_x_selection_converter_text(char *target,
return 1; return 1;
} }
#else #else /* ifdef X_HAVE_UTF8_STRING */
if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style, if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
&text_prop) == Success) &text_prop) == Success)
{ {
@ -630,13 +630,13 @@ _ecore_x_selection_converter_text(char *target,
return 1; return 1;
} }
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
else else
{ {
free(mystr); free(mystr);
return 0; return 0;
} }
} } /* _ecore_x_selection_converter_text */
EAPI void EAPI void
ecore_x_selection_parser_add(const char *target, 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->target = strdup(target);
prs->parse = func; prs->parse = func;
} } /* ecore_x_selection_parser_add */
EAPI void EAPI void
ecore_x_selection_parser_del(const char *target) ecore_x_selection_parser_del(const char *target)
@ -709,7 +709,7 @@ ecore_x_selection_parser_del(const char *target)
prev_prs = prs; prev_prs = prs;
prs = prs->next; prs = prs->next;
} }
} } /* ecore_x_selection_parser_del */
/* Locate and run conversion callback for specified selection target */ /* Locate and run conversion callback for specified selection target */
void * void *
@ -734,7 +734,7 @@ _ecore_x_selection_parse(const char *target, void *data, int size, int format)
sel->format = format; sel->format = format;
sel->data = data; sel->data = data;
return sel; return sel;
} } /* _ecore_x_selection_parse */
static int static int
_ecore_x_selection_data_default_free(void *data) _ecore_x_selection_data_default_free(void *data)
@ -745,7 +745,7 @@ _ecore_x_selection_data_default_free(void *data)
free(sel->data); free(sel->data);
free(sel); free(sel);
return 1; return 1;
} } /* _ecore_x_selection_data_default_free */
static void * static void *
_ecore_x_selection_parser_files(const char *target, _ecore_x_selection_parser_files(const char *target,
@ -813,7 +813,7 @@ _ecore_x_selection_parser_files(const char *target,
ECORE_X_SELECTION_DATA(sel)->length = sel->num_files; ECORE_X_SELECTION_DATA(sel)->length = sel->num_files;
return ECORE_X_SELECTION_DATA(sel); return ECORE_X_SELECTION_DATA(sel);
} } /* _ecore_x_selection_parser_files */
static int static int
_ecore_x_selection_data_files_free(void *data) _ecore_x_selection_data_files_free(void *data)
@ -831,7 +831,7 @@ _ecore_x_selection_data_files_free(void *data)
free(sel); free(sel);
return 0; return 0;
} } /* _ecore_x_selection_data_files_free */
static void * static void *
_ecore_x_selection_parser_text(const char *target __UNUSED__, _ecore_x_selection_parser_text(const char *target __UNUSED__,
@ -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)->content = ECORE_X_SELECTION_CONTENT_TEXT;
ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_text_free; ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_text_free;
return sel; return sel;
} } /* _ecore_x_selection_parser_text */
static int static int
_ecore_x_selection_data_text_free(void *data) _ecore_x_selection_data_text_free(void *data)
@ -868,7 +868,7 @@ _ecore_x_selection_data_text_free(void *data)
free(sel->text); free(sel->text);
free(sel); free(sel);
return 1; return 1;
} } /* _ecore_x_selection_data_text_free */
static void * static void *
_ecore_x_selection_parser_targets(const char *target __UNUSED__, _ecore_x_selection_parser_targets(const char *target __UNUSED__,
@ -888,13 +888,12 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__,
for (i = 2; i < size; i++) for (i = 2; i < size; i++)
sel->targets[i - 2] = XGetAtomName(_ecore_x_disp, targets[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)->free = _ecore_x_selection_data_targets_free;
ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TARGETS; ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TARGETS;
ECORE_X_SELECTION_DATA(sel)->length = size; ECORE_X_SELECTION_DATA(sel)->length = size;
ECORE_X_SELECTION_DATA(sel)->data = data; ECORE_X_SELECTION_DATA(sel)->data = data;
return sel; return sel;
} } /* _ecore_x_selection_parser_targets */
static int static int
_ecore_x_selection_data_targets_free(void *data) _ecore_x_selection_data_targets_free(void *data)
@ -914,4 +913,5 @@ _ecore_x_selection_data_targets_free(void *data)
free(ECORE_X_SELECTION_DATA(sel)->data); free(ECORE_X_SELECTION_DATA(sel)->data);
free(sel); free(sel);
return 1; return 1;
} } /* _ecore_x_selection_data_targets_free */

View File

@ -8,7 +8,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "Ecore.h" #include "Ecore.h"
#include "ecore_x_private.h" #include "ecore_x_private.h"
@ -46,14 +46,14 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
ecore_x_sync(); ecore_x_sync();
return alarm; return alarm;
} } /* ecore_x_sync_alarm_new */
EAPI int EAPI int
ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm) ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XSyncDestroyAlarm(_ecore_x_disp, alarm); return XSyncDestroyAlarm(_ecore_x_disp, alarm);
} } /* ecore_x_sync_alarm_free */
EAPI int EAPI int
ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val) 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; return 0;
} } /* ecore_x_sync_counter_query */
EAPI Ecore_X_Sync_Counter EAPI Ecore_X_Sync_Counter
ecore_x_sync_counter_new(int val) ecore_x_sync_counter_new(int val)
@ -80,14 +80,14 @@ ecore_x_sync_counter_new(int val)
XSyncIntToValue(&v, val); XSyncIntToValue(&v, val);
counter = XSyncCreateCounter(_ecore_x_disp, v); counter = XSyncCreateCounter(_ecore_x_disp, v);
return counter; return counter;
} } /* ecore_x_sync_counter_new */
EAPI void EAPI void
ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter) ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSyncDestroyCounter(_ecore_x_disp, counter); XSyncDestroyCounter(_ecore_x_disp, counter);
} } /* ecore_x_sync_counter_free */
EAPI void EAPI void
ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSyncIntToValue(&v, by); XSyncIntToValue(&v, by);
XSyncChangeCounter(_ecore_x_disp, counter, v); XSyncChangeCounter(_ecore_x_disp, counter, v);
} } /* ecore_x_sync_counter_inc */
EAPI void EAPI void
ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val) 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; cond.event_threshold = v2;
XSyncAwait(_ecore_x_disp, &cond, 1); XSyncAwait(_ecore_x_disp, &cond, 1);
// XSync(_ecore_x_disp, False); // dont need this // XSync(_ecore_x_disp, False); // dont need this
} } /* ecore_x_sync_counter_val_wait */

View File

@ -4,19 +4,18 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#ifdef ECORE_XTEST #ifdef ECORE_XTEST
# include <X11/extensions/XTest.h> # include <X11/extensions/XTest.h>
#endif #endif /* ifdef ECORE_XTEST */
#include "ecore_x_private.h" #include "ecore_x_private.h"
#include "Ecore_X.h" #include "Ecore_X.h"
#include <string.h> #include <string.h>
EAPI int EAPI int
ecore_x_test_fake_key_down(const char *key) 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 0;
return XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0); return XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
#else #else /* ifdef ECORE_XTEST */
return 0; return 0;
#endif #endif /* ifdef ECORE_XTEST */
} } /* ecore_x_test_fake_key_down */
EAPI int EAPI int
ecore_x_test_fake_key_up(const char *key) 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 0;
return XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0); return XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
#else #else /* ifdef ECORE_XTEST */
return 0; return 0;
#endif #endif /* ifdef ECORE_XTEST */
} } /* ecore_x_test_fake_key_up */
EAPI int EAPI int
ecore_x_test_fake_key_press(const char *key) ecore_x_test_fake_key_press(const char *key)
@ -135,13 +134,14 @@ ecore_x_test_fake_key_press(const char *key)
XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0); XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
return 1; return 1;
#else #else /* ifdef ECORE_XTEST */
return 0; return 0;
#endif #endif /* ifdef ECORE_XTEST */
} } /* ecore_x_test_fake_key_press */
EAPI const char * EAPI const char *
ecore_x_keysym_string_get(int keysym) ecore_x_keysym_string_get(int keysym)
{ {
return XKeysymToString(keysym); return XKeysymToString(keysym);
} } /* ecore_x_keysym_string_get */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.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); ecore_x_window_defaults_set(win);
return win; return win;
} } /* ecore_x_window_new */
/** /**
* Creates a window with the override redirect attribute set to @c True. * 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, CWWinGravity,
&attr); &attr);
return win; return win;
} } /* ecore_x_window_override_new */
/** /**
* Creates a new input window. * 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; return win;
} } /* ecore_x_window_input_new */
/** /**
* @defgroup Ecore_X_Window_Properties_Group X Window Property Functions * @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_app_args_get(&argc, &argv);
ecore_x_icccm_command_set(win, argc, argv); ecore_x_icccm_command_set(win, argc, argv);
} } /* ecore_x_window_defaults_set */
EAPI void EAPI void
ecore_x_window_configure(Ecore_X_Window win, 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; xwc.stack_mode = stack_mode;
XConfigureWindow(_ecore_x_disp, win, mask, &xwc); XConfigureWindow(_ecore_x_disp, win, mask, &xwc);
} } /* ecore_x_window_configure */
/** /**
* @defgroup Ecore_X_Window_Destroy_Group X Window Destroy Functions * @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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win) if (win)
XDestroyWindow(_ecore_x_disp, win); XDestroyWindow(_ecore_x_disp, win);
} } /* ecore_x_window_free */
/** /**
* Set if a window should be ignored. * 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)); ignore_list = realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window));
} }
} } /* ecore_x_window_ignore_set */
/** /**
* Get the ignore list * Get the ignore list
@ -366,7 +366,7 @@ ecore_x_window_ignore_list(int *num)
*num = ignore_num; *num = ignore_num;
return ignore_list; return ignore_list;
} } /* ecore_x_window_ignore_list */
/** /**
* Sends a delete request to the given window. * 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; xev.xclient.data.l[1] = CurrentTime;
XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
} } /* ecore_x_window_delete_request_send */
/** /**
* @defgroup Ecore_X_Window_Visibility_Group X Window Visibility Functions * @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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XMapWindow(_ecore_x_disp, win); XMapWindow(_ecore_x_disp, win);
} } /* ecore_x_window_show */
/** /**
* Hides a window. * Hides a window.
@ -459,7 +459,7 @@ ecore_x_window_hide(Ecore_X_Window win)
XSendEvent(_ecore_x_disp, xev.xunmap.event, False, XSendEvent(_ecore_x_disp, xev.xunmap.event, False,
SubstructureRedirectMask | SubstructureNotifyMask, &xev); SubstructureRedirectMask | SubstructureNotifyMask, &xev);
XUnmapWindow(_ecore_x_disp, win); XUnmapWindow(_ecore_x_disp, win);
} } /* ecore_x_window_hide */
/** /**
* @defgroup Ecore_X_Window_Geometry_Group X Window Geometry Functions * @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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XMoveWindow(_ecore_x_disp, win, x, y); XMoveWindow(_ecore_x_disp, win, x, y);
} } /* ecore_x_window_move */
/** /**
* Resizes a window. * Resizes a window.
@ -503,7 +503,7 @@ ecore_x_window_resize(Ecore_X_Window win, int w, int h)
h = 1; h = 1;
XResizeWindow(_ecore_x_disp, win, w, h); XResizeWindow(_ecore_x_disp, win, w, h);
} } /* ecore_x_window_resize */
/** /**
* Moves and resizes a window. * 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; h = 1;
XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h); XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h);
} } /* ecore_x_window_move_resize */
/** /**
* @defgroup Ecore_X_Window_Focus_Functions X Window Focus Functions * @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, RevertToPointerRoot, CurrentTime);
XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime); XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime);
} } /* ecore_x_window_focus */
/** /**
* Sets the focus to the given window at a specific time. * 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, PointerRoot, t);
XSetInputFocus(_ecore_x_disp, win, RevertToParent, t); XSetInputFocus(_ecore_x_disp, win, RevertToParent, t);
} } /* ecore_x_window_focus_at_time */
/** /**
* gets the focus to the window @p win. * gets the focus to the window @p win.
@ -581,7 +581,7 @@ ecore_x_window_focus_get(void)
win = 0; win = 0;
XGetInputFocus(_ecore_x_disp, &win, &revert_mode); XGetInputFocus(_ecore_x_disp, &win, &revert_mode);
return win; return win;
} } /* ecore_x_window_focus_get */
/** /**
* @defgroup Ecore_X_Window_Z_Order_Group X Window Z Order Functions * @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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XRaiseWindow(_ecore_x_disp, win); XRaiseWindow(_ecore_x_disp, win);
} } /* ecore_x_window_raise */
/** /**
* Lowers the given window. * Lowers the given window.
@ -611,7 +611,7 @@ ecore_x_window_lower(Ecore_X_Window win)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XLowerWindow(_ecore_x_disp, win); XLowerWindow(_ecore_x_disp, win);
} } /* ecore_x_window_lower */
/** /**
* @defgroup Ecore_X_Window_Parent_Group X Window Parent Functions * @defgroup Ecore_X_Window_Parent_Group X Window Parent Functions
@ -638,7 +638,7 @@ ecore_x_window_reparent(Ecore_X_Window win,
new_parent = DefaultRootWindow(_ecore_x_disp); new_parent = DefaultRootWindow(_ecore_x_disp);
XReparentWindow(_ecore_x_disp, win, new_parent, x, y); XReparentWindow(_ecore_x_disp, win, new_parent, x, y);
} } /* ecore_x_window_reparent */
/** /**
* Retrieves the size of the given window. * 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); win = DefaultRootWindow(_ecore_x_disp);
ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h); ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h);
} } /* ecore_x_window_size_get */
/** /**
* Retrieves the geometry of the given window. * 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); win = DefaultRootWindow(_ecore_x_disp);
ecore_x_drawable_geometry_get(win, x, y, w, h); 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. * 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 0;
return ecore_x_drawable_border_width_get(win); return ecore_x_drawable_border_width_get(win);
} } /* ecore_x_window_border_width_get */
/** /**
* Sets the width of the border of the given window. * 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; return;
XSetWindowBorderWidth (_ecore_x_disp, win, width); XSetWindowBorderWidth (_ecore_x_disp, win, width);
} } /* ecore_x_window_border_width_set */
/** /**
* Retrieves the depth of the given window. * Retrieves the depth of the given window.
@ -722,7 +722,7 @@ ecore_x_window_depth_get(Ecore_X_Window win)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_drawable_depth_get(win); return ecore_x_drawable_depth_get(win);
} } /* ecore_x_window_depth_get */
/** /**
* To be documented. * To be documented.
@ -758,7 +758,7 @@ ecore_x_window_cursor_show(Ecore_X_Window win, int show)
} }
else else
XDefineCursor(_ecore_x_disp, win, 0); XDefineCursor(_ecore_x_disp, win, 0);
} } /* ecore_x_window_cursor_show */
EAPI void EAPI void
ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c) 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); XUndefineCursor(_ecore_x_disp, win);
else else
XDefineCursor(_ecore_x_disp, win, c); XDefineCursor(_ecore_x_disp, win, c);
} } /* ecore_x_window_cursor_set */
/** /**
* Finds out whether the given window is currently visible. * Finds out whether the given window is currently visible.
@ -784,9 +784,7 @@ ecore_x_window_visible_get(Ecore_X_Window win)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return (XGetWindowAttributes(_ecore_x_disp, win, &attr) && return (XGetWindowAttributes(_ecore_x_disp, win, &attr) &&
(attr.map_state == IsViewable)); (attr.map_state == IsViewable));
} } /* ecore_x_window_visible_get */
typedef struct _Shadow Shadow; typedef struct _Shadow Shadow;
struct _Shadow struct _Shadow
@ -870,7 +868,7 @@ _ecore_x_window_tree_walk(Window win)
XFree(list); XFree(list);
return s; return s;
} } /* _ecore_x_window_tree_walk */
static void static void
_ecore_x_window_tree_shadow_free1(Shadow *s) _ecore_x_window_tree_shadow_free1(Shadow *s)
@ -891,7 +889,7 @@ _ecore_x_window_tree_shadow_free1(Shadow *s)
} }
free(s); free(s);
} } /* _ecore_x_window_tree_shadow_free1 */
static void static void
_ecore_x_window_tree_shadow_free(void) _ecore_x_window_tree_shadow_free(void)
@ -911,7 +909,7 @@ _ecore_x_window_tree_shadow_free(void)
free(shadow_base); free(shadow_base);
shadow_base = NULL; shadow_base = NULL;
shadow_num = 0; shadow_num = 0;
} } /* _ecore_x_window_tree_shadow_free */
static void static void
_ecore_x_window_tree_shadow_populate(void) _ecore_x_window_tree_shadow_populate(void)
@ -932,7 +930,7 @@ _ecore_x_window_tree_shadow_populate(void)
free(roots); free(roots);
} }
} } /* _ecore_x_window_tree_shadow_populate */
/* /*
static int shadow_count = 0; static int shadow_count = 0;
@ -975,7 +973,7 @@ _ecore_x_window_shadow_tree_find_shadow(Shadow *s, Window win)
} }
return NULL; return NULL;
} } /* _ecore_x_window_shadow_tree_find_shadow */
static Shadow * static Shadow *
_ecore_x_window_shadow_tree_find(Window base) _ecore_x_window_shadow_tree_find(Window base)
@ -992,7 +990,7 @@ _ecore_x_window_shadow_tree_find(Window base)
return s; return s;
} }
return NULL; return NULL;
} } /* _ecore_x_window_shadow_tree_find */
static Window static Window
_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, _ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s,
@ -1046,7 +1044,7 @@ onward:
} }
return s->win; return s->win;
} } /* _ecore_x_window_shadow_tree_at_xy_get_shadow */
static Window static Window
_ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y, _ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
@ -1072,7 +1070,7 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
y, y,
skip, skip,
skip_num); skip_num);
} } /* _ecore_x_window_shadow_tree_at_xy_get */
/** /**
* Retrieves the top, visible window at the given location, * Retrieves the top, visible window at the given location,
@ -1101,7 +1099,7 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
y, y,
skip, skip,
skip_num); 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 * Retrieves the parent window a given window has. This uses the shadow window
@ -1141,7 +1139,7 @@ ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__,
} }
} }
return 0; return 0;
} } /* ecore_x_window_shadow_parent_get */
/** /**
* Flushes the window shadow tree so nothing is stored. * Flushes the window shadow tree so nothing is stored.
@ -1152,7 +1150,7 @@ ecore_x_window_shadow_tree_flush(void)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_window_tree_shadow_free(); _ecore_x_window_tree_shadow_free();
} } /* ecore_x_window_shadow_tree_flush */
/** /**
* Retrieves the root window a given window is on. * 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 0;
return att.root; return att.root;
} } /* ecore_x_window_root_get */
static Window static Window
_ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y, _ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
@ -1230,7 +1228,7 @@ onward:
} }
return base; return base;
} } /* _ecore_x_window_at_xy_get */
/** /**
* Retrieves the top, visible window at the given location. * 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(); ecore_x_ungrab();
return win ? win : root; return win ? win : root;
} } /* ecore_x_window_at_xy_get */
/** /**
* Retrieves the top, visible window at the given location, * Retrieves the top, visible window at the given location,
@ -1282,7 +1280,7 @@ ecore_x_window_at_xy_with_skip_get(int x,
ecore_x_ungrab(); ecore_x_ungrab();
return win ? win : root; return win ? win : root;
} } /* ecore_x_window_at_xy_with_skip_get */
EAPI Ecore_X_Window EAPI Ecore_X_Window
ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y) 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(); ecore_x_ungrab();
return win ? win : begin; return win ? win : begin;
} } /* ecore_x_window_at_xy_begin_get */
/** /**
* Retrieves the parent window of the given window. * Retrieves the parent window of the given window.
@ -1317,7 +1315,7 @@ ecore_x_window_parent_get(Ecore_X_Window win)
XFree(children); XFree(children);
return parent; return parent;
} } /* ecore_x_window_parent_get */
/** /**
* Sets the background color of the given window. * 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; attr.background_pixel = col.pixel;
XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr); XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr);
} } /* ecore_x_window_background_color_set */
EAPI void EAPI void
ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
att.win_gravity = grav; att.win_gravity = grav;
XChangeWindowAttributes(_ecore_x_disp, win, CWWinGravity, &att); XChangeWindowAttributes(_ecore_x_disp, win, CWWinGravity, &att);
} } /* ecore_x_window_gravity_set */
EAPI void EAPI void
ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav) 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
att.bit_gravity = grav; att.bit_gravity = grav;
XChangeWindowAttributes(_ecore_x_disp, win, CWBitGravity, &att); XChangeWindowAttributes(_ecore_x_disp, win, CWBitGravity, &att);
} } /* ecore_x_window_pixel_gravity_set */
EAPI void EAPI void
ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pmap) ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pmap)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSetWindowBackgroundPixmap(_ecore_x_disp, win, pmap); XSetWindowBackgroundPixmap(_ecore_x_disp, win, pmap);
} } /* ecore_x_window_pixmap_set */
EAPI void EAPI void
ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h) ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XClearArea(_ecore_x_disp, win, x, y, w, h, False); XClearArea(_ecore_x_disp, win, x, y, w, h, False);
} } /* ecore_x_window_area_clear */
EAPI void EAPI void
ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h) ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XClearArea(_ecore_x_disp, win, x, y, w, h, True); XClearArea(_ecore_x_disp, win, x, y, w, h, True);
} } /* ecore_x_window_area_expose */
EAPI void EAPI void
ecore_x_window_override_set(Ecore_X_Window win, int override) ecore_x_window_override_set(Ecore_X_Window win, int override)
@ -1395,7 +1393,7 @@ ecore_x_window_override_set(Ecore_X_Window win, int override)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
att.override_redirect = override; att.override_redirect = override;
XChangeWindowAttributes(_ecore_x_disp, win, CWOverrideRedirect, &att); XChangeWindowAttributes(_ecore_x_disp, win, CWOverrideRedirect, &att);
} } /* ecore_x_window_override_set */
#ifdef ECORE_XRENDER #ifdef ECORE_XRENDER
static Ecore_X_Window static Ecore_X_Window
@ -1504,8 +1502,9 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
ecore_x_window_defaults_set(win); ecore_x_window_defaults_set(win);
return win; return win;
} } /* _ecore_x_window_argb_internal_new */
#endif
#endif /* ifdef ECORE_XRENDER */
EAPI int EAPI int
ecore_x_window_argb_get(Ecore_X_Window win) 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 1;
return 0; return 0;
#else #else /* ifdef ECORE_XRENDER */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRENDER */
} } /* ecore_x_window_argb_get */
/** /**
* Creates a new window. * Creates a new window.
@ -1552,10 +1551,10 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent,
#ifdef ECORE_XRENDER #ifdef ECORE_XRENDER
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0); return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
#else #else /* ifdef ECORE_XRENDER */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRENDER */
} } /* ecore_x_window_manager_argb_new */
/** /**
* Creates a new window. * 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 #ifdef ECORE_XRENDER
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 0, 0); return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 0, 0);
#else #else /* ifdef ECORE_XRENDER */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRENDER */
} } /* ecore_x_window_argb_new */
/** /**
* Creates a window with the override redirect attribute set to @c True. * Creates a window with the override redirect attribute set to @c True.
@ -1600,7 +1599,8 @@ ecore_x_window_override_argb_new(Ecore_X_Window parent,
#ifdef ECORE_XRENDER #ifdef ECORE_XRENDER
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0); return _ecore_x_window_argb_internal_new(parent, x, y, w, h, 1, 0);
#else #else /* ifdef ECORE_XRENDER */
return 0; return 0;
#endif #endif /* ifdef ECORE_XRENDER */
} } /* ecore_x_window_override_argb_new */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -29,7 +29,7 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
{ {
#if SIZEOF_INT == SIZEOF_LONG #if SIZEOF_INT == SIZEOF_LONG
_ATOM_SET_CARD32(win, atom, val, num); _ATOM_SET_CARD32(win, atom, val, num);
#else #else /* if SIZEOF_INT == SIZEOF_LONG */
long *v2; long *v2;
unsigned int i; 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]; v2[i] = val[i];
_ATOM_SET_CARD32(win, atom, v2, num); _ATOM_SET_CARD32(win, atom, v2, num);
free(v2); free(v2);
#endif #endif /* if SIZEOF_INT == SIZEOF_LONG */
} } /* ecore_x_window_prop_card32_set */
/* /*
* Get CARD32 (array) property * 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); XFree(prop_ret);
return num; return num;
} } /* ecore_x_window_prop_card32_get */
/* /*
* Get CARD32 (array) property of any length * 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); XFree(prop_ret);
return num; return num;
} } /* ecore_x_window_prop_card32_list_get */
/* /*
* Set X ID (array) property * 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 #if SIZEOF_INT == SIZEOF_LONG
XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace, XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
(unsigned char *)lst, num); (unsigned char *)lst, num);
#else #else /* if SIZEOF_INT == SIZEOF_LONG */
unsigned long *pl; unsigned long *pl;
unsigned int i; 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, XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
(unsigned char *)pl, num); (unsigned char *)pl, num);
free(pl); free(pl);
#endif #endif /* if SIZEOF_INT == SIZEOF_LONG */
} } /* ecore_x_window_prop_xid_set */
/* /*
* Get X ID (array) property * 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); XFree(prop_ret);
return num; return num;
} } /* ecore_x_window_prop_xid_get */
/* /*
* Get X ID (array) property * 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); XFree(prop_ret);
return num; return num;
} } /* ecore_x_window_prop_xid_list_get */
/* /*
* Remove/add/toggle X ID list item. * 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) if (num < 0)
{ {
return; /* Error - assuming invalid window */ return; /* Error - assuming invalid window */
} }
/* Is it there? */ /* Is it there? */
@ -309,7 +308,7 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
done: done:
if (lst) if (lst)
free(lst); free(lst);
} } /* ecore_x_window_prop_xid_list_change */
/* /*
* Set Atom (array) property * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num); ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num);
} } /* ecore_x_window_prop_atom_set */
/* /*
* Get Atom (array) property * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len); return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len);
} } /* ecore_x_window_prop_atom_get */
/* /*
* Get Atom (array) property * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst); 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. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op); ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op);
} } /* ecore_x_window_prop_atom_list_change */
/* /*
* Set Window (array) property * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num); ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num);
} } /* ecore_x_window_prop_window_set */
/* /*
* Get Window (array) property * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len); return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len);
} } /* ecore_x_window_prop_window_get */
/* /*
* Get Window (array) property * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst); return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst);
} } /* ecore_x_window_prop_window_list_get */
/** /**
* To be documented. * To be documented.
@ -417,7 +416,7 @@ EAPI Ecore_X_Atom
ecore_x_window_prop_any_type(void) ecore_x_window_prop_any_type(void)
{ {
return AnyPropertyType; return AnyPropertyType;
} } /* ecore_x_window_prop_any_type */
/** /**
* To be documented. * To be documented.
@ -459,7 +458,7 @@ ecore_x_window_prop_property_set(Ecore_X_Window win,
free(dat); free(dat);
} }
} }
} } /* ecore_x_window_prop_property_set */
/** /**
* To be documented. * To be documented.
@ -526,7 +525,7 @@ ecore_x_window_prop_property_get(Ecore_X_Window win,
for (i = 0; i < num_ret; i++) for (i = 0; i < num_ret; i++)
((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i]; ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i];
break; break;
} } /* switch */
XFree(prop_ret); XFree(prop_ret);
@ -534,14 +533,14 @@ ecore_x_window_prop_property_get(Ecore_X_Window win,
*num = num_ret; *num = num_ret;
return size_ret; return size_ret;
} } /* ecore_x_window_prop_property_get */
EAPI void EAPI void
ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property) ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property)
{ {
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XDeleteProperty(_ecore_x_disp, win, property); XDeleteProperty(_ecore_x_disp, win, property);
} } /* ecore_x_window_prop_property_del */
EAPI Ecore_X_Atom * EAPI Ecore_X_Atom *
ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret) 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); XFree(atom_ret);
return atoms; return atoms;
} } /* ecore_x_window_prop_list */
/** /**
* Set a window string property. * Set a window string property.
@ -594,7 +593,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win,
xtp.encoding = ECORE_X_ATOM_UTF8_STRING; xtp.encoding = ECORE_X_ATOM_UTF8_STRING;
xtp.nitems = strlen(str); xtp.nitems = strlen(str);
XSetTextProperty(_ecore_x_disp, win, &xtp, type); XSetTextProperty(_ecore_x_disp, win, &xtp, type);
} } /* ecore_x_window_prop_string_set */
/** /**
* Get a window string property. * 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 #ifdef X_HAVE_UTF8_STRING
s = Xutf8TextPropertyToTextList(_ecore_x_disp, &xtp, s = Xutf8TextPropertyToTextList(_ecore_x_disp, &xtp,
&list, &items); &list, &items);
#else #else /* ifdef X_HAVE_UTF8_STRING */
s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp, s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp,
&list, &items); &list, &items);
#endif #endif /* ifdef X_HAVE_UTF8_STRING */
if ((s == XLocaleNotSupported) || if ((s == XLocaleNotSupported) ||
(s == XNoMemory) || (s == XConverterNotFound)) (s == XNoMemory) || (s == XConverterNotFound))
str = strdup((char *)xtp.value); str = strdup((char *)xtp.value);
@ -644,7 +643,7 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
} }
return str; return str;
} } /* ecore_x_window_prop_string_get */
EAPI int EAPI int
ecore_x_window_prop_protocol_isset(Ecore_X_Window win, ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
@ -673,7 +672,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
XFree(protos); XFree(protos);
return ret; return ret;
} } /* ecore_x_window_prop_protocol_isset */
/** /**
* To be documented. * To be documented.
@ -715,4 +714,5 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
XFree(protos); XFree(protos);
*num_ret = protos_count; *num_ret = protos_count;
return prot_ret; return prot_ret;
} } /* ecore_x_window_prop_protocol_list_get */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <stdlib.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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet); XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet);
} } /* ecore_x_window_shape_mask_set */
EAPI void EAPI void
ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win) ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
@ -45,7 +45,7 @@ ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
shape_win, shape_win,
ShapeBounding, ShapeBounding,
ShapeSet); ShapeSet);
} } /* ecore_x_window_shape_window_set */
EAPI void EAPI void
ecore_x_window_shape_window_set_xy(Ecore_X_Window win, ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
@ -62,7 +62,7 @@ ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
shape_win, shape_win,
ShapeBounding, ShapeBounding,
ShapeSet); ShapeSet);
} } /* ecore_x_window_shape_window_set_xy */
EAPI void EAPI void
ecore_x_window_shape_rectangle_set(Ecore_X_Window win, ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
@ -87,7 +87,7 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
1, 1,
ShapeSet, ShapeSet,
Unsorted); Unsorted);
} } /* ecore_x_window_shape_rectangle_set */
EAPI void EAPI void
ecore_x_window_shape_rectangles_set(Ecore_X_Window win, ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
@ -124,7 +124,7 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
Unsorted); Unsorted);
if (rect) if (rect)
free(rect); free(rect);
} } /* ecore_x_window_shape_rectangles_set */
EAPI void EAPI void
ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win) ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
@ -138,7 +138,7 @@ ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
shape_win, shape_win,
ShapeBounding, ShapeBounding,
ShapeUnion); ShapeUnion);
} } /* ecore_x_window_shape_window_add */
EAPI void EAPI void
ecore_x_window_shape_window_add_xy(Ecore_X_Window win, ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
@ -155,7 +155,7 @@ ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
shape_win, shape_win,
ShapeBounding, ShapeBounding,
ShapeUnion); ShapeUnion);
} } /* ecore_x_window_shape_window_add_xy */
EAPI void EAPI void
ecore_x_window_shape_rectangle_add(Ecore_X_Window win, ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
@ -180,7 +180,7 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
1, 1,
ShapeUnion, ShapeUnion,
Unsorted); Unsorted);
} } /* ecore_x_window_shape_rectangle_add */
EAPI void EAPI void
ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
@ -205,7 +205,7 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
1, 1,
ShapeIntersect, ShapeIntersect,
Unsorted); Unsorted);
} } /* ecore_x_window_shape_rectangle_clip */
EAPI void EAPI void
ecore_x_window_shape_rectangles_add(Ecore_X_Window win, ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
@ -242,7 +242,7 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
Unsorted); Unsorted);
if (rect) if (rect)
free(rect); free(rect);
} } /* ecore_x_window_shape_rectangles_add */
EAPI Ecore_X_Rectangle * EAPI Ecore_X_Rectangle *
ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret) 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; *num_ret = num;
return rects; return rects;
} } /* ecore_x_window_shape_rectangles_get */
EAPI void EAPI void
ecore_x_window_shape_events_select(Ecore_X_Window win, int on) 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); XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
else else
XShapeSelectInput(_ecore_x_disp, win, 0); 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. * 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__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
#ifdef ShapeInput #ifdef ShapeInput
XShapeCombineMask(_ecore_x_disp, win, ShapeInput, 0, 0, mask, ShapeSet); XShapeCombineMask(_ecore_x_disp, win, ShapeInput, 0, 0, mask, ShapeSet);
#else #else /* ifdef ShapeInput */
XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet); XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet);
#endif #endif /* ifdef ShapeInput */
} } /* ecore_x_window_shape_input_mask_set */

View File

@ -4,7 +4,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include <string.h> #include <string.h>
@ -14,14 +14,14 @@
#ifdef ECORE_XI2 #ifdef ECORE_XI2
#include "Ecore_Input.h" #include "Ecore_Input.h"
#endif #endif /* ifdef ECORE_XI2 */
int _ecore_x_xi2_opcode = -1; int _ecore_x_xi2_opcode = -1;
#ifdef ECORE_XI2 #ifdef ECORE_XI2
static XIDeviceInfo *_ecore_x_xi2_devs = NULL; static XIDeviceInfo *_ecore_x_xi2_devs = NULL;
static int _ecore_x_xi2_num = 0; static int _ecore_x_xi2_num = 0;
#endif #endif /* ifdef ECORE_XI2 */
void void
_ecore_x_input_init(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_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices,
&_ecore_x_xi2_num); &_ecore_x_xi2_num);
#endif #endif /* ifdef ECORE_XI2 */
} } /* _ecore_x_input_init */
void void
_ecore_x_input_shutdown(void) _ecore_x_input_shutdown(void)
@ -60,8 +60,8 @@ _ecore_x_input_shutdown(void)
_ecore_x_xi2_num = 0; _ecore_x_xi2_num = 0;
_ecore_x_xi2_opcode = -1; _ecore_x_xi2_opcode = -1;
#endif #endif /* ifdef ECORE_XI2 */
} } /* _ecore_x_input_shutdown */
void void
_ecore_x_input_handler(XEvent *xevent) _ecore_x_input_handler(XEvent *xevent)
@ -127,9 +127,9 @@ _ecore_x_input_handler(XEvent *xevent)
evd->event_x, evd->event_y, evd->event_x, evd->event_y,
evd->root_x, evd->root_y); evd->root_x, evd->root_y);
break; break;
} } /* switch */
#endif #endif /* ifdef ECORE_XI2 */
} } /* _ecore_x_input_handler */
EAPI Eina_Bool EAPI Eina_Bool
ecore_x_input_multi_select(Ecore_X_Window win) ecore_x_input_multi_select(Ecore_X_Window win)
@ -162,7 +162,8 @@ ecore_x_input_multi_select(Ecore_X_Window win)
} }
return find; return find;
#else #else /* ifdef ECORE_XI2 */
return 0; return 0;
#endif #endif /* ifdef ECORE_XI2 */
} } /* ecore_x_input_multi_select */

View File

@ -8,7 +8,7 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif /* ifdef HAVE_CONFIG_H */
#include "Ecore.h" #include "Ecore.h"
#include "ecore_x_private.h" #include "ecore_x_private.h"
@ -18,7 +18,7 @@
#ifdef ECORE_XINERAMA #ifdef ECORE_XINERAMA
static XineramaScreenInfo *_xin_info = NULL; static XineramaScreenInfo *_xin_info = NULL;
static int _xin_scr_num = 0; static int _xin_scr_num = 0;
#endif #endif /* ifdef ECORE_XINERAMA */
EAPI int EAPI int
ecore_x_xinerama_screen_count_get(void) ecore_x_xinerama_screen_count_get(void)
@ -38,9 +38,9 @@ ecore_x_xinerama_screen_count_get(void)
return _xin_scr_num; return _xin_scr_num;
} }
#endif #endif /* ifdef ECORE_XINERAMA */
return 0; return 0;
} } /* ecore_x_xinerama_screen_count_get */
EAPI int EAPI int
ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h) 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) if (x)
*x = 0; *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); *h = DisplayHeight(_ecore_x_disp, 0);
return 0; return 0;
} } /* ecore_x_xinerama_screen_geometry_get */