dri3_priv.h revision 35c4bbdf
11.63Skleink/* 21.44Sitojun * Copyright © 2013 Keith Packard 31.44Sitojun * 41.44Sitojun * Permission to use, copy, modify, distribute, and sell this software and its 51.44Sitojun * documentation for any purpose is hereby granted without fee, provided that 61.44Sitojun * the above copyright notice appear in all copies and that both that copyright 71.44Sitojun * notice and this permission notice appear in supporting documentation, and 81.44Sitojun * that the name of the copyright holders not be used in advertising or 91.44Sitojun * publicity pertaining to distribution of the software without specific, 101.44Sitojun * written prior permission. The copyright holders make no representations 111.44Sitojun * about the suitability of this software for any purpose. It is provided "as 121.44Sitojun * is" without express or implied warranty. 131.44Sitojun * 141.44Sitojun * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 151.44Sitojun * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 161.44Sitojun * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 171.44Sitojun * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 181.44Sitojun * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 191.44Sitojun * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 201.44Sitojun * OF THIS SOFTWARE. 211.44Sitojun */ 221.44Sitojun 231.44Sitojun#ifndef _DRI3PRIV_H_ 241.44Sitojun#define _DRI3PRIV_H_ 251.44Sitojun 261.44Sitojun#include <X11/X.h> 271.44Sitojun#include "scrnintstr.h" 281.44Sitojun#include "misc.h" 291.44Sitojun#include "list.h" 301.44Sitojun#include "windowstr.h" 311.10Scgd#include "dixstruct.h" 321.1Scgd#include <randrstr.h> 331.8Smycroft#include "dri3.h" 341.8Smycroft 351.1Scgdextern DevPrivateKeyRec dri3_screen_private_key; 361.1Scgd 371.1Scgdtypedef struct dri3_screen_priv { 381.1Scgd CloseScreenProcPtr CloseScreen; 391.1Scgd ConfigNotifyProcPtr ConfigNotify; 401.1Scgd DestroyWindowProcPtr DestroyWindow; 411.1Scgd 421.1Scgd dri3_screen_info_ptr info; 431.1Scgd} dri3_screen_priv_rec, *dri3_screen_priv_ptr; 441.1Scgd 451.1Scgd#define wrap(priv,real,mem,func) {\ 461.1Scgd priv->mem = real->mem; \ 471.1Scgd real->mem = func; \ 481.1Scgd} 491.1Scgd 501.1Scgd#define unwrap(priv,real,mem) {\ 511.1Scgd real->mem = priv->mem; \ 521.1Scgd} 531.1Scgd 541.1Scgdstatic inline dri3_screen_priv_ptr 551.1Scgddri3_screen_priv(ScreenPtr screen) 561.1Scgd{ 571.1Scgd return (dri3_screen_priv_ptr)dixLookupPrivate(&(screen)->devPrivates, &dri3_screen_private_key); 581.1Scgd} 591.1Scgd 601.1Scgdint 611.1Scgdproc_dri3_dispatch(ClientPtr client); 621.1Scgd 631.1Scgdint 641.28Sfvdlsproc_dri3_dispatch(ClientPtr client); 651.1Scgd 661.1Scgd/* DDX interface */ 671.2Smycroft 681.8Smycroftint 691.2Smycroftdri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd); 701.1Scgd 711.1Scgdint 721.1Scgddri3_pixmap_from_fd(PixmapPtr *ppixmap, ScreenPtr screen, int fd, 731.1Scgd CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp); 741.1Scgd 751.42Skleinkint 761.42Skleinkdri3_fd_from_pixmap(int *pfd, PixmapPtr pixmap, CARD16 *stride, CARD32 *size); 771.55Sitojun 781.56Skleink#endif /* _DRI3PRIV_H_ */ 791.56Skleink