diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-02-29 18:00:23 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2008-02-29 18:01:37 -0500 |
commit | 34bf308a9e66f1a2f48630a15b1802afad50ec24 (patch) | |
tree | a7f0fe69faba1a930018794ff73a381e72e3938b /include/selection.h | |
parent | d5715f7beaad6816db27b01b67d7a3c69164d106 (diff) |
dix: Refactoring of selection code to allow for polyinstantiation.
Introduces dixLookupSelection() API.
Removes NumCurrentSelections from API.
Diffstat (limited to 'include/selection.h')
-rw-r--r-- | include/selection.h | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/include/selection.h b/include/selection.h index 859b6a3b5..dd9b056fe 100644 --- a/include/selection.h +++ b/include/selection.h @@ -1,7 +1,3 @@ - -#ifndef SELECTION_H -#define SELECTION_H 1 - /*********************************************************** Copyright 1987, 1998 The Open Group @@ -49,10 +45,13 @@ SOFTWARE. ******************************************************************/ +#ifndef SELECTION_H +#define SELECTION_H 1 + #include "dixstruct.h" #include "privates.h" + /* - * * Selection data structures */ @@ -62,11 +61,45 @@ typedef struct _Selection { Window window; WindowPtr pWin; ClientPtr client; - ClientPtr alt_client; /* support for redirection */ - Window alt_window; /* support for redirection */ + struct _Selection *next; PrivateRec *devPrivates; } Selection; + +/* + * Selection API + */ + +int dixLookupSelection(Selection **result, Atom name, + ClientPtr client, Mask access_mode); + +extern Selection *CurrentSelections; + +extern CallbackListPtr SelectionCallback; + +typedef enum { + SelectionSetOwner, + SelectionWindowDestroy, + SelectionClientClose +} SelectionCallbackKind; + +typedef struct { + struct _Selection *selection; + ClientPtr client; + SelectionCallbackKind kind; +} SelectionInfoRec; + + +/* + * Selection server internals + */ + +void InitSelections(void); + +void DeleteWindowFromAnySelections(WindowPtr pWin); + +void DeleteClientFromAnySelections(ClientPtr client); + #endif /* SELECTION_H */ |