mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
dix: Refactoring of selection code to allow for polyinstantiation.
Introduces dixLookupSelection() API. Removes NumCurrentSelections from API.
This commit is contained in:
parent
d5715f7bea
commit
34bf308a9e
8 changed files with 352 additions and 311 deletions
|
|
@ -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 */
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue