a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/*
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Copyright © 2013 Keith Packard
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Permission to use, copy, modify, distribute, and sell this software and its
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * documentation for any purpose is hereby granted without fee, provided that
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * the above copyright notice appear in all copies and that both that copyright
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * notice and this permission notice appear in supporting documentation, and
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * that the name of the copyright holders not be used in advertising or
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * publicity pertaining to distribution of the software without specific,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * written prior permission. The copyright holders make no representations
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * about the suitability of this software for any purpose. It is provided "as
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * is" without express or implied warranty.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * OF THIS SOFTWARE.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifndef _MISYNCFD_H_
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define _MISYNCFD_H_
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef int (*SyncScreenCreateFenceFromFdFunc) (ScreenPtr screen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SyncFence *fence,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int fd,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool initially_triggered);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef int (*SyncScreenGetFenceFdFunc) (ScreenPtr screen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SyncFence *fence);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define SYNC_FD_SCREEN_FUNCS_VERSION 1
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef struct _syncFdScreenFuncs {
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int version;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SyncScreenCreateFenceFromFdFunc CreateFenceFromFd;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SyncScreenGetFenceFdFunc GetFenceFd;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync} SyncFdScreenFuncsRec, *SyncFdScreenFuncsPtr;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT Bool miSyncFdScreenInit(ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync const SyncFdScreenFuncsRec *funcs);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif /* _MISYNCFD_H_ */