Add new, combined dix lookup functions.

This commit is contained in:
Eamon Walsh
2006-12-14 14:46:03 -05:00
committed by Eamon Walsh
parent 6c46645cfc
commit 60cdc592fe
4 changed files with 148 additions and 127 deletions

View File

@@ -375,47 +375,40 @@ extern int CompareISOLatin1Lowered(
unsigned char * /*b*/,
int blen);
#ifdef XACE
extern int dixLookupWindow(
WindowPtr *result,
XID id,
ClientPtr client,
Mask access_mode);
extern WindowPtr SecurityLookupWindow(
XID /*rid*/,
ClientPtr /*client*/,
Mask /*access_mode*/);
extern int dixLookupDrawable(
DrawablePtr *result,
XID id,
ClientPtr client,
Mask type_mask,
Mask access_mode);
extern pointer SecurityLookupDrawable(
XID /*rid*/,
ClientPtr /*client*/,
Mask /*access_mode*/);
extern int dixLookupGC(
GCPtr *result,
XID id,
ClientPtr client,
Mask access_mode);
extern WindowPtr LookupWindow(
XID /*rid*/,
ClientPtr /*client*/);
extern int dixLookupClient(
ClientPtr *result,
XID id,
ClientPtr client);
extern pointer LookupDrawable(
XID /*rid*/,
ClientPtr /*client*/);
#else
extern WindowPtr LookupWindow(
XID /*rid*/,
ClientPtr /*client*/);
extern pointer LookupDrawable(
XID /*rid*/,
ClientPtr /*client*/);
#define SecurityLookupWindow(rid, client, access_mode) \
LookupWindow(rid, client)
#define SecurityLookupDrawable(rid, client, access_mode) \
LookupDrawable(rid, client)
#endif /* XACE */
extern ClientPtr LookupClient(
XID /*rid*/,
ClientPtr /*client*/);
/*
* These are deprecated compatibility functions and will be removed soon!
* Please use the new dixLookup*() functions above.
*/
extern WindowPtr SecurityLookupWindow(XID, ClientPtr, Mask);
extern WindowPtr LookupWindow(XID, ClientPtr);
extern pointer SecurityLookupDrawable(XID, ClientPtr, Mask);
extern pointer LookupDrawable(XID, ClientPtr);
extern ClientPtr LookupClient(XID, ClientPtr);
/* end deprecated functions */
extern void NoopDDA(void);

View File

@@ -58,6 +58,16 @@ SOFTWARE.
#define UNDRAWABLE_WINDOW 2
#define DRAWABLE_BUFFER 3
/* corresponding type masks for dixLookupDrawable() */
#define M_DRAWABLE_WINDOW (1<<0)
#define M_DRAWABLE_PIXMAP (1<<1)
#define M_UNDRAWABLE_WINDOW (1<<2)
#define M_DRAWABLE_BUFFER (1<<3)
#define M_ANY (-1)
#define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
#define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP|M_DRAWABLE_BUFFER)
#define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW)
/* flags to PaintWindow() */
#define PW_BACKGROUND 0
#define PW_BORDER 1