uncrustify so T_UNIX will stop nagging me! :)

SVN revision: 50583
This commit is contained in:
Mike Blumenkrantz 2010-07-28 05:23:42 +00:00
parent 5028d6a282
commit e248c8b6fc
33 changed files with 8808 additions and 6282 deletions

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_MOVE;
EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_LINK;
EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_ASK;
EAPI extern Ecore_X_Atom ECORE_X_DND_ACTION_PRIVATE;
/* old E atom */
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_FRAME_SIZE;
@ -192,23 +192,23 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
/* currenly E specific virtual keyboard extension, aim to submit to netwm spec
* later */
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
/* Illume specific atoms */

View File

@ -1,84 +1,84 @@
/* generic atoms */
EAPI Ecore_X_Atom ECORE_X_ATOM_ATOM = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_CARDINAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_COMPOUND_TEXT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_FILE_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_STRING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_TEXT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_UTF8_STRING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_PIXMAP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_ATOM = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_CARDINAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_COMPOUND_TEXT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_FILE_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_STRING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_TEXT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_UTF8_STRING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_PIXMAP = 0;
/* dnd atoms */
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_XDND = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_XDND = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_AWARE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ENTER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_TYPE_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_POSITION = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_COPY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_MOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_PRIVATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_ASK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_LINK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_DESCRIPTION = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_PROXY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_STATUS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_LEAVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_DROP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_FINISHED = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_XDND = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_XDND = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_AWARE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ENTER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_TYPE_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_POSITION = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_COPY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_MOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_PRIVATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_ASK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_LINK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_ACTION_DESCRIPTION = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_PROXY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_STATUS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_LEAVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_DROP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_XDND_FINISHED = 0;
/* dnd atoms that need to be exposed to the application interface */
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_COPY = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_MOVE = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_LINK = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_ASK = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_PRIVATE = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_COPY = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_MOVE = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_LINK = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_ASK = 0;
EAPI Ecore_X_Atom ECORE_X_DND_ACTION_PRIVATE = 0;
/* old E atom */
EAPI Ecore_X_Atom ECORE_X_ATOM_E_FRAME_SIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_FRAME_SIZE = 0;
/* old Gnome atom */
EAPI Ecore_X_Atom ECORE_X_ATOM_WIN_LAYER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WIN_LAYER = 0;
/* ICCCM atoms */
/* ICCCM: client properties */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_ICON_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_NORMAL_HINTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_SIZE_HINTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_HINTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLASS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_TRANSIENT_FOR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_PROTOCOLS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COLORMAP_WINDOWS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COMMAND = 0; /* obsolete */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLIENT_MACHINE = 0; /* obsolete */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_ICON_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_NORMAL_HINTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_SIZE_HINTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_HINTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLASS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_TRANSIENT_FOR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_PROTOCOLS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COLORMAP_WINDOWS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COMMAND = 0; /* obsolete */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLIENT_MACHINE = 0; /* obsolete */
/* ICCCM: window manager properties */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_ICON_SIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_ICON_SIZE = 0;
/* ICCCM: WM_STATE property */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CHANGE_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CHANGE_STATE = 0;
/* ICCCM: WM_PROTOCOLS properties */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_TAKE_FOCUS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_SAVE_YOURSELF = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_DELETE_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_TAKE_FOCUS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_SAVE_YOURSELF = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_DELETE_WINDOW = 0;
/* ICCCM: WM_COLORMAP properties */
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COLORMAP_NOTIFY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_COLORMAP_NOTIFY = 0;
/* ICCCM: session management properties */
EAPI Ecore_X_Atom ECORE_X_ATOM_SM_CLIENT_ID = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLIENT_LEADER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_WINDOW_ROLE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SM_CLIENT_ID = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_CLIENT_LEADER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_WM_WINDOW_ROLE = 0;
/* Motif WM atom */
EAPI Ecore_X_Atom ECORE_X_ATOM_MOTIF_WM_HINTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_MOTIF_WM_HINTS = 0;
/* NetWM 1.3 atoms (http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html) */
@ -86,183 +86,183 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_MOTIF_WM_HINTS = 0;
* NetWM: Root Window Properties and related messages (complete)
*/
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTED = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLIENT_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLIENT_LIST_STACKING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_VIEWPORT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CURRENT_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_NAMES = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_ACTIVE_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WORKAREA = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_VIRTUAL_ROOTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_LAYOUT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SHOWING_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTED = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLIENT_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLIENT_LIST_STACKING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_VIEWPORT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CURRENT_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_NAMES = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_ACTIVE_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WORKAREA = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_VIRTUAL_ROOTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_DESKTOP_LAYOUT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_SHOWING_DESKTOP = 0;
/*
* NetWM: Other Root Window Messages (complete)
*/
/* pager */
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLOSE_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_MOVERESIZE_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_MOVERESIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_RESTACK_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_CLOSE_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_MOVERESIZE_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_MOVERESIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_RESTACK_WINDOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS = 0;
/*
* NetWM: Application Window Properties (complete)
*/
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_VISIBLE_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_VISIBLE_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_DESKTOP = 0;
/* window type */
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND = 0;
/* state */
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MODAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_STICKY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SHADED = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_HIDDEN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_ABOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_BELOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MODAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_STICKY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SHADED = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_HIDDEN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_ABOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_BELOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION = 0;
/* allowed actions */
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_RESIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_SHADE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_STICK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CLOSE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_ABOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_BELOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_RESIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_SHADE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_STICK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_CLOSE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_ABOVE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ACTION_BELOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT_PARTIAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_PID = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_HANDLED_ICONS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_USER_TIME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_ID = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_FRAME_EXTENTS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_STRUT_PARTIAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_ICON = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_PID = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_HANDLED_ICONS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_USER_TIME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_ID = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_FRAME_EXTENTS = 0;
/*
* NetWM: Window Manager Protocols (complete)
*/
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_PING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_SYNC_REQUEST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_PING = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_SYNC_REQUEST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER = 0;
/*
* NetWM: Not in the spec
*/
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_OPACITY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_OPACITY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADOW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_WM_WINDOW_SHADE = 0;
/*
* Startup Notification (http://standards.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt)
*/
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO = 0;
/* selection atoms */
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_TARGETS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PRIMARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_SECONDARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_CLIPBOARD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_PRIMARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_SECONDARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_TARGETS = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PRIMARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_SECONDARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_CLIPBOARD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_PRIMARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_SECONDARY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD = 0;
/* currently E specific virtual keyboard extension, aim to submit to netwm spec
* later */
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER= 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME = 0;
/* currently E specific illume extension */
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CONFORMANT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_SINGLE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_BACK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_HOME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLOSE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_HOME_NEW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_HOME_DEL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ZONE_LIST = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CONFORMANT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_SINGLE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_BACK = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_FOCUS_HOME = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLOSE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_HOME_NEW = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_HOME_DEL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0;

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@ void *alloca (size_t);
typedef struct
{
const char *name;
const char *name;
Ecore_X_Atom *atom;
} Atom_Item;
@ -42,232 +42,250 @@ void
_ecore_x_atoms_init(void)
{
const Atom_Item items[] =
{
{ "ATOM", &ECORE_X_ATOM_ATOM },
{ "CARDINAL", &ECORE_X_ATOM_CARDINAL },
{ "COMPOUND_TEXT", &ECORE_X_ATOM_COMPOUND_TEXT },
{ "FILE_NAME", &ECORE_X_ATOM_FILE_NAME },
{ "STRING", &ECORE_X_ATOM_STRING },
{ "TEXT", &ECORE_X_ATOM_TEXT },
{ "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING },
{ "WINDOW", &ECORE_X_ATOM_WINDOW },
{ "PIXMAP", &ECORE_X_ATOM_PIXMAP },
{
{ "ATOM", &ECORE_X_ATOM_ATOM },
{ "CARDINAL", &ECORE_X_ATOM_CARDINAL },
{ "COMPOUND_TEXT", &ECORE_X_ATOM_COMPOUND_TEXT },
{ "FILE_NAME", &ECORE_X_ATOM_FILE_NAME },
{ "STRING", &ECORE_X_ATOM_STRING },
{ "TEXT", &ECORE_X_ATOM_TEXT },
{ "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING },
{ "WINDOW", &ECORE_X_ATOM_WINDOW },
{ "PIXMAP", &ECORE_X_ATOM_PIXMAP },
{ "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND },
{ "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND },
{ "XdndAware", &ECORE_X_ATOM_XDND_AWARE },
{ "XdndEnter", &ECORE_X_ATOM_XDND_ENTER },
{ "XdndTypeList", &ECORE_X_ATOM_XDND_TYPE_LIST },
{ "XdndPosition", &ECORE_X_ATOM_XDND_POSITION },
{ "XdndActionCopy", &ECORE_X_ATOM_XDND_ACTION_COPY },
{ "XdndActionMove", &ECORE_X_ATOM_XDND_ACTION_MOVE },
{ "XdndActionPrivate", &ECORE_X_ATOM_XDND_ACTION_PRIVATE },
{ "XdndActionAsk", &ECORE_X_ATOM_XDND_ACTION_ASK },
{ "XdndActionList", &ECORE_X_ATOM_XDND_ACTION_LIST },
{ "XdndActionLink", &ECORE_X_ATOM_XDND_ACTION_LINK },
{ "XdndActionDescription", &ECORE_X_ATOM_XDND_ACTION_DESCRIPTION },
{ "XdndProxy", &ECORE_X_ATOM_XDND_PROXY },
{ "XdndStatus", &ECORE_X_ATOM_XDND_STATUS },
{ "XdndLeave", &ECORE_X_ATOM_XDND_LEAVE },
{ "XdndDrop", &ECORE_X_ATOM_XDND_DROP },
{ "XdndFinished", &ECORE_X_ATOM_XDND_FINISHED },
{ "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND },
{ "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND },
{ "XdndAware", &ECORE_X_ATOM_XDND_AWARE },
{ "XdndEnter", &ECORE_X_ATOM_XDND_ENTER },
{ "XdndTypeList", &ECORE_X_ATOM_XDND_TYPE_LIST },
{ "XdndPosition", &ECORE_X_ATOM_XDND_POSITION },
{ "XdndActionCopy", &ECORE_X_ATOM_XDND_ACTION_COPY },
{ "XdndActionMove", &ECORE_X_ATOM_XDND_ACTION_MOVE },
{ "XdndActionPrivate", &ECORE_X_ATOM_XDND_ACTION_PRIVATE },
{ "XdndActionAsk", &ECORE_X_ATOM_XDND_ACTION_ASK },
{ "XdndActionList", &ECORE_X_ATOM_XDND_ACTION_LIST },
{ "XdndActionLink", &ECORE_X_ATOM_XDND_ACTION_LINK },
{ "XdndActionDescription", &ECORE_X_ATOM_XDND_ACTION_DESCRIPTION },
{ "XdndProxy", &ECORE_X_ATOM_XDND_PROXY },
{ "XdndStatus", &ECORE_X_ATOM_XDND_STATUS },
{ "XdndLeave", &ECORE_X_ATOM_XDND_LEAVE },
{ "XdndDrop", &ECORE_X_ATOM_XDND_DROP },
{ "XdndFinished", &ECORE_X_ATOM_XDND_FINISHED },
{ "XdndActionCopy", &ECORE_X_DND_ACTION_COPY },
{ "XdndActionMove", &ECORE_X_DND_ACTION_MOVE },
{ "XdndActionLink", &ECORE_X_DND_ACTION_LINK },
{ "XdndActionAsk", &ECORE_X_DND_ACTION_ASK },
{ "XdndActionPrivate", &ECORE_X_DND_ACTION_PRIVATE },
{ "XdndActionCopy", &ECORE_X_DND_ACTION_COPY },
{ "XdndActionMove", &ECORE_X_DND_ACTION_MOVE },
{ "XdndActionLink", &ECORE_X_DND_ACTION_LINK },
{ "XdndActionAsk", &ECORE_X_DND_ACTION_ASK },
{ "XdndActionPrivate", &ECORE_X_DND_ACTION_PRIVATE },
{ "_E_FRAME_SIZE", &ECORE_X_ATOM_E_FRAME_SIZE },
{ "_E_FRAME_SIZE", &ECORE_X_ATOM_E_FRAME_SIZE },
{ "_WIN_LAYER", &ECORE_X_ATOM_WIN_LAYER },
{ "_WIN_LAYER", &ECORE_X_ATOM_WIN_LAYER },
{ "WM_NAME", &ECORE_X_ATOM_WM_NAME },
{ "WM_ICON_NAME", &ECORE_X_ATOM_WM_ICON_NAME },
{ "WM_NORMAL_HINTS", &ECORE_X_ATOM_WM_NORMAL_HINTS },
{ "WM_SIZE_HINTS", &ECORE_X_ATOM_WM_SIZE_HINTS },
{ "WM_HINTS", &ECORE_X_ATOM_WM_HINTS },
{ "WM_CLASS", &ECORE_X_ATOM_WM_CLASS },
{ "WM_TRANSIENT_FOR", &ECORE_X_ATOM_WM_TRANSIENT_FOR },
{ "WM_PROTOCOLS", &ECORE_X_ATOM_WM_PROTOCOLS },
{ "WM_COLORMAP_WINDOWS", &ECORE_X_ATOM_WM_COLORMAP_WINDOWS },
{ "WM_COMMAND", &ECORE_X_ATOM_WM_COMMAND },
{ "WM_CLIENT_MACHINE", &ECORE_X_ATOM_WM_CLIENT_MACHINE },
{ "WM_NAME", &ECORE_X_ATOM_WM_NAME },
{ "WM_ICON_NAME", &ECORE_X_ATOM_WM_ICON_NAME },
{ "WM_NORMAL_HINTS", &ECORE_X_ATOM_WM_NORMAL_HINTS },
{ "WM_SIZE_HINTS", &ECORE_X_ATOM_WM_SIZE_HINTS },
{ "WM_HINTS", &ECORE_X_ATOM_WM_HINTS },
{ "WM_CLASS", &ECORE_X_ATOM_WM_CLASS },
{ "WM_TRANSIENT_FOR", &ECORE_X_ATOM_WM_TRANSIENT_FOR },
{ "WM_PROTOCOLS", &ECORE_X_ATOM_WM_PROTOCOLS },
{ "WM_COLORMAP_WINDOWS", &ECORE_X_ATOM_WM_COLORMAP_WINDOWS },
{ "WM_COMMAND", &ECORE_X_ATOM_WM_COMMAND },
{ "WM_CLIENT_MACHINE", &ECORE_X_ATOM_WM_CLIENT_MACHINE },
{ "WM_STATE", &ECORE_X_ATOM_WM_STATE },
{ "WM_ICON_SIZE", &ECORE_X_ATOM_WM_ICON_SIZE },
{ "WM_STATE", &ECORE_X_ATOM_WM_STATE },
{ "WM_ICON_SIZE", &ECORE_X_ATOM_WM_ICON_SIZE },
{ "WM_CHANGE_STATE", &ECORE_X_ATOM_WM_CHANGE_STATE },
{ "WM_CHANGE_STATE", &ECORE_X_ATOM_WM_CHANGE_STATE },
{ "WM_TAKE_FOCUS", &ECORE_X_ATOM_WM_TAKE_FOCUS },
{ "WM_SAVE_YOURSELF", &ECORE_X_ATOM_WM_SAVE_YOURSELF },
{ "WM_DELETE_WINDOW", &ECORE_X_ATOM_WM_DELETE_WINDOW },
{ "WM_TAKE_FOCUS", &ECORE_X_ATOM_WM_TAKE_FOCUS },
{ "WM_SAVE_YOURSELF", &ECORE_X_ATOM_WM_SAVE_YOURSELF },
{ "WM_DELETE_WINDOW", &ECORE_X_ATOM_WM_DELETE_WINDOW },
{ "WM_COLORMAP_NOTIFY", &ECORE_X_ATOM_WM_COLORMAP_NOTIFY },
{ "WM_COLORMAP_NOTIFY", &ECORE_X_ATOM_WM_COLORMAP_NOTIFY },
{ "SM_CLIENT_ID", &ECORE_X_ATOM_SM_CLIENT_ID },
{ "WM_CLIENT_LEADER", &ECORE_X_ATOM_WM_CLIENT_LEADER },
{ "WM_WINDOW_ROLE", &ECORE_X_ATOM_WM_WINDOW_ROLE },
{ "SM_CLIENT_ID", &ECORE_X_ATOM_SM_CLIENT_ID },
{ "WM_CLIENT_LEADER", &ECORE_X_ATOM_WM_CLIENT_LEADER },
{ "WM_WINDOW_ROLE", &ECORE_X_ATOM_WM_WINDOW_ROLE },
{ "_MOTIF_WM_HINTS", &ECORE_X_ATOM_MOTIF_WM_HINTS },
{ "_MOTIF_WM_HINTS", &ECORE_X_ATOM_MOTIF_WM_HINTS },
{ "_NET_SUPPORTED", &ECORE_X_ATOM_NET_SUPPORTED },
{ "_NET_CLIENT_LIST", &ECORE_X_ATOM_NET_CLIENT_LIST },
{ "_NET_CLIENT_LIST_STACKING", &ECORE_X_ATOM_NET_CLIENT_LIST_STACKING },
{ "_NET_NUMBER_OF_DESKTOPS", &ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS },
{ "_NET_DESKTOP_GEOMETRY", &ECORE_X_ATOM_NET_DESKTOP_GEOMETRY },
{ "_NET_DESKTOP_VIEWPORT", &ECORE_X_ATOM_NET_DESKTOP_VIEWPORT },
{ "_NET_CURRENT_DESKTOP", &ECORE_X_ATOM_NET_CURRENT_DESKTOP },
{ "_NET_DESKTOP_NAMES", &ECORE_X_ATOM_NET_DESKTOP_NAMES },
{ "_NET_ACTIVE_WINDOW", &ECORE_X_ATOM_NET_ACTIVE_WINDOW },
{ "_NET_WORKAREA", &ECORE_X_ATOM_NET_WORKAREA },
{ "_NET_SUPPORTING_WM_CHECK", &ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK },
{ "_NET_VIRTUAL_ROOTS", &ECORE_X_ATOM_NET_VIRTUAL_ROOTS },
{ "_NET_DESKTOP_LAYOUT", &ECORE_X_ATOM_NET_DESKTOP_LAYOUT },
{ "_NET_SHOWING_DESKTOP", &ECORE_X_ATOM_NET_SHOWING_DESKTOP },
{ "_NET_SUPPORTED", &ECORE_X_ATOM_NET_SUPPORTED },
{ "_NET_CLIENT_LIST", &ECORE_X_ATOM_NET_CLIENT_LIST },
{ "_NET_CLIENT_LIST_STACKING", &ECORE_X_ATOM_NET_CLIENT_LIST_STACKING },
{ "_NET_NUMBER_OF_DESKTOPS", &ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS },
{ "_NET_DESKTOP_GEOMETRY", &ECORE_X_ATOM_NET_DESKTOP_GEOMETRY },
{ "_NET_DESKTOP_VIEWPORT", &ECORE_X_ATOM_NET_DESKTOP_VIEWPORT },
{ "_NET_CURRENT_DESKTOP", &ECORE_X_ATOM_NET_CURRENT_DESKTOP },
{ "_NET_DESKTOP_NAMES", &ECORE_X_ATOM_NET_DESKTOP_NAMES },
{ "_NET_ACTIVE_WINDOW", &ECORE_X_ATOM_NET_ACTIVE_WINDOW },
{ "_NET_WORKAREA", &ECORE_X_ATOM_NET_WORKAREA },
{ "_NET_SUPPORTING_WM_CHECK", &ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK },
{ "_NET_VIRTUAL_ROOTS", &ECORE_X_ATOM_NET_VIRTUAL_ROOTS },
{ "_NET_DESKTOP_LAYOUT", &ECORE_X_ATOM_NET_DESKTOP_LAYOUT },
{ "_NET_SHOWING_DESKTOP", &ECORE_X_ATOM_NET_SHOWING_DESKTOP },
{ "_NET_CLOSE_WINDOW", &ECORE_X_ATOM_NET_CLOSE_WINDOW },
{ "_NET_MOVERESIZE_WINDOW", &ECORE_X_ATOM_NET_MOVERESIZE_WINDOW },
{ "_NET_WM_MOVERESIZE", &ECORE_X_ATOM_NET_WM_MOVERESIZE },
{ "_NET_RESTACK_WINDOW", &ECORE_X_ATOM_NET_RESTACK_WINDOW },
{ "_NET_CLOSE_WINDOW", &ECORE_X_ATOM_NET_CLOSE_WINDOW },
{ "_NET_MOVERESIZE_WINDOW", &ECORE_X_ATOM_NET_MOVERESIZE_WINDOW },
{ "_NET_WM_MOVERESIZE", &ECORE_X_ATOM_NET_WM_MOVERESIZE },
{ "_NET_RESTACK_WINDOW", &ECORE_X_ATOM_NET_RESTACK_WINDOW },
{ "_NET_REQUEST_FRAME_EXTENTS", &ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS },
{ "_NET_REQUEST_FRAME_EXTENTS", &ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS },
{ "_NET_WM_NAME", &ECORE_X_ATOM_NET_WM_NAME },
{ "_NET_WM_VISIBLE_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_NAME },
{ "_NET_WM_ICON_NAME", &ECORE_X_ATOM_NET_WM_ICON_NAME },
{ "_NET_WM_VISIBLE_ICON_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME },
{ "_NET_WM_DESKTOP", &ECORE_X_ATOM_NET_WM_DESKTOP },
{ "_NET_WM_NAME", &ECORE_X_ATOM_NET_WM_NAME },
{ "_NET_WM_VISIBLE_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_NAME },
{ "_NET_WM_ICON_NAME", &ECORE_X_ATOM_NET_WM_ICON_NAME },
{ "_NET_WM_VISIBLE_ICON_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME },
{ "_NET_WM_DESKTOP", &ECORE_X_ATOM_NET_WM_DESKTOP },
{ "_NET_WM_WINDOW_TYPE", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE },
{ "_NET_WM_WINDOW_TYPE_DESKTOP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP },
{ "_NET_WM_WINDOW_TYPE_DOCK", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK },
{ "_NET_WM_WINDOW_TYPE_TOOLBAR", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR },
{ "_NET_WM_WINDOW_TYPE_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU },
{ "_NET_WM_WINDOW_TYPE_UTILITY", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY },
{ "_NET_WM_WINDOW_TYPE_SPLASH", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH },
{ "_NET_WM_WINDOW_TYPE_DIALOG", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG },
{ "_NET_WM_WINDOW_TYPE_NORMAL", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL },
{ "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU },
{ "_NET_WM_WINDOW_TYPE_POPUP_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU },
{ "_NET_WM_WINDOW_TYPE_TOOLTIP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP },
{ "_NET_WM_WINDOW_TYPE_NOTIFICATION", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION },
{ "_NET_WM_WINDOW_TYPE_COMBO", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO },
{ "_NET_WM_WINDOW_TYPE_DND", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND },
{ "_NET_WM_WINDOW_TYPE", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE },
{ "_NET_WM_WINDOW_TYPE_DESKTOP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP },
{ "_NET_WM_WINDOW_TYPE_DOCK", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK },
{ "_NET_WM_WINDOW_TYPE_TOOLBAR", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR },
{ "_NET_WM_WINDOW_TYPE_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU },
{ "_NET_WM_WINDOW_TYPE_UTILITY", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY },
{ "_NET_WM_WINDOW_TYPE_SPLASH", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH },
{ "_NET_WM_WINDOW_TYPE_DIALOG", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG },
{ "_NET_WM_WINDOW_TYPE_NORMAL", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL },
{ "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
&ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU },
{ "_NET_WM_WINDOW_TYPE_POPUP_MENU",
&ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU },
{ "_NET_WM_WINDOW_TYPE_TOOLTIP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP },
{ "_NET_WM_WINDOW_TYPE_NOTIFICATION",
&ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION },
{ "_NET_WM_WINDOW_TYPE_COMBO", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO },
{ "_NET_WM_WINDOW_TYPE_DND", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND },
{ "_NET_WM_STATE", &ECORE_X_ATOM_NET_WM_STATE },
{ "_NET_WM_STATE_MODAL", &ECORE_X_ATOM_NET_WM_STATE_MODAL },
{ "_NET_WM_STATE_STICKY", &ECORE_X_ATOM_NET_WM_STATE_STICKY },
{ "_NET_WM_STATE_MAXIMIZED_VERT", &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT },
{ "_NET_WM_STATE_MAXIMIZED_HORZ", &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ },
{ "_NET_WM_STATE_SHADED", &ECORE_X_ATOM_NET_WM_STATE_SHADED },
{ "_NET_WM_STATE_SKIP_TASKBAR", &ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR },
{ "_NET_WM_STATE_SKIP_PAGER", &ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER },
{ "_NET_WM_STATE_HIDDEN", &ECORE_X_ATOM_NET_WM_STATE_HIDDEN },
{ "_NET_WM_STATE_FULLSCREEN", &ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN },
{ "_NET_WM_STATE_ABOVE", &ECORE_X_ATOM_NET_WM_STATE_ABOVE },
{ "_NET_WM_STATE_BELOW", &ECORE_X_ATOM_NET_WM_STATE_BELOW },
{ "_NET_WM_STATE_DEMANDS_ATTENTION", &ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION },
{ "_NET_WM_STATE", &ECORE_X_ATOM_NET_WM_STATE },
{ "_NET_WM_STATE_MODAL", &ECORE_X_ATOM_NET_WM_STATE_MODAL },
{ "_NET_WM_STATE_STICKY", &ECORE_X_ATOM_NET_WM_STATE_STICKY },
{ "_NET_WM_STATE_MAXIMIZED_VERT",
&ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT },
{ "_NET_WM_STATE_MAXIMIZED_HORZ",
&ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ },
{ "_NET_WM_STATE_SHADED", &ECORE_X_ATOM_NET_WM_STATE_SHADED },
{ "_NET_WM_STATE_SKIP_TASKBAR", &ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR },
{ "_NET_WM_STATE_SKIP_PAGER", &ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER },
{ "_NET_WM_STATE_HIDDEN", &ECORE_X_ATOM_NET_WM_STATE_HIDDEN },
{ "_NET_WM_STATE_FULLSCREEN", &ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN },
{ "_NET_WM_STATE_ABOVE", &ECORE_X_ATOM_NET_WM_STATE_ABOVE },
{ "_NET_WM_STATE_BELOW", &ECORE_X_ATOM_NET_WM_STATE_BELOW },
{ "_NET_WM_STATE_DEMANDS_ATTENTION",
&ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION },
{ "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS },
{ "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE },
{ "_NET_WM_ACTION_RESIZE", &ECORE_X_ATOM_NET_WM_ACTION_RESIZE },
{ "_NET_WM_ACTION_MINIMIZE", &ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE },
{ "_NET_WM_ACTION_SHADE", &ECORE_X_ATOM_NET_WM_ACTION_SHADE },
{ "_NET_WM_ACTION_STICK", &ECORE_X_ATOM_NET_WM_ACTION_STICK },
{ "_NET_WM_ACTION_MAXIMIZE_HORZ", &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ },
{ "_NET_WM_ACTION_MAXIMIZE_VERT", &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT },
{ "_NET_WM_ACTION_FULLSCREEN", &ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN },
{ "_NET_WM_ACTION_CHANGE_DESKTOP", &ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP },
{ "_NET_WM_ACTION_CLOSE", &ECORE_X_ATOM_NET_WM_ACTION_CLOSE },
{ "_NET_WM_ACTION_ABOVE", &ECORE_X_ATOM_NET_WM_ACTION_ABOVE },
{ "_NET_WM_ACTION_BELOW", &ECORE_X_ATOM_NET_WM_ACTION_BELOW },
{ "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS },
{ "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE },
{ "_NET_WM_ACTION_RESIZE", &ECORE_X_ATOM_NET_WM_ACTION_RESIZE },
{ "_NET_WM_ACTION_MINIMIZE", &ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE },
{ "_NET_WM_ACTION_SHADE", &ECORE_X_ATOM_NET_WM_ACTION_SHADE },
{ "_NET_WM_ACTION_STICK", &ECORE_X_ATOM_NET_WM_ACTION_STICK },
{ "_NET_WM_ACTION_MAXIMIZE_HORZ",
&ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ },
{ "_NET_WM_ACTION_MAXIMIZE_VERT",
&ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT },
{ "_NET_WM_ACTION_FULLSCREEN", &ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN },
{ "_NET_WM_ACTION_CHANGE_DESKTOP",
&ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP },
{ "_NET_WM_ACTION_CLOSE", &ECORE_X_ATOM_NET_WM_ACTION_CLOSE },
{ "_NET_WM_ACTION_ABOVE", &ECORE_X_ATOM_NET_WM_ACTION_ABOVE },
{ "_NET_WM_ACTION_BELOW", &ECORE_X_ATOM_NET_WM_ACTION_BELOW },
{ "_NET_WM_STRUT", &ECORE_X_ATOM_NET_WM_STRUT },
{ "_NET_WM_STRUT_PARTIAL", &ECORE_X_ATOM_NET_WM_STRUT_PARTIAL },
{ "_NET_WM_ICON_GEOMETRY", &ECORE_X_ATOM_NET_WM_ICON_GEOMETRY },
{ "_NET_WM_ICON", &ECORE_X_ATOM_NET_WM_ICON },
{ "_NET_WM_PID", &ECORE_X_ATOM_NET_WM_PID },
{ "_NET_WM_HANDLED_ICONS", &ECORE_X_ATOM_NET_WM_HANDLED_ICONS },
{ "_NET_WM_USER_TIME", &ECORE_X_ATOM_NET_WM_USER_TIME },
{ "_NET_STARTUP_ID", &ECORE_X_ATOM_NET_STARTUP_ID },
{ "_NET_FRAME_EXTENTS", &ECORE_X_ATOM_NET_FRAME_EXTENTS },
{ "_NET_WM_STRUT", &ECORE_X_ATOM_NET_WM_STRUT },
{ "_NET_WM_STRUT_PARTIAL", &ECORE_X_ATOM_NET_WM_STRUT_PARTIAL },
{ "_NET_WM_ICON_GEOMETRY", &ECORE_X_ATOM_NET_WM_ICON_GEOMETRY },
{ "_NET_WM_ICON", &ECORE_X_ATOM_NET_WM_ICON },
{ "_NET_WM_PID", &ECORE_X_ATOM_NET_WM_PID },
{ "_NET_WM_HANDLED_ICONS", &ECORE_X_ATOM_NET_WM_HANDLED_ICONS },
{ "_NET_WM_USER_TIME", &ECORE_X_ATOM_NET_WM_USER_TIME },
{ "_NET_STARTUP_ID", &ECORE_X_ATOM_NET_STARTUP_ID },
{ "_NET_FRAME_EXTENTS", &ECORE_X_ATOM_NET_FRAME_EXTENTS },
{ "_NET_WM_PING", &ECORE_X_ATOM_NET_WM_PING },
{ "_NET_WM_SYNC_REQUEST", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST },
{ "_NET_WM_SYNC_REQUEST_COUNTER", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER },
{ "_NET_WM_PING", &ECORE_X_ATOM_NET_WM_PING },
{ "_NET_WM_SYNC_REQUEST", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST },
{ "_NET_WM_SYNC_REQUEST_COUNTER",
&ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER },
{ "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY },
{ "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW },
{ "_NET_WM_WINDOW_SHADE", &ECORE_X_ATOM_NET_WM_WINDOW_SHADE },
{ "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY },
{ "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW },
{ "_NET_WM_WINDOW_SHADE", &ECORE_X_ATOM_NET_WM_WINDOW_SHADE },
{ "TARGETS", &ECORE_X_ATOM_SELECTION_TARGETS },
{ "CLIPBOARD", &ECORE_X_ATOM_SELECTION_CLIPBOARD },
{ "PRIMARY", &ECORE_X_ATOM_SELECTION_PRIMARY },
{ "SECONDARY", &ECORE_X_ATOM_SELECTION_SECONDARY },
{ "_ECORE_SELECTION_PRIMARY", &ECORE_X_ATOM_SELECTION_PROP_PRIMARY },
{ "_ECORE_SELECTION_SECONDARY", &ECORE_X_ATOM_SELECTION_PROP_SECONDARY },
{ "_ECORE_SELECTION_CLIPBOARD", &ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD },
{ "TARGETS", &ECORE_X_ATOM_SELECTION_TARGETS },
{ "CLIPBOARD", &ECORE_X_ATOM_SELECTION_CLIPBOARD },
{ "PRIMARY", &ECORE_X_ATOM_SELECTION_PRIMARY },
{ "SECONDARY", &ECORE_X_ATOM_SELECTION_SECONDARY },
{ "_ECORE_SELECTION_PRIMARY", &ECORE_X_ATOM_SELECTION_PROP_PRIMARY },
{ "_ECORE_SELECTION_SECONDARY", &ECORE_X_ATOM_SELECTION_PROP_SECONDARY },
{ "_ECORE_SELECTION_CLIPBOARD", &ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD },
{ "_E_VIRTUAL_KEYBOARD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD },
{ "_E_VIRTUAL_KEYBOARD_STATE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE },
{ "_E_VIRTUAL_KEYBOARD_ON", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON },
{ "_E_VIRTUAL_KEYBOARD_OFF", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF },
{ "_E_VIRTUAL_KEYBOARD_ALPHA", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA },
{ "_E_VIRTUAL_KEYBOARD_NUMERIC", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC },
{ "_E_VIRTUAL_KEYBOARD_PIN", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN },
{ "_E_VIRTUAL_KEYBOARD_PHONE_NUMBER", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER },
{ "_E_VIRTUAL_KEYBOARD_HEX", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX },
{ "_E_VIRTUAL_KEYBOARD_TERMINAL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL },
{ "_E_VIRTUAL_KEYBOARD_PASSWORD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD },
{ "_E_VIRTUAL_KEYBOARD_IP", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP },
{ "_E_VIRTUAL_KEYBOARD_HOST", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST },
{ "_E_VIRTUAL_KEYBOARD_FILE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE },
{ "_E_VIRTUAL_KEYBOARD_URL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL },
{ "_E_VIRTUAL_KEYBOARD_KEYPAD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD },
{ "_E_VIRTUAL_KEYBOARD_J2ME", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME },
{ "_E_VIRTUAL_KEYBOARD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD },
{ "_E_VIRTUAL_KEYBOARD_STATE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE },
{ "_E_VIRTUAL_KEYBOARD_ON", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON },
{ "_E_VIRTUAL_KEYBOARD_OFF", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF },
{ "_E_VIRTUAL_KEYBOARD_ALPHA", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA },
{ "_E_VIRTUAL_KEYBOARD_NUMERIC", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC },
{ "_E_VIRTUAL_KEYBOARD_PIN", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN },
{ "_E_VIRTUAL_KEYBOARD_PHONE_NUMBER",
&ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER },
{ "_E_VIRTUAL_KEYBOARD_HEX", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX },
{ "_E_VIRTUAL_KEYBOARD_TERMINAL",
&ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL },
{ "_E_VIRTUAL_KEYBOARD_PASSWORD",
&ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD },
{ "_E_VIRTUAL_KEYBOARD_IP", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP },
{ "_E_VIRTUAL_KEYBOARD_HOST", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST },
{ "_E_VIRTUAL_KEYBOARD_FILE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE },
{ "_E_VIRTUAL_KEYBOARD_URL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL },
{ "_E_VIRTUAL_KEYBOARD_KEYPAD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD },
{ "_E_VIRTUAL_KEYBOARD_J2ME", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME },
{ "_E_ILLUME_ZONE", &ECORE_X_ATOM_E_ILLUME_ZONE },
{ "_E_ILLUME_ZONE_LIST", &ECORE_X_ATOM_E_ILLUME_ZONE_LIST },
{ "_E_ILLUME_CONFORMANT", &ECORE_X_ATOM_E_ILLUME_CONFORMANT },
{ "_E_ILLUME_MODE", &ECORE_X_ATOM_E_ILLUME_MODE },
{ "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE },
{ "_E_ILLUME_MODE_DUAL_TOP", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP },
{ "_E_ILLUME_MODE_DUAL_LEFT", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT },
{ "_E_ILLUME_FOCUS_BACK", &ECORE_X_ATOM_E_ILLUME_FOCUS_BACK },
{ "_E_ILLUME_FOCUS_FORWARD", &ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD },
{ "_E_ILLUME_FOCUS_HOME", &ECORE_X_ATOM_E_ILLUME_FOCUS_HOME },
{ "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE },
{ "_E_ILLUME_HOME_NEW", &ECORE_X_ATOM_E_ILLUME_HOME_NEW },
{ "_E_ILLUME_HOME_DEL", &ECORE_X_ATOM_E_ILLUME_HOME_DEL },
{ "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG },
{ "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED },
{ "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START },
{ "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END },
{ "_E_ILLUME_INDICATOR_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY },
{ "_E_ILLUME_SOFTKEY_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY },
{ "_E_ILLUME_KEYBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY },
{ "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL },
{ "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE },
{ "_E_ILLUME_QUICKPANEL_STATE_TOGGLE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE },
{ "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON },
{ "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF },
{ "_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR },
{ "_E_ILLUME_QUICKPANEL_PRIORITY_MINOR", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR },
{ "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
{ "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
{ "_E_ILLUME_ZONE", &ECORE_X_ATOM_E_ILLUME_ZONE },
{ "_E_ILLUME_ZONE_LIST", &ECORE_X_ATOM_E_ILLUME_ZONE_LIST },
{ "_E_ILLUME_CONFORMANT", &ECORE_X_ATOM_E_ILLUME_CONFORMANT },
{ "_E_ILLUME_MODE", &ECORE_X_ATOM_E_ILLUME_MODE },
{ "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE },
{ "_E_ILLUME_MODE_DUAL_TOP", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP },
{ "_E_ILLUME_MODE_DUAL_LEFT", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT },
{ "_E_ILLUME_FOCUS_BACK", &ECORE_X_ATOM_E_ILLUME_FOCUS_BACK },
{ "_E_ILLUME_FOCUS_FORWARD", &ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD },
{ "_E_ILLUME_FOCUS_HOME", &ECORE_X_ATOM_E_ILLUME_FOCUS_HOME },
{ "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE },
{ "_E_ILLUME_HOME_NEW", &ECORE_X_ATOM_E_ILLUME_HOME_NEW },
{ "_E_ILLUME_HOME_DEL", &ECORE_X_ATOM_E_ILLUME_HOME_DEL },
{ "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG },
{ "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED },
{ "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START },
{ "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END },
{ "_E_ILLUME_INDICATOR_GEOMETRY",
&ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY },
{ "_E_ILLUME_SOFTKEY_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY },
{ "_E_ILLUME_KEYBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY },
{ "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL },
{ "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE },
{ "_E_ILLUME_QUICKPANEL_STATE_TOGGLE",
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE },
{ "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON },
{ "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF },
{ "_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR",
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR },
{ "_E_ILLUME_QUICKPANEL_PRIORITY_MINOR",
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR },
{ "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
{ "_E_ILLUME_QUICKPANEL_POSITION_UPDATE",
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
{ "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
{ "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
{ "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED },
{ "_E_COMP_SYNC_BEGIN", &ECORE_X_ATOM_E_COMP_SYNC_BEGIN },
{ "_E_COMP_SYNC_END", &ECORE_X_ATOM_E_COMP_SYNC_END },
{ "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL },
{ "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH },
{ "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
{ "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP }
};
{ "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
{ "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
{ "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED },
{ "_E_COMP_SYNC_BEGIN", &ECORE_X_ATOM_E_COMP_SYNC_BEGIN },
{ "_E_COMP_SYNC_END", &ECORE_X_ATOM_E_COMP_SYNC_END },
{ "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL },
{ "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH },
{ "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
{ "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP }
};
Atom *atoms;
char **names;
int i, num;
@ -288,7 +306,9 @@ _ecore_x_atoms_init(void)
EAPI Ecore_X_Atom
ecore_x_atom_get(const char *name)
{
if (!_ecore_x_disp) return 0;
if (!_ecore_x_disp)
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XInternAtom(_ecore_x_disp, name, False);
}
@ -299,12 +319,14 @@ ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms)
Atom *atoms_int;
int i;
if (!_ecore_x_disp) return;
if (!_ecore_x_disp)
return;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
atoms_int = alloca(num * sizeof(Atom));
XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int);
for (i = 0; i < num; i++)
atoms[i] = atoms_int[i];
atoms[i] = atoms_int[i];
}
EAPI char *
@ -313,11 +335,14 @@ ecore_x_atom_name_get(Ecore_X_Atom atom)
char *name;
char *xname;
if (!_ecore_x_disp) return NULL;
if (!_ecore_x_disp)
return NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xname = XGetAtomName(_ecore_x_disp, atom);
if (!xname) return NULL;
if (!xname)
return NULL;
name = strdup(xname);
XFree(xname);

View File

@ -21,7 +21,8 @@ _ecore_x_composite_init(void)
int major, minor;
if (XCompositeQueryVersion(_ecore_x_disp, &major, &minor))
_composite_available = 1;
_composite_available = 1;
#endif
}
@ -33,7 +34,8 @@ ecore_x_composite_query(void)
}
EAPI void
ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
ecore_x_composite_redirect_window(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
@ -42,18 +44,20 @@ ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_T
switch(type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;
break;
update = CompositeRedirectAutomatic;
break;
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual;
break;
update = CompositeRedirectManual;
break;
}
XCompositeRedirectWindow(_ecore_x_disp, win, update);
#endif
}
EAPI void
ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
@ -62,18 +66,20 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Upda
switch(type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;
break;
update = CompositeRedirectAutomatic;
break;
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual;
break;
update = CompositeRedirectManual;
break;
}
XCompositeRedirectSubwindows(_ecore_x_disp, win, update);
#endif
}
EAPI void
ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
ecore_x_composite_unredirect_window(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
@ -82,18 +88,20 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update
switch(type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;
break;
update = CompositeRedirectAutomatic;
break;
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual;
break;
update = CompositeRedirectManual;
break;
}
XCompositeUnredirectWindow(_ecore_x_disp, win, update);
#endif
}
EAPI void
ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type)
ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
Ecore_X_Composite_Update_Type type)
{
#ifdef ECORE_XCOMPOSITE
int update = CompositeRedirectAutomatic;
@ -102,11 +110,12 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Up
switch(type)
{
case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
update = CompositeRedirectAutomatic;
break;
update = CompositeRedirectAutomatic;
break;
case ECORE_X_COMPOSITE_UPDATE_MANUAL:
update = CompositeRedirectManual;
break;
update = CompositeRedirectManual;
break;
}
XCompositeUnredirectSubwindows(_ecore_x_disp, win, update);
#endif
@ -116,7 +125,7 @@ EAPI Ecore_X_Pixmap
ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win)
{
Ecore_X_Pixmap pixmap = None;
#ifdef ECORE_XCOMPOSITE
LOGFN(__FILE__, __LINE__, __FUNCTION__);
pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win);
@ -131,14 +140,14 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root)
Ecore_X_Window win = 0;
#ifdef ECORE_XCOMPOSITE
XRectangle rect;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
win = XCompositeGetOverlayWindow(_ecore_x_disp, root);
rect.x = -1;
rect.y = -1;
rect.width = 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);
#endif
return win;
@ -150,5 +159,5 @@ ecore_x_composite_render_window_disable(Ecore_X_Window root)
#ifdef ECORE_XCOMPOSITE
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XCompositeReleaseOverlayWindow(_ecore_x_disp, root);
#endif
#endif
}

View File

@ -18,180 +18,192 @@ ecore_x_cursor_color_supported_get(void)
}
EAPI Ecore_X_Cursor
ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y)
ecore_x_cursor_new(Ecore_X_Window win,
int *pixels,
int w,
int h,
int hot_x,
int hot_y)
{
#ifdef ECORE_XCURSOR
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (_ecore_x_xcursor)
{
Cursor c;
XcursorImage *xci;
Cursor c;
XcursorImage *xci;
xci = XcursorImageCreate(w, h);
if (xci)
{
int i;
xci = XcursorImageCreate(w, h);
if (xci)
{
int i;
xci->xhot = hot_x;
xci->yhot = hot_y;
xci->delay = 0;
for (i = 0; i < (w * h); i++)
{
xci->xhot = hot_x;
xci->yhot = hot_y;
xci->delay = 0;
for (i = 0; i < (w * h); i++)
{
// int r, g, b, a;
//
// a = (pixels[i] >> 24) & 0xff;
// r = (((pixels[i] >> 16) & 0xff) * a) / 0xff;
// g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff;
// b = (((pixels[i] ) & 0xff) * a) / 0xff;
xci->pixels[i] = pixels[i];
xci->pixels[i] = pixels[i];
// (a << 24) | (r << 16) | (g << 8) | (b);
}
c = XcursorImageLoadCursor(_ecore_x_disp, xci);
XcursorImageDestroy(xci);
return c;
}
}
c = XcursorImageLoadCursor(_ecore_x_disp, xci);
XcursorImageDestroy(xci);
return c;
}
}
else
#endif
{
XColor c1, c2;
Cursor c;
Pixmap pmap, mask;
GC gc;
XGCValues gcv;
XImage *xim;
unsigned int *pix;
int fr, fg, fb, br, bg, bb;
int brightest = 0;
int darkest = 255 * 3;
int x, y;
const int dither[2][2] =
{
{0, 2},
{3, 1}
};
{
XColor c1, c2;
Cursor c;
Pixmap pmap, mask;
GC gc;
XGCValues gcv;
XImage *xim;
unsigned int *pix;
int fr, fg, fb, br, bg, bb;
int brightest = 0;
int darkest = 255 * 3;
int x, y;
const int dither[2][2] =
{
{0, 2},
{3, 1}
};
pmap = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
mask = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
xim = XCreateImage(_ecore_x_disp,
DefaultVisual(_ecore_x_disp, 0),
1, ZPixmap, 0, NULL, w, h, 32, 0);
xim->data = malloc(xim->bytes_per_line * xim->height);
pmap = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
mask = XCreatePixmap(_ecore_x_disp, win, w, h, 1);
xim = XCreateImage(_ecore_x_disp,
DefaultVisual(_ecore_x_disp, 0),
1, ZPixmap, 0, NULL, w, h, 32, 0);
xim->data = malloc(xim->bytes_per_line * xim->height);
fr = 0x00; fg = 0x00; fb = 0x00;
br = 0xff; bg = 0xff; bb = 0xff;
pix = (unsigned int*)pixels;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
int r, g, b, a;
fr = 0x00; fg = 0x00; fb = 0x00;
br = 0xff; bg = 0xff; bb = 0xff;
pix = (unsigned int *)pixels;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
int r, g, b, a;
a = (pix[0] >> 24) & 0xff;
r = (pix[0] >> 16) & 0xff;
g = (pix[0] >> 8 ) & 0xff;
b = (pix[0] ) & 0xff;
if (a > 0)
{
if ((r + g + b) > brightest)
{
brightest = r + g + b;
br = r;
bg = g;
bb = b;
}
if ((r + g + b) < darkest)
{
darkest = r + g + b;
fr = r;
fg = g;
fb = b;
}
}
pix++;
}
}
a = (pix[0] >> 24) & 0xff;
r = (pix[0] >> 16) & 0xff;
g = (pix[0] >> 8) & 0xff;
b = (pix[0]) & 0xff;
if (a > 0)
{
if ((r + g + b) > brightest)
{
brightest = r + g + b;
br = r;
bg = g;
bb = b;
}
pix = (unsigned int*)pixels;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
int v;
int r, g, b;
int d1, d2;
if ((r + g + b) < darkest)
{
darkest = r + g + b;
fr = r;
fg = g;
fb = b;
}
}
r = (pix[0] >> 16) & 0xff;
g = (pix[0] >> 8 ) & 0xff;
b = (pix[0] ) & 0xff;
d1 =
((r - fr) * (r - fr)) +
((g - fg) * (g - fg)) +
((b - fb) * (b - fb));
d2 =
((r - br) * (r - br)) +
((g - bg) * (g - bg)) +
((b - bb) * (b - bb));
if (d1 + d2)
{
v = (((d2 * 255) / (d1 + d2)) * 5) / 256;
if (v > dither[x & 0x1][y & 0x1]) v = 1;
else v = 0;
}
else
{
v = 0;
}
XPutPixel(xim, x, y, v);
pix++;
}
}
gc = XCreateGC(_ecore_x_disp, pmap, 0, &gcv);
XPutImage(_ecore_x_disp, pmap, gc, xim, 0, 0, 0, 0, w, h);
XFreeGC(_ecore_x_disp, gc);
pix++;
}
}
pix = (unsigned int*)pixels;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
int v;
pix = (unsigned int *)pixels;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
int v;
int r, g, b;
int d1, d2;
v = (((pix[0] >> 24) & 0xff) * 5) / 256;
if (v > dither[x & 0x1][y & 0x1]) v = 1;
else v = 0;
XPutPixel(xim, x, y, v);
pix++;
}
}
gc = XCreateGC(_ecore_x_disp, mask, 0, &gcv);
XPutImage(_ecore_x_disp, mask, gc, xim, 0, 0, 0, 0, w, h);
XFreeGC(_ecore_x_disp, gc);
r = (pix[0] >> 16) & 0xff;
g = (pix[0] >> 8) & 0xff;
b = (pix[0]) & 0xff;
d1 =
((r - fr) * (r - fr)) +
((g - fg) * (g - fg)) +
((b - fb) * (b - fb));
d2 =
((r - br) * (r - br)) +
((g - bg) * (g - bg)) +
((b - bb) * (b - bb));
if (d1 + d2)
{
v = (((d2 * 255) / (d1 + d2)) * 5) / 256;
if (v > dither[x & 0x1][y & 0x1])
v = 1;
else
v = 0;
}
else
v = 0;
free(xim->data);
xim->data = NULL;
XDestroyImage(xim);
XPutPixel(xim, x, y, v);
pix++;
}
}
gc = XCreateGC(_ecore_x_disp, pmap, 0, &gcv);
XPutImage(_ecore_x_disp, pmap, gc, xim, 0, 0, 0, 0, w, h);
XFreeGC(_ecore_x_disp, gc);
c1.pixel = 0;
c1.red = fr << 8 | fr;
c1.green = fg << 8 | fg;
c1.blue = fb << 8 | fb;
c1.flags = DoRed | DoGreen | DoBlue;
pix = (unsigned int *)pixels;
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
int v;
c2.pixel = 0;
c2.red = br << 8 | br;
c2.green = bg << 8 | bg;
c2.blue = bb << 8 | bb;
c2.flags = DoRed | DoGreen | DoBlue;
v = (((pix[0] >> 24) & 0xff) * 5) / 256;
if (v > dither[x & 0x1][y & 0x1])
v = 1;
else
v = 0;
XPutPixel(xim, x, y, v);
pix++;
}
}
gc = XCreateGC(_ecore_x_disp, mask, 0, &gcv);
XPutImage(_ecore_x_disp, mask, gc, xim, 0, 0, 0, 0, w, h);
XFreeGC(_ecore_x_disp, gc);
free(xim->data);
xim->data = NULL;
XDestroyImage(xim);
c1.pixel = 0;
c1.red = fr << 8 | fr;
c1.green = fg << 8 | fg;
c1.blue = fb << 8 | fb;
c1.flags = DoRed | DoGreen | DoBlue;
c2.pixel = 0;
c2.red = br << 8 | br;
c2.green = bg << 8 | bg;
c2.blue = bb << 8 | bb;
c2.flags = DoRed | DoGreen | DoBlue;
c = XCreatePixmapCursor(_ecore_x_disp,
pmap, mask,
&c1, &c2,
hot_x, hot_y);
XFreePixmap(_ecore_x_disp, pmap);
XFreePixmap(_ecore_x_disp, mask);
return c;
}
c = XCreatePixmapCursor(_ecore_x_disp,
pmap, mask,
&c1, &c2,
hot_x, hot_y);
XFreePixmap(_ecore_x_disp, pmap);
XFreePixmap(_ecore_x_disp, mask);
return c;
}
return 0;
}

View File

@ -24,9 +24,10 @@ _ecore_x_damage_init(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (XDamageQueryVersion(_ecore_x_disp, &_damage_major, &_damage_minor))
_damage_available = 1;
_damage_available = 1;
else
_damage_available = 0;
_damage_available = 0;
#else
_damage_available = 0;
#endif
@ -62,7 +63,9 @@ ecore_x_damage_free(Ecore_X_Damage damage)
}
EAPI void
ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts)
ecore_x_damage_subtract(Ecore_X_Damage damage,
Ecore_X_Region repair,
Ecore_X_Region parts)
{
#ifdef ECORE_XDAMAGE
LOGFN(__FILE__, __LINE__, __FUNCTION__);

View File

@ -38,24 +38,24 @@ _ecore_x_dnd_init(void)
{
if (!_ecore_x_dnd_init_count)
{
_source = calloc(1, sizeof(Ecore_X_DND_Source));
_source->version = ECORE_X_DND_VERSION;
_source->win = None;
_source->dest = None;
_source->state = ECORE_X_DND_SOURCE_IDLE;
_source->prev.window = 0;
_source = calloc(1, sizeof(Ecore_X_DND_Source));
_source->version = ECORE_X_DND_VERSION;
_source->win = None;
_source->dest = None;
_source->state = ECORE_X_DND_SOURCE_IDLE;
_source->prev.window = 0;
_target = calloc(1, sizeof(Ecore_X_DND_Target));
_target->win = None;
_target->source = None;
_target->state = ECORE_X_DND_TARGET_IDLE;
ECORE_X_EVENT_XDND_ENTER = ecore_event_type_new();
ECORE_X_EVENT_XDND_POSITION = ecore_event_type_new();
ECORE_X_EVENT_XDND_STATUS = ecore_event_type_new();
ECORE_X_EVENT_XDND_LEAVE = ecore_event_type_new();
ECORE_X_EVENT_XDND_DROP = ecore_event_type_new();
ECORE_X_EVENT_XDND_FINISHED = ecore_event_type_new();
_target = calloc(1, sizeof(Ecore_X_DND_Target));
_target->win = None;
_target->source = None;
_target->state = ECORE_X_DND_TARGET_IDLE;
ECORE_X_EVENT_XDND_ENTER = ecore_event_type_new();
ECORE_X_EVENT_XDND_POSITION = ecore_event_type_new();
ECORE_X_EVENT_XDND_STATUS = ecore_event_type_new();
ECORE_X_EVENT_XDND_LEAVE = ecore_event_type_new();
ECORE_X_EVENT_XDND_DROP = ecore_event_type_new();
ECORE_X_EVENT_XDND_FINISHED = ecore_event_type_new();
}
_ecore_x_dnd_init_count++;
@ -66,47 +66,58 @@ _ecore_x_dnd_shutdown(void)
{
_ecore_x_dnd_init_count--;
if (_ecore_x_dnd_init_count > 0)
return;
return;
if (_source)
free(_source);
free(_source);
_source = NULL;
if (_target)
free(_target);
free(_target);
_target = NULL;
_ecore_x_dnd_init_count = 0;
}
static int
_ecore_x_dnd_converter_copy(char *target __UNUSED__, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop, int *count)
_ecore_x_dnd_converter_copy(char *target __UNUSED__,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *tprop,
int *count)
{
XTextProperty text_prop;
char *mystr;
XICCEncodingStyle style = XTextStyle;
if (!data || !size)
return 0;
return 0;
mystr = calloc(1, size + 1);
if (!mystr) return 0;
memcpy(mystr, data, size);
if (!mystr)
return 0;
if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style, &text_prop) == Success)
memcpy(mystr, data, size);
if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
&text_prop) == Success)
{
int bufsize = strlen((char *)text_prop.value) + 1;
*data_ret = malloc(bufsize);
memcpy(*data_ret, text_prop.value, bufsize);
*size_ret = bufsize;
XFree(text_prop.value);
free(mystr);
return 1;
int bufsize = strlen((char *)text_prop.value) + 1;
*data_ret = malloc(bufsize);
memcpy(*data_ret, text_prop.value, bufsize);
*size_ret = bufsize;
XFree(text_prop.value);
free(mystr);
return 1;
}
else
{
free(mystr);
return 0;
free(mystr);
return 0;
}
}
@ -117,10 +128,10 @@ ecore_x_dnd_aware_set(Ecore_X_Window win, int on)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (on)
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
XA_ATOM, 32, &prop_data, 1);
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
XA_ATOM, 32, &prop_data, 1);
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);
}
EAPI int
@ -135,69 +146,76 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
// move and going to and from x multiple times per move is EXPENSIVE
// and slows things down, puts lots of load on x etc.
if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
{
if (_version_cache)
{
int i;
for (i = 0; i < _version_cache_num; i++)
{
if (_version_cache[i].win == win)
return _version_cache[i].ver;
}
}
}
if (_version_cache)
{
int i;
for (i = 0; i < _version_cache_num; i++)
{
if (_version_cache[i].win == win)
return _version_cache[i].ver;
}
}
if (ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_AWARE,
XA_ATOM, 32, &prop_data, &num))
{
int version = (int) *prop_data;
free(prop_data);
if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
{
_version_cache_num++;
if (_version_cache_num > _version_cache_alloc)
_version_cache_alloc += 16;
_version_cache = realloc(_version_cache, _version_cache_alloc * sizeof(Version_Cache_Item));
_version_cache[_version_cache_num - 1].win = win;
_version_cache[_version_cache_num - 1].ver = version;
}
return version;
int version = (int)*prop_data;
free(prop_data);
if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
{
_version_cache_num++;
if (_version_cache_num > _version_cache_alloc)
_version_cache_alloc += 16;
_version_cache = realloc(_version_cache,
_version_cache_alloc *
sizeof(Version_Cache_Item));
_version_cache[_version_cache_num - 1].win = win;
_version_cache[_version_cache_num - 1].ver = version;
}
return version;
}
if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
{
_version_cache_num++;
if (_version_cache_num > _version_cache_alloc)
_version_cache_alloc += 16;
_version_cache = realloc(_version_cache, _version_cache_alloc * sizeof(Version_Cache_Item));
_version_cache[_version_cache_num - 1].win = win;
_version_cache[_version_cache_num - 1].ver = 0;
_version_cache_num++;
if (_version_cache_num > _version_cache_alloc)
_version_cache_alloc += 16;
_version_cache =
realloc(_version_cache, _version_cache_alloc *
sizeof(Version_Cache_Item));
_version_cache[_version_cache_num - 1].win = win;
_version_cache[_version_cache_num - 1].ver = 0;
}
return 0;
}
EAPI int
ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
{
int num, i, ret = 0;
unsigned char *data;
Ecore_X_Atom *atoms, atom;
int num, i, ret = 0;
unsigned char *data;
Ecore_X_Atom *atoms, atom;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, &data, &num))
return ret;
XA_ATOM, 32, &data, &num))
return ret;
atom = ecore_x_atom_get(type);
atoms = (Ecore_X_Atom *)data;
for (i = 0; i < num; ++i)
{
if (atom == atoms[i])
{
ret = 1;
break;
}
if (atom == atoms[i])
{
ret = 1;
break;
}
}
XFree(data);
@ -207,11 +225,11 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
EAPI void
ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
{
Ecore_X_Atom atom;
Ecore_X_Atom *oldset = NULL, *newset = NULL;
int i, j = 0, num = 0;
unsigned char *data = NULL;
unsigned char *old_data = NULL;
Ecore_X_Atom atom;
Ecore_X_Atom *oldset = NULL, *newset = NULL;
int i, j = 0, num = 0;
unsigned char *data = NULL;
unsigned char *old_data = NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
atom = ecore_x_atom_get(type);
@ -222,96 +240,106 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, int on)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (on)
{
if (ecore_x_dnd_type_isset(win, type))
{
XFree(old_data);
return;
}
newset = calloc(num + 1, sizeof(Ecore_X_Atom));
if (!newset) return;
data = (unsigned char *)newset;
if (ecore_x_dnd_type_isset(win, type))
{
XFree(old_data);
return;
}
for (i = 0; i < num; i++)
newset[i + 1] = oldset[i];
/* prepend the new type */
newset[0] = atom;
newset = calloc(num + 1, sizeof(Ecore_X_Atom));
if (!newset)
return;
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, data, num + 1);
data = (unsigned char *)newset;
for (i = 0; i < num; i++)
newset[i + 1] = oldset[i];
/* prepend the new type */
newset[0] = atom;
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, data, num + 1);
}
else
{
if (!ecore_x_dnd_type_isset(win, type))
{
XFree(old_data);
return;
}
newset = calloc(num - 1, sizeof(Ecore_X_Atom));
if (!newset)
{
XFree(old_data);
return;
}
data = (unsigned char *)newset;
for (i = 0; i < num; i++)
if (oldset[i] != atom)
newset[j++] = oldset[i];
if (!ecore_x_dnd_type_isset(win, type))
{
XFree(old_data);
return;
}
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, data, num - 1);
newset = calloc(num - 1, sizeof(Ecore_X_Atom));
if (!newset)
{
XFree(old_data);
return;
}
data = (unsigned char *)newset;
for (i = 0; i < num; i++)
if (oldset[i] != atom)
newset[j++] = oldset[i];
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, data, num - 1);
}
XFree(oldset);
free(newset);
}
EAPI void
ecore_x_dnd_types_set(Ecore_X_Window win, const char **types, unsigned int num_types)
ecore_x_dnd_types_set(Ecore_X_Window win,
const char **types,
unsigned int num_types)
{
Ecore_X_Atom *newset = NULL;
unsigned int i;
unsigned char *data = NULL;
Ecore_X_Atom *newset = NULL;
unsigned int i;
unsigned char *data = NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!num_types)
{
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
}
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
else
{
newset = calloc(num_types, sizeof(Ecore_X_Atom));
if (!newset) return;
data = (unsigned char *)newset;
for (i = 0; i < num_types; i++)
{
newset[i] = ecore_x_atom_get(types[i]);
ecore_x_selection_converter_atom_add(newset[i], _ecore_x_dnd_converter_copy);
}
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, data, num_types);
free(newset);
newset = calloc(num_types, sizeof(Ecore_X_Atom));
if (!newset)
return;
data = (unsigned char *)newset;
for (i = 0; i < num_types; i++)
{
newset[i] = ecore_x_atom_get(types[i]);
ecore_x_selection_converter_atom_add(newset[i],
_ecore_x_dnd_converter_copy);
}
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, data, num_types);
free(newset);
}
}
EAPI void
ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int num_actions)
ecore_x_dnd_actions_set(Ecore_X_Window win,
Ecore_X_Atom *actions,
unsigned int num_actions)
{
unsigned int i;
unsigned char *data = NULL;
unsigned int i;
unsigned char *data = NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!num_actions)
{
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
}
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
else
{
data = (unsigned char *)actions;
for (i = 0; i < num_actions; i++)
{
ecore_x_selection_converter_atom_add(actions[i], _ecore_x_dnd_converter_copy);
}
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST,
XA_ATOM, 32, data, num_actions);
data = (unsigned char *)actions;
for (i = 0; i < num_actions; i++)
{
ecore_x_selection_converter_atom_add(actions[i],
_ecore_x_dnd_converter_copy);
}
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST,
XA_ATOM, 32, data, num_actions);
}
}
@ -333,21 +361,22 @@ ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_dnd_version_get(source))
return 0;
return 0;
/* Take ownership of XdndSelection */
if (!ecore_x_selection_xdnd_set(source, data, size))
return 0;
return 0;
if (_version_cache)
{
free(_version_cache);
_version_cache = NULL;
_version_cache_num = 0;
_version_cache_alloc = 0;
free(_version_cache);
_version_cache = NULL;
_version_cache_num = 0;
_version_cache_alloc = 0;
}
ecore_x_window_shadow_tree_flush();
_source->win = source;
ecore_x_window_ignore_set(_source->win, 1);
_source->state = ECORE_X_DND_SOURCE_DRAGGING;
@ -371,36 +400,37 @@ ecore_x_dnd_drop(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (_source->dest)
{
xev.xany.type = ClientMessage;
xev.xany.display = _ecore_x_disp;
xev.xclient.format = 32;
xev.xclient.window = _source->dest;
xev.xany.type = ClientMessage;
xev.xany.display = _ecore_x_disp;
xev.xclient.format = 32;
xev.xclient.window = _source->dest;
if (_source->will_accept)
{
xev.xclient.message_type = ECORE_X_ATOM_XDND_DROP;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = _source->time;
XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
_source->state = ECORE_X_DND_SOURCE_DROPPED;
status = 1;
}
else
{
xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
_source->state = ECORE_X_DND_SOURCE_IDLE;
}
if (_source->will_accept)
{
xev.xclient.message_type = ECORE_X_ATOM_XDND_DROP;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = _source->time;
XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
_source->state = ECORE_X_DND_SOURCE_DROPPED;
status = 1;
}
else
{
xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
_source->state = ECORE_X_DND_SOURCE_IDLE;
}
}
else
{
/* Dropping on nothing */
ecore_x_selection_xdnd_clear();
_source->state = ECORE_X_DND_SOURCE_IDLE;
/* Dropping on nothing */
ecore_x_selection_xdnd_clear();
_source->state = ECORE_X_DND_SOURCE_IDLE;
}
ecore_x_window_ignore_set(_source->win, 0);
_source->prev.window = 0;
@ -409,12 +439,15 @@ ecore_x_dnd_drop(void)
}
EAPI void
ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectangle, Ecore_X_Atom action)
ecore_x_dnd_send_status(int will_accept,
int suppress,
Ecore_X_Rectangle rectangle,
Ecore_X_Atom action)
{
XEvent xev;
if (_target->state == ECORE_X_DND_TARGET_IDLE)
return;
return;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
memset(&xev, 0, sizeof(XEvent));
@ -430,9 +463,10 @@ ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectang
xev.xclient.data.l[0] = _target->win;
xev.xclient.data.l[1] = 0;
if (will_accept)
xev.xclient.data.l[1] |= 0x1UL;
xev.xclient.data.l[1] |= 0x1UL;
if (!suppress)
xev.xclient.data.l[1] |= 0x2UL;
xev.xclient.data.l[1] |= 0x2UL;
/* Set rectangle information */
xev.xclient.data.l[2] = rectangle.x;
@ -444,13 +478,13 @@ ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectang
if (will_accept)
{
xev.xclient.data.l[4] = action;
_target->accepted_action = action;
xev.xclient.data.l[4] = action;
_target->accepted_action = action;
}
else
{
xev.xclient.data.l[4] = None;
_target->accepted_action = action;
xev.xclient.data.l[4] = None;
_target->accepted_action = action;
}
XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
@ -459,10 +493,10 @@ ecore_x_dnd_send_status(int will_accept, int suppress, Ecore_X_Rectangle rectang
EAPI void
ecore_x_dnd_send_finished(void)
{
XEvent xev;
XEvent xev;
if (_target->state == ECORE_X_DND_TARGET_IDLE)
return;
return;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xev.xany.type = ClientMessage;
@ -476,9 +510,10 @@ ecore_x_dnd_send_finished(void)
xev.xclient.data.l[2] = 0;
if (_target->will_accept)
{
xev.xclient.data.l[1] |= 0x1UL;
xev.xclient.data.l[2] = _target->accepted_action;
xev.xclient.data.l[1] |= 0x1UL;
xev.xclient.data.l[2] = _target->accepted_action;
}
XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev);
_target->state = ECORE_X_DND_TARGET_IDLE;
@ -489,7 +524,7 @@ ecore_x_dnd_source_action_set(Ecore_X_Atom action)
{
_source->action = action;
if (_source->prev.window)
_ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
_ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
}
Ecore_X_Atom
@ -501,13 +536,13 @@ ecore_x_dnd_source_action_get(void)
void
_ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
{
XEvent xev;
Ecore_X_Window win;
XEvent xev;
Ecore_X_Window win;
Ecore_X_Window *skip;
int num;
int num;
if (_source->state != ECORE_X_DND_SOURCE_DRAGGING)
return;
return;
/* Preinitialize XEvent struct */
memset(&xev, 0, sizeof(XEvent));
@ -527,78 +562,83 @@ _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
// while ((win) && !(ecore_x_dnd_version_get(win)))
// win = ecore_x_window_parent_get(win);
while ((win) && !(ecore_x_dnd_version_get(win)))
win = ecore_x_window_shadow_parent_get(root, win);
win = ecore_x_window_shadow_parent_get(root, win);
/* Send XdndLeave to current destination window if we have left it */
if ((_source->dest) && (win != _source->dest))
{
xev.xclient.window = _source->dest;
xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
xev.xclient.window = _source->dest;
xev.xclient.message_type = ECORE_X_ATOM_XDND_LEAVE;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
_source->suppress = 0;
XSendEvent(_ecore_x_disp, _source->dest, False, 0, &xev);
_source->suppress = 0;
}
if (win)
{
int x1, x2, y1, y2;
int x1, x2, y1, y2;
_source->version = MIN(ECORE_X_DND_VERSION,
ecore_x_dnd_version_get(win));
if (win != _source->dest)
{
int i;
unsigned char *data;
Ecore_X_Atom *types;
_source->version = MIN(ECORE_X_DND_VERSION,
ecore_x_dnd_version_get(win));
if (win != _source->dest)
{
int i;
unsigned char *data;
Ecore_X_Atom *types;
ecore_x_window_prop_property_get(_source->win, ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM, 32, &data, &num);
types = (Ecore_X_Atom *)data;
ecore_x_window_prop_property_get(_source->win,
ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM,
32,
&data,
&num);
types = (Ecore_X_Atom *)data;
/* Entered new window, send XdndEnter */
xev.xclient.window = win;
xev.xclient.message_type = ECORE_X_ATOM_XDND_ENTER;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
if (num > 3)
xev.xclient.data.l[1] |= 0x1UL;
else
xev.xclient.data.l[1] &= 0xfffffffeUL;
xev.xclient.data.l[1] |= ((unsigned long) _source->version) << 24;
/* Entered new window, send XdndEnter */
xev.xclient.window = win;
xev.xclient.message_type = ECORE_X_ATOM_XDND_ENTER;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0;
if (num > 3)
xev.xclient.data.l[1] |= 0x1UL;
else
xev.xclient.data.l[1] &= 0xfffffffeUL;
for (i = 2; i < 5; i++)
xev.xclient.data.l[i] = 0;
for (i = 0; i < MIN(num, 3); ++i)
xev.xclient.data.l[i + 2] = types[i];
XFree(data);
XSendEvent(_ecore_x_disp, win, False, 0, &xev);
_source->await_status = 0;
_source->will_accept = 0;
}
xev.xclient.data.l[1] |= ((unsigned long)_source->version) << 24;
/* Determine if we're still in the rectangle from the last status */
x1 = _source->rectangle.x;
x2 = _source->rectangle.x + _source->rectangle.width;
y1 = _source->rectangle.y;
y2 = _source->rectangle.y + _source->rectangle.height;
for (i = 2; i < 5; i++)
xev.xclient.data.l[i] = 0;
for (i = 0; i < MIN(num, 3); ++i)
xev.xclient.data.l[i + 2] = types[i];
XFree(data);
XSendEvent(_ecore_x_disp, win, False, 0, &xev);
_source->await_status = 0;
_source->will_accept = 0;
}
if ((!_source->await_status) ||
(!_source->suppress) ||
((x < x1) || (x > x2) || (y < y1) || (y > y2)))
{
xev.xclient.window = win;
xev.xclient.message_type = ECORE_X_ATOM_XDND_POSITION;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0; /* Reserved */
xev.xclient.data.l[2] = ((x << 16) & 0xffff0000) | (y & 0xffff);
xev.xclient.data.l[3] = _source->time; /* Version 1 */
xev.xclient.data.l[4] = _source->action; /* Version 2, Needs to be pre-set */
XSendEvent(_ecore_x_disp, win, False, 0, &xev);
/* Determine if we're still in the rectangle from the last status */
x1 = _source->rectangle.x;
x2 = _source->rectangle.x + _source->rectangle.width;
y1 = _source->rectangle.y;
y2 = _source->rectangle.y + _source->rectangle.height;
_source->await_status = 1;
}
if ((!_source->await_status) ||
(!_source->suppress) ||
((x < x1) || (x > x2) || (y < y1) || (y > y2)))
{
xev.xclient.window = win;
xev.xclient.message_type = ECORE_X_ATOM_XDND_POSITION;
xev.xclient.data.l[0] = _source->win;
xev.xclient.data.l[1] = 0; /* Reserved */
xev.xclient.data.l[2] = ((x << 16) & 0xffff0000) | (y & 0xffff);
xev.xclient.data.l[3] = _source->time; /* Version 1 */
xev.xclient.data.l[4] = _source->action; /* Version 2, Needs to be pre-set */
XSendEvent(_ecore_x_disp, win, False, 0, &xev);
_source->await_status = 1;
}
}
_source->prev.x = x;

View File

@ -20,9 +20,10 @@ _ecore_x_dpms_init(void)
_dpms_minor = 0;
if (DPMSGetVersion(_ecore_x_disp, &_dpms_major, &_dpms_minor))
_dpms_available = 1;
_dpms_available = 1;
else
_dpms_available = 0;
_dpms_available = 0;
#else
_dpms_available = 0;
#endif
@ -92,9 +93,10 @@ ecore_x_dpms_enabled_set(int enabled)
#ifdef ECORE_XDPMS
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (enabled)
DPMSEnable(_ecore_x_disp);
DPMSEnable(_ecore_x_disp);
else
DPMSDisable(_ecore_x_disp);
DPMSDisable(_ecore_x_disp);
#endif
}
@ -106,12 +108,14 @@ ecore_x_dpms_enabled_set(int enabled)
* @ingroup Ecore_X_DPMS_Group
*/
EAPI void
ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned int *off)
ecore_x_dpms_timeouts_get(unsigned int *standby,
unsigned int *suspend,
unsigned int *off)
{
#ifdef ECORE_XDPMS
LOGFN(__FILE__, __LINE__, __FUNCTION__);
DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby,
(unsigned short *)suspend, (unsigned short *)off);
DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby,
(unsigned short *)suspend, (unsigned short *)off);
#endif
}
@ -123,7 +127,9 @@ ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned
* @ingroup Ecore_X_DPMS_Group
*/
EAPI int
ecore_x_dpms_timeouts_set(unsigned int standby, unsigned int suspend, unsigned int off)
ecore_x_dpms_timeouts_set(unsigned int standby,
unsigned int suspend,
unsigned int off)
{
#ifdef ECORE_XDPMS
LOGFN(__FILE__, __LINE__, __FUNCTION__);

View File

@ -26,26 +26,37 @@
* @ingroup Ecore_X_Drawable_Group
*/
EAPI void
ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h)
ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
int *x,
int *y,
int *w,
int *h)
{
Window dummy_win;
int ret_x, ret_y;
unsigned int ret_w, ret_h, dummy_border, dummy_depth;
Window dummy_win;
int ret_x, ret_y;
unsigned int ret_w, ret_h, dummy_border, dummy_depth;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &ret_x, &ret_y,
&ret_w, &ret_h, &dummy_border, &dummy_depth))
{
ret_x = 0;
ret_y = 0;
ret_w = 0;
ret_h = 0;
}
{
ret_x = 0;
ret_y = 0;
ret_w = 0;
ret_h = 0;
}
if (x) *x = ret_x;
if (y) *y = ret_y;
if (w) *w = (int) ret_w;
if (h) *h = (int) ret_h;
if (x)
*x = ret_x;
if (y)
*y = ret_y;
if (w)
*w = (int)ret_w;
if (h)
*h = (int)ret_h;
}
/**
@ -57,16 +68,16 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h
EAPI int
ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
{
Window dummy_win;
int dummy_x, dummy_y;
unsigned int dummy_w, dummy_h, border_ret, dummy_depth;
Window dummy_win;
int dummy_x, dummy_y;
unsigned int dummy_w, dummy_h, border_ret, dummy_depth;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
&dummy_w, &dummy_h, &border_ret, &dummy_depth))
border_ret = 0;
return (int) border_ret;
return (int)border_ret;
}
/**
@ -78,16 +89,16 @@ ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
EAPI int
ecore_x_drawable_depth_get(Ecore_X_Drawable d)
{
Window dummy_win;
int dummy_x, dummy_y;
unsigned int dummy_w, dummy_h, dummy_border, depth_ret;
Window dummy_win;
int dummy_x, dummy_y;
unsigned int dummy_w, dummy_h, dummy_border, depth_ret;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
&dummy_w, &dummy_h, &dummy_border, &depth_ret))
depth_ret = 0;
return (int) depth_ret;
return (int)depth_ret;
}
/**
@ -100,7 +111,12 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
* @param height The height of the rectangle.
*/
EAPI void
ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height)
ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d,
Ecore_X_GC gc,
int x,
int y,
int width,
int height)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);

File diff suppressed because it is too large Load Diff

View File

@ -13,25 +13,25 @@
#include "ecore_x_private.h"
#include "Ecore_X.h"
static void _ecore_x_error_handle(Display * d, XErrorEvent * ev);
static void _ecore_x_error_handle(Display *d, XErrorEvent *ev);
static int _ecore_x_io_error_handle(Display *d);
static void (*_error_func) (void *data) = NULL;
static void (*_error_func)(void *data) = NULL;
static void *_error_data = NULL;
static void (*_io_error_func) (void *data) = NULL;
static void (*_io_error_func)(void *data) = NULL;
static void *_io_error_data = NULL;
static int _error_request_code = 0;
static int _error_code = 0;
static int _error_request_code = 0;
static int _error_code = 0;
/**
* Set the error handler.
* @param func The error handler function
* @param data The data to be passed to the handler function
*
*
* Set the X error handler function
*/
EAPI void
ecore_x_error_handler_set(void (*func) (void *data), const void *data)
ecore_x_error_handler_set(void (*func)(void *data), const void *data)
{
_error_func = func;
_error_data = (void *)data;
@ -41,11 +41,11 @@ ecore_x_error_handler_set(void (*func) (void *data), const void *data)
* Set the I/O error handler.
* @param func The I/O error handler function
* @param data The data to be passed to the handler function
*
*
* Set the X I/O error handler function
*/
EAPI void
ecore_x_io_error_handler_set(void (*func) (void *data), const void *data)
ecore_x_io_error_handler_set(void (*func)(void *data), const void *data)
{
_io_error_func = func;
_io_error_data = (void *)data;
@ -54,7 +54,7 @@ ecore_x_io_error_handler_set(void (*func) (void *data), const void *data)
/**
* Get the request code that caused the error.
* @return The request code causing the X error
*
*
* Return the X request code that caused the last X error
*/
EAPI int
@ -66,7 +66,7 @@ ecore_x_error_request_get(void)
/**
* Get the error code from the error.
* @return The error code from the X error
*
*
* Return the error code from the last X error
*/
EAPI int
@ -79,27 +79,31 @@ void
_ecore_x_error_handler_init(void)
{
XSetErrorHandler((XErrorHandler)_ecore_x_error_handle);
XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle);
XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle);
}
static void
_ecore_x_error_handle(Display *d, XErrorEvent *ev)
{
if (d == _ecore_x_disp)
if (d == _ecore_x_disp)
{
_error_request_code = ev->request_code;
_error_code = ev->error_code;
if (_error_func) _error_func(_error_data);
_error_request_code = ev->request_code;
_error_code = ev->error_code;
if (_error_func)
_error_func(_error_data);
}
}
static int
_ecore_x_io_error_handle(Display *d)
{
if (d == _ecore_x_disp)
if (d == _ecore_x_disp)
{
if (_io_error_func) _io_error_func(_io_error_data);
else exit(-1);
if (_io_error_func)
_io_error_func(_io_error_data);
else
exit(-1);
}
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@ -25,9 +25,10 @@ _ecore_x_fixes_init(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (XFixesQueryVersion(_ecore_x_disp, &_fixes_major, &_fixes_minor))
_fixes_available = 1;
_fixes_available = 1;
else
_fixes_available = 0;
_fixes_available = 0;
#else
_fixes_available = 0;
#endif
@ -41,16 +42,19 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, int num)
XRectangle *xrect;
int i;
if (num == 0) return NULL;
if (num == 0)
return NULL;
xrect = malloc(sizeof(XRectangle) * num);
if (!xrect) return NULL;
if (!xrect)
return NULL;
for (i = 0; i < num; i++)
{
xrect[i].x = rects[i].x;
xrect[i].y = rects[i].y;
xrect[i].width = rects[i].width;
xrect[i].height = rects[i].height;
xrect[i].x = rects[i].x;
xrect[i].y = rects[i].y;
xrect[i].width = rects[i].width;
xrect[i].height = rects[i].height;
}
return xrect;
}
@ -61,15 +65,19 @@ _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, int num)
Ecore_X_Rectangle *rects;
int i;
if (num == 0) return NULL;
if (num == 0)
return NULL;
rects = malloc(sizeof(Ecore_X_Rectangle) * num);
if (!rects) return NULL;
if (!rects)
return NULL;
for (i = 0; i < num; i++)
{
rects[i].x = xrect[i].x;
rects[i].y = xrect[i].y;
rects[i].width = xrect[i].width;
rects[i].height = xrect[i].height;
rects[i].x = xrect[i].x;
rects[i].y = xrect[i].y;
rects[i].width = xrect[i].width;
rects[i].height = xrect[i].height;
}
return rects;
}
@ -177,7 +185,9 @@ ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
}
EAPI void
ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
ecore_x_region_combine(Ecore_X_Region dest,
Ecore_X_Region source1,
Ecore_X_Region source2)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -186,7 +196,9 @@ ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Regi
}
EAPI void
ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
ecore_x_region_intersect(Ecore_X_Region dest,
Ecore_X_Region source1,
Ecore_X_Region source2)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -195,7 +207,9 @@ ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Re
}
EAPI void
ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2)
ecore_x_region_subtract(Ecore_X_Region dest,
Ecore_X_Region source1,
Ecore_X_Region source2)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -204,7 +218,9 @@ ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Reg
}
EAPI void
ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Region source)
ecore_x_region_invert(Ecore_X_Region dest,
Ecore_X_Rectangle *bounds,
Ecore_X_Region source)
{
#ifdef ECORE_XFIXES
XRectangle *xbound;
@ -237,11 +253,12 @@ ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
}
EAPI Ecore_X_Rectangle *
ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds){
ecore_x_region_fetch(Ecore_X_Region region, int *num,
Ecore_X_Rectangle *bounds){
#ifdef ECORE_XFIXES
Ecore_X_Rectangle *rects;
XRectangle *xrect, xbound;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xrect = XFixesFetchRegionAndBounds(_ecore_x_disp, region, num, &xbound);
rects = _ecore_x_rectangle_x_to_ecore(xrect, *num);
@ -256,7 +273,12 @@ ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds)
}
EAPI void
ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int left, unsigned int right, unsigned int top, unsigned int bottom)
ecore_x_region_expand(Ecore_X_Region dest,
Ecore_X_Region source,
unsigned int left,
unsigned int right,
unsigned int top,
unsigned int bottom)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -265,7 +287,10 @@ ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int l
}
EAPI void
ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, int y_origin)
ecore_x_region_gc_clip_set(Ecore_X_Region region,
Ecore_X_GC gc,
int x_origin,
int y_origin)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -274,20 +299,36 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, i
}
EAPI void
ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window win, Ecore_X_Shape_Type type, int x_offset, int y_offset)
ecore_x_region_window_shape_set(Ecore_X_Region region,
Ecore_X_Window win,
Ecore_X_Shape_Type type,
int x_offset,
int y_offset)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesSetWindowShapeRegion(_ecore_x_disp, win, type, x_offset, y_offset, region);
XFixesSetWindowShapeRegion(_ecore_x_disp,
win,
type,
x_offset,
y_offset,
region);
#endif
}
EAPI void
ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x_origin, int y_origin)
ecore_x_region_picture_clip_set(Ecore_X_Region region,
Ecore_X_Picture picture,
int x_origin,
int y_origin)
{
#ifdef ECORE_XFIXES
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XFixesSetPictureClipRegion(_ecore_x_disp, picture, x_origin, y_origin, region);
XFixesSetPictureClipRegion(_ecore_x_disp,
picture,
x_origin,
y_origin,
region);
#endif
}

View File

@ -23,15 +23,18 @@
* @return The new default graphics context.
*/
EAPI Ecore_X_GC
ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list)
ecore_x_gc_new(Ecore_X_Drawable draw,
Ecore_X_GC_Value_Mask value_mask,
const unsigned int *value_list)
{
XGCValues gcv;
int mask;
int index;
int i;
int mask;
int index;
int i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!draw) draw = DefaultRootWindow(_ecore_x_disp);
if (!draw)
draw = DefaultRootWindow(_ecore_x_disp);
memset(&gcv, 0, sizeof (gcv));
@ -43,90 +46,112 @@ ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const un
gcv.function = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_PLANE_MASK:
gcv.plane_mask = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_FOREGROUND:
gcv.foreground = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_BACKGROUND:
gcv.background = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_LINE_WIDTH:
gcv.line_width = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_LINE_STYLE:
gcv.line_style = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_CAP_STYLE:
gcv.cap_style = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_JOIN_STYLE:
gcv.join_style = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_FILL_STYLE:
gcv.fill_style = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_FILL_RULE:
gcv.fill_rule = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_TILE:
gcv.tile = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_STIPPLE:
gcv.stipple = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X:
gcv.ts_x_origin = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y:
gcv.ts_y_origin = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_FONT:
gcv.font = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE:
gcv.subwindow_mode = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES:
gcv.graphics_exposures = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X:
gcv.clip_x_origin = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y:
gcv.clip_y_origin = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_CLIP_MASK:
gcv.clip_mask = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_DASH_OFFSET:
gcv.dash_offset = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_DASH_LIST:
gcv.dashes = value_list[index];
index++;
break;
case ECORE_X_GC_VALUE_MASK_ARC_MODE:
gcv.arc_mode = value_list[index];
index++;

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ static int _ecore_x_image_shm_can = -1;
static int _ecore_x_image_err = 0;
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;
}
@ -30,18 +30,19 @@ _ecore_x_image_shm_check(void)
XErrorHandler ph;
XShmSegmentInfo shminfo;
XImage *xim;
if (_ecore_x_image_shm_can != -1) return;
if (_ecore_x_image_shm_can != -1)
return;
XSync(_ecore_x_disp, False);
_ecore_x_image_err = 0;
xim = XShmCreateImage(_ecore_x_disp,
DefaultVisual(_ecore_x_disp,
DefaultScreen(_ecore_x_disp)),
DefaultDepth(_ecore_x_disp,
xim = XShmCreateImage(_ecore_x_disp,
DefaultVisual(_ecore_x_disp,
DefaultScreen(_ecore_x_disp)),
DefaultDepth(_ecore_x_disp,
DefaultScreen(_ecore_x_disp)),
ZPixmap, NULL,
ZPixmap, NULL,
&shminfo, 1, 1);
if (!xim)
{
@ -57,21 +58,21 @@ _ecore_x_image_shm_check(void)
_ecore_x_image_shm_can = 0;
return;
}
shminfo.readOnly = False;
shminfo.shmaddr = shmat(shminfo.shmid, 0, 0);
shminfo.shmaddr = shmat(shminfo.shmid, 0, 0);
xim->data = shminfo.shmaddr;
if (xim->data == (char *)-1)
{
XDestroyImage(xim);
_ecore_x_image_shm_can = 0;
return;
}
ph = XSetErrorHandler((XErrorHandler)_ecore_x_image_error_handler);
XShmAttach(_ecore_x_disp, &shminfo);
XShmGetImage(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp),
XShmGetImage(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp),
xim, 0, 0, 0xffffffff);
XSync(_ecore_x_disp, False);
XSetErrorHandler((XErrorHandler)ph);
@ -79,17 +80,17 @@ _ecore_x_image_shm_check(void)
{
XShmDetach(_ecore_x_disp, &shminfo);
XDestroyImage(xim);
shmdt(shminfo.shmaddr);
shmdt(shminfo.shmaddr);
shmctl(shminfo.shmid, IPC_RMID, 0);
_ecore_x_image_shm_can = 0;
return;
}
XShmDetach(_ecore_x_disp, &shminfo);
XDestroyImage(xim);
shmdt(shminfo.shmaddr);
shmctl(shminfo.shmid, IPC_RMID, 0);
_ecore_x_image_shm_can = 1;
}
@ -109,9 +110,11 @@ EAPI Ecore_X_Image *
ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth)
{
Ecore_X_Image *im;
im = calloc(1, sizeof(Ecore_X_Image));
if (!im) return NULL;
if (!im)
return NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
im->w = w;
im->h = h;
@ -136,15 +139,13 @@ ecore_x_image_free(Ecore_X_Image *im)
shmctl(im->shminfo.shmid, IPC_RMID, 0);
}
}
else
else if (im->xim)
{
if (im->xim)
{
free(im->xim->data);
im->xim->data = NULL;
XDestroyImage(im->xim);
}
free(im->xim->data);
im->xim->data = NULL;
XDestroyImage(im->xim);
}
free(im);
}
@ -152,11 +153,12 @@ static void
_ecore_x_image_shm_create(Ecore_X_Image *im)
{
im->xim = XShmCreateImage(_ecore_x_disp, im->vis, im->depth,
ZPixmap, NULL, &(im->shminfo),
ZPixmap, NULL, &(im->shminfo),
im->w, im->h);
if (!im->xim) return;
if (!im->xim)
return;
im->shminfo.shmid = shmget(IPC_PRIVATE,
im->shminfo.shmid = shmget(IPC_PRIVATE,
im->xim->bytes_per_line * im->xim->height,
IPC_CREAT | 0666);
if (im->shminfo.shmid == -1)
@ -164,8 +166,9 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
XDestroyImage(im->xim);
return;
}
im->shminfo.readOnly = False;
im->shminfo.shmaddr = shmat(im->shminfo.shmid, 0, 0);
im->shminfo.shmaddr = shmat(im->shminfo.shmid, 0, 0);
im->xim->data = im->shminfo.shmaddr;
if ((im->xim->data == (char *)-1) ||
(im->xim->data == NULL))
@ -174,41 +177,50 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
shmctl(im->shminfo.shmid, IPC_RMID, 0);
XDestroyImage(im->xim);
return;
}
}
XShmAttach(_ecore_x_disp, &im->shminfo);
im->data = (unsigned char *)im->xim->data;
im->bpl = im->xim->bytes_per_line;
im->rows = im->xim->height;
if (im->xim->bits_per_pixel <= 8) im->bpp = 1;
else if (im->xim->bits_per_pixel <= 16) im->bpp = 2;
else im->bpp = 4;
if (im->xim->bits_per_pixel <= 8)
im->bpp = 1;
else if (im->xim->bits_per_pixel <= 16)
im->bpp = 2;
else
im->bpp = 4;
}
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,
int x, int y, int sx, int sy, int w, int h)
{
int ret = 1;
XErrorHandler ph;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (im->shm)
{
if (!im->xim) _ecore_x_image_shm_create(im);
if (!im->xim) return 0;
if (!im->xim)
_ecore_x_image_shm_create(im);
if (!im->xim)
return 0;
_ecore_x_image_err = 0;
// optimised path
ph = XSetErrorHandler((XErrorHandler)_ecore_x_image_error_handler);
if ((sx == 0) && (w == im->w))
{
im->xim->data = (char *)
im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
im->xim->width = w;
im->xim->height = h;
if (!XShmGetImage(_ecore_x_disp, draw, im->xim, x, y, 0xffffffff))
ret = 0;
ret = 0;
ecore_x_sync();
}
// unavoidable thanks to mit-shm get api - tmp shm buf + copy into it
@ -218,14 +230,17 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
unsigned char *spixels, *sp, *pixels, *p;
int bpp, bpl, rows, sbpp, sbpl, srows;
int r;
tim = ecore_x_image_new(w, h, im->vis, im->depth);
if (tim)
{
ret = ecore_x_image_get(tim, draw, x, y, 0, 0, w, h);
if (ret)
{
spixels = ecore_x_image_data_get(tim, &sbpl, &srows, &sbpp);
spixels = ecore_x_image_data_get(tim,
&sbpl,
&srows,
&sbpp);
pixels = ecore_x_image_data_get(im, &bpl, &rows, &bpp);
if ((pixels) && (spixels))
{
@ -239,22 +254,33 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
}
}
}
ecore_x_image_free(tim);
}
}
XSetErrorHandler((XErrorHandler)ph);
if (_ecore_x_image_err) ret = 0;
if (_ecore_x_image_err)
ret = 0;
}
else
{
printf("currently unimplemented ecore_x_image_get without shm\n");
ret = 0;
}
return ret;
}
EAPI void
ecore_x_image_put(Ecore_X_Image *im __UNUSED__, Ecore_X_Drawable draw __UNUSED__, int x __UNUSED__, int y __UNUSED__, int sx __UNUSED__, int sy __UNUSED__, int w __UNUSED__, int h __UNUSED__)
ecore_x_image_put(Ecore_X_Image *im __UNUSED__,
Ecore_X_Drawable draw __UNUSED__,
int x __UNUSED__,
int y __UNUSED__,
int sx __UNUSED__,
int sy __UNUSED__,
int w __UNUSED__,
int h __UNUSED__)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
printf("ecore_x_image_put: unimplemented!\n");
@ -264,11 +290,20 @@ EAPI void *
ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!im->xim) _ecore_x_image_shm_create(im);
if (!im->xim) return NULL;
if (bpl) *bpl = im->bpl;
if (rows) *rows = im->rows;
if (bpp) *bpp = im->bpp;
if (!im->xim)
_ecore_x_image_shm_create(im);
if (!im->xim)
return NULL;
if (bpl)
*bpl = im->bpl;
if (rows)
*rows = im->rows;
if (bpp)
*bpp = im->bpp;
return im->data;
}

View File

@ -27,62 +27,68 @@
typedef struct _mwmhints
{
CARD32 flags;
CARD32 functions;
CARD32 decorations;
INT32 inputmode;
CARD32 status;
CARD32 flags;
CARD32 functions;
CARD32 decorations;
INT32 inputmode;
CARD32 status;
}
MWMHints;
EAPI int
ecore_x_mwm_hints_get(Ecore_X_Window win,
Ecore_X_MWM_Hint_Func * fhint,
Ecore_X_MWM_Hint_Decor * dhint,
Ecore_X_MWM_Hint_Input * ihint)
Ecore_X_MWM_Hint_Func *fhint,
Ecore_X_MWM_Hint_Decor *dhint,
Ecore_X_MWM_Hint_Input *ihint)
{
unsigned char *p = NULL;
MWMHints *mwmhints = NULL;
int num;
int ret;
unsigned char *p = NULL;
MWMHints *mwmhints = NULL;
int num;
int ret;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ret = 0;
if (!ecore_x_window_prop_property_get(win,
ECORE_X_ATOM_MOTIF_WM_HINTS,
ECORE_X_ATOM_MOTIF_WM_HINTS,
32, &p, &num))
ECORE_X_ATOM_MOTIF_WM_HINTS,
ECORE_X_ATOM_MOTIF_WM_HINTS,
32, &p, &num))
return 0;
mwmhints = (MWMHints *) p;
mwmhints = (MWMHints *)p;
if (mwmhints)
{
if (num >= 4)
{
if (dhint)
{
if (mwmhints->flags & ECORE_X_MWM_HINTS_DECORATIONS)
*dhint = mwmhints->decorations;
else
*dhint = ECORE_X_MWM_HINT_DECOR_ALL;
}
if (fhint)
{
if (mwmhints->flags & ECORE_X_MWM_HINTS_FUNCTIONS)
*fhint = mwmhints->functions;
else
*fhint = ECORE_X_MWM_HINT_FUNC_ALL;
}
if (ihint)
{
if (mwmhints->flags & ECORE_X_MWM_HINTS_INPUT_MODE)
*ihint = mwmhints->inputmode;
else
*ihint = ECORE_X_MWM_HINT_INPUT_MODELESS;
}
ret = 1;
}
free(mwmhints);
if (num >= 4)
{
if (dhint)
{
if (mwmhints->flags & ECORE_X_MWM_HINTS_DECORATIONS)
*dhint = mwmhints->decorations;
else
*dhint = ECORE_X_MWM_HINT_DECOR_ALL;
}
if (fhint)
{
if (mwmhints->flags & ECORE_X_MWM_HINTS_FUNCTIONS)
*fhint = mwmhints->functions;
else
*fhint = ECORE_X_MWM_HINT_FUNC_ALL;
}
if (ihint)
{
if (mwmhints->flags & ECORE_X_MWM_HINTS_INPUT_MODE)
*ihint = mwmhints->inputmode;
else
*ihint = ECORE_X_MWM_HINT_INPUT_MODELESS;
}
ret = 1;
}
free(mwmhints);
}
return ret;
}
@ -93,11 +99,11 @@ ecore_x_mwm_borderless_set(Ecore_X_Window win, int borderless)
data[0] = 2; /* just set the decorations hint! */
data[2] = !borderless;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_property_set(win,
ECORE_X_ATOM_MOTIF_WM_HINTS,
ECORE_X_ATOM_MOTIF_WM_HINTS,
32, (void *)data, 5);
ecore_x_window_prop_property_set(win,
ECORE_X_ATOM_MOTIF_WM_HINTS,
ECORE_X_ATOM_MOTIF_WM_HINTS,
32, (void *)data, 5);
}

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,12 @@ EAPI Ecore_X_Pixmap
ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
if (dep == 0) dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
if (win == 0)
win = DefaultRootWindow(_ecore_x_disp);
if (dep == 0)
dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
}
@ -68,9 +72,9 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
* @ingroup Ecore_X_Pixmap_Group
*/
EAPI void
ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest,
Ecore_X_GC gc, int sx, int sy,
int w, int h, int dx, int dy)
ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest,
Ecore_X_GC gc, int sx, int sy,
int w, int h, int dx, int dy)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
@ -89,7 +93,8 @@ EAPI void
ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (pmap) ecore_x_drawable_geometry_get(pmap, x, y, w, h);
if (pmap)
ecore_x_drawable_geometry_get(pmap, x, y, w, h);
}
/**

View File

@ -94,11 +94,11 @@ typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
struct _Ecore_X_Selection_Intern
{
Ecore_X_Window win;
Ecore_X_Atom selection;
unsigned char *data;
int length;
Time time;
Ecore_X_Window win;
Ecore_X_Atom selection;
unsigned char *data;
int length;
Time time;
};
typedef struct _Ecore_X_Selection_Converter Ecore_X_Selection_Converter;
@ -108,7 +108,7 @@ struct _Ecore_X_Selection_Converter
Ecore_X_Atom target;
int (*convert)(char *target, void *data, int size,
void **data_ret, int *size_ret,
Ecore_X_Atom *type, int *typeseize);
Ecore_X_Atom *type, int *typeseize);
Ecore_X_Selection_Converter *next;
};
@ -116,16 +116,16 @@ typedef struct _Ecore_X_Selection_Parser Ecore_X_Selection_Parser;
struct _Ecore_X_Selection_Parser
{
char *target;
char *target;
void *(*parse)(const char *target, void *data, int size, int format);
Ecore_X_Selection_Parser *next;
};
typedef struct _Ecore_X_DND_Source
typedef struct _Ecore_X_DND_Source
{
int version;
Ecore_X_Window win, dest;
enum {
ECORE_X_DND_SOURCE_IDLE,
ECORE_X_DND_SOURCE_DRAGGING,
@ -133,12 +133,14 @@ typedef struct _Ecore_X_DND_Source
ECORE_X_DND_SOURCE_CONVERTING
} state;
struct {
struct
{
short x, y;
unsigned short width, height;
} rectangle;
struct {
struct
{
Ecore_X_Window window;
int x, y;
} prev;
@ -146,31 +148,32 @@ typedef struct _Ecore_X_DND_Source
Time time;
Ecore_X_Atom action, accepted_action;
int will_accept;
int suppress;
int await_status;
} Ecore_X_DND_Source;
typedef struct _Ecore_X_DND_Target
typedef struct _Ecore_X_DND_Target
{
int version;
Ecore_X_Window win, source;
enum {
ECORE_X_DND_TARGET_IDLE,
ECORE_X_DND_TARGET_ENTERED
} state;
struct {
struct
{
int x, y;
} pos;
Time time;
Ecore_X_Atom action, accepted_action;
int will_accept;
} Ecore_X_DND_Target;
@ -185,118 +188,175 @@ extern int ECORE_X_LOCK_NUM;
extern int ECORE_X_LOCK_CAPS;
extern Display *_ecore_x_disp;
extern double _ecore_x_double_click_time;
extern Time _ecore_x_event_last_time;
extern Window _ecore_x_event_last_win;
extern int _ecore_x_event_last_root_x;
extern int _ecore_x_event_last_root_y;
extern int _ecore_x_xcursor;
extern XIC _ecore_x_ic;
extern double _ecore_x_double_click_time;
extern Time _ecore_x_event_last_time;
extern Window _ecore_x_event_last_win;
extern int _ecore_x_event_last_root_x;
extern int _ecore_x_event_last_root_y;
extern int _ecore_x_xcursor;
extern XIC _ecore_x_ic;
extern Ecore_X_Atom _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_NUM];
extern Ecore_X_Atom _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_NUM];
extern int _ecore_window_grabs_num;
extern Window *_ecore_window_grabs;
extern Eina_Bool (*_ecore_window_grab_replay_func) (void *data, int event_type, void *event);
extern void *_ecore_window_grab_replay_data;
extern int _ecore_window_grabs_num;
extern Window *_ecore_window_grabs;
extern Eina_Bool (*_ecore_window_grab_replay_func)(void *data, int event_type,
void *event);
extern void *_ecore_window_grab_replay_data;
extern Ecore_X_Window _ecore_x_private_win;
void _ecore_x_error_handler_init(void);
void _ecore_x_event_handle_any_event(XEvent *xevent);
void _ecore_x_event_handle_key_press(XEvent *xevent);
void _ecore_x_event_handle_key_release(XEvent *xevent);
void _ecore_x_event_handle_button_press(XEvent *xevent);
void _ecore_x_event_handle_button_release(XEvent *xevent);
void _ecore_x_event_handle_motion_notify(XEvent *xevent);
void _ecore_x_event_handle_enter_notify(XEvent *xevent);
void _ecore_x_event_handle_leave_notify(XEvent *xevent);
void _ecore_x_event_handle_focus_in(XEvent *xevent);
void _ecore_x_event_handle_focus_out(XEvent *xevent);
void _ecore_x_event_handle_keymap_notify(XEvent *xevent);
void _ecore_x_event_handle_expose(XEvent *xevent);
void _ecore_x_event_handle_graphics_expose(XEvent *xevent);
void _ecore_x_event_handle_visibility_notify(XEvent *xevent);
void _ecore_x_event_handle_create_notify(XEvent *xevent);
void _ecore_x_event_handle_destroy_notify(XEvent *xevent);
void _ecore_x_event_handle_unmap_notify(XEvent *xevent);
void _ecore_x_event_handle_map_notify(XEvent *xevent);
void _ecore_x_event_handle_map_request(XEvent *xevent);
void _ecore_x_event_handle_reparent_notify(XEvent *xevent);
void _ecore_x_event_handle_configure_notify(XEvent *xevent);
void _ecore_x_event_handle_configure_request(XEvent *xevent);
void _ecore_x_event_handle_gravity_notify(XEvent *xevent);
void _ecore_x_event_handle_resize_request(XEvent *xevent);
void _ecore_x_event_handle_circulate_notify(XEvent *xevent);
void _ecore_x_event_handle_circulate_request(XEvent *xevent);
void _ecore_x_event_handle_property_notify(XEvent *xevent);
void _ecore_x_event_handle_selection_clear(XEvent *xevent);
void _ecore_x_event_handle_selection_request(XEvent *xevent);
void _ecore_x_event_handle_selection_notify(XEvent *xevent);
void _ecore_x_event_handle_colormap_notify(XEvent *xevent);
void _ecore_x_event_handle_client_message(XEvent *xevent);
void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
void _ecore_x_event_handle_shape_change(XEvent *xevent);
void _ecore_x_event_handle_screensaver_notify(XEvent *xevent);
void _ecore_x_event_handle_sync_counter(XEvent *xevent);
void _ecore_x_event_handle_sync_alarm(XEvent *xevent);
void _ecore_x_error_handler_init(void);
void _ecore_x_event_handle_any_event(XEvent *xevent);
void _ecore_x_event_handle_key_press(XEvent *xevent);
void _ecore_x_event_handle_key_release(XEvent *xevent);
void _ecore_x_event_handle_button_press(XEvent *xevent);
void _ecore_x_event_handle_button_release(XEvent *xevent);
void _ecore_x_event_handle_motion_notify(XEvent *xevent);
void _ecore_x_event_handle_enter_notify(XEvent *xevent);
void _ecore_x_event_handle_leave_notify(XEvent *xevent);
void _ecore_x_event_handle_focus_in(XEvent *xevent);
void _ecore_x_event_handle_focus_out(XEvent *xevent);
void _ecore_x_event_handle_keymap_notify(XEvent *xevent);
void _ecore_x_event_handle_expose(XEvent *xevent);
void _ecore_x_event_handle_graphics_expose(XEvent *xevent);
void _ecore_x_event_handle_visibility_notify(
XEvent *xevent);
void _ecore_x_event_handle_create_notify(XEvent *xevent);
void _ecore_x_event_handle_destroy_notify(XEvent *xevent);
void _ecore_x_event_handle_unmap_notify(XEvent *xevent);
void _ecore_x_event_handle_map_notify(XEvent *xevent);
void _ecore_x_event_handle_map_request(XEvent *xevent);
void _ecore_x_event_handle_reparent_notify(XEvent *xevent);
void _ecore_x_event_handle_configure_notify(XEvent *xevent);
void _ecore_x_event_handle_configure_request(
XEvent *xevent);
void _ecore_x_event_handle_gravity_notify(XEvent *xevent);
void _ecore_x_event_handle_resize_request(XEvent *xevent);
void _ecore_x_event_handle_circulate_notify(XEvent *xevent);
void _ecore_x_event_handle_circulate_request(
XEvent *xevent);
void _ecore_x_event_handle_property_notify(XEvent *xevent);
void _ecore_x_event_handle_selection_clear(XEvent *xevent);
void _ecore_x_event_handle_selection_request(
XEvent *xevent);
void _ecore_x_event_handle_selection_notify(XEvent *xevent);
void _ecore_x_event_handle_colormap_notify(XEvent *xevent);
void _ecore_x_event_handle_client_message(XEvent *xevent);
void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
void _ecore_x_event_handle_shape_change(XEvent *xevent);
void _ecore_x_event_handle_screensaver_notify(
XEvent *xevent);
void _ecore_x_event_handle_sync_counter(XEvent *xevent);
void _ecore_x_event_handle_sync_alarm(XEvent *xevent);
#ifdef ECORE_XRANDR
void _ecore_x_event_handle_randr_change(XEvent *xevent);
void _ecore_x_event_handle_randr_notify(XEvent *xevent);
void _ecore_x_event_handle_randr_change(XEvent *xevent);
void _ecore_x_event_handle_randr_notify(XEvent *xevent);
#endif
#ifdef ECORE_XFIXES
void _ecore_x_event_handle_fixes_selection_notify(XEvent *xevent);
void _ecore_x_event_handle_fixes_selection_notify(
XEvent *xevent);
#endif
#ifdef ECORE_XDAMAGE
void _ecore_x_event_handle_damage_notify(XEvent *xevent);
void _ecore_x_event_handle_damage_notify(XEvent *xevent);
#endif
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_shutdown(void);
void _ecore_x_selection_data_init(void);
void _ecore_x_selection_shutdown(void);
Ecore_X_Atom
_ecore_x_selection_target_atom_get(const char *target);
char *_ecore_x_selection_target_get(Ecore_X_Atom target);
Ecore_X_Selection_Intern *
_ecore_x_selection_get(Ecore_X_Atom selection);
int _ecore_x_selection_set(Window w, const void *data, int len, Ecore_X_Atom selection);
int _ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **data_ret, Ecore_X_Atom *targettype, int *targetsize);
void *_ecore_x_selection_parse(const char *target, void *data, int size, int format);
_ecore_x_selection_target_atom_get(const char *target);
char * _ecore_x_selection_target_get(Ecore_X_Atom target);
Ecore_X_Selection_Intern *
_ecore_x_selection_get(Ecore_X_Atom selection);
int _ecore_x_selection_set(Window w,
const void *data,
int len,
Ecore_X_Atom selection);
int _ecore_x_selection_convert(Ecore_X_Atom selection,
Ecore_X_Atom target,
void **data_ret,
Ecore_X_Atom *targettype,
int *targetsize);
void * _ecore_x_selection_parse(const char *target,
void *data,
int size,
int format);
void _ecore_x_sync_magic_send(int val, Ecore_X_Window swin);
void _ecore_x_window_grab_remove(Ecore_X_Window win);
void _ecore_x_key_grab_remove(Ecore_X_Window win);
void _ecore_x_sync_magic_send(int val, Ecore_X_Window swin);
void _ecore_x_window_grab_remove(Ecore_X_Window win);
void _ecore_x_key_grab_remove(Ecore_X_Window win);
/* from dnd */
void _ecore_x_dnd_init(void);
Ecore_X_DND_Source *_ecore_x_dnd_source_get(void);
Ecore_X_DND_Target *_ecore_x_dnd_target_get(void);
void _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y);
void _ecore_x_dnd_shutdown(void);
void _ecore_x_dnd_init(void);
Ecore_X_DND_Source * _ecore_x_dnd_source_get(void);
Ecore_X_DND_Target * _ecore_x_dnd_target_get(void);
void _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y);
void _ecore_x_dnd_shutdown(void);
/* from netwm */
Ecore_X_Window_State _ecore_x_netwm_state_get(Ecore_X_Atom a);
int _ecore_x_netwm_startup_info_begin(Ecore_X_Window win, char *data);
int _ecore_x_netwm_startup_info(Ecore_X_Window win, char *data);
int _ecore_x_netwm_startup_info_begin(Ecore_X_Window win,
char *data);
int _ecore_x_netwm_startup_info(Ecore_X_Window win,
char *data);
/* Fixes * Damage * Composite * DPMS */
void _ecore_x_fixes_init(void);
void _ecore_x_damage_init(void);
void _ecore_x_composite_init(void);
void _ecore_x_dpms_init(void);
void _ecore_x_randr_init(void);
void _ecore_x_fixes_init(void);
void _ecore_x_damage_init(void);
void _ecore_x_composite_init(void);
void _ecore_x_dpms_init(void);
void _ecore_x_randr_init(void);
void _ecore_x_atoms_init(void);
void _ecore_x_atoms_init(void);
extern int _ecore_x_xi2_opcode;
void _ecore_x_input_init(void);
void _ecore_x_input_shutdown(void);
void _ecore_x_input_handler(XEvent* xevent);
void _ecore_x_input_init(void);
void _ecore_x_input_shutdown(void);
void _ecore_x_input_handler(XEvent *xevent);
/* from sync */
void _ecore_mouse_move(unsigned int timestamp, unsigned int xmodifiers, int x, int y, int x_root, int y_root, unsigned int event_window, unsigned int window, unsigned int root_win, int same_screen, int dev, double radx, double rady, double pressure, double angle, double mx, double my, double mrx, double mry);
Ecore_Event_Mouse_Button *_ecore_mouse_button(int event, unsigned int timestamp, unsigned int xmodifiers, unsigned int buttons, int x, int y, int x_root, int y_root, unsigned int event_window, unsigned int window, unsigned int root_win, int same_screen, int dev, double radx, double rady, double pressure, double angle, double mx, double my, double mrx, double mry);
void _ecore_mouse_move(unsigned int timestamp,
unsigned int xmodifiers,
int x,
int y,
int x_root,
int y_root,
unsigned int event_window,
unsigned int window,
unsigned int root_win,
int same_screen,
int dev,
double radx,
double rady,
double pressure,
double angle,
double mx,
double my,
double mrx,
double mry);
Ecore_Event_Mouse_Button *_ecore_mouse_button(int event,
unsigned int timestamp,
unsigned int xmodifiers,
unsigned int buttons,
int x,
int y,
int x_root,
int y_root,
unsigned int event_window,
unsigned int window,
unsigned int root_win,
int same_screen,
int dev,
double radx,
double rady,
double pressure,
double angle,
double mx,
double my,
double mrx,
double mry);
//#define LOGFNS 1

View File

@ -27,11 +27,12 @@ _ecore_x_randr_init(void)
if (XRRQueryVersion(_ecore_x_disp, &_randr_major, &_randr_minor))
{
_randr_version = (_randr_major << 16) | _randr_minor;
_randr_available = 1;
_randr_version = (_randr_major << 16) | _randr_minor;
_randr_available = 1;
}
else
_randr_available = 0;
_randr_available = 0;
#else
_randr_available = 0;
#endif
@ -52,14 +53,14 @@ ecore_x_randr_events_select(Ecore_X_Window win, int on)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!on)
mask = 0;
mask = 0;
else
{
mask = RRScreenChangeNotifyMask;
if (_randr_version >= RANDR_1_2)
mask |= (RRCrtcChangeNotifyMask |
RROutputChangeNotifyMask |
RROutputPropertyNotifyMask);
mask = RRScreenChangeNotifyMask;
if (_randr_version >= RANDR_1_2)
mask |= (RRCrtcChangeNotifyMask |
RROutputChangeNotifyMask |
RROutputPropertyNotifyMask);
}
XRRSelectInput(_ecore_x_disp, win, mask);
@ -75,13 +76,14 @@ ecore_x_randr_screen_rotations_get(Ecore_X_Window root)
{
#ifdef ECORE_XRANDR
Rotation rot, crot;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
rot = XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
root), &crot);
return rot;
#else
return 0;
#endif
#endif
}
EAPI Ecore_X_Randr_Rotation
@ -89,30 +91,33 @@ ecore_x_randr_screen_rotation_get(Ecore_X_Window root)
{
#ifdef ECORE_XRANDR
Rotation crot = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &crot);
return crot;
#else
return 0;
#endif
#endif
}
EAPI void
ecore_x_randr_screen_rotation_set(Ecore_X_Window root, Ecore_X_Randr_Rotation rot)
ecore_x_randr_screen_rotation_set(Ecore_X_Window root,
Ecore_X_Randr_Rotation rot)
{
#ifdef ECORE_XRANDR
XRRScreenConfiguration *xrrcfg;
SizeID sizeid;
Rotation crot;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xrrcfg = XRRGetScreenInfo(_ecore_x_disp, root);
if (!xrrcfg) return;
if (!xrrcfg)
return;
sizeid = XRRConfigCurrentConfiguration(xrrcfg, &crot);
XRRSetScreenConfig(_ecore_x_disp, xrrcfg, root, sizeid, rot, CurrentTime);
XRRFreeScreenConfigInfo(xrrcfg);
#endif
#endif
}
EAPI Ecore_X_Screen_Size *
@ -124,22 +129,28 @@ ecore_x_randr_screen_sizes_get(Ecore_X_Window root, int *num)
int i, n;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (num) *num = 0;
if (num)
*num = 0;
/* we don't have to free sizes, no idea why not */
sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
ret = calloc(n, sizeof(Ecore_X_Screen_Size));
if (!ret) return NULL;
if (!ret)
return NULL;
if (num)
*num = n;
if (num) *num = n;
for (i = 0; i < n; i++)
{
ret[i].width = sizes[i].width;
ret[i].height = sizes[i].height;
ret[i].width = sizes[i].width;
ret[i].height = sizes[i].height;
}
return ret;
#else
if (num) *num = 0;
if (num)
*num = 0;
return NULL;
#endif
}
@ -159,17 +170,19 @@ ecore_x_randr_current_screen_size_get(Ecore_X_Window root)
sc = XRRGetScreenInfo(_ecore_x_disp, root);
if (!sc)
{
ERR("Couldn't get screen information for %d", root);
return ret;
ERR("Couldn't get screen information for %d", root);
return ret;
}
size_index = XRRConfigCurrentConfiguration(sc, &rotation);
sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
if (size_index < n)
{
ret.width = sizes[size_index].width;
ret.height = sizes[size_index].height;
ret.width = sizes[size_index].width;
ret.height = sizes[size_index].height;
}
XRRFreeScreenConfigInfo(sc);
#endif
return ret;
@ -187,24 +200,26 @@ ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
for (i = 0; i < n; i++)
{
if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
{
size_index = i;
break;
}
if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
{
size_index = i;
break;
}
}
if (size_index == -1) return 0;
if (size_index == -1)
return 0;
sc = XRRGetScreenInfo(_ecore_x_disp, root);
if (XRRSetScreenConfig(_ecore_x_disp, sc,
root, size_index,
RR_Rotate_0, CurrentTime))
root, size_index,
RR_Rotate_0, CurrentTime))
{
ERR("Can't set new screen size!");
XRRFreeScreenConfigInfo(sc);
return 0;
ERR("Can't set new screen size!");
XRRFreeScreenConfigInfo(sc);
return 0;
}
XRRFreeScreenConfigInfo(sc);
XRRFreeScreenConfigInfo(sc);
return 1;
#else
return 0;
@ -222,57 +237,68 @@ ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
sc = XRRGetScreenInfo(_ecore_x_disp, root);
if (!sc)
{
ERR("Couldn't get screen information for %d", root);
return ret;
ERR("Couldn't get screen information for %d", root);
return ret;
}
ret.rate = XRRConfigCurrentRate(sc);
XRRFreeScreenConfigInfo(sc);
XRRFreeScreenConfigInfo(sc);
#endif
return ret;
}
EAPI Ecore_X_Screen_Refresh_Rate *
ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root, int size_id, int *num)
ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root,
int size_id,
int *num)
{
#ifdef ECORE_XRANDR
Ecore_X_Screen_Refresh_Rate *ret = NULL;
XRRScreenConfiguration *sc;
XRRScreenConfiguration *sc;
short *rates;
int i, n;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (num) *num = 0;
if (num)
*num = 0;
sc = XRRGetScreenInfo(_ecore_x_disp, root);
if (!sc)
{
ERR("Couldn't get screen information for %d", root);
return ret;
ERR("Couldn't get screen information for %d", root);
return ret;
}
rates = XRRRates(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), size_id, &n);
rates = XRRRates(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
root), size_id, &n);
ret = calloc(n, sizeof(Ecore_X_Screen_Refresh_Rate));
if (!ret)
{
XRRFreeScreenConfigInfo(sc);
return NULL;
if (!ret)
{
XRRFreeScreenConfigInfo(sc);
return NULL;
}
if (num) *num = n;
if (num)
*num = n;
for (i = 0; i < n; i++)
{
ret[i].rate = rates[i];
ret[i].rate = rates[i];
}
XRRFreeScreenConfigInfo(sc);
XRRFreeScreenConfigInfo(sc);
return ret;
#else
if (num) *num = 0;
if (num)
*num = 0;
return NULL;
#endif
}
EAPI int
ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, Ecore_X_Screen_Size size, Ecore_X_Screen_Refresh_Rate rate)
ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root,
Ecore_X_Screen_Size size,
Ecore_X_Screen_Refresh_Rate rate)
{
#ifdef ECORE_XRANDR
XRRScreenConfiguration *sc;
@ -283,24 +309,26 @@ ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, Ecore_X_Screen_Size s
sizes = XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &n);
for (i = 0; i < n; i++)
{
if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
{
size_index = i;
break;
}
if ((sizes[i].width == size.width) && (sizes[i].height == size.height))
{
size_index = i;
break;
}
}
if (size_index == -1) return 0;
if (size_index == -1)
return 0;
sc = XRRGetScreenInfo(_ecore_x_disp, root);
if (XRRSetScreenConfigAndRate(_ecore_x_disp, sc,
root, size_index,
RR_Rotate_0, rate.rate, CurrentTime))
root, size_index,
RR_Rotate_0, rate.rate, CurrentTime))
{
ERR("Can't set new screen size and refresh rate!");
XRRFreeScreenConfigInfo(sc);
return 0;
ERR("Can't set new screen size and refresh rate!");
XRRFreeScreenConfigInfo(sc);
return 0;
}
XRRFreeScreenConfigInfo(sc);
XRRFreeScreenConfigInfo(sc);
return 1;
#else
return 1;

View File

@ -44,7 +44,7 @@ ecore_x_xregion_free(Ecore_X_XRegion *region)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!region)
return;
return;
XDestroyRegion((Region)region);
}
@ -61,28 +61,34 @@ ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!region)
return;
return;
/* return value not used */
XOffsetRegion((Region)region, x, y);
}
EAPI int
ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
Ecore_X_XRegion *r1,
Ecore_X_XRegion *r2)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XIntersectRegion((Region)r1, (Region)r2, (Region)dst);
}
EAPI int
ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
ecore_x_xregion_union(Ecore_X_XRegion *dst,
Ecore_X_XRegion *r1,
Ecore_X_XRegion *r2)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XUnionRegion((Region)r1, (Region)r2, (Region)dst);
}
EAPI int
ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect)
ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
Ecore_X_XRegion *src,
Ecore_X_Rectangle *rect)
{
XRectangle xr;
@ -96,7 +102,9 @@ ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_R
}
EAPI int
ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *rm, Ecore_X_XRegion *rs)
ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
Ecore_X_XRegion *rm,
Ecore_X_XRegion *rs)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XSubtractRegion((Region)rm, (Region)rs, (Region)dst);
@ -106,7 +114,7 @@ EAPI int
ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
{
if (!region)
return 1;
return 1;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return !XEmptyRegion((Region)region);
@ -116,7 +124,7 @@ EAPI int
ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
{
if (!r1 || !r2)
return 0;
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XEqualRegion((Region)r1, (Region)r1);
@ -126,7 +134,7 @@ EAPI int
ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
{
if (!region)
return 0;
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XPointInRegion((Region)region, x, y);
@ -136,8 +144,12 @@ EAPI int
ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
{
if (!region || !rect)
return 0;
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return XRectInRegion((Region)region, rect->x, rect->y, rect->width, rect->height);
return XRectInRegion((Region)region,
rect->x,
rect->y,
rect->width,
rect->height);
}

View File

@ -20,7 +20,9 @@ static int _screensaver_available = -1;
EAPI int
ecore_x_screensaver_event_available_get(void)
{
if (_screensaver_available >= 0) return _screensaver_available;
if (_screensaver_available >= 0)
return _screensaver_available;
#ifdef ECORE_XSS
int _screensaver_major, _screensaver_minor;
@ -28,10 +30,12 @@ ecore_x_screensaver_event_available_get(void)
_screensaver_major = 1;
_screensaver_minor = 0;
if (XScreenSaverQueryVersion(_ecore_x_disp, &_screensaver_major, &_screensaver_minor))
_screensaver_available = 1;
if (XScreenSaverQueryVersion(_ecore_x_disp, &_screensaver_major,
&_screensaver_minor))
_screensaver_available = 1;
else
_screensaver_available = 0;
_screensaver_available = 0;
#else
_screensaver_available = 0;
#endif
@ -47,7 +51,9 @@ ecore_x_screensaver_idle_time_get(void)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
xss = XScreenSaverAllocInfo();
XScreenSaverQueryInfo(_ecore_x_disp, RootWindow(_ecore_x_disp, DefaultScreen(_ecore_x_disp)), xss);
XScreenSaverQueryInfo(_ecore_x_disp,
RootWindow(_ecore_x_disp, DefaultScreen(
_ecore_x_disp)), xss);
idle = xss->idle / 1000;
XFree(xss);
@ -58,10 +64,17 @@ ecore_x_screensaver_idle_time_get(void)
}
EAPI void
ecore_x_screensaver_set(int timeout, int interval, int prefer_blanking, int allow_exposures)
ecore_x_screensaver_set(int timeout,
int interval,
int prefer_blanking,
int allow_exposures)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSetScreenSaver(_ecore_x_disp, timeout, interval, prefer_blanking, allow_exposures);
XSetScreenSaver(_ecore_x_disp,
timeout,
interval,
prefer_blanking,
allow_exposures);
}
EAPI void
@ -153,8 +166,9 @@ ecore_x_screensaver_event_listen_set(int on)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
root = DefaultRootWindow(_ecore_x_disp);
if (on)
XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask);
XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask);
else
XScreenSaverSelectInput(_ecore_x_disp, root, 0);
XScreenSaverSelectInput(_ecore_x_disp, root, 0);
#endif
}

View File

@ -19,14 +19,29 @@ static Ecore_X_Selection_Intern selections[4];
static Ecore_X_Selection_Converter *converters = NULL;
static Ecore_X_Selection_Parser *parsers = NULL;
static int _ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop, int *);
static int _ecore_x_selection_data_default_free(void *data);
static void *_ecore_x_selection_parser_files(const char *target, void *data, int size, int format);
static int _ecore_x_selection_data_files_free(void *data);
static void *_ecore_x_selection_parser_text(const char *target, void *data, int size, int format);
static int _ecore_x_selection_data_text_free(void *data);
static void *_ecore_x_selection_parser_targets(const char *target, void *data, int size, int format);
static int _ecore_x_selection_data_targets_free(void *data);
static int _ecore_x_selection_converter_text(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *tprop,
int *);
static int _ecore_x_selection_data_default_free(void *data);
static void *_ecore_x_selection_parser_files(const char *target,
void *data,
int size,
int format);
static int _ecore_x_selection_data_files_free(void *data);
static void *_ecore_x_selection_parser_text(const char *target,
void *data,
int size,
int format);
static int _ecore_x_selection_data_text_free(void *data);
static void *_ecore_x_selection_parser_targets(const char *target,
void *data,
int size,
int format);
static int _ecore_x_selection_data_targets_free(void *data);
#define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
@ -38,27 +53,27 @@ _ecore_x_selection_data_init(void)
/* Initialize converters */
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
_ecore_x_selection_converter_text);
_ecore_x_selection_converter_text);
#ifdef X_HAVE_UTF8_STRING
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
_ecore_x_selection_converter_text);
_ecore_x_selection_converter_text);
#endif
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_text);
_ecore_x_selection_converter_text);
/* Initialize parsers */
ecore_x_selection_parser_add("text/plain",
_ecore_x_selection_parser_text);
_ecore_x_selection_parser_text);
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING,
_ecore_x_selection_parser_text);
_ecore_x_selection_parser_text);
ecore_x_selection_parser_add("text/uri-list",
_ecore_x_selection_parser_files);
_ecore_x_selection_parser_files);
ecore_x_selection_parser_add("_NETSCAPE_URL",
_ecore_x_selection_parser_files);
_ecore_x_selection_parser_files);
ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
_ecore_x_selection_parser_targets);
_ecore_x_selection_parser_targets);
}
void
@ -71,11 +86,11 @@ _ecore_x_selection_shutdown(void)
cnv = converters;
while (cnv)
{
Ecore_X_Selection_Converter *tmp;
Ecore_X_Selection_Converter *tmp;
tmp = cnv->next;
free(cnv);
cnv = tmp;
tmp = cnv->next;
free(cnv);
cnv = tmp;
}
converters = NULL;
@ -83,12 +98,12 @@ _ecore_x_selection_shutdown(void)
prs = parsers;
while (prs)
{
Ecore_X_Selection_Parser *tmp;
Ecore_X_Selection_Parser *tmp;
tmp = prs;
prs = prs->next;
free(tmp->target);
free(tmp);
tmp = prs;
prs = prs->next;
free(tmp->target);
free(tmp);
}
parsers = NULL;
}
@ -97,56 +112,56 @@ Ecore_X_Selection_Intern *
_ecore_x_selection_get(Ecore_X_Atom selection)
{
if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
return &selections[0];
return &selections[0];
else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
return &selections[1];
return &selections[1];
else if (selection == ECORE_X_ATOM_SELECTION_XDND)
return &selections[2];
return &selections[2];
else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
return &selections[3];
return &selections[3];
else
return NULL;
return NULL;
}
int
_ecore_x_selection_set(Window w, const void *data, int size, Ecore_X_Atom selection)
_ecore_x_selection_set(Window w,
const void *data,
int size,
Ecore_X_Atom selection)
{
int in;
unsigned char *buf = NULL;
XSetSelectionOwner(_ecore_x_disp, selection, w, _ecore_x_event_last_time);
if (XGetSelectionOwner(_ecore_x_disp, selection) != w)
return 0;
return 0;
if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
in = 0;
in = 0;
else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
in = 1;
in = 1;
else if (selection == ECORE_X_ATOM_SELECTION_XDND)
in = 2;
in = 2;
else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
in = 3;
in = 3;
else
return 0;
return 0;
if (data)
{
selections[in].win = w;
selections[in].selection = selection;
selections[in].length = size;
selections[in].time = _ecore_x_event_last_time;
selections[in].win = w;
selections[in].selection = selection;
selections[in].length = size;
selections[in].time = _ecore_x_event_last_time;
buf = malloc(size);
memcpy(buf, data, size);
selections[in].data = buf;
buf = malloc(size);
memcpy(buf, data, size);
selections[in].data = buf;
}
else
else if (selections[in].data)
{
if (selections[in].data)
{
free(selections[in].data);
memset(&selections[in], 0, sizeof(Ecore_X_Selection_Data));
}
free(selections[in].data);
memset(&selections[in], 0, sizeof(Ecore_X_Selection_Data));
}
return 1;
@ -157,7 +172,7 @@ _ecore_x_selection_set(Window w, const void *data, int size, Ecore_X_Atom select
* @param w The window to which this selection belongs
* @param data The data associated with the selection
* @param size The size of the data buffer in bytes
* @return Returns 1 if the ownership of the selection was successfully
* @return Returns 1 if the ownership of the selection was successfully
* claimed, or 0 if unsuccessful.
*/
EAPI int
@ -185,14 +200,17 @@ ecore_x_selection_primary_clear(void)
* @param w The window to which this selection belongs
* @param data The data associated with the selection
* @param size The size of the data buffer in bytes
* @return Returns 1 if the ownership of the selection was successfully
* @return Returns 1 if the ownership of the selection was successfully
* claimed, or 0 if unsuccessful.
*/
EAPI int
ecore_x_selection_secondary_set(Ecore_X_Window w, const void *data, int size)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_SECONDARY);
return _ecore_x_selection_set(w,
data,
size,
ECORE_X_ATOM_SELECTION_SECONDARY);
}
/**
@ -205,7 +223,10 @@ EAPI int
ecore_x_selection_secondary_clear(void)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_SECONDARY);
return _ecore_x_selection_set(None,
NULL,
0,
ECORE_X_ATOM_SELECTION_SECONDARY);
}
/**
@ -213,7 +234,7 @@ ecore_x_selection_secondary_clear(void)
* @param w The window to which this selection belongs
* @param data The data associated with the selection
* @param size The size of the data buffer in bytes
* @return Returns 1 if the ownership of the selection was successfully
* @return Returns 1 if the ownership of the selection was successfully
* claimed, or 0 if unsuccessful.
*/
EAPI int
@ -241,7 +262,7 @@ ecore_x_selection_xdnd_clear(void)
* @param w The window to which this selection belongs
* @param data The data associated with the selection
* @param size The size of the data buffer in bytes
* @return Returns 1 if the ownership of the selection was successfully
* @return Returns 1 if the ownership of the selection was successfully
* claimed, or 0 if unsuccessful.
*
* Get the converted data from a previous CLIPBOARD selection
@ -251,7 +272,10 @@ EAPI int
ecore_x_selection_clipboard_set(Ecore_X_Window w, const void *data, int size)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_CLIPBOARD);
return _ecore_x_selection_set(w,
data,
size,
ECORE_X_ATOM_SELECTION_CLIPBOARD);
}
/**
@ -264,7 +288,10 @@ EAPI int
ecore_x_selection_clipboard_clear(void)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_CLIPBOARD);
return _ecore_x_selection_set(None,
NULL,
0,
ECORE_X_ATOM_SELECTION_CLIPBOARD);
}
Ecore_X_Atom
@ -273,19 +300,17 @@ _ecore_x_selection_target_atom_get(const char *target)
Ecore_X_Atom x_target;
if (!strcmp(target, ECORE_X_SELECTION_TARGET_TEXT))
x_target = ECORE_X_ATOM_TEXT;
x_target = ECORE_X_ATOM_TEXT;
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_COMPOUND_TEXT))
x_target = ECORE_X_ATOM_COMPOUND_TEXT;
x_target = ECORE_X_ATOM_COMPOUND_TEXT;
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
x_target = ECORE_X_ATOM_STRING;
x_target = ECORE_X_ATOM_STRING;
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
x_target = ECORE_X_ATOM_UTF8_STRING;
x_target = ECORE_X_ATOM_UTF8_STRING;
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_FILENAME))
x_target = ECORE_X_ATOM_FILE_NAME;
x_target = ECORE_X_ATOM_FILE_NAME;
else
{
x_target = ecore_x_atom_get(target);
}
x_target = ecore_x_atom_get(target);
return x_target;
}
@ -296,52 +321,54 @@ _ecore_x_selection_target_get(Ecore_X_Atom target)
/* FIXME: Should not return mem allocated with strdup or X mixed,
* one should use free to free, the other XFree */
if (target == ECORE_X_ATOM_FILE_NAME)
return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
else if (target == ECORE_X_ATOM_STRING)
return strdup(ECORE_X_SELECTION_TARGET_STRING);
return strdup(ECORE_X_SELECTION_TARGET_STRING);
else if (target == ECORE_X_ATOM_UTF8_STRING)
return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
else if (target == ECORE_X_ATOM_TEXT)
return strdup(ECORE_X_SELECTION_TARGET_TEXT);
return strdup(ECORE_X_SELECTION_TARGET_TEXT);
else
return XGetAtomName(_ecore_x_disp, target);
return XGetAtomName(_ecore_x_disp, target);
}
static void
_ecore_x_selection_request(Ecore_X_Window w, Ecore_X_Atom selection, const char *target_str)
static void
_ecore_x_selection_request(Ecore_X_Window w,
Ecore_X_Atom selection,
const char *target_str)
{
Ecore_X_Atom target, prop;
target = _ecore_x_selection_target_atom_get(target_str);
if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
prop = ECORE_X_ATOM_SELECTION_PROP_PRIMARY;
prop = ECORE_X_ATOM_SELECTION_PROP_PRIMARY;
else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
prop = ECORE_X_ATOM_SELECTION_PROP_SECONDARY;
prop = ECORE_X_ATOM_SELECTION_PROP_SECONDARY;
else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
prop = ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
prop = ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
else
return;
return;
XConvertSelection(_ecore_x_disp, selection, target, prop,
w, CurrentTime);
w, CurrentTime);
}
EAPI void
EAPI void
ecore_x_selection_primary_request(Ecore_X_Window w, const char *target)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target);
}
EAPI void
EAPI void
ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
_ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target);
}
EAPI void
EAPI void
ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
{
Ecore_X_Atom atom;
@ -351,11 +378,11 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
_target = _ecore_x_dnd_target_get();
atom = _ecore_x_selection_target_atom_get(target);
XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom,
ECORE_X_ATOM_SELECTION_PROP_XDND, w,
_target->time);
ECORE_X_ATOM_SELECTION_PROP_XDND, w,
_target->time);
}
EAPI void
EAPI void
ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -364,7 +391,13 @@ ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target)
EAPI void
ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *tsize))
int (*func)(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *ttype,
int *tsize))
{
Ecore_X_Selection_Converter *cnv;
@ -372,39 +405,47 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
cnv = converters;
if (converters)
{
while (1)
{
if (cnv->target == target)
{
cnv->convert = func;
return;
}
if (cnv->next)
cnv = cnv->next;
else
break;
}
while (1)
{
if (cnv->target == target)
{
cnv->convert = func;
return;
}
cnv->next = calloc(1, sizeof(Ecore_X_Selection_Converter));
cnv = cnv->next;
if (cnv->next)
cnv = cnv->next;
else
break;
}
cnv->next = calloc(1, sizeof(Ecore_X_Selection_Converter));
cnv = cnv->next;
}
else
{
converters = calloc(1, sizeof(Ecore_X_Selection_Converter));
cnv = converters;
converters = calloc(1, sizeof(Ecore_X_Selection_Converter));
cnv = converters;
}
cnv->target = target;
cnv->convert = func;
}
EAPI void
ecore_x_selection_converter_add(char *target,
int (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *, int *))
int (*func)(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *,
int *))
{
Ecore_X_Atom x_target;
if (!func || !target)
return;
return;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
x_target = _ecore_x_selection_target_atom_get(target);
@ -423,18 +464,22 @@ ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
while (cnv)
{
if (cnv->target == target)
{
if (prev_cnv)
prev_cnv->next = cnv->next;
else
converters = cnv->next; /* This was the first converter */
free(cnv);
if (cnv->target == target)
{
if (prev_cnv)
prev_cnv->next = cnv->next;
else
{
converters = cnv->next; /* This was the first converter */
}
return;
}
prev_cnv = cnv;
cnv = cnv->next;
free(cnv);
return;
}
prev_cnv = cnv;
cnv = cnv->next;
}
}
@ -444,7 +489,7 @@ ecore_x_selection_converter_del(char *target)
Ecore_X_Atom x_target;
if (!target)
return;
return;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
x_target = _ecore_x_selection_target_atom_get(target);
@ -452,9 +497,13 @@ ecore_x_selection_converter_del(char *target)
}
EAPI int
ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection, Ecore_X_Atom target, Ecore_X_Atom property, Ecore_X_Time time)
ecore_x_selection_notify_send(Ecore_X_Window requestor,
Ecore_X_Atom selection,
Ecore_X_Atom target,
Ecore_X_Atom property,
Ecore_X_Time time)
{
XEvent xev;
XEvent xev;
XSelectionEvent xnotify;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -474,8 +523,12 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection,
/* Locate and run conversion callback for specified selection target */
EAPI int
ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target,
void **data_ret, int *size, Ecore_X_Atom *targtype, int *typesize)
ecore_x_selection_convert(Ecore_X_Atom selection,
Ecore_X_Atom target,
void **data_ret,
int *size,
Ecore_X_Atom *targtype,
int *typesize)
{
Ecore_X_Selection_Intern *sel;
Ecore_X_Selection_Converter *cnv;
@ -488,124 +541,138 @@ ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target,
for (cnv = converters; cnv; cnv = cnv->next)
{
if (cnv->target == target)
{
int r;
r = cnv->convert(tgt_str, sel->data, sel->length, &data, size,
targtype, typesize);
free(tgt_str);
if (r)
{
*data_ret = data;
return r;
}
else
return 0;
}
if (cnv->target == target)
{
int r;
r = cnv->convert(tgt_str, sel->data, sel->length, &data, size,
targtype, typesize);
free(tgt_str);
if (r)
{
*data_ret = data;
return r;
}
else
return 0;
}
}
/* ICCCM says "If the selection cannot be converted into a form based on the target (and parameters, if any), the owner should refuse the SelectionRequest as previously described." */
return 0;
return 0;
/* Default, just return the data
*data_ret = malloc(sel->length);
memcpy(*data_ret, sel->data, sel->length);
free(tgt_str);
return 1;
*/
/* Default, just return the data
*data_ret = malloc(sel->length);
memcpy(*data_ret, sel->data, sel->length);
free(tgt_str);
return 1;
*/
}
/* TODO: We need to work out a mechanism for automatic conversion to any requested
* locale using Ecore_Txt functions */
/* Converter for standard non-utf8 text targets */
static int
_ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *targprop, int *s)
_ecore_x_selection_converter_text(char *target,
void *data,
int size,
void **data_ret,
int *size_ret,
Ecore_X_Atom *targprop,
int *s)
{
XTextProperty text_prop;
char *mystr;
XICCEncodingStyle style;
if (!data || !size)
return 0;
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!strcmp(target, ECORE_X_SELECTION_TARGET_TEXT))
style = XTextStyle;
style = XTextStyle;
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_COMPOUND_TEXT))
style = XCompoundTextStyle;
style = XCompoundTextStyle;
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
style = XStringStyle;
style = XStringStyle;
#ifdef X_HAVE_UTF8_STRING
else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
style = XUTF8StringStyle;
style = XUTF8StringStyle;
#endif
else
return 0;
return 0;
if (!(mystr = strdup(data)))
return 0;
return 0;
#ifdef X_HAVE_UTF8_STRING
if (Xutf8TextListToTextProperty(_ecore_x_disp, &mystr, 1, style, &text_prop) == Success)
if (Xutf8TextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
&text_prop) == Success)
{
int bufsize = strlen((char *)text_prop.value) + 1;
*data_ret = malloc(bufsize);
memcpy(*data_ret, text_prop.value, bufsize);
*size_ret = bufsize;
XFree(text_prop.value);
free(mystr);
return 1;
int bufsize = strlen((char *)text_prop.value) + 1;
*data_ret = malloc(bufsize);
memcpy(*data_ret, text_prop.value, bufsize);
*size_ret = bufsize;
XFree(text_prop.value);
free(mystr);
return 1;
}
#else
if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style, &text_prop) == Success)
if (XmbTextListToTextProperty(_ecore_x_disp, &mystr, 1, style,
&text_prop) == Success)
{
int bufsize = strlen(text_prop.value) + 1;
*data_ret = malloc(bufsize);
memcpy(*data_ret, text_prop.value, bufsize);
*size_ret = bufsize;
XFree(text_prop.value);
free(mystr);
return 1;
int bufsize = strlen(text_prop.value) + 1;
*data_ret = malloc(bufsize);
memcpy(*data_ret, text_prop.value, bufsize);
*size_ret = bufsize;
XFree(text_prop.value);
free(mystr);
return 1;
}
#endif
else
{
free(mystr);
return 0;
free(mystr);
return 0;
}
}
EAPI void
ecore_x_selection_parser_add(const char *target,
void *(*func)(const char *target, void *data, int size, int format))
void *(*func)(const char *target, void *data,
int size,
int format))
{
Ecore_X_Selection_Parser *prs;
if (!target)
return;
return;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
prs = parsers;
if (parsers)
{
while (prs->next)
{
if (!strcmp(prs->target, target))
{
prs->parse = func;
return;
}
prs = prs->next;
}
while (prs->next)
{
if (!strcmp(prs->target, target))
{
prs->parse = func;
return;
}
prs->next = calloc(1, sizeof(Ecore_X_Selection_Parser));
prs = prs->next;
prs = prs->next;
}
prs->next = calloc(1, sizeof(Ecore_X_Selection_Parser));
prs = prs->next;
}
else
{
parsers = calloc(1, sizeof(Ecore_X_Selection_Parser));
prs = parsers;
parsers = calloc(1, sizeof(Ecore_X_Selection_Parser));
prs = parsers;
}
prs->target = strdup(target);
prs->parse = func;
}
@ -616,7 +683,7 @@ ecore_x_selection_parser_del(const char *target)
Ecore_X_Selection_Parser *prs, *prev_prs;
if (!target)
return;
return;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
prev_prs = NULL;
@ -624,19 +691,23 @@ ecore_x_selection_parser_del(const char *target)
while (prs)
{
if (!strcmp(prs->target, target))
{
if (prev_prs)
prev_prs->next = prs->next;
else
parsers = prs->next; /* This was the first parser */
free(prs->target);
free(prs);
if (!strcmp(prs->target, target))
{
if (prev_prs)
prev_prs->next = prs->next;
else
{
parsers = prs->next; /* This was the first parser */
}
return;
}
prev_prs = prs;
prs = prs->next;
free(prs->target);
free(prs);
return;
}
prev_prs = prs;
prs = prs->next;
}
}
@ -649,11 +720,11 @@ _ecore_x_selection_parse(const char *target, void *data, int size, int format)
for (prs = parsers; prs; prs = prs->next)
{
if (!strcmp(prs->target, target))
{
sel = prs->parse(target, data, size, format);
return sel;
}
if (!strcmp(prs->target, target))
{
sel = prs->parse(target, data, size, format);
return sel;
}
}
/* Default, just return the data */
@ -671,13 +742,16 @@ _ecore_x_selection_data_default_free(void *data)
Ecore_X_Selection_Data *sel;
sel = data;
free(sel->data);
free(sel);
free(sel->data);
free(sel);
return 1;
}
static void *
_ecore_x_selection_parser_files(const char *target, void *_data, int size, int format __UNUSED__)
_ecore_x_selection_parser_files(const char *target,
void *_data,
int size,
int format __UNUSED__)
{
Ecore_X_Selection_Data_Files *sel;
char *data = _data;
@ -686,17 +760,17 @@ _ecore_x_selection_parser_files(const char *target, void *_data, int size, int f
if (strcmp(target, "text/uri-list") &&
strcmp(target, "_NETSCAPE_URL"))
return NULL;
return NULL;
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Files));
ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_files_free;
if (data[size - 1])
{
/* Isn't nul terminated */
size++;
data = realloc(data, size);
data[size - 1] = 0;
/* Isn't nul terminated */
size++;
data = realloc(data, size);
data[size - 1] = 0;
}
tmp = malloc(size);
@ -704,36 +778,34 @@ _ecore_x_selection_parser_files(const char *target, void *_data, int size, int f
is = 0;
while ((is < size) && (data[is]))
{
if ((i == 0) && (data[is] == '#'))
{
for (; ((data[is]) && (data[is] != '\n')); is++);
}
else
{
if ((data[is] != '\r') &&
(data[is] != '\n'))
{
tmp[i++] = data[is++];
}
else
{
while ((data[is] == '\r') || (data[is] == '\n')) is++;
tmp[i] = 0;
sel->num_files++;
sel->files = realloc(sel->files, sel->num_files * sizeof(char *));
sel->files[sel->num_files - 1] = strdup(tmp);
tmp[0] = 0;
i = 0;
}
}
if ((i == 0) && (data[is] == '#'))
for (; ((data[is]) && (data[is] != '\n')); is++) ;
else
{
if ((data[is] != '\r') &&
(data[is] != '\n'))
tmp[i++] = data[is++];
else
{
while ((data[is] == '\r') || (data[is] == '\n')) is++;
tmp[i] = 0;
sel->num_files++;
sel->files =
realloc(sel->files, sel->num_files * sizeof(char *));
sel->files[sel->num_files - 1] = strdup(tmp);
tmp[0] = 0;
i = 0;
}
}
}
if (i > 0)
{
tmp[i] = 0;
sel->num_files++;
sel->files = realloc(sel->files, sel->num_files * sizeof(char *));
sel->files[sel->num_files - 1] = strdup(tmp);
tmp[i] = 0;
sel->num_files++;
sel->files = realloc(sel->files, sel->num_files * sizeof(char *));
sel->files[sel->num_files - 1] = strdup(tmp);
}
free(tmp);
free(data);
@ -752,16 +824,20 @@ _ecore_x_selection_data_files_free(void *data)
sel = data;
if (sel->files)
{
for (i = 0; i < sel->num_files; i++)
free(sel->files[i]);
free(sel->files);
for (i = 0; i < sel->num_files; i++)
free(sel->files[i]);
free(sel->files);
}
free(sel);
free(sel);
return 0;
}
static void *
_ecore_x_selection_parser_text(const char *target __UNUSED__, void *_data, int size, int format __UNUSED__)
_ecore_x_selection_parser_text(const char *target __UNUSED__,
void *_data,
int size,
int format __UNUSED__)
{
Ecore_X_Selection_Data_Text *sel;
char *data = _data;
@ -770,10 +846,10 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__, void *_data, int s
if (data[size - 1])
{
/* Isn't nul terminated */
size++;
data = realloc(data, size);
data[size - 1] = 0;
/* Isn't nul terminated */
size++;
data = realloc(data, size);
data[size - 1] = 0;
}
sel->text = (char *)data;
@ -795,7 +871,10 @@ _ecore_x_selection_data_text_free(void *data)
}
static void *
_ecore_x_selection_parser_targets(const char *target __UNUSED__, void *data, int size, int format __UNUSED__)
_ecore_x_selection_parser_targets(const char *target __UNUSED__,
void *data,
int size,
int format __UNUSED__)
{
Ecore_X_Selection_Data_Targets *sel;
unsigned long *targets;
@ -807,7 +886,7 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__, void *data, int
sel->num_targets = size - 2;
sel->targets = malloc((size - 2) * sizeof(char *));
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;
@ -827,11 +906,12 @@ _ecore_x_selection_data_targets_free(void *data)
if (sel->targets)
{
for (i = 0; i < sel->num_targets; i++)
XFree(sel->targets[i]);
free(sel->targets);
for (i = 0; i < sel->num_targets; i++)
XFree(sel->targets[i]);
free(sel->targets);
}
free(ECORE_X_SELECTION_DATA(sel)->data);
free(sel);
free(ECORE_X_SELECTION_DATA(sel)->data);
free(sel);
return 1;
}

View File

@ -25,24 +25,24 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSyncIntToValue(&init, 0);
XSyncSetCounter(_ecore_x_disp, counter, init);
values.trigger.counter = counter;
values.trigger.value_type = XSyncAbsolute;
XSyncIntToValue(&values.trigger.wait_value, 1);
values.trigger.test_type = XSyncPositiveComparison;
XSyncIntToValue(&values.delta, 1);
XSyncIntToValue(&values.delta, 1);
values.events = True;
alarm = XSyncCreateAlarm(_ecore_x_disp,
XSyncCACounter |
XSyncCAValueType |
XSyncCAValue |
XSyncCATestType |
XSyncCADelta |
XSyncCAEvents,
&values);
XSyncCACounter |
XSyncCAValueType |
XSyncCAValue |
XSyncCATestType |
XSyncCADelta |
XSyncCAEvents,
&values);
ecore_x_sync();
return alarm;
@ -59,14 +59,14 @@ EAPI int
ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val)
{
XSyncValue value;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (XSyncQueryCounter(_ecore_x_disp, counter, &value))
{
*val = (unsigned int) XSyncValueLow32(value);
*val = (unsigned int)XSyncValueLow32(value);
return 1;
}
return 0;
}
@ -75,7 +75,7 @@ ecore_x_sync_counter_new(int val)
{
XSyncCounter counter;
XSyncValue v;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSyncIntToValue(&v, val);
counter = XSyncCreateCounter(_ecore_x_disp, v);
@ -93,7 +93,7 @@ EAPI void
ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
{
XSyncValue v;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSyncIntToValue(&v, by);
XSyncChangeCounter(_ecore_x_disp, counter, v);
@ -107,7 +107,7 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XSyncQueryCounter(_ecore_x_disp, counter, &v);
XSyncIntToValue(&v, val);
XSyncIntToValue(&v, val);
XSyncIntToValue(&v2, val + 1);
cond.trigger.counter = counter;
cond.trigger.value_type = XSyncAbsolute;

View File

@ -21,19 +21,24 @@ EAPI int
ecore_x_test_fake_key_down(const char *key)
{
#ifdef ECORE_XTEST
KeyCode keycode = 0;
KeySym keysym;
KeyCode keycode = 0;
KeySym keysym;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!strncmp(key, "Keycode-", 8))
keycode = atoi(key + 8);
keycode = atoi(key + 8);
else
{
keysym = XStringToKeysym(key);
if (keysym == NoSymbol) return 0;
keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
keysym = XStringToKeysym(key);
if (keysym == NoSymbol)
return 0;
keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
}
if (keycode == 0) return 0;
if (keycode == 0)
return 0;
return XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
#else
return 0;
@ -44,19 +49,24 @@ EAPI int
ecore_x_test_fake_key_up(const char *key)
{
#ifdef ECORE_XTEST
KeyCode keycode = 0;
KeySym keysym;
KeyCode keycode = 0;
KeySym keysym;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!strncmp(key, "Keycode-", 8))
keycode = atoi(key + 8);
keycode = atoi(key + 8);
else
{
keysym = XStringToKeysym(key);
if (keysym == NoSymbol) return 0;
keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
keysym = XStringToKeysym(key);
if (keysym == NoSymbol)
return 0;
keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
}
if (keycode == 0) return 0;
if (keycode == 0)
return 0;
return XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
#else
return 0;
@ -67,57 +77,63 @@ EAPI int
ecore_x_test_fake_key_press(const char *key)
{
#ifdef ECORE_XTEST
KeyCode keycode = 0;
KeySym keysym = 0;
int shift = 0;
KeyCode keycode = 0;
KeySym keysym = 0;
int shift = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!strncmp(key, "Keycode-", 8))
keycode = atoi(key + 8);
keycode = atoi(key + 8);
else
{
keysym = XStringToKeysym(key);
if (keysym == NoSymbol) return 0;
keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
if (XKeycodeToKeysym(_ecore_x_disp, keycode, 0) != keysym)
{
if (XKeycodeToKeysym(_ecore_x_disp, keycode, 1) == keysym)
shift = 1;
else
keycode = 0;
}
else
shift = 0;
keysym = XStringToKeysym(key);
if (keysym == NoSymbol)
return 0;
keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
if (XKeycodeToKeysym(_ecore_x_disp, keycode, 0) != keysym)
{
if (XKeycodeToKeysym(_ecore_x_disp, keycode, 1) == keysym)
shift = 1;
else
keycode = 0;
}
else
shift = 0;
}
if (keycode == 0)
{
static int mod = 0;
KeySym *keysyms;
int keycode_min, keycode_max, keycode_num;
int i;
static int mod = 0;
KeySym *keysyms;
int keycode_min, keycode_max, keycode_num;
int i;
XDisplayKeycodes(_ecore_x_disp, &keycode_min, &keycode_max);
keysyms = XGetKeyboardMapping(_ecore_x_disp, keycode_min,
keycode_max - keycode_min + 1,
&keycode_num);
mod = (mod + 1) & 0x7;
i = (keycode_max - keycode_min - mod - 1) * keycode_num;
keysyms[i] = keysym;
XChangeKeyboardMapping(_ecore_x_disp, keycode_min, keycode_num,
keysyms, (keycode_max - keycode_min));
XFree(keysyms);
XSync(_ecore_x_disp, False);
keycode = keycode_max - mod - 1;
XDisplayKeycodes(_ecore_x_disp, &keycode_min, &keycode_max);
keysyms = XGetKeyboardMapping(_ecore_x_disp, keycode_min,
keycode_max - keycode_min + 1,
&keycode_num);
mod = (mod + 1) & 0x7;
i = (keycode_max - keycode_min - mod - 1) * keycode_num;
keysyms[i] = keysym;
XChangeKeyboardMapping(_ecore_x_disp, keycode_min, keycode_num,
keysyms, (keycode_max - keycode_min));
XFree(keysyms);
XSync(_ecore_x_disp, False);
keycode = keycode_max - mod - 1;
}
if (shift)
XTestFakeKeyEvent(_ecore_x_disp,
XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 1, 0);
XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
XTestFakeKeyEvent(_ecore_x_disp,
XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 1, 0);
XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
if (shift)
XTestFakeKeyEvent(_ecore_x_disp,
XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
XTestFakeKeyEvent(_ecore_x_disp,
XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
return 1;
#else
return 0;

File diff suppressed because it is too large Load Diff

View File

@ -25,18 +25,19 @@
*/
EAPI void
ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
unsigned int *val, unsigned int num)
unsigned int *val, unsigned int num)
{
#if SIZEOF_INT == SIZEOF_LONG
_ATOM_SET_CARD32(win, atom, val, num);
#else
long *v2;
unsigned int i;
long *v2;
unsigned int i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
v2 = malloc(num * sizeof(long));
if (!v2)
return;
for (i = 0; i < num; i++)
v2[i] = val[i];
_ATOM_SET_CARD32(win, atom, v2, num);
@ -54,38 +55,36 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
unsigned int *val, unsigned int len)
unsigned int *val, unsigned int len)
{
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
unsigned int i;
int num;
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
unsigned int i;
int num;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
prop_ret = NULL;
if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
XA_CARDINAL, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
XA_CARDINAL, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
return -1;
if (type_ret != XA_CARDINAL || format_ret != 32)
{
num = -1;
}
num = -1;
else if (num_ret == 0 || !prop_ret)
{
num = 0;
}
num = 0;
else
{
if (num_ret < len)
len = num_ret;
for (i = 0; i < len; i++)
val[i] = ((unsigned long *)prop_ret)[i];
num = len;
if (num_ret < len)
len = num_ret;
for (i = 0; i < len; i++)
val[i] = ((unsigned long *)prop_ret)[i];
num = len;
}
if (prop_ret)
XFree(prop_ret);
@ -101,39 +100,36 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
unsigned int **plst)
unsigned int **plst)
{
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
unsigned int i, *val;
int num;
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
unsigned int i, *val;
int num;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
*plst = NULL;
prop_ret = NULL;
if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
XA_CARDINAL, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
XA_CARDINAL, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
return -1;
if (type_ret != XA_CARDINAL || format_ret != 32)
{
num = -1;
}
num = -1;
else if (num_ret == 0 || !prop_ret)
{
num = 0;
}
num = 0;
else
{
val = malloc(num_ret * sizeof(unsigned int));
for (i = 0; i < num_ret; i++)
val[i] = ((unsigned long *)prop_ret)[i];
num = num_ret;
*plst = val;
val = malloc(num_ret * sizeof(unsigned int));
for (i = 0; i < num_ret; i++)
val[i] = ((unsigned long *)prop_ret)[i];
num = num_ret;
*plst = val;
}
if (prop_ret)
XFree(prop_ret);
@ -145,24 +141,25 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI void
ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom type, Ecore_X_ID * lst,
unsigned int num)
Ecore_X_Atom type, Ecore_X_ID *lst,
unsigned int num)
{
#if SIZEOF_INT == SIZEOF_LONG
XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
(unsigned char *)lst, num);
(unsigned char *)lst, num);
#else
unsigned long *pl;
unsigned int i;
unsigned long *pl;
unsigned int i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
pl = malloc(num * sizeof(long));
if (!pl)
return;
for (i = 0; i < num; i++)
pl[i] = lst[i];
XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
(unsigned char *)pl, num);
(unsigned char *)pl, num);
free(pl);
#endif
}
@ -177,39 +174,37 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom type, Ecore_X_ID * lst,
unsigned int len)
Ecore_X_Atom type, Ecore_X_ID *lst,
unsigned int len)
{
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
int num;
unsigned i;
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
int num;
unsigned i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
prop_ret = NULL;
if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
type, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
type, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
return -1;
if (type_ret != type || format_ret != 32)
{
num = -1;
}
num = -1;
else if (num_ret == 0 || !prop_ret)
{
num = 0;
}
num = 0;
else
{
if (num_ret < len)
len = num_ret;
for (i = 0; i < len; i++)
lst[i] = ((unsigned long *)prop_ret)[i];
num = len;
if (num_ret < len)
len = num_ret;
for (i = 0; i < len; i++)
lst[i] = ((unsigned long *)prop_ret)[i];
num = len;
}
if (prop_ret)
XFree(prop_ret);
@ -226,40 +221,37 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom type, Ecore_X_ID ** val)
Ecore_X_Atom type, Ecore_X_ID **val)
{
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
Ecore_X_Atom *alst;
int num;
unsigned i;
unsigned char *prop_ret;
Atom type_ret;
unsigned long bytes_after, num_ret;
int format_ret;
Ecore_X_Atom *alst;
int num;
unsigned i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
*val = NULL;
prop_ret = NULL;
if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
type, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
type, &type_ret, &format_ret, &num_ret,
&bytes_after, &prop_ret) != Success)
return -1;
if (type_ret != type || format_ret != 32)
{
num = -1;
}
num = -1;
else if (num_ret == 0 || !prop_ret)
{
num = 0;
}
num = 0;
else
{
alst = malloc(num_ret * sizeof(Ecore_X_ID));
for (i = 0; i < num_ret; i++)
alst[i] = ((unsigned long *)prop_ret)[i];
num = num_ret;
*val = alst;
alst = malloc(num_ret * sizeof(Ecore_X_ID));
for (i = 0; i < num_ret; i++)
alst[i] = ((unsigned long *)prop_ret)[i];
num = num_ret;
*val = alst;
}
if (prop_ret)
XFree(prop_ret);
@ -271,47 +263,50 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI void
ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom type, Ecore_X_ID item, int op)
Ecore_X_Atom type, Ecore_X_ID item, int op)
{
Ecore_X_ID *lst;
int i, num;
Ecore_X_ID *lst;
int i, num;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
num = ecore_x_window_prop_xid_list_get(win, atom, type, &lst);
if (num < 0)
return; /* Error - assuming invalid window */
{
return; /* Error - assuming invalid window */
}
/* Is it there? */
for (i = 0; i < num; i++)
{
if (lst[i] == item)
break;
if (lst[i] == item)
break;
}
if (i < num)
{
/* Was in list */
if (op == ECORE_X_PROP_LIST_ADD)
goto done;
/* Remove it */
num--;
for (; i < num; i++)
lst[i] = lst[i + 1];
/* Was in list */
if (op == ECORE_X_PROP_LIST_ADD)
goto done; /* Remove it */
num--;
for (; i < num; i++)
lst[i] = lst[i + 1];
}
else
{
/* Was not in list */
if (op == ECORE_X_PROP_LIST_REMOVE)
goto done;
/* Add it */
num++;
lst = realloc(lst, num * sizeof(Ecore_X_ID));
lst[i] = item;
/* Was not in list */
if (op == ECORE_X_PROP_LIST_REMOVE)
goto done; /* Add it */
num++;
lst = realloc(lst, num * sizeof(Ecore_X_ID));
lst[i] = item;
}
ecore_x_window_prop_xid_set(win, atom, type, lst, num);
done:
done:
if (lst)
free(lst);
}
@ -321,7 +316,7 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI void
ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom * lst, unsigned int num)
Ecore_X_Atom *lst, unsigned int num)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num);
@ -337,7 +332,7 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom * lst, unsigned int len)
Ecore_X_Atom *lst, unsigned int len)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len);
@ -353,7 +348,7 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom ** plst)
Ecore_X_Atom **plst)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst);
@ -364,7 +359,7 @@ ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI void
ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Atom item, int op)
Ecore_X_Atom item, int op)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op);
@ -375,7 +370,7 @@ ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI void
ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Window * lst, unsigned int num)
Ecore_X_Window *lst, unsigned int num)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num);
@ -391,7 +386,7 @@ ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Window * lst, unsigned int len)
Ecore_X_Window *lst, unsigned int len)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len);
@ -407,7 +402,7 @@ ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom,
*/
EAPI int
ecore_x_window_prop_window_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
Ecore_X_Window ** plst)
Ecore_X_Window **plst)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst);
@ -430,26 +425,39 @@ ecore_x_window_prop_any_type(void)
* FIXME: To be fixed.
*/
EAPI void
ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size, void *data, int number)
ecore_x_window_prop_property_set(Ecore_X_Window win,
Ecore_X_Atom property,
Ecore_X_Atom type,
int size,
void *data,
int number)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
if (win == 0)
win = DefaultRootWindow(_ecore_x_disp);
if (size != 32)
XChangeProperty(_ecore_x_disp, win, property, type, size, PropModeReplace,
(unsigned char *)data, number);
XChangeProperty(_ecore_x_disp,
win,
property,
type,
size,
PropModeReplace,
(unsigned char *)data,
number);
else
{
unsigned long *dat;
int i, *ptr;
dat = malloc(sizeof(unsigned long) * number);
if (dat)
{
for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i];
XChangeProperty(_ecore_x_disp, win, property, type, size,
PropModeReplace, (unsigned char *)dat, number);
free(dat);
}
unsigned long *dat;
int i, *ptr;
dat = malloc(sizeof(unsigned long) * number);
if (dat)
{
for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i];
XChangeProperty(_ecore_x_disp, win, property, type, size,
PropModeReplace, (unsigned char *)dat, number);
free(dat);
}
}
}
@ -459,7 +467,12 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecor
* FIXME: To be fixed.
*/
EAPI int
ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size __UNUSED__, unsigned char **data, int *num)
ecore_x_window_prop_property_get(Ecore_X_Window win,
Ecore_X_Atom property,
Ecore_X_Atom type,
int size __UNUSED__,
unsigned char **data,
int *num)
{
Atom type_ret = 0;
int ret, size_ret = 0;
@ -467,51 +480,59 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecor
unsigned char *prop_ret = NULL;
/* make sure these are initialized */
if (num) *num = 0;
if (num)
*num = 0;
if (data)
*data = NULL;
*data = NULL;
else /* we can't store the retrieved data, so just return */
return 0;
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!win) win = DefaultRootWindow(_ecore_x_disp);
if (!win)
win = DefaultRootWindow(_ecore_x_disp);
ret = XGetWindowProperty(_ecore_x_disp, win, property, 0, LONG_MAX,
False, type, &type_ret, &size_ret,
&num_ret, &bytes, &prop_ret);
if (ret != Success)
return 0;
return 0;
if (!num_ret)
{
XFree(prop_ret);
return 0;
}
if (!(*data = malloc(num_ret * size_ret / 8)))
{
XFree(prop_ret);
return 0;
}
if (!num_ret) {
XFree(prop_ret);
return 0;
}
if (!(*data = malloc(num_ret * size_ret / 8))) {
XFree(prop_ret);
return 0;
}
switch (size_ret) {
case 8:
for (i = 0; i < num_ret; i++)
(*data)[i] = prop_ret[i];
break;
for (i = 0; i < num_ret; i++)
(*data)[i] = prop_ret[i];
break;
case 16:
for (i = 0; i < num_ret; i++)
((unsigned short *) *data)[i] = ((unsigned short *) prop_ret)[i];
break;
for (i = 0; i < num_ret; i++)
((unsigned short *)*data)[i] = ((unsigned short *)prop_ret)[i];
break;
case 32:
for (i = 0; i < num_ret; i++)
((unsigned int *) *data)[i] = ((unsigned long *) prop_ret)[i];
break;
}
for (i = 0; i < num_ret; i++)
((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i];
break;
}
XFree(prop_ret);
XFree(prop_ret);
if (num)
*num = num_ret;
if (num) *num = num_ret;
return size_ret;
}
@ -528,19 +549,23 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
Ecore_X_Atom *atoms;
Atom *atom_ret;
int num = 0, i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (num_ret) *num_ret = 0;
if (num_ret)
*num_ret = 0;
atom_ret = XListProperties(_ecore_x_disp, win, &num);
if (!atom_ret) return NULL;
if (!atom_ret)
return NULL;
atoms = malloc(num * sizeof(Ecore_X_Atom));
if (atoms)
{
for (i = 0; i < num; i++) atoms[i] = atom_ret[i];
if (num_ret) *num_ret = num;
for (i = 0; i < num; i++) atoms[i] = atom_ret[i];
if (num_ret)
*num_ret = num;
}
XFree(atom_ret);
return atoms;
}
@ -550,16 +575,20 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
* @param win The window
* @param type The property
* @param str The string
*
*
* Set a window string property
*/
EAPI void
ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char *str)
ecore_x_window_prop_string_set(Ecore_X_Window win,
Ecore_X_Atom type,
const char *str)
{
XTextProperty xtp;
XTextProperty xtp;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
if (win == 0)
win = DefaultRootWindow(_ecore_x_disp);
xtp.value = (unsigned char *)str;
xtp.format = 8;
xtp.encoding = ECORE_X_ATOM_UTF8_STRING;
@ -571,50 +600,49 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char
* Get a window string property.
* @param win The window
* @param type The property
*
*
* Return window string property of a window. String must be free'd when done.
*/
EAPI char *
ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
{
XTextProperty xtp;
char *str = NULL;
XTextProperty xtp;
char *str = NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (win == 0) win = DefaultRootWindow(_ecore_x_disp);
if (win == 0)
win = DefaultRootWindow(_ecore_x_disp);
if (XGetTextProperty(_ecore_x_disp, win, &xtp, type))
{
int items;
char **list = NULL;
Status s;
if (xtp.encoding == ECORE_X_ATOM_UTF8_STRING)
{
str = strdup((char *)xtp.value);
}
else
{
int items;
char **list = NULL;
Status s;
if (xtp.encoding == ECORE_X_ATOM_UTF8_STRING)
str = strdup((char *)xtp.value);
else
{
#ifdef X_HAVE_UTF8_STRING
s = Xutf8TextPropertyToTextList(_ecore_x_disp, &xtp,
&list, &items);
s = Xutf8TextPropertyToTextList(_ecore_x_disp, &xtp,
&list, &items);
#else
s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp,
&list, &items);
s = XmbTextPropertyToTextList(_ecore_x_disp, &xtp,
&list, &items);
#endif
if ((s == XLocaleNotSupported) ||
(s == XNoMemory) || (s == XConverterNotFound))
{
str = strdup((char *)xtp.value);
}
else if ((s >= Success) && (items > 0))
{
str = strdup(list[0]);
}
if (list)
XFreeStringList(list);
}
XFree(xtp.value);
if ((s == XLocaleNotSupported) ||
(s == XNoMemory) || (s == XConverterNotFound))
str = strdup((char *)xtp.value);
else if ((s >= Success) && (items > 0))
str = strdup(list[0]);
if (list)
XFreeStringList(list);
}
XFree(xtp.value);
}
return str;
}
@ -627,20 +655,20 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
/* check for invalid values */
if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
return 0;
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
proto = _ecore_x_atoms_wm_protocols[protocol];
if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
return ret;
return ret;
for (i = 0; i < protos_count; i++)
if (protos[i] == proto)
{
ret = 1;
break;
}
if (protos[i] == proto)
{
ret = 1;
break;
}
XFree(protos);
@ -658,30 +686,33 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
Atom *protos = NULL;
int i, protos_count = 0;
Ecore_X_WM_Protocol *prot_ret = NULL;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
return NULL;
return NULL;
if ((!protos) || (protos_count <= 0))
return NULL;
if ((!protos) || (protos_count <= 0)) return NULL;
prot_ret = calloc(1, protos_count * sizeof(Ecore_X_WM_Protocol));
if (!prot_ret)
{
XFree(protos);
return NULL;
XFree(protos);
return NULL;
}
for (i = 0; i < protos_count; i++)
{
Ecore_X_WM_Protocol j;
prot_ret[i] = -1;
for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++)
{
if (_ecore_x_atoms_wm_protocols[j] == protos[i])
prot_ret[i] = j;
}
Ecore_X_WM_Protocol j;
prot_ret[i] = -1;
for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++)
{
if (_ecore_x_atoms_wm_protocols[j] == protos[i])
prot_ret[i] = j;
}
}
XFree(protos);
XFree(protos);
*num_ret = protos_count;
return prot_ret;
}

View File

@ -37,121 +37,211 @@ EAPI void
ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, 0, 0, shape_win, ShapeBounding, ShapeSet);
XShapeCombineShape(_ecore_x_disp,
win,
ShapeBounding,
0,
0,
shape_win,
ShapeBounding,
ShapeSet);
}
EAPI void
ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y)
ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
Ecore_X_Window shape_win,
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, x, y, shape_win, ShapeBounding, ShapeSet);
XShapeCombineShape(_ecore_x_disp,
win,
ShapeBounding,
x,
y,
shape_win,
ShapeBounding,
ShapeSet);
}
EAPI void
ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h)
ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
int x,
int y,
int w,
int h)
{
XRectangle rect;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
rect.x = x;
rect.y = y;
rect.width = w;
rect.height = h;
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeSet, Unsorted);
XShapeCombineRectangles(_ecore_x_disp,
win,
ShapeBounding,
0,
0,
&rect,
1,
ShapeSet,
Unsorted);
}
EAPI void
ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
Ecore_X_Rectangle *rects,
int num)
{
XRectangle *rect = NULL;
int i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (num > 0)
{
rect = malloc(sizeof(XRectangle) * num);
if (rect)
{
for (i = 0; i < num; i++)
{
rect[i].x = rects[i].x;
rect[i].y = rects[i].y;
rect[i].width = rects[i].width;
rect[i].height = rects[i].height;
}
}
else
num = 0;
rect = malloc(sizeof(XRectangle) * num);
if (rect)
for (i = 0; i < num; i++)
{
rect[i].x = rects[i].x;
rect[i].y = rects[i].y;
rect[i].width = rects[i].width;
rect[i].height = rects[i].height;
}
else
num = 0;
}
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeSet, Unsorted);
if (rect) free(rect);
XShapeCombineRectangles(_ecore_x_disp,
win,
ShapeBounding,
0,
0,
rect,
num,
ShapeSet,
Unsorted);
if (rect)
free(rect);
}
EAPI void
ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, 0, 0, shape_win, ShapeBounding, ShapeUnion);
XShapeCombineShape(_ecore_x_disp,
win,
ShapeBounding,
0,
0,
shape_win,
ShapeBounding,
ShapeUnion);
}
EAPI void
ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y)
ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
Ecore_X_Window shape_win,
int x,
int y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
XShapeCombineShape(_ecore_x_disp, win, ShapeBounding, x, y, shape_win, ShapeBounding, ShapeUnion);
XShapeCombineShape(_ecore_x_disp,
win,
ShapeBounding,
x,
y,
shape_win,
ShapeBounding,
ShapeUnion);
}
EAPI void
ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h)
ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
int x,
int y,
int w,
int h)
{
XRectangle rect;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
rect.x = x;
rect.y = y;
rect.width = w;
rect.height = h;
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeUnion, Unsorted);
XShapeCombineRectangles(_ecore_x_disp,
win,
ShapeBounding,
0,
0,
&rect,
1,
ShapeUnion,
Unsorted);
}
EAPI void
ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h)
ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
int x,
int y,
int w,
int h)
{
XRectangle rect;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
rect.x = x;
rect.y = y;
rect.width = w;
rect.height = h;
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeIntersect, Unsorted);
XShapeCombineRectangles(_ecore_x_disp,
win,
ShapeBounding,
0,
0,
&rect,
1,
ShapeIntersect,
Unsorted);
}
EAPI void
ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
Ecore_X_Rectangle *rects,
int num)
{
XRectangle *rect = NULL;
int i;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (num > 0)
{
rect = malloc(sizeof(XRectangle) * num);
if (rect)
{
for (i = 0; i < num; i++)
{
rect[i].x = rects[i].x;
rect[i].y = rects[i].y;
rect[i].width = rects[i].width;
rect[i].height = rects[i].height;
}
}
else
num = 0;
rect = malloc(sizeof(XRectangle) * num);
if (rect)
for (i = 0; i < num; i++)
{
rect[i].x = rects[i].x;
rect[i].y = rects[i].y;
rect[i].width = rects[i].width;
rect[i].height = rects[i].height;
}
else
num = 0;
}
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeUnion, Unsorted);
if (rect) free(rect);
XShapeCombineRectangles(_ecore_x_disp,
win,
ShapeBounding,
0,
0,
rect,
num,
ShapeUnion,
Unsorted);
if (rect)
free(rect);
}
EAPI Ecore_X_Rectangle *
@ -160,25 +250,27 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
XRectangle *rect;
Ecore_X_Rectangle *rects = NULL;
int i, num = 0, ord;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
rect = XShapeGetRectangles(_ecore_x_disp, win, ShapeBounding, &num, &ord);
if (rect)
{
rects = malloc(sizeof(Ecore_X_Rectangle) * num);
if (rects)
{
for (i = 0; i < num; i++)
{
rects[i].x = rect[i].x;
rects[i].y = rect[i].y;
rects[i].width = rect[i].width;
rects[i].height = rect[i].height;
}
}
XFree(rect);
rects = malloc(sizeof(Ecore_X_Rectangle) * num);
if (rects)
for (i = 0; i < num; i++)
{
rects[i].x = rect[i].x;
rects[i].y = rect[i].y;
rects[i].width = rect[i].width;
rects[i].height = rect[i].height;
}
XFree(rect);
}
if (num_ret) *num_ret = num;
if (num_ret)
*num_ret = num;
return rects;
}
@ -187,9 +279,9 @@ ecore_x_window_shape_events_select(Ecore_X_Window win, int on)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (on)
XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
else
XShapeSelectInput(_ecore_x_disp, win, 0);
XShapeSelectInput(_ecore_x_disp, win, 0);
}
/**
@ -204,8 +296,8 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
#ifdef ShapeInput
XShapeCombineMask(_ecore_x_disp, win, ShapeInput, 0, 0, mask, ShapeSet);
#else
XShapeCombineMask(_ecore_x_disp, win, ShapeInput, 0, 0, mask, ShapeSet);
#else
XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet);
#endif
}

View File

@ -29,22 +29,23 @@ _ecore_x_input_init(void)
#ifdef ECORE_XI2
int event, error;
int major = 2, minor = 0;
if (!XQueryExtension(_ecore_x_disp, "XInputExtension",
if (!XQueryExtension(_ecore_x_disp, "XInputExtension",
&_ecore_x_xi2_opcode, &event, &error))
{
_ecore_x_xi2_opcode = -1;
return;
}
if (XIQueryVersion(_ecore_x_disp, &major, &minor) == BadRequest)
{
_ecore_x_xi2_opcode = -1;
return;
}
_ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices,
_ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices,
&_ecore_x_xi2_num);
#endif
#endif
}
void
@ -56,75 +57,78 @@ _ecore_x_input_shutdown(void)
XIFreeDeviceInfo(_ecore_x_xi2_devs);
_ecore_x_xi2_devs = NULL;
}
_ecore_x_xi2_num = 0;
_ecore_x_xi2_opcode = -1;
#endif
#endif
}
void
_ecore_x_input_handler(XEvent* xevent)
_ecore_x_input_handler(XEvent *xevent)
{
#ifdef ECORE_XI2
XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
int devid = evd->deviceid;
//printf("deviceID = %d\n", devid);
switch (xevent->xcookie.evtype)
{
case XI_Motion:
_ecore_mouse_move
(evd->time,
0, // state
evd->event_x, evd->event_y,
evd->root_x, evd->root_y,
evd->event,
(evd->child ? evd->child : evd->event),
evd->root,
1, // same_screen
devid, 1, 1,
1.0, // pressure
0.0, // angle
evd->event_x, evd->event_y,
evd->root_x, evd->root_y);
break;
case XI_ButtonPress:
_ecore_mouse_button
(ECORE_EVENT_MOUSE_BUTTON_DOWN,
evd->time,
0, // state
0, // button
evd->event_x, evd->event_y,
evd->root_x, evd->root_y,
evd->event,
(evd->child ? evd->child : evd->event),
evd->root,
1, // same_screen
devid, 1, 1,
1.0, // pressure
0.0, // angle
evd->event_x, evd->event_y,
evd->root_x, evd->root_y);
break;
case XI_ButtonRelease:
_ecore_mouse_button
(ECORE_EVENT_MOUSE_BUTTON_UP,
evd->time,
0, // state
0, // button
evd->event_x, evd->event_y,
evd->root_x, evd->root_y,
evd->event,
(evd->child ? evd->child : evd->event),
evd->root,
1, // same_screen
devid, 1, 1,
1.0, // pressure
0.0, // angle
evd->event_x, evd->event_y,
evd->root_x, evd->root_y);
break;
case XI_Motion:
_ecore_mouse_move
(evd->time,
0, // state
evd->event_x, evd->event_y,
evd->root_x, evd->root_y,
evd->event,
(evd->child ? evd->child : evd->event),
evd->root,
1, // same_screen
devid, 1, 1,
1.0, // pressure
0.0, // angle
evd->event_x, evd->event_y,
evd->root_x, evd->root_y);
break;
case XI_ButtonPress:
_ecore_mouse_button
(ECORE_EVENT_MOUSE_BUTTON_DOWN,
evd->time,
0, // state
0, // button
evd->event_x, evd->event_y,
evd->root_x, evd->root_y,
evd->event,
(evd->child ? evd->child : evd->event),
evd->root,
1, // same_screen
devid, 1, 1,
1.0, // pressure
0.0, // angle
evd->event_x, evd->event_y,
evd->root_x, evd->root_y);
break;
case XI_ButtonRelease:
_ecore_mouse_button
(ECORE_EVENT_MOUSE_BUTTON_UP,
evd->time,
0, // state
0, // button
evd->event_x, evd->event_y,
evd->root_x, evd->root_y,
evd->event,
(evd->child ? evd->child : evd->event),
evd->root,
1, // same_screen
devid, 1, 1,
1.0, // pressure
0.0, // angle
evd->event_x, evd->event_y,
evd->root_x, evd->root_y);
break;
}
#endif
#endif
}
EAPI Eina_Bool
@ -133,7 +137,8 @@ ecore_x_input_multi_select(Ecore_X_Window win)
#ifdef ECORE_XI2
int i, find = 0;
if (!_ecore_x_xi2_devs) return 0;
if (!_ecore_x_xi2_devs)
return 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
for (i = 0; i < _ecore_x_xi2_num; i++)

View File

@ -26,14 +26,18 @@ ecore_x_xinerama_screen_count_get(void)
#ifdef ECORE_XINERAMA
int event_base, error_base;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (_xin_info) XFree(_xin_info);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (_xin_info)
XFree(_xin_info);
_xin_info = NULL;
if (XineramaQueryExtension(_ecore_x_disp, &event_base, &error_base))
{
_xin_info = XineramaQueryScreens(_ecore_x_disp, &_xin_scr_num);
if (_xin_info) return _xin_scr_num;
_xin_info = XineramaQueryScreens(_ecore_x_disp, &_xin_scr_num);
if (_xin_info)
return _xin_scr_num;
}
#endif
return 0;
}
@ -45,24 +49,41 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
#ifdef ECORE_XINERAMA
if (_xin_info)
{
int i;
for (i = 0; i < _xin_scr_num; i++)
{
if (_xin_info[i].screen_number == screen)
{
if (x) *x = _xin_info[i].x_org;
if (y) *y = _xin_info[i].y_org;
if (w) *w = _xin_info[i].width;
if (h) *h = _xin_info[i].height;
return 1;
}
}
int i;
for (i = 0; i < _xin_scr_num; i++)
{
if (_xin_info[i].screen_number == screen)
{
if (x)
*x = _xin_info[i].x_org;
if (y)
*y = _xin_info[i].y_org;
if (w)
*w = _xin_info[i].width;
if (h)
*h = _xin_info[i].height;
return 1;
}
}
}
#endif
if (x) *x = 0;
if (y) *y = 0;
if (w) *w = DisplayWidth(_ecore_x_disp, 0);
if (h) *h = DisplayHeight(_ecore_x_disp, 0);
if (x)
*x = 0;
if (y)
*y = 0;
if (w)
*w = DisplayWidth(_ecore_x_disp, 0);
if (h)
*h = DisplayHeight(_ecore_x_disp, 0);
return 0;
}