summaryrefslogtreecommitdiff
path: root/include/selection.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/selection.h')
-rw-r--r--include/selection.h47
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 */