VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.13.0/syncsrv.h@ 81245

最後變更 在這個檔案從81245是 43251,由 vboxsync 提交於 12 年 前

Additions/x11: added headers for X.Org Server 1.13.

  • 屬性 svn:eol-style 設為 native
檔案大小: 4.7 KB
 
1/*
2
3Copyright 1991, 1993, 1994, 1998 The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in this Software without prior written authorization from The Open Group.
24
25*/
26
27/***********************************************************
28Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
29and Olivetti Research Limited, Cambridge, England.
30
31 All Rights Reserved
32
33Permission to use, copy, modify, and distribute this software and its
34documentation for any purpose and without fee is hereby granted,
35provided that the above copyright notice appear in all copies and that
36both that copyright notice and this permission notice appear in
37supporting documentation, and that the names of Digital or Olivetti
38not be used in advertising or publicity pertaining to distribution of the
39software without specific, written prior permission.
40
41DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
42SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
43FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
44CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
45USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
46OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
47PERFORMANCE OF THIS SOFTWARE.
48
49******************************************************************/
50
51#ifndef _SYNCSRV_H_
52#define _SYNCSRV_H_
53
54#include "list.h"
55#include "misync.h"
56#include "misyncstr.h"
57
58/*
59 * The System Counter interface
60 */
61
62typedef enum {
63 XSyncCounterNeverChanges,
64 XSyncCounterNeverIncreases,
65 XSyncCounterNeverDecreases,
66 XSyncCounterUnrestricted
67} SyncCounterType;
68
69typedef void (*SyncSystemCounterQueryValue)(pointer counter,
70 CARD64 *value_return
71 );
72typedef void (*SyncSystemCounterBracketValues)(pointer counter,
73 CARD64 *pbracket_less,
74 CARD64 *pbracket_greater
75 );
76
77typedef struct _SysCounterInfo {
78 SyncCounter *pCounter;
79 char *name;
80 CARD64 resolution;
81 CARD64 bracket_greater;
82 CARD64 bracket_less;
83 SyncCounterType counterType; /* how can this counter change */
84 SyncSystemCounterQueryValue QueryValue;
85 SyncSystemCounterBracketValues BracketValues;
86 void *private;
87 struct xorg_list entry;
88} SysCounterInfo;
89
90typedef struct _SyncAlarmClientList {
91 ClientPtr client;
92 XID delete_id;
93 struct _SyncAlarmClientList *next;
94} SyncAlarmClientList;
95
96typedef struct _SyncAlarm {
97 SyncTrigger trigger;
98 ClientPtr client;
99 XSyncAlarm alarm_id;
100 CARD64 delta;
101 int events;
102 int state;
103 SyncAlarmClientList *pEventClients;
104} SyncAlarm;
105
106typedef struct {
107 ClientPtr client;
108 CARD32 delete_id;
109 int num_waitconditions;
110} SyncAwaitHeader;
111
112typedef struct {
113 SyncTrigger trigger;
114 CARD64 event_threshold;
115 SyncAwaitHeader *pHeader;
116} SyncAwait;
117
118typedef union {
119 SyncAwaitHeader header;
120 SyncAwait await;
121} SyncAwaitUnion;
122
123extern SyncCounter* SyncCreateSystemCounter(const char *name,
124 CARD64 initial_value,
125 CARD64 resolution,
126 SyncCounterType counterType,
127 SyncSystemCounterQueryValue QueryValue,
128 SyncSystemCounterBracketValues BracketValues
129 );
130
131extern void SyncChangeCounter(SyncCounter *pCounter,
132 CARD64 new_value
133 );
134
135extern void SyncDestroySystemCounter(pointer pCounter);
136
137extern SyncCounter *SyncInitDeviceIdleTime(DeviceIntPtr dev);
138extern void SyncRemoveDeviceIdleTime(SyncCounter *counter);
139#endif /* _SYNCSRV_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette