]> Pileus Git - ~andy/gtk/blob - gdk/wayland/gdkwindow-wayland.h
wayland: Support setting cursors
[~andy/gtk] / gdk / wayland / gdkwindow-wayland.h
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #ifndef __GDK_WINDOW_WAYLAND_H__
28 #define __GDK_WINDOW_WAYLAND_H__
29
30 #include <gdk/wayland/gdkprivate-wayland.h>
31 #include <gdk/gdkwindowimpl.h>
32
33 #include <stdint.h>
34 #include <wayland-client.h>
35 #include <wayland-egl.h>
36 #include <EGL/egl.h>
37 #include <EGL/eglext.h>
38 #include <GL/gl.h>
39
40 G_BEGIN_DECLS
41
42 typedef struct _GdkToplevelWayland GdkToplevelWayland;
43 typedef struct _GdkXPositionInfo GdkXPositionInfo;
44
45 struct _GdkToplevelWayland
46 {
47
48   /* Set if the window, or any descendent of it, is the server's focus window
49    */
50   guint has_focus_window : 1;
51
52   /* Set if window->has_focus_window and the focus isn't grabbed elsewhere.
53    */
54   guint has_focus : 1;
55
56   /* Set if the pointer is inside this window. (This is needed for
57    * for focus tracking)
58    */
59   guint has_pointer : 1;
60   
61   /* Set if the window is a descendent of the focus window and the pointer is
62    * inside it. (This is the case where the window will receive keystroke
63    * events even window->has_focus_window is FALSE)
64    */
65   guint has_pointer_focus : 1;
66
67   /* Set if we are requesting these hints */
68   guint skip_taskbar_hint : 1;
69   guint skip_pager_hint : 1;
70   guint urgency_hint : 1;
71
72   guint on_all_desktops : 1;   /* _NET_WM_STICKY == 0xFFFFFFFF */
73
74   guint have_sticky : 1;        /* _NET_WM_STATE_STICKY */
75   guint have_maxvert : 1;       /* _NET_WM_STATE_MAXIMIZED_VERT */
76   guint have_maxhorz : 1;       /* _NET_WM_STATE_MAXIMIZED_HORZ */
77   guint have_fullscreen : 1;    /* _NET_WM_STATE_FULLSCREEN */
78
79   gulong map_serial;    /* Serial of last transition from unmapped */
80
81   cairo_surface_t *icon_pixmap;
82   cairo_surface_t *icon_mask;
83
84   /* Time of most recent user interaction. */
85   gulong user_time;
86 };
87
88 GType               _gdk_window_impl_wayland_get_type  (void);
89
90 GdkToplevelWayland *_gdk_wayland_window_get_toplevel  (GdkWindow   *window);
91
92 GdkCursor          *_gdk_wayland_window_get_cursor    (GdkWindow   *window);
93 void                _gdk_wayland_window_get_offsets   (GdkWindow   *window,
94                                                        gint        *x_offset,
95                                                        gint        *y_offset);
96
97 void                _gdk_wayland_window_update_size   (GdkWindow   *window);
98
99 G_END_DECLS
100
101 #endif /* __GDK_WINDOW_WAYLAND_H__ */