00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 00003 /* Asynchronous X property getting hack */ 00004 00005 /* 00006 * Copyright (C) 2002 Havoc Pennington 00007 * 00008 * Permission to use, copy, modify, distribute, and sell this software 00009 * and its documentation for any purpose is hereby granted without 00010 * fee, provided that the above copyright notice appear in all copies 00011 * and that both that copyright notice and this permission notice 00012 * appear in supporting documentation. 00013 * 00014 * The above copyright notice and this permission notice shall be 00015 * included in all copies or substantial portions of the Software. 00016 * 00017 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00018 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00019 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00020 * NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR 00021 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 00022 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00023 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00024 * 00025 * Except as contained in this notice, the name of The Open Group shall not be 00026 * used in advertising or otherwise to promote the sale, use or other dealings 00027 * in this Software without prior written authorization from The Open Group. 00028 */ 00029 00030 #ifndef ASYNC_GETPROP_H 00031 #define ASYNC_GETPROP_H 00032 00033 #include <X11/Xlib.h> 00034 #include <X11/Xutil.h> 00035 00036 typedef struct _AgGetPropertyTask AgGetPropertyTask; 00037 00038 AgGetPropertyTask* ag_task_create (Display *display, 00039 Window window, 00040 Atom property, 00041 long offset, 00042 long length, 00043 Bool delete, 00044 Atom req_type); 00045 Status ag_task_get_reply_and_free (AgGetPropertyTask *task, 00046 Atom *actual_type, 00047 int *actual_format, 00048 unsigned long *nitems, 00049 unsigned long *bytesafter, 00050 char **prop); 00051 00052 Bool ag_task_have_reply (AgGetPropertyTask *task); 00053 Atom ag_task_get_property (AgGetPropertyTask *task); 00054 Window ag_task_get_window (AgGetPropertyTask *task); 00055 Display* ag_task_get_display (AgGetPropertyTask *task); 00056 00057 AgGetPropertyTask* ag_get_next_completed_task (Display *display); 00058 00059 /* so other headers don't have to include internal Xlib goo */ 00060 void* ag_Xmalloc (unsigned long bytes); 00061 void* ag_Xmalloc0 (unsigned long bytes); 00062 00063 #endif 00064 00065 00066 00067
1.5.5