diff options
author | Havoc Pennington <hp@pobox.com> | 2002-10-06 09:04:39 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-10-06 09:04:39 +0000 |
commit | a1bb0e00154f745ec557525623e956f2c6d7854b (patch) | |
tree | 7591bc299f877ee8c7958f60becde1e7b3ace22e /src/async-getprop.h | |
parent | b8e5a4d707a632ce1a9d9ee78ba85a752ca60670 (diff) | |
download | metacity-a1bb0e00154f745ec557525623e956f2c6d7854b.tar.gz |
Add wacky hack suggested by Keith Packard to get X properties
2002-10-06 Havoc Pennington <hp@pobox.com>
* src/async-getprop.c: Add wacky hack suggested by Keith Packard
to get X properties asynchronously. Not actually used by metacity
yet, but thinking about it.
Diffstat (limited to 'src/async-getprop.h')
-rw-r--r-- | src/async-getprop.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/async-getprop.h b/src/async-getprop.h new file mode 100644 index 00000000..9ff3df1e --- /dev/null +++ b/src/async-getprop.h @@ -0,0 +1,61 @@ +/* Asynchronous X property getting hack */ + +/* + * Copyright (C) 2002 Havoc Pennington + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation. + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of The Open Group shall not be + * used in advertising or otherwise to promote the sale, use or other dealings + * in this Software without prior written authorization from The Open Group. + */ + +#ifndef ASYNC_GETPROP_H +#define ASYNC_GETPROP_H + +#include <X11/Xlib.h> +#include <X11/Xutil.h> + +typedef struct _AgGetPropertyTask AgGetPropertyTask; + +AgGetPropertyTask* ag_task_create (Display *display, + Window window, + Atom property, + long offset, + long length, + Bool delete, + Atom req_type); +Status ag_task_get_reply_and_free (AgGetPropertyTask *task, + Atom *actual_type, + int *actual_format, + unsigned long *nitems, + unsigned long *bytesafter, + unsigned char **prop); + +Bool ag_task_have_reply (AgGetPropertyTask *task); +Atom ag_task_get_property (AgGetPropertyTask *task); +Window ag_task_get_window (AgGetPropertyTask *task); +Display* ag_task_get_display (AgGetPropertyTask *task); + +AgGetPropertyTask* ag_get_next_completed_task (Display *display); + +#endif + + + + |