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 4 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#define X_PresentPixmapSynced 5 40 41#define PresentNumberRequests 6 42 43/* Present operation options */ 44#define PresentOptionNone 0 45#define PresentOptionAsync (1 << 0) 46#define PresentOptionCopy (1 << 1) 47#define PresentOptionUST (1 << 2) 48#define PresentOptionSuboptimal (1 << 3) 49#define PresentOptionAsyncMayTear (1 << 4) 50 51#define PresentAllOptions (PresentOptionAsync | \ 52 PresentOptionCopy | \ 53 PresentOptionUST | \ 54 PresentOptionSuboptimal | \ 55 PresentOptionAsyncMayTear) 56 57#define PresentAllAsyncOptions (PresentOptionAsync | PresentOptionAsyncMayTear) 58 59/* Present capabilities */ 60 61#define PresentCapabilityNone 0 62#define PresentCapabilityAsync 1 63#define PresentCapabilityFence 2 64#define PresentCapabilityUST 4 65#define PresentCapabilityAsyncMayTear 8 66#define PresentCapabilitySyncobj 16 67 68#define PresentAllCapabilities (PresentCapabilityAsync | \ 69 PresentCapabilityFence | \ 70 PresentCapabilityUST | \ 71 PresentCapabilityAsyncMayTear | \ 72 PresentCapabilitySyncobj) 73 74#define PresentAllAsyncCapabilities (PresentCapabilityAsync | PresentCapabilityAsyncMayTear) 75 76/* Events */ 77#define PresentConfigureNotify 0 78#define PresentCompleteNotify 1 79#define PresentIdleNotify 2 80#if PRESENT_FUTURE_VERSION 81#define PresentRedirectNotify 3 82#endif 83 84/* Event Masks */ 85#define PresentConfigureNotifyMask 1 86#define PresentCompleteNotifyMask 2 87#define PresentIdleNotifyMask 4 88#if PRESENT_FUTURE_VERSION 89#define PresentRedirectNotifyMask 8 90#endif 91 92#if PRESENT_FUTURE_VERSION 93#define PRESENT_REDIRECT_NOTIFY_MASK PresentRedirectNotifyMask 94#else 95#define PRESENT_REDIRECT_NOTIFY_MASK 0 96#endif 97 98#define PresentAllEvents (PresentConfigureNotifyMask | \ 99 PresentCompleteNotifyMask | \ 100 PresentIdleNotifyMask | \ 101 PRESENT_REDIRECT_NOTIFY_MASK) 102 103/* Complete Kinds */ 104 105#define PresentCompleteKindPixmap 0 106#define PresentCompleteKindNotifyMSC 1 107 108/* Complete Modes */ 109 110#define PresentCompleteModeCopy 0 111#define PresentCompleteModeFlip 1 112#define PresentCompleteModeSkip 2 113#define PresentCompleteModeSuboptimalCopy 3 114 115#endif 116