From 73b30883a6046a316969c13751238180933876e9 Mon Sep 17 00:00:00 2001 From: iovar Date: Thu, 15 Nov 2007 11:20:50 +0000 Subject: rmdfunc.h: added RegisterShortcuts declaration, changed PollDamage to PollEvents. rmdmacro.h: Added default values for shortcuts. rmdtypes.h: added HotKey struct type and all members related to shortcuts, on the pdata and args structs. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@434 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/include/rmdfunc.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'recordmydesktop/include/rmdfunc.h') diff --git a/recordmydesktop/include/rmdfunc.h b/recordmydesktop/include/rmdfunc.h index 0a01301..de12ef1 100644 --- a/recordmydesktop/include/rmdfunc.h +++ b/recordmydesktop/include/rmdfunc.h @@ -37,10 +37,11 @@ /** * Loop calling XNextEvent.Retrieve and place on -* list damage events that arive, create damage for new windows. +* list damage events that arive, create damage for new windows +* and pickup key events for shortcuts. * \param pdata ProgData struct containing all program data */ -void *PollDamage(ProgData *pdata); +void *PollEvents(ProgData *pdata); /** * Retrieve frame form xserver, and transform to a yuv buffer, @@ -686,6 +687,28 @@ void BlocksFromList(RectArea **root, void CleanUp(void); +/* + * Check a shortcut combination and if valid, + * register it, on the root window. + * + * \param dpy Connection to the X Server + * + * \param root Root window id + * + * \param shortcut String represantation of the shortcut + * + * \param HotKey Pre-allocated struct that is filled with the + * modifiers and the keycode, for checks on incoming + * keypress events. Left untouched if the call fails. + * + * + * \returns 0 on Success, 1 on Failure. + * + */ +int RegisterShortcut(Display *dpy, + Window root, + const char *shortcut, + HotKey *hotkey); #endif -- cgit v1.2.3