ephyrdri.h revision 706f2543
1/*
2 * Xephyr - A kdrive X server thats runs in a host X window.
3 *          Authored by Matthew Allum <mallum@openedhand.com>
4 *
5 * Copyright © 2007 OpenedHand Ltd
6 *
7 * Permission to use, copy, modify, distribute, and sell this software and its
8 * documentation for any purpose is hereby granted without fee, provided that
9 * the above copyright notice appear in all copies and that both that
10 * copyright notice and this permission notice appear in supporting
11 * documentation, and that the name of OpenedHand Ltd not be used in
12 * advertising or publicity pertaining to distribution of the software without
13 * specific, written prior permission. OpenedHand Ltd makes no
14 * representations about the suitability of this software for any purpose.  It
15 * is provided "as is" without express or implied warranty.
16 *
17 * OpenedHand Ltd DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
18 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
19 * EVENT SHALL OpenedHand Ltd BE LIABLE FOR ANY SPECIAL, INDIRECT OR
20 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23 * PERFORMANCE OF THIS SOFTWARE.
24 *
25 * Authors:
26 *    Dodji Seketeli <dodji@openedhand.com>
27 */
28
29#ifndef __EPHYRDRI_H__
30#define __EPHYRDRI_H__
31
32#include <xf86drm.h>
33
34Bool ephyrDRIQueryDirectRenderingCapable (int a_screen, Bool *a_is_capable) ;
35Bool ephyrDRIOpenConnection (int screen, drm_handle_t *a_sarea, char **a_bus_id_string) ;
36Bool ephyrDRIAuthConnection (int a_screen, drm_magic_t a_magic) ;
37Bool ephyrDRICloseConnection (int a_screen) ;
38Bool ephyrDRIGetClientDriverName (int a_screen,
39                                  int *a_ddx_driver_major_version,
40                                  int *a_ddx_driver_minor_version,
41                                  int *a_ddx_driver_patch_version,
42                                  char ** a_client_driver_name) ;
43Bool ephyrDRICreateContext (int a_screen,
44                            int a_visual_id,
45                            XID *a_returned_ctx_id,
46                            drm_context_t *a_hw_ctx) ;
47Bool ephyrDRIDestroyContext (int a_screen,
48                             int a_context_id) ;
49Bool ephyrDRICreateDrawable (int a_screen,
50                             int a_drawable,
51                             drm_drawable_t *a_hw_drawable) ;
52Bool ephyrDRIDestroyDrawable (int a_screen, int a_drawable) ;
53Bool ephyrDRIGetDrawableInfo (int a_screen,
54                              int /*Drawable*/a_drawable,
55                              unsigned int *a_index,
56                              unsigned int *a_stamp,
57                              int *a_x,
58                              int *a_y,
59                              int *a_w,
60                              int *a_h,
61                              int *a_num_clip_rects,
62                              drm_clip_rect_t **a_clip_rects,
63                              int *a_back_x,
64                              int *a_back_y,
65                              int *num_back_clip_rects,
66                              drm_clip_rect_t **a_back_clip_rects) ;
67Bool ephyrDRIGetDeviceInfo (int a_screen,
68                            drm_handle_t *a_frame_buffer,
69                            int *a_fb_origin,
70                            int *a_fb_size,
71                            int *a_fb_stride,
72                            int *a_dev_private_size,
73                            void **a_dev_private) ;
74#endif /*__EPHYRDRI_H__*/
75
76