mirror of
https://gitlab.freedesktop.org/xorg/proto/xorgproto.git
synced 2025-12-26 04:10:18 +01:00
Update to version 1.0
Add presentproto.h updates for current protocol. Finish encoding specification. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
32f17e1d44
commit
584d8b87e2
3 changed files with 231 additions and 11 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#define Region CARD32
|
#define Region CARD32
|
||||||
#define XSyncFence CARD32
|
#define XSyncFence CARD32
|
||||||
|
#define EventID CARD32
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Window window B32;
|
Window window B32;
|
||||||
|
|
@ -109,7 +110,29 @@ typedef struct {
|
||||||
CARD32 window B32;
|
CARD32 window B32;
|
||||||
CARD32 eventMask B32;
|
CARD32 eventMask B32;
|
||||||
} xPresentSelectInputReq;
|
} xPresentSelectInputReq;
|
||||||
#define sz_xPresentSelectInputReq 12
|
#define sz_xPresentSelectInputReq 16
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
CARD8 reqType;
|
||||||
|
CARD8 presentReqType;
|
||||||
|
CARD16 length B16;
|
||||||
|
CARD32 target B32;
|
||||||
|
} xPresentQueryCapabilitiesReq;
|
||||||
|
#define sz_xPresentQueryCapabilitiesReq 8
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
BYTE type; /* X_Reply */
|
||||||
|
BYTE pad1;
|
||||||
|
CARD16 sequenceNumber B16;
|
||||||
|
CARD32 length B32;
|
||||||
|
CARD32 capabilities B32;
|
||||||
|
CARD32 pad3 B32;
|
||||||
|
CARD32 pad4 B32;
|
||||||
|
CARD32 pad5 B32;
|
||||||
|
CARD32 pad6 B32;
|
||||||
|
CARD32 pad7 B32;
|
||||||
|
} xPresentQueryCapabilitiesReply;
|
||||||
|
#define sz_xPresentQueryCapabilitiesReply 32
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Events
|
* Events
|
||||||
|
|
@ -156,6 +179,21 @@ typedef struct {
|
||||||
} xPresentCompleteNotify;
|
} xPresentCompleteNotify;
|
||||||
#define sz_xPresentCompleteNotify 40
|
#define sz_xPresentCompleteNotify 40
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
CARD8 type;
|
||||||
|
CARD8 extension;
|
||||||
|
CARD16 sequenceNumber B16;
|
||||||
|
CARD32 length;
|
||||||
|
CARD16 evtype B16;
|
||||||
|
CARD16 pad2 B16;
|
||||||
|
CARD32 eid B32;
|
||||||
|
Window window B32;
|
||||||
|
CARD32 serial B32;
|
||||||
|
Pixmap pixmap B32;
|
||||||
|
CARD32 idle_fence B32;
|
||||||
|
} xPresentIdleNotify;
|
||||||
|
#define sz_xPresentIdleNotify 32
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CARD8 type;
|
CARD8 type;
|
||||||
CARD8 extension;
|
CARD8 extension;
|
||||||
|
|
@ -166,7 +204,6 @@ typedef struct {
|
||||||
CARD8 pad1;
|
CARD8 pad1;
|
||||||
CARD32 eid B32;
|
CARD32 eid B32;
|
||||||
Window event_window B32;
|
Window event_window B32;
|
||||||
|
|
||||||
Window window B32;
|
Window window B32;
|
||||||
Pixmap pixmap B32;
|
Pixmap pixmap B32;
|
||||||
CARD32 serial B32;
|
CARD32 serial B32;
|
||||||
|
|
@ -200,5 +237,6 @@ typedef struct {
|
||||||
|
|
||||||
#undef Region
|
#undef Region
|
||||||
#undef XSyncFence
|
#undef XSyncFence
|
||||||
|
#undef EventID
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
175
presentproto.txt
175
presentproto.txt
|
|
@ -46,6 +46,7 @@ PRESENTEVENTTYPE { PresentConfigureNotify,
|
||||||
|
|
||||||
PRESENTEVENTMASK { PresentConfigureNotifyMask,
|
PRESENTEVENTMASK { PresentConfigureNotifyMask,
|
||||||
PresentCompleteNotifyMask,
|
PresentCompleteNotifyMask,
|
||||||
|
PresentIdleNotifyMask,
|
||||||
PresentSubredirectNotifyMask }
|
PresentSubredirectNotifyMask }
|
||||||
|
|
||||||
PRESENTOPTION { PresentOptionAsync,
|
PRESENTOPTION { PresentOptionAsync,
|
||||||
|
|
@ -333,7 +334,6 @@ The name of this extension is "Present"
|
||||||
extension: CARD8 Present extension request number
|
extension: CARD8 Present extension request number
|
||||||
sequence-number: CARD16
|
sequence-number: CARD16
|
||||||
length: CARD32 2
|
length: CARD32 2
|
||||||
length: CARD16 2
|
|
||||||
evtype: CARD16 Present_ConfigureNotify
|
evtype: CARD16 Present_ConfigureNotify
|
||||||
eventID: PRESENTEVENTID
|
eventID: PRESENTEVENTID
|
||||||
window: WINDOW
|
window: WINDOW
|
||||||
|
|
@ -431,9 +431,9 @@ The name of this extension is "Present"
|
||||||
type: CARD8 XGE event type (35)
|
type: CARD8 XGE event type (35)
|
||||||
extension: CARD8 Present extension request number
|
extension: CARD8 Present extension request number
|
||||||
sequence-number: CARD16
|
sequence-number: CARD16
|
||||||
length: CARD32 16
|
length: CARD32 17 + 2 n
|
||||||
evtype: CARD16 Present_RedirectNotify
|
evtype: CARD16 Present_RedirectNotify
|
||||||
update-window: CARD8
|
update-window: BOOL
|
||||||
|
|
||||||
eventID: PRESENTEVENTID
|
eventID: PRESENTEVENTID
|
||||||
event-window: WINDOW
|
event-window: WINDOW
|
||||||
|
|
@ -450,9 +450,10 @@ The name of this extension is "Present"
|
||||||
wait-fence: FENCE
|
wait-fence: FENCE
|
||||||
idle-fence: FENCE
|
idle-fence: FENCE
|
||||||
options: SETofPRESENTOPTION
|
options: SETofPRESENTOPTION
|
||||||
target_msc: CARD64
|
target-msc: CARD64
|
||||||
divisor: CARD64
|
divisor: CARD64
|
||||||
remainder: CARD64
|
remainder: CARD64
|
||||||
|
notifies: LISTofPRESENTNOTIFY
|
||||||
└───
|
└───
|
||||||
|
|
||||||
RedirectNotify events are delivered when the client has
|
RedirectNotify events are delivered when the client has
|
||||||
|
|
@ -462,6 +463,13 @@ The name of this extension is "Present"
|
||||||
parameters back to the X server, the effect will be as if the
|
parameters back to the X server, the effect will be as if the
|
||||||
original client executed the request.
|
original client executed the request.
|
||||||
|
|
||||||
|
If 'update-window' is TRUE, then there are clients who have
|
||||||
|
requested composite automatic redirect on the window and who
|
||||||
|
presumably expect the window buffer to eventually contain
|
||||||
|
the application provided contents. The compositing manager
|
||||||
|
should at least occasionally update the window buffer with
|
||||||
|
suitable contents. The precise update interval is left to the
|
||||||
|
discretion of the client receiving this event.
|
||||||
|
|
||||||
❄ ❄ ❄ ❄ ❄ ❄ ❄
|
❄ ❄ ❄ ❄ ❄ ❄ ❄
|
||||||
|
|
||||||
|
|
@ -514,6 +522,54 @@ protocol encoding document.
|
||||||
|
|
||||||
|
|
||||||
A.1 Common Types
|
A.1 Common Types
|
||||||
|
┌───
|
||||||
|
PresentEventType
|
||||||
|
0 PresentConfigureNotify
|
||||||
|
1 PresentCompleteNotify
|
||||||
|
2 PresentIdleNotify
|
||||||
|
3 PresentRedirectNotify
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentEventMask
|
||||||
|
1 PresentConfigureNotifyMask
|
||||||
|
2 PresentCompleteNotifyMask
|
||||||
|
4 PresentIdleNotifyMask
|
||||||
|
8 PresentRedirectNotifyMask
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentOption
|
||||||
|
1 PresentOptionAsync
|
||||||
|
2 PresentOptionCopy;
|
||||||
|
4 PresentOptionUST
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentCapability
|
||||||
|
1 PresentCapabilityAsync
|
||||||
|
2 PresentCapabilityFence
|
||||||
|
4 PresentCapabilityUST
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentCompleteKind
|
||||||
|
0 PresentCompleteKindPixmap
|
||||||
|
1 PresentCompleteKindMSCNotify
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentCompleteMode
|
||||||
|
0 PresentCompleteModeCopy
|
||||||
|
1 PresentCompleteModeFlip
|
||||||
|
2 PresentCompleteModeSkip
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentNotify
|
||||||
|
4 Window window
|
||||||
|
4 CARD32 serial
|
||||||
|
└───
|
||||||
|
|
||||||
A.2 Protocol Requests
|
A.2 Protocol Requests
|
||||||
|
|
||||||
|
|
@ -534,6 +590,65 @@ A.2 Protocol Requests
|
||||||
16 unused
|
16 unused
|
||||||
└───
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentPixmap
|
||||||
|
1 CARD8 major opcode
|
||||||
|
1 1 Present opcode
|
||||||
|
2 18+2n length
|
||||||
|
4 Window window
|
||||||
|
4 Pixmap pixmap
|
||||||
|
4 CARD32 serial
|
||||||
|
4 Region valid-area
|
||||||
|
4 Region update-area
|
||||||
|
2 INT16 x-off
|
||||||
|
2 INT16 y-off
|
||||||
|
4 CRTC target-crtc
|
||||||
|
4 SyncFence wait-fence
|
||||||
|
4 SyncFence idle-fence
|
||||||
|
4 CARD32 options
|
||||||
|
4 unused
|
||||||
|
8 CARD64 target-msc
|
||||||
|
8 CARD64 divisor
|
||||||
|
8 CARD64 remainder
|
||||||
|
8n LISTofPresentNotify notifies
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentNotifyMSC
|
||||||
|
1 CARD8 major opcode
|
||||||
|
1 2 Present opcode
|
||||||
|
2 10 length
|
||||||
|
4 Window window
|
||||||
|
4 CARD32 serial
|
||||||
|
4 unused
|
||||||
|
8 CARD64 target-msc
|
||||||
|
8 CARD64 divisor
|
||||||
|
8 CARD64 remainder
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentSelectInput
|
||||||
|
1 CARD8 major opcode
|
||||||
|
1 3 Present opcode
|
||||||
|
2 4 length
|
||||||
|
4 EventID event-id
|
||||||
|
4 Window window
|
||||||
|
4 SETofPRESENTEVENTMASK event-mask
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentQueryCapabilities
|
||||||
|
1 CARD8 major opcode
|
||||||
|
1 4 Present opcode
|
||||||
|
2 2 length
|
||||||
|
4 CRTC or Window target
|
||||||
|
▶
|
||||||
|
1 1 Reply
|
||||||
|
1 unused
|
||||||
|
2 CARD16 sequence number
|
||||||
|
4 0 reply length
|
||||||
|
4 SETofPRESENTCAPABILITY capabilities
|
||||||
|
└───
|
||||||
|
|
||||||
A.3 Protocol Events
|
A.3 Protocol Events
|
||||||
|
|
||||||
|
|
@ -553,6 +668,7 @@ A.3 Protocol Events
|
||||||
2 CARD16 height
|
2 CARD16 height
|
||||||
2 INT16 off x
|
2 INT16 off x
|
||||||
2 INT16 off y
|
2 INT16 off y
|
||||||
|
|
||||||
2 CARD16 pixmap width
|
2 CARD16 pixmap width
|
||||||
2 CARD16 pixmap height
|
2 CARD16 pixmap height
|
||||||
4 CARD32 pixmap flags
|
4 CARD32 pixmap flags
|
||||||
|
|
@ -565,14 +681,63 @@ A.3 Protocol Events
|
||||||
2 CARD16 sequence number
|
2 CARD16 sequence number
|
||||||
4 2 length
|
4 2 length
|
||||||
2 1 PresentCompleteNotify
|
2 1 PresentCompleteNotify
|
||||||
2 CARD16 kind
|
1 CARD8 kind
|
||||||
|
1 CARD8 mode
|
||||||
4 CARD32 event id
|
4 CARD32 event id
|
||||||
4 Window window
|
4 Window window
|
||||||
4 CARD32 serial
|
4 CARD32 serial
|
||||||
8 CARD64 ust
|
8 CARD64 ust
|
||||||
|
|
||||||
8 CARD64 msc
|
8 CARD64 msc
|
||||||
└───
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentIdleNotify
|
||||||
|
1 35 XGE
|
||||||
|
1 CARD8 Present extension opcode
|
||||||
|
2 CARD16 sequence number
|
||||||
|
4 0 length
|
||||||
|
2 2 PresentIdleNotify
|
||||||
|
2 unused
|
||||||
|
4 CARD32 event id
|
||||||
|
4 Window window
|
||||||
|
4 CARD32 serial
|
||||||
|
4 Pixmap pixmap
|
||||||
|
4 SyncFence idle-fence
|
||||||
|
└───
|
||||||
|
|
||||||
|
┌───
|
||||||
|
PresentRedirectNotify
|
||||||
|
1 35 XGE
|
||||||
|
1 CARD8 Present extension opcode
|
||||||
|
2 CARD16 sequence number
|
||||||
|
4 18+2n length
|
||||||
|
2 3 PresentRedirectNotify
|
||||||
|
1 BOOL update-window
|
||||||
|
1 unused
|
||||||
|
4 CARD32 event id
|
||||||
|
4 Window event-window
|
||||||
|
4 Window window
|
||||||
|
4 Pixmap pixmap
|
||||||
|
4 CARD32 serial
|
||||||
|
|
||||||
|
4 Region valid-area
|
||||||
|
4 Region update-area
|
||||||
|
8 Rectangle valid-rect
|
||||||
|
8 Rectangle update-rect
|
||||||
|
2 INT16 x-off
|
||||||
|
2 INT16 y-off
|
||||||
|
4 CRTC target-crtc
|
||||||
|
4 SyncFence wait-fence
|
||||||
|
4 SyncFence idle-fence
|
||||||
|
4 CARD32 options
|
||||||
|
4 unused
|
||||||
|
8 CARD64 target-msc
|
||||||
|
8 CARD64 divisor
|
||||||
|
8 CARD64 remainder
|
||||||
|
8n LISTofPRESENTNOTIFY notifies
|
||||||
|
└───
|
||||||
|
|
||||||
A.4 Protocol Errors
|
A.4 Protocol Errors
|
||||||
|
|
||||||
The DRI3 extension defines no errors.
|
The DRI3 extension defines no errors.
|
||||||
|
|
|
||||||
|
|
@ -35,29 +35,46 @@
|
||||||
#define X_PresentPixmap 1
|
#define X_PresentPixmap 1
|
||||||
#define X_PresentNotifyMSC 2
|
#define X_PresentNotifyMSC 2
|
||||||
#define X_PresentSelectInput 3
|
#define X_PresentSelectInput 3
|
||||||
|
#define X_PresentQueryCapabilities 4
|
||||||
|
|
||||||
#define PresentNumberRequests 4
|
#define PresentNumberRequests 5
|
||||||
|
|
||||||
/* Present operation options */
|
/* Present operation options */
|
||||||
#define PresentOptionNone 0
|
#define PresentOptionNone 0
|
||||||
#define PresentOptionAsync (1 << 0)
|
#define PresentOptionAsync (1 << 0)
|
||||||
#define PresentOptionCopy (1 << 1)
|
#define PresentOptionCopy (1 << 1)
|
||||||
|
#define PresentOptionUST (1 << 2)
|
||||||
|
|
||||||
#define PresentAllOptions (PresentOptionAsync | \
|
#define PresentAllOptions (PresentOptionAsync | \
|
||||||
PresentOptionCopy)
|
PresentOptionCopy | \
|
||||||
|
PresentOptionUST)
|
||||||
|
|
||||||
|
/* Present capabilities */
|
||||||
|
|
||||||
|
#define PresentCapabilityNone 0
|
||||||
|
#define PresentCapabilityAsync 1
|
||||||
|
#define PresentCapabilityFence 2
|
||||||
|
#define PresentCapabilityUST 4
|
||||||
|
|
||||||
|
#define PresentAllCapabilities (PresentCapabilityAsync | \
|
||||||
|
PresentCapabilityFence | \
|
||||||
|
PresentCapabilityUST)
|
||||||
|
|
||||||
/* Events */
|
/* Events */
|
||||||
#define PresentConfigureNotify 0
|
#define PresentConfigureNotify 0
|
||||||
#define PresentCompleteNotify 1
|
#define PresentCompleteNotify 1
|
||||||
#define PresentRedirectNotify 2
|
#define PresentIdleNotify 2
|
||||||
|
#define PresentRedirectNotify 3
|
||||||
|
|
||||||
/* Event Masks */
|
/* Event Masks */
|
||||||
#define PresentConfigureNotifyMask 1
|
#define PresentConfigureNotifyMask 1
|
||||||
#define PresentCompleteNotifyMask 2
|
#define PresentCompleteNotifyMask 2
|
||||||
#define PresentRedirectNotifyMask 4
|
#define PresentIdleNotifyMask 4
|
||||||
|
#define PresentRedirectNotifyMask 8
|
||||||
|
|
||||||
#define PresentAllEvents (PresentConfigureNotifyMask | \
|
#define PresentAllEvents (PresentConfigureNotifyMask | \
|
||||||
PresentCompleteNotifyMask | \
|
PresentCompleteNotifyMask | \
|
||||||
|
PresentIdleNotifyMask | \
|
||||||
PresentRedirectNotifyMask)
|
PresentRedirectNotifyMask)
|
||||||
|
|
||||||
/* Complete Kinds */
|
/* Complete Kinds */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue