dixstruct.h revision a5e7ae69e440f6816420fc99599f044e79e716b6
/***********************************************************
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef DIXSTRUCT_H
#define DIXSTRUCT_H
#include "client.h"
#include "dix.h"
#include "resource.h"
#include "cursor.h"
#include "gc.h"
#include "pixmap.h"
#include "privates.h"
/*
* direct-mapped hash table, used by resource manager to store
* translation from client ids to server addresses.
*/
typedef struct {
int /* size */ ,
void * /* pbuf */ );
extern _X_EXPORT void
int /* size */ ,
void * /* pbuf */ ) _X_NORETURN;
typedef enum { ClientStateInitial,
} ClientState;
typedef struct _saveSet {
} SaveSetElt;
typedef struct _Client {
void *requestBuffer;
void *osPrivate; /* for OS layer, including scheduler */
short index;
unsigned int swapped:1;
unsigned int local:1;
unsigned int clientGone:1;
unsigned int closeDownMode:2;
unsigned int clientState:2;
signed char smart_priority;
short noClientException; /* this client died or needs to be killed */
int priority;
int sequence;
int ignoreCount; /* count for Attend/IgnoreClient */
int numSaved;
unsigned int replyBytesRemaining;
unsigned short xkbClientFlags;
unsigned short mapNotifyMask;
unsigned short newKeyboardNotifyMask;
int smart_start_tick;
int smart_stop_tick;
#if XTRANS_SEND_FDS
int req_fds;
#endif
} ClientRec;
#if XTRANS_SEND_FDS
static inline void
}
#endif
/*
* Scheduling interface
*/
extern _X_EXPORT long SmartScheduleTime;
extern _X_EXPORT long SmartScheduleInterval;
extern _X_EXPORT long SmartScheduleSlice;
extern _X_EXPORT long SmartScheduleMaxSlice;
extern _X_EXPORT void
SmartScheduleStartTimer(void);
extern _X_EXPORT void
SmartScheduleStopTimer(void);
#define SMART_MAX_PRIORITY (20)
#define SMART_MIN_PRIORITY (-20)
extern _X_EXPORT void
SmartScheduleInit(void);
/* This prototype is used pervasively in Xext, dix */
typedef struct _WorkQueue {
struct _WorkQueue *next;
void * /* closure */
);
void *closure;
} WorkQueueRec;
extern _X_EXPORT int
TimeStamp /*b */ );
typedef struct _CallbackRec {
void *data;
struct _CallbackRec *next;
} CallbackRec, *CallbackPtr;
typedef struct _CallbackList {
int inCallback;
int numDeleted;
/* proc vectors */
extern _X_EXPORT int
#endif /* DIXSTRUCT_H */