File: | cdk/broadway/cdkwindow-broadway.c |
Warning: | line 1518, column 5 Value stored to 'opacity' is never read |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* CDK - The GIMP Drawing Kit |
2 | * Copyright (C) 1995-2007 Peter Mattis, Spencer Kimball, |
3 | * Josh MacDonald, Ryan Lortie |
4 | * |
5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Lesser General Public |
7 | * License as published by the Free Software Foundation; either |
8 | * version 2 of the License, or (at your option) any later version. |
9 | * |
10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Lesser General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General Public |
16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
17 | */ |
18 | |
19 | /* |
20 | * Modified by the CTK+ Team and others 1997-2000. See the AUTHORS |
21 | * file for a list of people on the CTK+ Team. See the ChangeLog |
22 | * files for a list of changes. These files are distributed with |
23 | * CTK+ at ftp://ftp.ctk.org/pub/ctk/. |
24 | */ |
25 | |
26 | #include "config.h" |
27 | |
28 | #include "cdkwindow-broadway.h" |
29 | #include "cdkscreen-broadway.h" |
30 | |
31 | #include "cdkbroadwaydisplay.h" |
32 | #include "cdkdisplay.h" |
33 | #include "cdkwindow.h" |
34 | #include "cdkwindowimpl.h" |
35 | #include "cdkdisplay-broadway.h" |
36 | #include "cdkprivate-broadway.h" |
37 | #include "cdkinternals.h" |
38 | #include "cdkdeviceprivate.h" |
39 | #include "cdkeventsource.h" |
40 | |
41 | #include <stdlib.h> |
42 | #include <stdio.h> |
43 | #include <string.h> |
44 | |
45 | /* Forward declarations */ |
46 | static void cdk_window_broadway_set_background (CdkWindow *window, |
47 | cairo_pattern_t *pattern); |
48 | |
49 | static void cdk_window_impl_broadway_finalize (GObject *object); |
50 | |
51 | static const cairo_user_data_key_t cdk_broadway_cairo_key; |
52 | |
53 | #define WINDOW_IS_TOPLEVEL_OR_FOREIGN(window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN ) \ |
54 | (CDK_WINDOW_TYPE (window)((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && \ |
55 | CDK_WINDOW_TYPE (window)((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN) |
56 | |
57 | #define WINDOW_IS_TOPLEVEL(window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_FOREIGN && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN ) \ |
58 | (CDK_WINDOW_TYPE (window)((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && \ |
59 | CDK_WINDOW_TYPE (window)((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_FOREIGN && \ |
60 | CDK_WINDOW_TYPE (window)((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN) |
61 | |
62 | struct _CdkBroadwayWindow { |
63 | CdkWindow parent; |
64 | }; |
65 | |
66 | struct _CdkBroadwayWindowClass { |
67 | CdkWindowClass parent_class; |
68 | }; |
69 | |
70 | G_DEFINE_TYPE (CdkBroadwayWindow, cdk_broadway_window, CDK_TYPE_WINDOW)static void cdk_broadway_window_init (CdkBroadwayWindow *self ); static void cdk_broadway_window_class_init (CdkBroadwayWindowClass *klass); static GType cdk_broadway_window_get_type_once (void ); static gpointer cdk_broadway_window_parent_class = ((void* )0); static gint CdkBroadwayWindow_private_offset; static void cdk_broadway_window_class_intern_init (gpointer klass) { cdk_broadway_window_parent_class = g_type_class_peek_parent (klass); if (CdkBroadwayWindow_private_offset != 0) g_type_class_adjust_private_offset (klass, &CdkBroadwayWindow_private_offset ); cdk_broadway_window_class_init ((CdkBroadwayWindowClass*) klass ); } __attribute__ ((__unused__)) static inline gpointer cdk_broadway_window_get_instance_private (CdkBroadwayWindow *self) { return (((gpointer) ((guint8*) ( self) + (glong) (CdkBroadwayWindow_private_offset)))); } GType cdk_broadway_window_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); (void ) (0 ? (gpointer) * (&static_g_define_type_id) : ((void*) 0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = cdk_broadway_window_get_type_once (); (__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); 0 ? (void) (*(&static_g_define_type_id ) = (g_define_type_id)) : (void) 0; g_once_init_leave_pointer ((&static_g_define_type_id), (gpointer) (guintptr) (g_define_type_id )); })) ; } return static_g_define_type_id; } __attribute__ ( (__noinline__)) static GType cdk_broadway_window_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((cdk_window_get_type ()), g_intern_static_string ("CdkBroadwayWindow" ), sizeof (CdkBroadwayWindowClass), (GClassInitFunc)(void (*) (void)) cdk_broadway_window_class_intern_init, sizeof (CdkBroadwayWindow ), (GInstanceInitFunc)(void (*)(void)) cdk_broadway_window_init , (GTypeFlags) 0); { {{};} } return g_define_type_id; } |
71 | |
72 | static void |
73 | cdk_broadway_window_class_init (CdkBroadwayWindowClass *broadway_window_class G_GNUC_UNUSED__attribute__ ((__unused__))) |
74 | { |
75 | } |
76 | |
77 | static void |
78 | cdk_broadway_window_init (CdkBroadwayWindow *broadway_window G_GNUC_UNUSED__attribute__ ((__unused__))) |
79 | { |
80 | } |
81 | |
82 | G_DEFINE_TYPE (CdkWindowImplBroadway,static void cdk_window_impl_broadway_init (CdkWindowImplBroadway *self); static void cdk_window_impl_broadway_class_init (CdkWindowImplBroadwayClass *klass); static GType cdk_window_impl_broadway_get_type_once (void); static gpointer cdk_window_impl_broadway_parent_class = ((void*)0); static gint CdkWindowImplBroadway_private_offset ; static void cdk_window_impl_broadway_class_intern_init (gpointer klass) { cdk_window_impl_broadway_parent_class = g_type_class_peek_parent (klass); if (CdkWindowImplBroadway_private_offset != 0) g_type_class_adjust_private_offset (klass, &CdkWindowImplBroadway_private_offset); cdk_window_impl_broadway_class_init ((CdkWindowImplBroadwayClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer cdk_window_impl_broadway_get_instance_private (CdkWindowImplBroadway *self) { return (((gpointer) ((guint8 *) (self) + (glong) (CdkWindowImplBroadway_private_offset)))) ; } GType cdk_window_impl_broadway_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); (void) (0 ? (gpointer) * ( &static_g_define_type_id) : ((void*)0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = cdk_window_impl_broadway_get_type_once (); (__extension__ ( { _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); 0 ? (void) (*( &static_g_define_type_id) = (g_define_type_id)) : (void) 0 ; g_once_init_leave_pointer ((&static_g_define_type_id), ( gpointer) (guintptr) (g_define_type_id)); })) ; } return static_g_define_type_id ; } __attribute__ ((__noinline__)) static GType cdk_window_impl_broadway_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((cdk_window_impl_get_type ()), g_intern_static_string ("CdkWindowImplBroadway" ), sizeof (CdkWindowImplBroadwayClass), (GClassInitFunc)(void (*)(void)) cdk_window_impl_broadway_class_intern_init, sizeof (CdkWindowImplBroadway), (GInstanceInitFunc)(void (*)(void)) cdk_window_impl_broadway_init, (GTypeFlags) 0); { {{};} } return g_define_type_id; } |
83 | cdk_window_impl_broadway,static void cdk_window_impl_broadway_init (CdkWindowImplBroadway *self); static void cdk_window_impl_broadway_class_init (CdkWindowImplBroadwayClass *klass); static GType cdk_window_impl_broadway_get_type_once (void); static gpointer cdk_window_impl_broadway_parent_class = ((void*)0); static gint CdkWindowImplBroadway_private_offset ; static void cdk_window_impl_broadway_class_intern_init (gpointer klass) { cdk_window_impl_broadway_parent_class = g_type_class_peek_parent (klass); if (CdkWindowImplBroadway_private_offset != 0) g_type_class_adjust_private_offset (klass, &CdkWindowImplBroadway_private_offset); cdk_window_impl_broadway_class_init ((CdkWindowImplBroadwayClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer cdk_window_impl_broadway_get_instance_private (CdkWindowImplBroadway *self) { return (((gpointer) ((guint8 *) (self) + (glong) (CdkWindowImplBroadway_private_offset)))) ; } GType cdk_window_impl_broadway_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); (void) (0 ? (gpointer) * ( &static_g_define_type_id) : ((void*)0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = cdk_window_impl_broadway_get_type_once (); (__extension__ ( { _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); 0 ? (void) (*( &static_g_define_type_id) = (g_define_type_id)) : (void) 0 ; g_once_init_leave_pointer ((&static_g_define_type_id), ( gpointer) (guintptr) (g_define_type_id)); })) ; } return static_g_define_type_id ; } __attribute__ ((__noinline__)) static GType cdk_window_impl_broadway_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((cdk_window_impl_get_type ()), g_intern_static_string ("CdkWindowImplBroadway" ), sizeof (CdkWindowImplBroadwayClass), (GClassInitFunc)(void (*)(void)) cdk_window_impl_broadway_class_intern_init, sizeof (CdkWindowImplBroadway), (GInstanceInitFunc)(void (*)(void)) cdk_window_impl_broadway_init, (GTypeFlags) 0); { {{};} } return g_define_type_id; } |
84 | CDK_TYPE_WINDOW_IMPL)static void cdk_window_impl_broadway_init (CdkWindowImplBroadway *self); static void cdk_window_impl_broadway_class_init (CdkWindowImplBroadwayClass *klass); static GType cdk_window_impl_broadway_get_type_once (void); static gpointer cdk_window_impl_broadway_parent_class = ((void*)0); static gint CdkWindowImplBroadway_private_offset ; static void cdk_window_impl_broadway_class_intern_init (gpointer klass) { cdk_window_impl_broadway_parent_class = g_type_class_peek_parent (klass); if (CdkWindowImplBroadway_private_offset != 0) g_type_class_adjust_private_offset (klass, &CdkWindowImplBroadway_private_offset); cdk_window_impl_broadway_class_init ((CdkWindowImplBroadwayClass*) klass); } __attribute__ ((__unused__ )) static inline gpointer cdk_window_impl_broadway_get_instance_private (CdkWindowImplBroadway *self) { return (((gpointer) ((guint8 *) (self) + (glong) (CdkWindowImplBroadway_private_offset)))) ; } GType cdk_window_impl_broadway_get_type (void) { static GType static_g_define_type_id = 0; if ((__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer) , "Expression evaluates to false"); (void) (0 ? (gpointer) * ( &static_g_define_type_id) : ((void*)0)); (!(__extension__ ({ _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ (*(&static_g_define_type_id)) gapg_temp_newval; __typeof__ ((&static_g_define_type_id)) gapg_temp_atomic = (&static_g_define_type_id ); __atomic_load (gapg_temp_atomic, &gapg_temp_newval, 5) ; gapg_temp_newval; })) && g_once_init_enter_pointer ( &static_g_define_type_id)); })) ) { GType g_define_type_id = cdk_window_impl_broadway_get_type_once (); (__extension__ ( { _Static_assert (sizeof *(&static_g_define_type_id) == sizeof (gpointer), "Expression evaluates to false"); 0 ? (void) (*( &static_g_define_type_id) = (g_define_type_id)) : (void) 0 ; g_once_init_leave_pointer ((&static_g_define_type_id), ( gpointer) (guintptr) (g_define_type_id)); })) ; } return static_g_define_type_id ; } __attribute__ ((__noinline__)) static GType cdk_window_impl_broadway_get_type_once (void) { GType g_define_type_id = g_type_register_static_simple ((cdk_window_impl_get_type ()), g_intern_static_string ("CdkWindowImplBroadway" ), sizeof (CdkWindowImplBroadwayClass), (GClassInitFunc)(void (*)(void)) cdk_window_impl_broadway_class_intern_init, sizeof (CdkWindowImplBroadway), (GInstanceInitFunc)(void (*)(void)) cdk_window_impl_broadway_init, (GTypeFlags) 0); { {{};} } return g_define_type_id; } |
85 | |
86 | static CdkDisplay * |
87 | find_broadway_display (void) |
88 | { |
89 | CdkDisplay *display; |
90 | GSList *list, *l; |
91 | |
92 | display = NULL((void*)0); |
93 | |
94 | list = cdk_display_manager_list_displays (cdk_display_manager_get ()); |
95 | for (l = list; l; l = l->next) |
96 | { |
97 | if (CDK_IS_BROADWAY_DISPLAY (l->data)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) ( (l->data)); GType __t = ((cdk_broadway_display_get_type()) ); gboolean __r; if (!__inst) __r = (0); else if (__inst-> g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; }))))) |
98 | { |
99 | display = l->data; |
100 | break; |
101 | } |
102 | } |
103 | g_slist_free (list); |
104 | |
105 | return display; |
106 | } |
107 | |
108 | static void |
109 | update_dirty_windows_and_sync (void) |
110 | { |
111 | GList *l; |
112 | CdkBroadwayDisplay *display; |
113 | gboolean updated_surface; |
114 | |
115 | display = CDK_BROADWAY_DISPLAY (find_broadway_display ())((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((find_broadway_display ())), ((cdk_broadway_display_get_type ())))))); |
116 | g_assert (display != NULL)do { if (display != ((void*)0)) ; else g_assertion_message_expr ("Cdk", "cdkwindow-broadway.c", 116, ((const char*) (__func__ )), "display != NULL"); } while (0); |
117 | |
118 | updated_surface = FALSE(0); |
119 | for (l = display->toplevels; l != NULL((void*)0); l = l->next) |
120 | { |
121 | CdkWindowImplBroadway *impl = l->data; |
122 | |
123 | if (impl->dirty) |
124 | { |
125 | impl->dirty = FALSE(0); |
126 | updated_surface = TRUE(!(0)); |
127 | _cdk_broadway_server_window_update (display->server, |
128 | impl->id, |
129 | impl->surface); |
130 | } |
131 | } |
132 | |
133 | /* We sync here to ensure all references to the impl->surface memory |
134 | is done, as we may later paint new data in them. */ |
135 | if (updated_surface) |
136 | cdk_display_sync (CDK_DISPLAY (display)((((CdkDisplay*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((display)), ((cdk_display_get_type ()))))))); |
137 | else |
138 | cdk_display_flush (CDK_DISPLAY (display)((((CdkDisplay*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((display)), ((cdk_display_get_type ()))))))); |
139 | } |
140 | |
141 | static guint flush_id = 0; |
142 | |
143 | static gboolean |
144 | flush_idle (gpointer data G_GNUC_UNUSED__attribute__ ((__unused__))) |
145 | { |
146 | flush_id = 0; |
147 | |
148 | cdk_display_flush (find_broadway_display ()); |
149 | |
150 | return FALSE(0); |
151 | } |
152 | |
153 | /* We need to flush in an idle rather than AFTER_PAINT, as the clock |
154 | is frozen during e.g. window resizes so the paint will not happen |
155 | and the window resize request is never flushed. */ |
156 | static void |
157 | queue_flush (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
158 | { |
159 | if (flush_id == 0) |
160 | { |
161 | flush_id = cdk_threads_add_idle (flush_idle, NULL((void*)0)); |
162 | g_source_set_name_by_id (flush_id, "[ctk+] flush_idle"); |
163 | } |
164 | } |
165 | |
166 | static void |
167 | cdk_window_impl_broadway_init (CdkWindowImplBroadway *impl) |
168 | { |
169 | impl->toplevel_window_type = -1; |
170 | impl->device_cursor = g_hash_table_new_full (NULL((void*)0), NULL((void*)0), NULL((void*)0), |
171 | (GDestroyNotify) g_object_unref); |
172 | } |
173 | |
174 | static void |
175 | cdk_window_impl_broadway_finalize (GObject *object) |
176 | { |
177 | CdkWindow *wrapper; |
178 | CdkWindowImplBroadway *impl; |
179 | CdkBroadwayDisplay *broadway_display; |
180 | |
181 | g_return_if_fail (CDK_IS_WINDOW_IMPL_BROADWAY (object))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((object)); GType __t = ((cdk_window_impl_broadway_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst-> g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__)), "CDK_IS_WINDOW_IMPL_BROADWAY (object)"); return; } } while (0); |
182 | |
183 | impl = CDK_WINDOW_IMPL_BROADWAY (object)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((object)), ((cdk_window_impl_broadway_get_type ())))))); |
184 | |
185 | wrapper = impl->wrapper; |
186 | |
187 | _cdk_broadway_window_grab_check_destroy (wrapper); |
188 | |
189 | broadway_display = CDK_BROADWAY_DISPLAY (cdk_window_get_display (impl->wrapper))((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((cdk_window_get_display (impl->wrapper)) ), ((cdk_broadway_display_get_type())))))); |
190 | |
191 | g_hash_table_remove (broadway_display->id_ht, GINT_TO_POINTER(impl->id)((gpointer) (glong) (impl->id))); |
192 | |
193 | if (impl->cursor) |
194 | g_object_unref (impl->cursor); |
195 | |
196 | g_hash_table_destroy (impl->device_cursor); |
197 | |
198 | broadway_display->toplevels = g_list_remove (broadway_display->toplevels, impl); |
199 | |
200 | G_OBJECT_CLASS (cdk_window_impl_broadway_parent_class)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((cdk_window_impl_broadway_parent_class)), (((GType) ((20) << (2))))))))->finalize (object); |
201 | } |
202 | |
203 | void |
204 | _cdk_broadway_screen_init_root_window (CdkScreen * screen) |
205 | { |
206 | CdkWindow *window; |
207 | CdkWindowImplBroadway *impl; |
208 | CdkBroadwayScreen *broadway_screen; |
209 | |
210 | broadway_screen = CDK_BROADWAY_SCREEN (screen)((((CdkBroadwayScreen*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((screen)), ((cdk_broadway_screen_get_type ( ))))))); |
211 | |
212 | g_assert (broadway_screen->root_window == NULL)do { if (broadway_screen->root_window == ((void*)0)) ; else g_assertion_message_expr ("Cdk", "cdkwindow-broadway.c", 212 , ((const char*) (__func__)), "broadway_screen->root_window == NULL" ); } while (0); |
213 | |
214 | broadway_screen->root_window = g_object_new (CDK_TYPE_BROADWAY_WINDOW(cdk_broadway_window_get_type ()), NULL((void*)0)); |
215 | |
216 | window = broadway_screen->root_window; |
217 | window->impl = g_object_new (CDK_TYPE_WINDOW_IMPL_BROADWAY(cdk_window_impl_broadway_get_type ()), NULL((void*)0)); |
218 | window->impl_window = window; |
219 | window->visual = cdk_screen_get_system_visual (screen); |
220 | |
221 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
222 | |
223 | impl->screen = screen; |
224 | impl->wrapper = window; |
225 | impl->id = 0; |
226 | |
227 | window->window_type = CDK_WINDOW_ROOT; |
228 | window->depth = 24; |
229 | |
230 | window->x = 0; |
231 | window->y = 0; |
232 | window->abs_x = 0; |
233 | window->abs_y = 0; |
234 | window->width = cdk_screen_get_width (screen); |
235 | window->height = cdk_screen_get_height (screen); |
236 | window->viewable = TRUE(!(0)); |
237 | |
238 | _cdk_window_update_size (broadway_screen->root_window); |
239 | } |
240 | |
241 | static void |
242 | on_frame_clock_after_paint (CdkFrameClock *clock G_GNUC_UNUSED__attribute__ ((__unused__)), |
243 | CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
244 | { |
245 | update_dirty_windows_and_sync (); |
246 | } |
247 | |
248 | static void |
249 | connect_frame_clock (CdkWindow *window) |
250 | { |
251 | if (WINDOW_IS_TOPLEVEL (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_FOREIGN && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
252 | { |
253 | CdkFrameClock *frame_clock = cdk_window_get_frame_clock (window); |
254 | |
255 | g_signal_connect (frame_clock, "after-paint",g_signal_connect_data ((frame_clock), ("after-paint"), (((GCallback ) (on_frame_clock_after_paint))), (window), ((void*)0), (GConnectFlags ) 0) |
256 | G_CALLBACK (on_frame_clock_after_paint), window)g_signal_connect_data ((frame_clock), ("after-paint"), (((GCallback ) (on_frame_clock_after_paint))), (window), ((void*)0), (GConnectFlags ) 0); |
257 | } |
258 | } |
259 | |
260 | void |
261 | _cdk_broadway_display_create_window_impl (CdkDisplay *display, |
262 | CdkWindow *window, |
263 | CdkWindow *real_parent G_GNUC_UNUSED__attribute__ ((__unused__)), |
264 | CdkScreen *screen, |
265 | CdkEventMask event_mask G_GNUC_UNUSED__attribute__ ((__unused__)), |
266 | CdkWindowAttr *attributes G_GNUC_UNUSED__attribute__ ((__unused__)), |
267 | gint attributes_mask G_GNUC_UNUSED__attribute__ ((__unused__))) |
268 | { |
269 | CdkWindowImplBroadway *impl; |
270 | CdkBroadwayDisplay *broadway_display; |
271 | |
272 | broadway_display = CDK_BROADWAY_DISPLAY (display)((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((display)), ((cdk_broadway_display_get_type ())))))); |
273 | |
274 | impl = g_object_new (CDK_TYPE_WINDOW_IMPL_BROADWAY(cdk_window_impl_broadway_get_type ()), NULL((void*)0)); |
275 | window->impl = (CdkWindowImpl *)impl; |
276 | impl->id = _cdk_broadway_server_new_window (broadway_display->server, |
277 | window->x, |
278 | window->y, |
279 | window->width, |
280 | window->height, |
281 | window->window_type == CDK_WINDOW_TEMP); |
282 | g_hash_table_insert (broadway_display->id_ht, GINT_TO_POINTER(impl->id)((gpointer) (glong) (impl->id)), window); |
283 | impl->wrapper = window; |
284 | |
285 | impl->screen = screen; |
286 | |
287 | g_assert (window->window_type == CDK_WINDOW_TOPLEVEL ||do { if (window->window_type == CDK_WINDOW_TOPLEVEL || window ->window_type == CDK_WINDOW_TEMP) ; else g_assertion_message_expr ("Cdk", "cdkwindow-broadway.c", 288, ((const char*) (__func__ )), "window->window_type == CDK_WINDOW_TOPLEVEL || window->window_type == CDK_WINDOW_TEMP" ); } while (0) |
288 | window->window_type == CDK_WINDOW_TEMP)do { if (window->window_type == CDK_WINDOW_TOPLEVEL || window ->window_type == CDK_WINDOW_TEMP) ; else g_assertion_message_expr ("Cdk", "cdkwindow-broadway.c", 288, ((const char*) (__func__ )), "window->window_type == CDK_WINDOW_TOPLEVEL || window->window_type == CDK_WINDOW_TEMP" ); } while (0); |
289 | g_assert (CDK_WINDOW_TYPE (window->parent) == CDK_WINDOW_ROOT)do { if (((((CdkWindow *)(window->parent)))->window_type ) == CDK_WINDOW_ROOT) ; else g_assertion_message_expr ("Cdk", "cdkwindow-broadway.c", 289, ((const char*) (__func__)), "CDK_WINDOW_TYPE (window->parent) == CDK_WINDOW_ROOT" ); } while (0); |
290 | |
291 | broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl); |
292 | |
293 | connect_frame_clock (window); |
294 | } |
295 | |
296 | void |
297 | _cdk_broadway_window_resize_surface (CdkWindow *window) |
298 | { |
299 | CdkWindowImplBroadway *impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
300 | |
301 | if (impl->surface) |
302 | { |
303 | cairo_surface_destroy (impl->surface); |
304 | |
305 | impl->surface = _cdk_broadway_server_create_surface (cdk_window_get_width (impl->wrapper), |
306 | cdk_window_get_height (impl->wrapper)); |
307 | } |
308 | |
309 | if (impl->ref_surface) |
310 | { |
311 | cairo_surface_set_user_data (impl->ref_surface, &cdk_broadway_cairo_key, |
312 | NULL((void*)0), NULL((void*)0)); |
313 | impl->ref_surface = NULL((void*)0); |
314 | } |
315 | |
316 | cdk_window_invalidate_rect (window, NULL((void*)0), TRUE(!(0))); |
317 | } |
318 | |
319 | static void |
320 | ref_surface_destroyed (void *data) |
321 | { |
322 | CdkWindowImplBroadway *impl = data; |
323 | |
324 | impl->ref_surface = NULL((void*)0); |
325 | } |
326 | |
327 | static cairo_surface_t * |
328 | cdk_window_broadway_ref_cairo_surface (CdkWindow *window) |
329 | { |
330 | CdkWindowImplBroadway *impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
331 | int w, h; |
332 | |
333 | if (CDK_IS_WINDOW_IMPL_BROADWAY (window)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) ( (window)); GType __t = ((cdk_window_impl_broadway_get_type () )); gboolean __r; if (!__inst) __r = (0); else if (__inst-> g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))) && |
334 | CDK_WINDOW_DESTROYED (impl->wrapper)(((CdkWindow *)(impl->wrapper))->destroyed)) |
335 | return NULL((void*)0); |
336 | |
337 | w = cdk_window_get_width (impl->wrapper); |
338 | h = cdk_window_get_height (impl->wrapper); |
339 | |
340 | /* Create actual backing store if missing */ |
341 | if (!impl->surface) |
342 | impl->surface = _cdk_broadway_server_create_surface (w, h); |
343 | |
344 | /* Create a destroyable surface referencing the real one */ |
345 | if (!impl->ref_surface) |
346 | { |
347 | impl->ref_surface = |
348 | cairo_surface_create_for_rectangle (impl->surface, |
349 | 0, 0, |
350 | w, h); |
351 | if (impl->ref_surface) |
352 | cairo_surface_set_user_data (impl->ref_surface, &cdk_broadway_cairo_key, |
353 | impl, ref_surface_destroyed); |
354 | } |
355 | else |
356 | cairo_surface_reference (impl->ref_surface); |
357 | |
358 | return impl->ref_surface; |
359 | } |
360 | |
361 | static void |
362 | _cdk_broadway_window_destroy (CdkWindow *window, |
363 | gboolean recursing G_GNUC_UNUSED__attribute__ ((__unused__)), |
364 | gboolean foreign_destroy G_GNUC_UNUSED__attribute__ ((__unused__))) |
365 | { |
366 | CdkWindowImplBroadway *impl; |
367 | CdkBroadwayDisplay *broadway_display; |
368 | |
369 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
370 | |
371 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
372 | |
373 | _cdk_broadway_selection_window_destroyed (window); |
374 | _cdk_broadway_window_grab_check_destroy (window); |
375 | |
376 | if (impl->ref_surface) |
377 | { |
378 | cairo_surface_finish (impl->ref_surface); |
379 | cairo_surface_set_user_data (impl->ref_surface, &cdk_broadway_cairo_key, |
380 | NULL((void*)0), NULL((void*)0)); |
381 | } |
382 | |
383 | if (impl->surface) |
384 | { |
385 | cairo_surface_destroy (impl->surface); |
386 | impl->surface = NULL((void*)0); |
387 | } |
388 | |
389 | broadway_display = CDK_BROADWAY_DISPLAY (cdk_window_get_display (window))((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((cdk_window_get_display (window))), ((cdk_broadway_display_get_type ())))))); |
390 | g_hash_table_remove (broadway_display->id_ht, GINT_TO_POINTER(impl->id)((gpointer) (glong) (impl->id))); |
391 | |
392 | _cdk_broadway_server_destroy_window (broadway_display->server, |
393 | impl->id); |
394 | } |
395 | |
396 | static void |
397 | cdk_broadway_window_destroy_foreign (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
398 | { |
399 | } |
400 | |
401 | /* This function is called when the XWindow is really gone. |
402 | */ |
403 | static void |
404 | cdk_broadway_window_destroy_notify (CdkWindow *window) |
405 | { |
406 | if (!CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed)) |
407 | { |
408 | if (CDK_WINDOW_TYPE(window)((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_FOREIGN) |
409 | g_warning ("CdkWindow %p unexpectedly destroyed", window); |
410 | |
411 | _cdk_window_destroy (window, TRUE(!(0))); |
412 | } |
413 | |
414 | g_object_unref (window); |
415 | } |
416 | |
417 | static void |
418 | cdk_window_broadway_show (CdkWindow *window, |
419 | gboolean already_mapped G_GNUC_UNUSED__attribute__ ((__unused__))) |
420 | { |
421 | CdkWindowImplBroadway *impl; |
422 | CdkBroadwayDisplay *broadway_display; |
423 | |
424 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
425 | impl->visible = TRUE(!(0)); |
426 | |
427 | if (window->event_mask & CDK_STRUCTURE_MASK) |
428 | _cdk_make_event (CDK_WINDOW (window)((((CdkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((window)), ((cdk_window_get_type ())))))), CDK_MAP, NULL((void*)0), FALSE(0)); |
429 | |
430 | if (window->parent && window->parent->event_mask & CDK_SUBSTRUCTURE_MASK) |
431 | _cdk_make_event (CDK_WINDOW (window)((((CdkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((window)), ((cdk_window_get_type ())))))), CDK_MAP, NULL((void*)0), FALSE(0)); |
432 | |
433 | broadway_display = CDK_BROADWAY_DISPLAY (cdk_window_get_display (window))((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((cdk_window_get_display (window))), ((cdk_broadway_display_get_type ())))))); |
434 | if (_cdk_broadway_server_window_show (broadway_display->server, impl->id)) |
435 | queue_flush (window); |
436 | |
437 | } |
438 | |
439 | static void |
440 | cdk_window_broadway_hide (CdkWindow *window) |
441 | { |
442 | CdkWindowImplBroadway *impl; |
443 | CdkBroadwayDisplay *broadway_display; |
444 | |
445 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
446 | impl->visible = FALSE(0); |
447 | |
448 | if (window->event_mask & CDK_STRUCTURE_MASK) |
449 | _cdk_make_event (CDK_WINDOW (window)((((CdkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((window)), ((cdk_window_get_type ())))))), CDK_UNMAP, NULL((void*)0), FALSE(0)); |
450 | |
451 | if (window->parent && window->parent->event_mask & CDK_SUBSTRUCTURE_MASK) |
452 | _cdk_make_event (CDK_WINDOW (window)((((CdkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((window)), ((cdk_window_get_type ())))))), CDK_UNMAP, NULL((void*)0), FALSE(0)); |
453 | |
454 | broadway_display = CDK_BROADWAY_DISPLAY (cdk_window_get_display (window))((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((cdk_window_get_display (window))), ((cdk_broadway_display_get_type ())))))); |
455 | |
456 | _cdk_broadway_window_grab_check_unmap (window, |
457 | _cdk_broadway_server_get_next_serial (broadway_display->server)); |
458 | |
459 | if (_cdk_broadway_server_window_hide (broadway_display->server, impl->id)) |
460 | queue_flush (window); |
461 | |
462 | _cdk_window_clear_update_area (window); |
463 | } |
464 | |
465 | static void |
466 | cdk_window_broadway_withdraw (CdkWindow *window) |
467 | { |
468 | cdk_window_broadway_hide (window); |
469 | } |
470 | |
471 | static void |
472 | cdk_window_broadway_move_resize (CdkWindow *window, |
473 | gboolean with_move, |
474 | gint x, |
475 | gint y, |
476 | gint width, |
477 | gint height) |
478 | { |
479 | CdkWindowImplBroadway *impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
480 | CdkBroadwayDisplay *broadway_display; |
481 | gboolean size_changed; |
482 | |
483 | size_changed = FALSE(0); |
484 | |
485 | broadway_display = CDK_BROADWAY_DISPLAY (cdk_window_get_display (window))((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((cdk_window_get_display (window))), ((cdk_broadway_display_get_type ())))))); |
486 | |
487 | if (width > 0 || height > 0) |
488 | { |
489 | if (width < 1) |
490 | width = 1; |
491 | |
492 | if (height < 1) |
493 | height = 1; |
494 | |
495 | if (width != window->width || |
496 | height != window->height) |
497 | { |
498 | size_changed = TRUE(!(0)); |
499 | |
500 | /* Resize clears the content */ |
501 | impl->dirty = TRUE(!(0)); |
502 | impl->last_synced = FALSE(0); |
503 | |
504 | window->width = width; |
505 | window->height = height; |
506 | _cdk_broadway_window_resize_surface (window); |
507 | } |
508 | } |
509 | |
510 | _cdk_broadway_server_window_move_resize (broadway_display->server, |
511 | impl->id, |
512 | with_move, |
513 | x, y, |
514 | window->width, window->height); |
515 | queue_flush (window); |
516 | if (size_changed) |
517 | window->resize_count++; |
518 | } |
519 | |
520 | static gboolean |
521 | cdk_window_broadway_reparent (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
522 | CdkWindow *new_parent G_GNUC_UNUSED__attribute__ ((__unused__)), |
523 | gint x G_GNUC_UNUSED__attribute__ ((__unused__)), |
524 | gint y G_GNUC_UNUSED__attribute__ ((__unused__))) |
525 | { |
526 | return FALSE(0); |
527 | } |
528 | |
529 | static void |
530 | cdk_window_broadway_raise (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
531 | { |
532 | } |
533 | |
534 | static void |
535 | cdk_window_broadway_restack_under (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
536 | GList *native_siblings G_GNUC_UNUSED__attribute__ ((__unused__)) /* in requested order, first is bottom-most */) |
537 | { |
538 | } |
539 | |
540 | static void |
541 | cdk_window_broadway_restack_toplevel (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
542 | CdkWindow *sibling G_GNUC_UNUSED__attribute__ ((__unused__)), |
543 | gboolean above G_GNUC_UNUSED__attribute__ ((__unused__))) |
544 | { |
545 | } |
546 | |
547 | static void |
548 | cdk_window_broadway_lower (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
549 | { |
550 | } |
551 | |
552 | |
553 | static void |
554 | cdk_broadway_window_focus (CdkWindow *window, |
555 | guint32 timestamp G_GNUC_UNUSED__attribute__ ((__unused__))) |
556 | { |
557 | CdkWindowImplBroadway *impl; |
558 | CdkBroadwayDisplay *broadway_display; |
559 | |
560 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
561 | |
562 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
563 | !window->accept_focus) |
564 | return; |
565 | |
566 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
567 | broadway_display = CDK_BROADWAY_DISPLAY (cdk_window_get_display (window))((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((cdk_window_get_display (window))), ((cdk_broadway_display_get_type ())))))); |
568 | _cdk_broadway_server_window_focus (broadway_display->server, |
569 | impl->id); |
570 | } |
571 | |
572 | static void |
573 | cdk_broadway_window_set_type_hint (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
574 | CdkWindowTypeHint hint G_GNUC_UNUSED__attribute__ ((__unused__))) |
575 | { |
576 | } |
577 | |
578 | static CdkWindowTypeHint |
579 | cdk_broadway_window_get_type_hint (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
580 | { |
581 | return CDK_WINDOW_TYPE_HINT_NORMAL; |
582 | } |
583 | |
584 | static void |
585 | cdk_broadway_window_set_modal_hint (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
586 | gboolean modal G_GNUC_UNUSED__attribute__ ((__unused__))) |
587 | { |
588 | } |
589 | |
590 | static void |
591 | cdk_broadway_window_set_skip_taskbar_hint (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
592 | gboolean skips_taskbar G_GNUC_UNUSED__attribute__ ((__unused__))) |
593 | { |
594 | } |
595 | |
596 | static void |
597 | cdk_broadway_window_set_skip_pager_hint (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
598 | gboolean skips_pager G_GNUC_UNUSED__attribute__ ((__unused__))) |
599 | { |
600 | } |
601 | |
602 | static void |
603 | cdk_broadway_window_set_urgency_hint (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
604 | gboolean urgent G_GNUC_UNUSED__attribute__ ((__unused__))) |
605 | { |
606 | } |
607 | |
608 | static void |
609 | cdk_broadway_window_set_geometry_hints (CdkWindow *window, |
610 | const CdkGeometry *geometry, |
611 | CdkWindowHints geom_mask) |
612 | { |
613 | CdkWindowImplBroadway *impl; |
614 | |
615 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
616 | |
617 | impl->geometry_hints = *geometry; |
618 | impl->geometry_hints_mask = geom_mask; |
619 | } |
620 | |
621 | static void |
622 | cdk_broadway_window_set_title (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
623 | const gchar *title G_GNUC_UNUSED__attribute__ ((__unused__))) |
624 | { |
625 | } |
626 | |
627 | static void |
628 | cdk_broadway_window_set_role (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
629 | const gchar *role G_GNUC_UNUSED__attribute__ ((__unused__))) |
630 | { |
631 | } |
632 | |
633 | static void |
634 | cdk_broadway_window_set_startup_id (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
635 | const gchar *startup_id G_GNUC_UNUSED__attribute__ ((__unused__))) |
636 | { |
637 | } |
638 | |
639 | static void |
640 | cdk_broadway_window_set_transient_for (CdkWindow *window, |
641 | CdkWindow *parent) |
642 | { |
643 | CdkBroadwayDisplay *display; |
644 | CdkWindowImplBroadway *impl; |
645 | int parent_id; |
646 | |
647 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
648 | |
649 | parent_id = 0; |
650 | if (parent) |
651 | parent_id = CDK_WINDOW_IMPL_BROADWAY (parent->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((parent->impl)), ((cdk_window_impl_broadway_get_type ()))))))->id; |
652 | |
653 | impl->transient_for = parent_id; |
654 | |
655 | display = CDK_BROADWAY_DISPLAY (cdk_window_get_display (impl->wrapper))((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((cdk_window_get_display (impl->wrapper)) ), ((cdk_broadway_display_get_type())))))); |
656 | _cdk_broadway_server_window_set_transient_for (display->server, impl->id, impl->transient_for); |
657 | } |
658 | |
659 | static void |
660 | cdk_window_broadway_set_background (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
661 | cairo_pattern_t *pattern G_GNUC_UNUSED__attribute__ ((__unused__))) |
662 | { |
663 | return; |
664 | } |
665 | |
666 | static void |
667 | cdk_window_broadway_set_device_cursor (CdkWindow *window, |
668 | CdkDevice *device, |
669 | CdkCursor *cursor) |
670 | { |
671 | CdkWindowImplBroadway *impl; |
672 | |
673 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
674 | g_return_if_fail (CDK_IS_DEVICE (device))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((device)); GType __t = ((cdk_device_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_DEVICE (device)"); return; } } while (0); |
675 | |
676 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
677 | |
678 | if (!cursor) |
679 | g_hash_table_remove (impl->device_cursor, device); |
680 | else |
681 | { |
682 | _cdk_broadway_cursor_update_theme (cursor); |
683 | g_hash_table_replace (impl->device_cursor, |
684 | device, g_object_ref (cursor)((__typeof__ (cursor)) (g_object_ref) (cursor))); |
685 | } |
686 | |
687 | if (!CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed)) |
688 | CDK_DEVICE_GET_CLASS (device)((((CdkDeviceClass*) (((GTypeInstance*) ((device)))->g_class ))))->set_window_cursor (device, window, cursor); |
689 | } |
690 | |
691 | static void |
692 | cdk_window_broadway_get_geometry (CdkWindow *window, |
693 | gint *x, |
694 | gint *y, |
695 | gint *width, |
696 | gint *height) |
697 | { |
698 | CdkWindowImplBroadway *impl; |
699 | |
700 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
701 | |
702 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
703 | |
704 | /* TODO: These should really roundtrip to the client to get the current data */ |
705 | |
706 | if (x) |
707 | *x = impl->wrapper->x; |
708 | if (y) |
709 | *y = impl->wrapper->y; |
710 | if (width) |
711 | *width = impl->wrapper->width; |
712 | if (height) |
713 | *height = impl->wrapper->height; |
714 | |
715 | } |
716 | |
717 | static void |
718 | cdk_window_broadway_get_root_coords (CdkWindow *window, |
719 | gint x, |
720 | gint y, |
721 | gint *root_x, |
722 | gint *root_y) |
723 | { |
724 | CdkWindowImplBroadway *impl; |
725 | |
726 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
727 | |
728 | if (root_x) |
729 | *root_x = x + impl->wrapper->x; |
730 | if (root_y) |
731 | *root_y = y + impl->wrapper->y; |
732 | } |
733 | |
734 | static void |
735 | cdk_broadway_window_get_frame_extents (CdkWindow *window, |
736 | CdkRectangle *rect) |
737 | { |
738 | g_return_if_fail (rect != NULL)do { if ((rect != ((void*)0))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__)), "rect != NULL"); return; } } while (0); |
739 | |
740 | /* TODO: This should take wm frame into account */ |
741 | |
742 | rect->x = window->x; |
743 | rect->y = window->y; |
744 | rect->width = window->width; |
745 | rect->height = window->height; |
746 | } |
747 | |
748 | static gboolean |
749 | cdk_window_broadway_get_device_state (CdkWindow *window, |
750 | CdkDevice *device, |
751 | gdouble *x, |
752 | gdouble *y, |
753 | CdkModifierType *mask) |
754 | { |
755 | CdkWindow *child; |
756 | |
757 | g_return_val_if_fail (window == NULL || CDK_IS_WINDOW (window), FALSE)do { if ((window == ((void*)0) || (((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst-> g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__)), "window == NULL || CDK_IS_WINDOW (window)" ); return ((0)); } } while (0); |
758 | |
759 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed)) |
760 | return FALSE(0); |
761 | |
762 | CDK_DEVICE_GET_CLASS (device)((((CdkDeviceClass*) (((GTypeInstance*) ((device)))->g_class ))))->query_state (device, window, |
763 | NULL((void*)0), &child, |
764 | NULL((void*)0), NULL((void*)0), |
765 | x, y, mask); |
766 | return child != NULL((void*)0); |
767 | } |
768 | |
769 | static CdkEventMask |
770 | cdk_window_broadway_get_events (CdkWindow *window) |
771 | { |
772 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed)) |
773 | return 0; |
774 | |
775 | return 0; |
776 | } |
777 | |
778 | static void |
779 | cdk_window_broadway_set_events (CdkWindow *window, |
780 | CdkEventMask event_mask G_GNUC_UNUSED__attribute__ ((__unused__))) |
781 | { |
782 | if (!CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed)) |
783 | { |
784 | } |
785 | } |
786 | |
787 | static void |
788 | cdk_window_broadway_shape_combine_region (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
789 | const cairo_region_t *shape_region G_GNUC_UNUSED__attribute__ ((__unused__)), |
790 | gint offset_x G_GNUC_UNUSED__attribute__ ((__unused__)), |
791 | gint offset_y G_GNUC_UNUSED__attribute__ ((__unused__))) |
792 | { |
793 | } |
794 | |
795 | static void |
796 | cdk_window_broadway_input_shape_combine_region (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
797 | const cairo_region_t *shape_region G_GNUC_UNUSED__attribute__ ((__unused__)), |
798 | gint offset_x G_GNUC_UNUSED__attribute__ ((__unused__)), |
799 | gint offset_y G_GNUC_UNUSED__attribute__ ((__unused__))) |
800 | { |
801 | } |
802 | |
803 | |
804 | static void |
805 | cdk_broadway_window_set_override_redirect (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
806 | gboolean override_redirect G_GNUC_UNUSED__attribute__ ((__unused__))) |
807 | { |
808 | } |
809 | |
810 | static void |
811 | cdk_broadway_window_set_accept_focus (CdkWindow *window, |
812 | gboolean accept_focus) |
813 | { |
814 | accept_focus = accept_focus != FALSE(0); |
815 | |
816 | if (window->accept_focus != accept_focus) |
817 | { |
818 | window->accept_focus = accept_focus; |
819 | } |
820 | } |
821 | |
822 | static void |
823 | cdk_broadway_window_set_focus_on_map (CdkWindow *window, |
824 | gboolean focus_on_map) |
825 | { |
826 | focus_on_map = focus_on_map != FALSE(0); |
827 | |
828 | if (window->focus_on_map != focus_on_map) |
829 | { |
830 | window->focus_on_map = focus_on_map; |
831 | } |
832 | } |
833 | |
834 | |
835 | static void |
836 | cdk_broadway_window_set_icon_list (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
837 | GList *pixbufs G_GNUC_UNUSED__attribute__ ((__unused__))) |
838 | { |
839 | } |
840 | |
841 | static void |
842 | cdk_broadway_window_set_icon_name (CdkWindow *window, |
843 | const gchar *name) |
844 | { |
845 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
846 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
847 | return; |
848 | |
849 | g_object_set_qdata (G_OBJECT (window)((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((window)), (((GType) ((20) << (2)))))))), g_quark_from_static_string ("cdk-icon-name-set"), |
850 | GUINT_TO_POINTER (name != NULL)((gpointer) (gulong) (name != ((void*)0)))); |
851 | } |
852 | |
853 | static void |
854 | cdk_broadway_window_iconify (CdkWindow *window) |
855 | { |
856 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
857 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
858 | return; |
859 | } |
860 | |
861 | static void |
862 | cdk_broadway_window_deiconify (CdkWindow *window) |
863 | { |
864 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
865 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
866 | return; |
867 | } |
868 | |
869 | static void |
870 | cdk_broadway_window_stick (CdkWindow *window) |
871 | { |
872 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
873 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
874 | return; |
875 | |
876 | } |
877 | |
878 | static void |
879 | cdk_broadway_window_unstick (CdkWindow *window) |
880 | { |
881 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
882 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
883 | return; |
884 | |
885 | } |
886 | |
887 | static void |
888 | cdk_broadway_window_maximize (CdkWindow *window) |
889 | { |
890 | CdkWindowImplBroadway *impl; |
891 | CdkScreen *screen; |
892 | |
893 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
894 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
895 | return; |
896 | |
897 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
898 | |
899 | if (impl->maximized) |
900 | return; |
901 | |
902 | impl->maximized = TRUE(!(0)); |
903 | |
904 | cdk_synthesize_window_state (window, 0, CDK_WINDOW_STATE_MAXIMIZED); |
905 | |
906 | impl->pre_maximize_x = window->x; |
907 | impl->pre_maximize_y = window->y; |
908 | impl->pre_maximize_width = window->width; |
909 | impl->pre_maximize_height = window->height; |
910 | |
911 | screen = cdk_window_get_screen (window); |
912 | |
913 | cdk_window_move_resize (window, 0, 0, |
914 | cdk_screen_get_width (screen), |
915 | cdk_screen_get_height (screen)); |
916 | } |
917 | |
918 | static void |
919 | cdk_broadway_window_unmaximize (CdkWindow *window) |
920 | { |
921 | CdkWindowImplBroadway *impl; |
922 | |
923 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
924 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
925 | return; |
926 | |
927 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
928 | |
929 | if (!impl->maximized) |
930 | return; |
931 | |
932 | impl->maximized = FALSE(0); |
933 | |
934 | cdk_synthesize_window_state (window, CDK_WINDOW_STATE_MAXIMIZED, 0); |
935 | |
936 | cdk_window_move_resize (window, |
937 | impl->pre_maximize_x, |
938 | impl->pre_maximize_y, |
939 | impl->pre_maximize_width, |
940 | impl->pre_maximize_height); |
941 | } |
942 | |
943 | static void |
944 | cdk_broadway_window_fullscreen (CdkWindow *window) |
945 | { |
946 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
947 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
948 | return; |
949 | |
950 | } |
951 | |
952 | static void |
953 | cdk_broadway_window_unfullscreen (CdkWindow *window) |
954 | { |
955 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
956 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
957 | return; |
958 | |
959 | } |
960 | |
961 | static void |
962 | cdk_broadway_window_set_keep_above (CdkWindow *window, |
963 | gboolean setting G_GNUC_UNUSED__attribute__ ((__unused__))) |
964 | { |
965 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
966 | |
967 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
968 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
969 | return; |
970 | |
971 | } |
972 | |
973 | static void |
974 | cdk_broadway_window_set_keep_below (CdkWindow *window, |
975 | gboolean setting G_GNUC_UNUSED__attribute__ ((__unused__))) |
976 | { |
977 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
978 | |
979 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
980 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
981 | return; |
982 | |
983 | } |
984 | |
985 | static CdkWindow * |
986 | cdk_broadway_window_get_group (CdkWindow *window) |
987 | { |
988 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
989 | !WINDOW_IS_TOPLEVEL (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_FOREIGN && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
990 | return NULL((void*)0); |
991 | |
992 | return window; |
993 | } |
994 | |
995 | static void |
996 | cdk_broadway_window_set_group (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
997 | CdkWindow *leader G_GNUC_UNUSED__attribute__ ((__unused__))) |
998 | { |
999 | } |
1000 | |
1001 | static void |
1002 | cdk_broadway_window_set_decorations (CdkWindow *window, |
1003 | CdkWMDecoration decorations G_GNUC_UNUSED__attribute__ ((__unused__))) |
1004 | { |
1005 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
1006 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
1007 | return; |
1008 | |
1009 | } |
1010 | |
1011 | static gboolean |
1012 | cdk_broadway_window_get_decorations (CdkWindow *window, |
1013 | CdkWMDecoration *decorations G_GNUC_UNUSED__attribute__ ((__unused__))) |
1014 | { |
1015 | gboolean result = FALSE(0); |
1016 | |
1017 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
1018 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
1019 | return FALSE(0); |
1020 | |
1021 | return result; |
1022 | } |
1023 | |
1024 | static void |
1025 | cdk_broadway_window_set_functions (CdkWindow *window, |
1026 | CdkWMFunction functions G_GNUC_UNUSED__attribute__ ((__unused__))) |
1027 | { |
1028 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
1029 | |
1030 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
1031 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
1032 | return; |
1033 | } |
1034 | |
1035 | static cairo_region_t * |
1036 | cdk_broadway_window_get_shape (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
1037 | { |
1038 | return NULL((void*)0); |
1039 | } |
1040 | |
1041 | static cairo_region_t * |
1042 | cdk_broadway_window_get_input_shape (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
1043 | { |
1044 | return NULL((void*)0); |
1045 | } |
1046 | |
1047 | static void |
1048 | cdk_broadway_window_end_paint (CdkWindow *window) |
1049 | { |
1050 | CdkWindowImplBroadway *impl; |
1051 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
1052 | impl->dirty = TRUE(!(0)); |
1053 | } |
1054 | |
1055 | typedef struct _MoveResizeData MoveResizeData; |
1056 | |
1057 | struct _MoveResizeData |
1058 | { |
1059 | CdkDisplay *display; |
1060 | |
1061 | CdkWindow *moveresize_window; |
1062 | CdkWindow *moveresize_emulation_window; |
1063 | gboolean is_resize; |
1064 | CdkWindowEdge resize_edge; |
1065 | gint moveresize_button; |
1066 | gint moveresize_x; |
1067 | gint moveresize_y; |
1068 | gint moveresize_orig_x; |
1069 | gint moveresize_orig_y; |
1070 | gint moveresize_orig_width; |
1071 | gint moveresize_orig_height; |
1072 | long moveresize_process_time; |
1073 | CdkWindowHints moveresize_geom_mask; |
1074 | CdkGeometry moveresize_geometry; |
1075 | BroadwayInputMsg *moveresize_pending_event; |
1076 | }; |
1077 | |
1078 | static MoveResizeData * |
1079 | get_move_resize_data (CdkDisplay *display, |
1080 | gboolean create) |
1081 | { |
1082 | CdkBroadwayDisplay *broadway_display; |
1083 | MoveResizeData *mv_resize; |
1084 | |
1085 | broadway_display = CDK_BROADWAY_DISPLAY (display)((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((display)), ((cdk_broadway_display_get_type ())))))); |
1086 | |
1087 | mv_resize = broadway_display->move_resize_data; |
1088 | |
1089 | if (!mv_resize && create) |
1090 | { |
1091 | mv_resize = g_new0 (MoveResizeData, 1)((MoveResizeData *) g_malloc0_n ((1), sizeof (MoveResizeData) )); |
1092 | mv_resize->display = display; |
1093 | |
1094 | broadway_display->move_resize_data = mv_resize; |
1095 | } |
1096 | |
1097 | return mv_resize; |
1098 | } |
1099 | |
1100 | static void |
1101 | update_pos (MoveResizeData *mv_resize, |
1102 | gint new_root_x, |
1103 | gint new_root_y) |
1104 | { |
1105 | gint dx, dy; |
1106 | |
1107 | dx = new_root_x - mv_resize->moveresize_x; |
1108 | dy = new_root_y - mv_resize->moveresize_y; |
1109 | |
1110 | if (mv_resize->is_resize) |
1111 | { |
1112 | gint x, y, w, h; |
1113 | |
1114 | x = mv_resize->moveresize_orig_x; |
1115 | y = mv_resize->moveresize_orig_y; |
1116 | |
1117 | w = mv_resize->moveresize_orig_width; |
1118 | h = mv_resize->moveresize_orig_height; |
1119 | |
1120 | switch (mv_resize->resize_edge) |
1121 | { |
1122 | case CDK_WINDOW_EDGE_NORTH_WEST: |
1123 | x += dx; |
1124 | y += dy; |
1125 | w -= dx; |
1126 | h -= dy; |
1127 | break; |
1128 | case CDK_WINDOW_EDGE_NORTH: |
1129 | y += dy; |
1130 | h -= dy; |
1131 | break; |
1132 | case CDK_WINDOW_EDGE_NORTH_EAST: |
1133 | y += dy; |
1134 | h -= dy; |
1135 | w += dx; |
1136 | break; |
1137 | case CDK_WINDOW_EDGE_SOUTH_WEST: |
1138 | h += dy; |
1139 | x += dx; |
1140 | w -= dx; |
1141 | break; |
1142 | case CDK_WINDOW_EDGE_SOUTH_EAST: |
1143 | w += dx; |
1144 | h += dy; |
1145 | break; |
1146 | case CDK_WINDOW_EDGE_SOUTH: |
1147 | h += dy; |
1148 | break; |
1149 | case CDK_WINDOW_EDGE_EAST: |
1150 | w += dx; |
1151 | break; |
1152 | case CDK_WINDOW_EDGE_WEST: |
1153 | x += dx; |
1154 | w -= dx; |
1155 | break; |
1156 | } |
1157 | |
1158 | x = MAX (x, 0)(((x) > (0)) ? (x) : (0)); |
1159 | y = MAX (y, 0)(((y) > (0)) ? (y) : (0)); |
1160 | w = MAX (w, 1)(((w) > (1)) ? (w) : (1)); |
1161 | h = MAX (h, 1)(((h) > (1)) ? (h) : (1)); |
1162 | |
1163 | if (mv_resize->moveresize_geom_mask) |
1164 | { |
1165 | cdk_window_constrain_size (&mv_resize->moveresize_geometry, |
1166 | mv_resize->moveresize_geom_mask, |
1167 | w, h, &w, &h); |
1168 | } |
1169 | |
1170 | cdk_window_move_resize (mv_resize->moveresize_window, x, y, w, h); |
1171 | } |
1172 | else |
1173 | { |
1174 | gint x, y; |
1175 | |
1176 | x = mv_resize->moveresize_orig_x + dx; |
1177 | y = mv_resize->moveresize_orig_y + dy; |
1178 | |
1179 | cdk_window_move (mv_resize->moveresize_window, x, y); |
1180 | } |
1181 | } |
1182 | |
1183 | static void |
1184 | finish_drag (MoveResizeData *mv_resize) |
1185 | { |
1186 | cdk_window_destroy (mv_resize->moveresize_emulation_window); |
1187 | mv_resize->moveresize_emulation_window = NULL((void*)0); |
1188 | g_object_unref (mv_resize->moveresize_window); |
1189 | mv_resize->moveresize_window = NULL((void*)0); |
1190 | g_clear_pointer (&mv_resize->moveresize_pending_event, g_free)do { _Static_assert (sizeof *(&mv_resize->moveresize_pending_event ) == sizeof (gpointer), "Expression evaluates to false"); __typeof__ ((&mv_resize->moveresize_pending_event)) _pp = (& mv_resize->moveresize_pending_event); __typeof__ (*(&mv_resize ->moveresize_pending_event)) _ptr = *_pp; *_pp = ((void*)0 ); if (_ptr) (g_free) (_ptr); } while (0); |
1191 | } |
1192 | |
1193 | static gboolean |
1194 | moveresize_lookahead (CdkDisplay *display, |
1195 | MoveResizeData *mv_resize G_GNUC_UNUSED__attribute__ ((__unused__)), |
1196 | BroadwayInputMsg *event G_GNUC_UNUSED__attribute__ ((__unused__))) |
1197 | { |
1198 | CdkBroadwayDisplay *broadway_display; |
1199 | |
1200 | broadway_display = CDK_BROADWAY_DISPLAY (display)((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((display)), ((cdk_broadway_display_get_type ())))))); |
1201 | |
1202 | return !_cdk_broadway_server_lookahead_event (broadway_display->server, "mb"); |
1203 | } |
1204 | |
1205 | gboolean |
1206 | _cdk_broadway_moveresize_handle_event (CdkDisplay *display, |
1207 | BroadwayInputMsg *event) |
1208 | { |
1209 | guint button_mask = 0; |
1210 | MoveResizeData *mv_resize = get_move_resize_data (display, FALSE(0)); |
1211 | |
1212 | if (!mv_resize || !mv_resize->moveresize_window) |
1213 | return FALSE(0); |
1214 | |
1215 | button_mask = CDK_BUTTON1_MASK << (mv_resize->moveresize_button - 1); |
1216 | |
1217 | switch (event->base.type) |
1218 | { |
1219 | case BROADWAY_EVENT_TOUCH: |
1220 | if (event->touch.touch_type == 2) /* END */ |
1221 | { |
1222 | update_pos (mv_resize, |
1223 | event->touch.root_x, |
1224 | event->touch.root_y); |
1225 | |
1226 | finish_drag (mv_resize); |
1227 | } |
1228 | else if (event->touch.touch_type == 1) /* UPDATE */ |
1229 | { |
1230 | if (mv_resize->moveresize_window->resize_count > 0) |
1231 | { |
1232 | if (mv_resize->moveresize_pending_event) |
1233 | *mv_resize->moveresize_pending_event = *event; |
1234 | else |
1235 | mv_resize->moveresize_pending_event = |
1236 | g_memdup2 (event, sizeof (BroadwayInputMsg)); |
1237 | |
1238 | break; |
1239 | } |
1240 | update_pos (mv_resize, |
1241 | event->touch.root_x, |
1242 | event->touch.root_y); |
1243 | } |
1244 | |
1245 | break; |
1246 | |
1247 | case BROADWAY_EVENT_POINTER_MOVE: |
1248 | if (mv_resize->moveresize_window->resize_count > 0) |
1249 | { |
1250 | if (mv_resize->moveresize_pending_event) |
1251 | *mv_resize->moveresize_pending_event = *event; |
1252 | else |
1253 | mv_resize->moveresize_pending_event = |
1254 | g_memdup2 (event, sizeof (BroadwayInputMsg)); |
1255 | |
1256 | break; |
1257 | } |
1258 | if (!moveresize_lookahead (display, mv_resize, event)) |
1259 | break; |
1260 | |
1261 | update_pos (mv_resize, |
1262 | event->pointer.root_x, |
1263 | event->pointer.root_y); |
1264 | |
1265 | /* This should never be triggered in normal cases, but in the |
1266 | * case where the drag started without an implicit grab being |
1267 | * in effect, we could miss the release if it occurs before |
1268 | * we grab the pointer; this ensures that we will never |
1269 | * get a permanently stuck grab. |
1270 | */ |
1271 | if ((event->pointer.state & button_mask) == 0) |
1272 | finish_drag (mv_resize); |
1273 | break; |
1274 | |
1275 | case BROADWAY_EVENT_BUTTON_RELEASE: |
1276 | update_pos (mv_resize, |
1277 | event->pointer.root_x, |
1278 | event->pointer.root_y); |
1279 | |
1280 | if (event->button.button == mv_resize->moveresize_button) |
1281 | finish_drag (mv_resize); |
1282 | break; |
1283 | } |
1284 | return TRUE(!(0)); |
1285 | } |
1286 | |
1287 | gboolean |
1288 | _cdk_broadway_moveresize_configure_done (CdkDisplay *display, |
1289 | CdkWindow *window) |
1290 | { |
1291 | MoveResizeData *mv_resize = get_move_resize_data (display, FALSE(0)); |
1292 | |
1293 | if (!mv_resize || window != mv_resize->moveresize_window) |
1294 | return FALSE(0); |
1295 | |
1296 | if (mv_resize->moveresize_pending_event) |
1297 | { |
1298 | BroadwayInputMsg *tmp_event; |
1299 | |
1300 | tmp_event = mv_resize->moveresize_pending_event; |
1301 | mv_resize->moveresize_pending_event = NULL((void*)0); |
1302 | _cdk_broadway_moveresize_handle_event (display, tmp_event); |
1303 | g_free (tmp_event); |
1304 | } |
1305 | |
1306 | return TRUE(!(0)); |
1307 | } |
1308 | |
1309 | static void |
1310 | create_moveresize_window (MoveResizeData *mv_resize, |
1311 | guint32 timestamp) |
1312 | { |
1313 | CdkWindowAttr attributes; |
1314 | gint attributes_mask; |
1315 | CdkGrabStatus status; |
1316 | |
1317 | g_assert (mv_resize->moveresize_emulation_window == NULL)do { if (mv_resize->moveresize_emulation_window == ((void* )0)) ; else g_assertion_message_expr ("Cdk", "cdkwindow-broadway.c" , 1317, ((const char*) (__func__)), "mv_resize->moveresize_emulation_window == NULL" ); } while (0); |
1318 | |
1319 | attributes.x = -100; |
1320 | attributes.y = -100; |
1321 | attributes.width = 10; |
1322 | attributes.height = 10; |
1323 | attributes.window_type = CDK_WINDOW_TEMP; |
1324 | attributes.wclass = CDK_INPUT_ONLY; |
1325 | attributes.override_redirect = TRUE(!(0)); |
1326 | attributes.event_mask = 0; |
1327 | |
1328 | attributes_mask = CDK_WA_X | CDK_WA_Y | CDK_WA_NOREDIR; |
1329 | |
1330 | mv_resize->moveresize_emulation_window = |
1331 | cdk_window_new (cdk_screen_get_root_window (cdk_display_get_default_screen (mv_resize->display)), |
1332 | &attributes, |
1333 | attributes_mask); |
1334 | |
1335 | cdk_window_show (mv_resize->moveresize_emulation_window); |
1336 | |
1337 | status = cdk_pointer_grab (mv_resize->moveresize_emulation_window, |
1338 | FALSE(0), |
1339 | CDK_BUTTON_RELEASE_MASK | |
1340 | CDK_POINTER_MOTION_MASK, |
1341 | NULL((void*)0), |
1342 | NULL((void*)0), |
1343 | timestamp); |
1344 | |
1345 | if (status != CDK_GRAB_SUCCESS) |
1346 | { |
1347 | /* If this fails, some other client has grabbed the window |
1348 | * already. |
1349 | */ |
1350 | finish_drag (mv_resize); |
1351 | } |
1352 | |
1353 | mv_resize->moveresize_process_time = 0; |
1354 | } |
1355 | |
1356 | static void |
1357 | calculate_unmoving_origin (MoveResizeData *mv_resize) |
1358 | { |
1359 | CdkRectangle rect; |
1360 | gint width, height; |
1361 | |
1362 | if (mv_resize->moveresize_geom_mask & CDK_HINT_WIN_GRAVITY && |
1363 | mv_resize->moveresize_geometry.win_gravity == CDK_GRAVITY_STATIC) |
1364 | { |
1365 | cdk_window_get_origin (mv_resize->moveresize_window, |
1366 | &mv_resize->moveresize_orig_x, |
1367 | &mv_resize->moveresize_orig_y); |
1368 | } |
1369 | else |
1370 | { |
1371 | cdk_window_get_frame_extents (mv_resize->moveresize_window, &rect); |
1372 | cdk_window_get_geometry (mv_resize->moveresize_window, |
1373 | NULL((void*)0), NULL((void*)0), &width, &height); |
1374 | |
1375 | switch (mv_resize->moveresize_geometry.win_gravity) |
1376 | { |
1377 | case CDK_GRAVITY_NORTH_WEST: |
1378 | mv_resize->moveresize_orig_x = rect.x; |
1379 | mv_resize->moveresize_orig_y = rect.y; |
1380 | break; |
1381 | case CDK_GRAVITY_NORTH: |
1382 | mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2; |
1383 | mv_resize->moveresize_orig_y = rect.y; |
1384 | break; |
1385 | case CDK_GRAVITY_NORTH_EAST: |
1386 | mv_resize->moveresize_orig_x = rect.x + rect.width - width; |
1387 | mv_resize->moveresize_orig_y = rect.y; |
1388 | break; |
1389 | case CDK_GRAVITY_WEST: |
1390 | mv_resize->moveresize_orig_x = rect.x; |
1391 | mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2; |
1392 | break; |
1393 | case CDK_GRAVITY_CENTER: |
1394 | mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2; |
1395 | mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2; |
1396 | break; |
1397 | case CDK_GRAVITY_EAST: |
1398 | mv_resize->moveresize_orig_x = rect.x + rect.width - width; |
1399 | mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2; |
1400 | break; |
1401 | case CDK_GRAVITY_SOUTH_WEST: |
1402 | mv_resize->moveresize_orig_x = rect.x; |
1403 | mv_resize->moveresize_orig_y = rect.y + rect.height - height; |
1404 | break; |
1405 | case CDK_GRAVITY_SOUTH: |
1406 | mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2; |
1407 | mv_resize->moveresize_orig_y = rect.y + rect.height - height; |
1408 | break; |
1409 | case CDK_GRAVITY_SOUTH_EAST: |
1410 | mv_resize->moveresize_orig_x = rect.x + rect.width - width; |
1411 | mv_resize->moveresize_orig_y = rect.y + rect.height - height; |
1412 | break; |
1413 | default: |
1414 | mv_resize->moveresize_orig_x = rect.x; |
1415 | mv_resize->moveresize_orig_y = rect.y; |
1416 | break; |
1417 | } |
1418 | } |
1419 | } |
1420 | |
1421 | static void |
1422 | cdk_broadway_window_begin_resize_drag (CdkWindow *window, |
1423 | CdkWindowEdge edge, |
1424 | CdkDevice *device G_GNUC_UNUSED__attribute__ ((__unused__)), |
1425 | gint button, |
1426 | gint root_x, |
1427 | gint root_y, |
1428 | guint32 timestamp) |
1429 | { |
1430 | MoveResizeData *mv_resize; |
1431 | CdkWindowImplBroadway *impl; |
1432 | |
1433 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
1434 | |
1435 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
1436 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
1437 | return; |
1438 | |
1439 | if (impl->maximized) |
1440 | return; |
1441 | |
1442 | mv_resize = get_move_resize_data (cdk_window_get_display (window), TRUE(!(0))); |
1443 | |
1444 | mv_resize->is_resize = TRUE(!(0)); |
1445 | mv_resize->moveresize_button = button; |
1446 | mv_resize->resize_edge = edge; |
1447 | mv_resize->moveresize_x = root_x; |
1448 | mv_resize->moveresize_y = root_y; |
1449 | mv_resize->moveresize_window = g_object_ref (window)((__typeof__ (window)) (g_object_ref) (window)); |
1450 | |
1451 | mv_resize->moveresize_orig_width = cdk_window_get_width (window); |
1452 | mv_resize->moveresize_orig_height = cdk_window_get_height (window); |
1453 | |
1454 | mv_resize->moveresize_geom_mask = impl->geometry_hints_mask; |
1455 | mv_resize->moveresize_geometry = impl->geometry_hints; |
1456 | |
1457 | calculate_unmoving_origin (mv_resize); |
1458 | |
1459 | create_moveresize_window (mv_resize, timestamp); |
1460 | } |
1461 | |
1462 | static void |
1463 | cdk_broadway_window_begin_move_drag (CdkWindow *window, |
1464 | CdkDevice *device G_GNUC_UNUSED__attribute__ ((__unused__)), |
1465 | gint button, |
1466 | gint root_x, |
1467 | gint root_y, |
1468 | guint32 timestamp) |
1469 | { |
1470 | MoveResizeData *mv_resize; |
1471 | CdkWindowImplBroadway *impl; |
1472 | |
1473 | impl = CDK_WINDOW_IMPL_BROADWAY (window->impl)((((CdkWindowImplBroadway*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((window->impl)), ((cdk_window_impl_broadway_get_type ())))))); |
1474 | |
1475 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
1476 | !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
1477 | return; |
1478 | |
1479 | if (impl->maximized) |
1480 | return; |
1481 | |
1482 | mv_resize = get_move_resize_data (cdk_window_get_display (window), TRUE(!(0))); |
1483 | |
1484 | mv_resize->is_resize = FALSE(0); |
1485 | mv_resize->moveresize_button = button; |
1486 | mv_resize->moveresize_x = root_x; |
1487 | mv_resize->moveresize_y = root_y; |
1488 | mv_resize->moveresize_window = g_object_ref (window)((__typeof__ (window)) (g_object_ref) (window)); |
1489 | |
1490 | mv_resize->moveresize_orig_width = cdk_window_get_width (window); |
1491 | mv_resize->moveresize_orig_height = cdk_window_get_height (window); |
1492 | |
1493 | mv_resize->moveresize_geom_mask = impl->geometry_hints_mask; |
1494 | mv_resize->moveresize_geometry = impl->geometry_hints; |
1495 | |
1496 | calculate_unmoving_origin (mv_resize); |
1497 | |
1498 | create_moveresize_window (mv_resize, timestamp); |
1499 | } |
1500 | |
1501 | static gboolean |
1502 | cdk_broadway_window_beep (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__))) |
1503 | { |
1504 | return FALSE(0); |
1505 | } |
1506 | |
1507 | static void |
1508 | cdk_broadway_window_set_opacity (CdkWindow *window, |
1509 | gdouble opacity) |
1510 | { |
1511 | g_return_if_fail (CDK_IS_WINDOW (window))do { if (((((__extension__ ({ GTypeInstance *__inst = (GTypeInstance *) ((window)); GType __t = ((cdk_window_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; })))))) { } else { g_return_if_fail_warning ("Cdk", ((const char*) (__func__ )), "CDK_IS_WINDOW (window)"); return; } } while (0); |
1512 | |
1513 | if (CDK_WINDOW_DESTROYED (window)(((CdkWindow *)(window))->destroyed) || |
1514 | !WINDOW_IS_TOPLEVEL (window)(((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_CHILD && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_FOREIGN && ((((CdkWindow *)(window)))->window_type) != CDK_WINDOW_OFFSCREEN )) |
1515 | return; |
1516 | |
1517 | if (opacity < 0) |
1518 | opacity = 0; |
Value stored to 'opacity' is never read | |
1519 | else if (opacity > 1) |
1520 | opacity = 1; |
1521 | } |
1522 | |
1523 | static void |
1524 | cdk_broadway_window_set_composited (CdkWindow *window G_GNUC_UNUSED__attribute__ ((__unused__)), |
1525 | gboolean composited G_GNUC_UNUSED__attribute__ ((__unused__))) |
1526 | { |
1527 | } |
1528 | |
1529 | void |
1530 | _cdk_broadway_display_before_process_all_updates (CdkDisplay *display G_GNUC_UNUSED__attribute__ ((__unused__))) |
1531 | { |
1532 | } |
1533 | |
1534 | void |
1535 | _cdk_broadway_display_after_process_all_updates (CdkDisplay *display G_GNUC_UNUSED__attribute__ ((__unused__))) |
1536 | { |
1537 | } |
1538 | |
1539 | guint32 |
1540 | cdk_broadway_get_last_seen_time (CdkWindow *window) |
1541 | { |
1542 | CdkDisplay *display; |
1543 | |
1544 | display = cdk_window_get_display (window); |
1545 | return _cdk_broadway_server_get_last_seen_time (CDK_BROADWAY_DISPLAY (display)((((CdkBroadwayDisplay*) (void *) g_type_check_instance_cast ( (GTypeInstance*) ((display)), ((cdk_broadway_display_get_type ()))))))->server); |
1546 | } |
1547 | |
1548 | static void |
1549 | cdk_window_impl_broadway_class_init (CdkWindowImplBroadwayClass *klass) |
1550 | { |
1551 | GObjectClass *object_class = G_OBJECT_CLASS (klass)((((GObjectClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((klass)), (((GType) ((20) << (2)))))))); |
1552 | CdkWindowImplClass *impl_class = CDK_WINDOW_IMPL_CLASS (klass)((((CdkWindowImplClass*) (void *) g_type_check_class_cast ((GTypeClass *) ((klass)), ((cdk_window_impl_get_type ())))))); |
1553 | |
1554 | object_class->finalize = cdk_window_impl_broadway_finalize; |
1555 | |
1556 | impl_class->ref_cairo_surface = cdk_window_broadway_ref_cairo_surface; |
1557 | impl_class->show = cdk_window_broadway_show; |
1558 | impl_class->hide = cdk_window_broadway_hide; |
1559 | impl_class->withdraw = cdk_window_broadway_withdraw; |
1560 | impl_class->set_events = cdk_window_broadway_set_events; |
1561 | impl_class->get_events = cdk_window_broadway_get_events; |
1562 | impl_class->raise = cdk_window_broadway_raise; |
1563 | impl_class->lower = cdk_window_broadway_lower; |
1564 | impl_class->restack_under = cdk_window_broadway_restack_under; |
1565 | impl_class->restack_toplevel = cdk_window_broadway_restack_toplevel; |
1566 | impl_class->move_resize = cdk_window_broadway_move_resize; |
1567 | impl_class->set_background = cdk_window_broadway_set_background; |
1568 | impl_class->reparent = cdk_window_broadway_reparent; |
1569 | impl_class->set_device_cursor = cdk_window_broadway_set_device_cursor; |
1570 | impl_class->get_geometry = cdk_window_broadway_get_geometry; |
1571 | impl_class->get_root_coords = cdk_window_broadway_get_root_coords; |
1572 | impl_class->get_device_state = cdk_window_broadway_get_device_state; |
1573 | impl_class->shape_combine_region = cdk_window_broadway_shape_combine_region; |
1574 | impl_class->input_shape_combine_region = cdk_window_broadway_input_shape_combine_region; |
1575 | impl_class->destroy = _cdk_broadway_window_destroy; |
1576 | impl_class->destroy_foreign = cdk_broadway_window_destroy_foreign; |
1577 | impl_class->get_shape = cdk_broadway_window_get_shape; |
1578 | impl_class->get_input_shape = cdk_broadway_window_get_input_shape; |
1579 | impl_class->end_paint = cdk_broadway_window_end_paint; |
1580 | impl_class->beep = cdk_broadway_window_beep; |
1581 | |
1582 | impl_class->focus = cdk_broadway_window_focus; |
1583 | impl_class->set_type_hint = cdk_broadway_window_set_type_hint; |
1584 | impl_class->get_type_hint = cdk_broadway_window_get_type_hint; |
1585 | impl_class->set_modal_hint = cdk_broadway_window_set_modal_hint; |
1586 | impl_class->set_skip_taskbar_hint = cdk_broadway_window_set_skip_taskbar_hint; |
1587 | impl_class->set_skip_pager_hint = cdk_broadway_window_set_skip_pager_hint; |
1588 | impl_class->set_urgency_hint = cdk_broadway_window_set_urgency_hint; |
1589 | impl_class->set_geometry_hints = cdk_broadway_window_set_geometry_hints; |
1590 | impl_class->set_title = cdk_broadway_window_set_title; |
1591 | impl_class->set_role = cdk_broadway_window_set_role; |
1592 | impl_class->set_startup_id = cdk_broadway_window_set_startup_id; |
1593 | impl_class->set_transient_for = cdk_broadway_window_set_transient_for; |
1594 | impl_class->get_frame_extents = cdk_broadway_window_get_frame_extents; |
1595 | impl_class->set_override_redirect = cdk_broadway_window_set_override_redirect; |
1596 | impl_class->set_accept_focus = cdk_broadway_window_set_accept_focus; |
1597 | impl_class->set_focus_on_map = cdk_broadway_window_set_focus_on_map; |
1598 | impl_class->set_icon_list = cdk_broadway_window_set_icon_list; |
1599 | impl_class->set_icon_name = cdk_broadway_window_set_icon_name; |
1600 | impl_class->iconify = cdk_broadway_window_iconify; |
1601 | impl_class->deiconify = cdk_broadway_window_deiconify; |
1602 | impl_class->stick = cdk_broadway_window_stick; |
1603 | impl_class->unstick = cdk_broadway_window_unstick; |
1604 | impl_class->maximize = cdk_broadway_window_maximize; |
1605 | impl_class->unmaximize = cdk_broadway_window_unmaximize; |
1606 | impl_class->fullscreen = cdk_broadway_window_fullscreen; |
1607 | impl_class->unfullscreen = cdk_broadway_window_unfullscreen; |
1608 | impl_class->set_keep_above = cdk_broadway_window_set_keep_above; |
1609 | impl_class->set_keep_below = cdk_broadway_window_set_keep_below; |
1610 | impl_class->get_group = cdk_broadway_window_get_group; |
1611 | impl_class->set_group = cdk_broadway_window_set_group; |
1612 | impl_class->set_decorations = cdk_broadway_window_set_decorations; |
1613 | impl_class->get_decorations = cdk_broadway_window_get_decorations; |
1614 | impl_class->set_functions = cdk_broadway_window_set_functions; |
1615 | impl_class->begin_resize_drag = cdk_broadway_window_begin_resize_drag; |
1616 | impl_class->begin_move_drag = cdk_broadway_window_begin_move_drag; |
1617 | impl_class->set_opacity = cdk_broadway_window_set_opacity; |
1618 | impl_class->set_composited = cdk_broadway_window_set_composited; |
1619 | impl_class->destroy_notify = cdk_broadway_window_destroy_notify; |
1620 | impl_class->register_dnd = _cdk_broadway_window_register_dnd; |
1621 | impl_class->drag_begin = _cdk_broadway_window_drag_begin; |
1622 | impl_class->sync_rendering = _cdk_broadway_window_sync_rendering; |
1623 | impl_class->simulate_key = _cdk_broadway_window_simulate_key; |
1624 | impl_class->simulate_button = _cdk_broadway_window_simulate_button; |
1625 | impl_class->get_property = _cdk_broadway_window_get_property; |
1626 | impl_class->change_property = _cdk_broadway_window_change_property; |
1627 | impl_class->delete_property = _cdk_broadway_window_delete_property; |
1628 | impl_class->get_drag_protocol = _cdk_broadway_window_get_drag_protocol; |
1629 | } |