| 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 | |
| 34 | Bool ephyrDRIQueryDirectRenderingCapable(int a_screen, Bool *a_is_capable); |
| 35 | Bool ephyrDRIOpenConnection(int screen, drm_handle_t * a_sarea, |
| 36 | char **a_bus_id_string); |
| 37 | Bool ephyrDRIAuthConnection(int a_screen, drm_magic_t a_magic); |
| 38 | Bool ephyrDRICloseConnection(int a_screen); |
| 39 | Bool ephyrDRIGetClientDriverName(int a_screen, |
| 40 | int *a_ddx_driver_major_version, |
| 41 | int *a_ddx_driver_minor_version, |
| 42 | int *a_ddx_driver_patch_version, |
| 43 | char **a_client_driver_name); |
| 44 | Bool ephyrDRICreateContext(int a_screen, |
| 45 | int a_visual_id, |
| 46 | CARD32 ctx_id, drm_context_t * a_hw_ctx); |
| 47 | Bool ephyrDRIDestroyContext(int a_screen, int a_context_id); |
| 48 | Bool ephyrDRICreateDrawable(int a_screen, |
| 49 | int a_drawable, drm_drawable_t * a_hw_drawable); |
| 50 | Bool ephyrDRIDestroyDrawable(int a_screen, int a_drawable); |
| 51 | Bool ephyrDRIGetDrawableInfo(int a_screen, int /*Drawable */ a_drawable, |
| 52 | unsigned int *a_index, |
| 53 | unsigned int *a_stamp, |
| 54 | int *a_x, |
| 55 | int *a_y, |
| 56 | int *a_w, |
| 57 | int *a_h, |
| 58 | int *a_num_clip_rects, |
| 59 | drm_clip_rect_t ** a_clip_rects, |
| 60 | int *a_back_x, |
| 61 | int *a_back_y, |
| 62 | int *num_back_clip_rects, |
| 63 | drm_clip_rect_t ** a_back_clip_rects); |
| 64 | Bool ephyrDRIGetDeviceInfo(int a_screen, |
| 65 | drm_handle_t * a_frame_buffer, |
| 66 | int *a_fb_origin, |
| 67 | int *a_fb_size, |
| 68 | int *a_fb_stride, |
| 69 | int *a_dev_private_size, void **a_dev_private); |
| 70 | #endif /*__EPHYRDRI_H__*/ |