xwayland.h revision 61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4cc
/*
* Copyright © 2014 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of the
* copyright holders not be used in advertising or publicity
* pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied
* warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef XWAYLAND_H
#define XWAYLAND_H
#include <dix-config.h>
#include <xorg-server.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <wayland-client.h>
#include <fb.h>
#include <input.h>
#include <dix.h>
#include <randrstr.h>
#include <exevents.h>
struct xwl_screen {
int width;
int height;
int depth;
int expecting_event;
int wm_fd;
int listen_fds[5];
int listen_fd_count;
int rootless;
int glamor;
struct xorg_list output_list;
struct xorg_list damage_window_list;
int wayland_fd;
struct wl_display *display;
struct wl_registry *registry;
struct wl_registry *input_registry;
struct wl_compositor *compositor;
#define XWL_FORMAT_ARGB8888 (1 << 0)
int prepare_read;
char *device_name;
int drm_fd;
int fd_render_node;
void *egl_display, *egl_context;
struct gbm_device *gbm;
struct glamor_context *glamor_ctx;
};
struct xwl_window {
struct xwl_screen *xwl_screen;
struct wl_surface *surface;
struct wl_shell_surface *shell_surface;
struct xorg_list link_damage;
};
#define MODIFIER_META 0x01
struct xwl_seat {
struct xwl_screen *xwl_screen;
struct wl_pointer *wl_pointer;
struct wl_keyboard *wl_keyboard;
struct wl_surface *cursor;
struct xwl_window *focus_window;
char *keymap;
struct wl_surface *keyboard_focus;
};
struct xwl_output {
struct xwl_screen *xwl_screen;
};
struct xwl_pixmap;
#endif