presenttokens.h revision 17ca54c3
1/* 2 * Copyright © 2013 Keith Packard 3 * 4 * Permission to use, copy, modify, distribute, and sell this software and its 5 * documentation for any purpose is hereby granted without fee, provided that 6 * the above copyright notice appear in all copies and that both that copyright 7 * notice and this permission notice appear in supporting documentation, and 8 * that the name of the copyright holders not be used in advertising or 9 * publicity pertaining to distribution of the software without specific, 10 * written prior permission. The copyright holders make no representations 11 * about the suitability of this software for any purpose. It is provided "as 12 * is" without express or implied warranty. 13 * 14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 20 * OF THIS SOFTWARE. 21 */ 22 23#ifndef _PRESENT_TOKENS_H_ 24#define _PRESENT_TOKENS_H_ 25 26#define PRESENT_NAME "Present" 27#define PRESENT_MAJOR 1 28#define PRESENT_MINOR 2 29 30#define PresentNumberErrors 0 31#define PresentNumberEvents 0 32 33/* Requests */ 34#define X_PresentQueryVersion 0 35#define X_PresentPixmap 1 36#define X_PresentNotifyMSC 2 37#define X_PresentSelectInput 3 38#define X_PresentQueryCapabilities 4 39 40#define PresentNumberRequests 5 41 42/* Present operation options */ 43#define PresentOptionNone 0 44#define PresentOptionAsync (1 << 0) 45#define PresentOptionCopy (1 << 1) 46#define PresentOptionUST (1 << 2) 47#define PresentOptionSuboptimal (1 << 3) 48 49#define PresentAllOptions (PresentOptionAsync | \ 50 PresentOptionCopy | \ 51 PresentOptionUST | \ 52 PresentOptionSuboptimal) 53 54/* Present capabilities */ 55 56#define PresentCapabilityNone 0 57#define PresentCapabilityAsync 1 58#define PresentCapabilityFence 2 59#define PresentCapabilityUST 4 60 61#define PresentAllCapabilities (PresentCapabilityAsync | \ 62 PresentCapabilityFence | \ 63 PresentCapabilityUST) 64 65/* Events */ 66#define PresentConfigureNotify 0 67#define PresentCompleteNotify 1 68#define PresentIdleNotify 2 69#if PRESENT_FUTURE_VERSION 70#define PresentRedirectNotify 3 71#endif 72 73/* Event Masks */ 74#define PresentConfigureNotifyMask 1 75#define PresentCompleteNotifyMask 2 76#define PresentIdleNotifyMask 4 77#if PRESENT_FUTURE_VERSION 78#define PresentRedirectNotifyMask 8 79#endif 80 81#if PRESENT_FUTURE_VERSION 82#define PRESENT_REDIRECT_NOTIFY_MASK PresentRedirectNotifyMask 83#else 84#define PRESENT_REDIRECT_NOTIFY_MASK 0 85#endif 86 87#define PresentAllEvents (PresentConfigureNotifyMask | \ 88 PresentCompleteNotifyMask | \ 89 PresentIdleNotifyMask | \ 90 PRESENT_REDIRECT_NOTIFY_MASK) 91 92/* Complete Kinds */ 93 94#define PresentCompleteKindPixmap 0 95#define PresentCompleteKindNotifyMSC 1 96 97/* Complete Modes */ 98 99#define PresentCompleteModeCopy 0 100#define PresentCompleteModeFlip 1 101#define PresentCompleteModeSkip 2 102#define PresentCompleteModeSuboptimalCopy 3 103 104#endif 105