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