diff --git a/README.md b/README.md index b78f3ed..95cf990 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ +# GTK4 version of GTK Layer Shell -- WIP +It works, but it's still rough around the edges. See the end of https://github.com/wmww/gtk-layer-shell/issues/37 for details. + +TODO before release: +- remove traces of GPL (all GPL code should be gone now) +- drop all copyright headers +- change license in meson +- change lib name in meson +- change version in meson +- change so name in meson +- update release process document +- get tests passing +- fix widget layout of demo +- make the fixed size toggle work +- investigate the size-allocate warning +- investigate extracting info from more XDG shell calls +- fix all compiler warnings +- detect if library got properly loaded and warn otherwise +- update readme on this repo +- update readme on GTK3 repo + # GTK Layer Shell ![GTK Layer Shell demo screenshot](https://i.imgur.com/dIuYcBM.png) diff --git a/examples/demo/anchor-control.c b/examples/demo/anchor-control.c index 6e0a590..f13d9cf 100644 --- a/examples/demo/anchor-control.c +++ b/examples/demo/anchor-control.c @@ -35,7 +35,7 @@ anchor_edge_button_new (GtkWindow *layer_window, const char *tooltip) { GtkWidget *button = gtk_toggle_button_new (); - gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON)); + gtk_button_set_icon_name (GTK_BUTTON (button), icon_name); gtk_widget_set_tooltip_text (button, tooltip); AnchorButtonData *data = g_new0 (AnchorButtonData, 1); *data = (AnchorButtonData) { @@ -53,33 +53,33 @@ anchor_control_new (GtkWindow *layer_window, const gboolean default_anchors[GTK_ { GtkWidget *outside_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); GtkWidget *outside_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_pack_start (GTK_BOX (outside_vbox), outside_hbox, TRUE, FALSE, 0); + gtk_box_append (GTK_BOX (outside_vbox), outside_hbox); { GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); - gtk_box_pack_start (GTK_BOX (outside_hbox), hbox, TRUE, FALSE, 0); + gtk_box_append (GTK_BOX (outside_hbox), hbox); { GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - gtk_container_add (GTK_CONTAINER (hbox), vbox); + gtk_box_append (GTK_BOX (hbox), vbox); { GtkWidget *button = anchor_edge_button_new (layer_window, GTK_LAYER_SHELL_EDGE_LEFT, default_anchors, "go-first", "Anchor left"); - gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), button); } }{ GtkWidget *center_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 40); - gtk_container_add (GTK_CONTAINER (hbox), center_vbox); + gtk_box_append (GTK_BOX (hbox), center_vbox); { GtkWidget *button = anchor_edge_button_new (layer_window, GTK_LAYER_SHELL_EDGE_TOP, default_anchors, "go-top", "Anchor top"); - gtk_box_pack_start (GTK_BOX (center_vbox), button, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (center_vbox), button); }{ GtkWidget *button = anchor_edge_button_new (layer_window, GTK_LAYER_SHELL_EDGE_BOTTOM, default_anchors, "go-bottom", "Anchor bottom"); - gtk_box_pack_end (GTK_BOX (center_vbox), button, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (center_vbox), button); } }{ GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - gtk_container_add (GTK_CONTAINER (hbox), vbox); + gtk_box_append (GTK_BOX (hbox), vbox); { GtkWidget *button = anchor_edge_button_new (layer_window, GTK_LAYER_SHELL_EDGE_RIGHT, default_anchors, "go-last", "Anchor right"); - gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), button); } } } diff --git a/examples/demo/gtk-layer-demo.c b/examples/demo/gtk-layer-demo.c index 398ec4d..d73955c 100644 --- a/examples/demo/gtk-layer-demo.c +++ b/examples/demo/gtk-layer-demo.c @@ -245,7 +245,7 @@ static void process_args (int *argc, char ***argv) { GOptionContext *context = g_option_context_new (""); - g_option_context_add_group (context, gtk_get_option_group (TRUE)); + //g_option_context_add_group (context, gtk_get_option_group (TRUE)); g_option_context_set_summary (context, prog_summary); g_option_context_set_description (context, prog_details); g_option_context_add_main_entries (context, options, NULL); @@ -314,22 +314,20 @@ on_orientation_changed (GtkWindow *window, WindowOrientation orientation, Toplev gtk_orientable_set_orientation (GTK_ORIENTABLE (data->toplevel_box), orient_toplevel); gtk_orientable_set_orientation (GTK_ORIENTABLE (data->first_box), orient_sub); gtk_orientable_set_orientation (GTK_ORIENTABLE (data->second_box), orient_sub); - gtk_window_resize (window, 1, 1); // force the window to shrink to the smallest size it can + //gtk_window_resize (window, 1, 1); // force the window to shrink to the smallest size it can } static void -on_window_destroy(GtkWindow *_window, void *_data) +on_window_destroy(GtkWindow *window, GApplication *_data) { - (void)_window; (void)_data; - - gtk_main_quit (); + g_application_quit (gtk_window_get_application (window)); } -static GtkWidget * -layer_window_new () +static void +activate (GtkApplication* app, void *_data) { - GtkWindow *gtk_window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL)); + GtkWindow *gtk_window = GTK_WINDOW (gtk_application_window_new (app)); ToplevelData *data = g_new0 (ToplevelData, 1); g_object_set_data_full (G_OBJECT (gtk_window), anchor_edges_key, data, g_free); @@ -356,57 +354,47 @@ layer_window_new () if (default_auto_exclusive_zone) gtk_layer_auto_exclusive_zone_enable (gtk_window); + set_up_menubar (gtk_window); GtkWidget *centered_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - gtk_container_add (GTK_CONTAINER (gtk_window), centered_vbox); + gtk_window_set_child (gtk_window, centered_vbox); GtkWidget *centered_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_pack_start (GTK_BOX (centered_vbox), centered_hbox, TRUE, FALSE, 0); + gtk_box_append (GTK_BOX (centered_vbox), centered_hbox); data->toplevel_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); - gtk_container_set_border_width (GTK_CONTAINER (data->toplevel_box), 16); - gtk_box_pack_start (GTK_BOX (centered_hbox), data->toplevel_box, TRUE, FALSE, 0); + //gtk_container_set_border_width (GTK_CONTAINER (data->toplevel_box), 16); + gtk_box_append (GTK_BOX (centered_hbox), data->toplevel_box); { data->first_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); - gtk_box_pack_start (GTK_BOX (data->toplevel_box), data->first_box, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (data->toplevel_box), data->first_box); { GtkWidget *selections_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); - gtk_box_pack_start (GTK_BOX (selections_box), menu_bar_new (gtk_window), FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (data->first_box), selections_box, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (selections_box), - monitor_selection_new (gtk_window), - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (selections_box), - layer_selection_new (gtk_window, default_layer), - FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (data->first_box), selections_box); + gtk_box_append (GTK_BOX (selections_box), + monitor_selection_new (gtk_window)); + gtk_box_append (GTK_BOX (selections_box), + layer_selection_new (gtk_window, default_layer)); }{ - gtk_box_pack_start (GTK_BOX (data->first_box), - anchor_control_new (gtk_window, default_anchors), - FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (data->first_box), + anchor_control_new (gtk_window, default_anchors)); } }{ data->second_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); - gtk_box_pack_start (GTK_BOX (data->toplevel_box), data->second_box, TRUE, TRUE, 0); + gtk_box_append (GTK_BOX (data->toplevel_box), data->second_box); { GtkWidget *toggles_box = mscl_toggles_new (gtk_window, default_auto_exclusive_zone, default_fixed_size); - gtk_box_pack_start (GTK_BOX (data->second_box), - toggles_box, - FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (data->second_box), toggles_box); GtkWidget *kb_box = keyboard_selection_new (gtk_window, default_keyboard_mode); - gtk_box_pack_start (GTK_BOX (data->second_box), - kb_box, - FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (data->second_box), kb_box); } { GtkWidget *margin_and_version_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); - gtk_box_pack_start (GTK_BOX (margin_and_version_box), - margin_control_new (gtk_window, default_margins), - TRUE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (margin_and_version_box), - version_info_new (), - TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (data->second_box), - margin_and_version_box, - TRUE, TRUE, 0); + gtk_box_append (GTK_BOX (margin_and_version_box), + margin_control_new (gtk_window, default_margins)); + gtk_box_append (GTK_BOX (margin_and_version_box), + version_info_new ()); + gtk_box_append (GTK_BOX (data->second_box), + margin_and_version_box); } } @@ -414,14 +402,14 @@ layer_window_new () data->orientation = -1; // invalid value will force anchor_edges_update_orientation to update layer_window_update_orientation (gtk_window); - return GTK_WIDGET (gtk_window); + g_signal_connect (gtk_window, "destroy", G_CALLBACK (on_window_destroy), NULL); + gtk_window_present (gtk_window); } int main (int argc, char **argv) { g_set_prgname (prog_name); - gtk_init (&argc, &argv); process_args (&argc, &argv); // The int arg is an enum of type WindowOrientation @@ -433,9 +421,9 @@ main (int argc, char **argv) g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); - GtkWidget *initial_window = layer_window_new (); - g_signal_connect (initial_window, "destroy", G_CALLBACK (on_window_destroy), NULL); - gtk_widget_show_all (GTK_WIDGET (initial_window)); - - gtk_main (); + GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.demo", G_APPLICATION_FLAGS_NONE); + g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); + int status = g_application_run (G_APPLICATION (app), argc, argv); + g_object_unref (app); + return status; } diff --git a/examples/demo/gtk-layer-demo.h b/examples/demo/gtk-layer-demo.h index 9429cd6..47a6bc8 100644 --- a/examples/demo/gtk-layer-demo.h +++ b/examples/demo/gtk-layer-demo.h @@ -56,8 +56,8 @@ mscl_toggles_new (GtkWindow *layer_window, gboolean default_auto_exclusive_zone, gboolean default_fixed_size); -GtkWidget * -menu_bar_new (GtkWindow *layer_window); +void +set_up_menubar (GtkWindow *layer_window); GtkWidget * keyboard_selection_new (GtkWindow *layer_window, GtkLayerShellKeyboardMode default_kb); diff --git a/examples/demo/keyboard-selection.c b/examples/demo/keyboard-selection.c index c1b5fcb..3691e48 100644 --- a/examples/demo/keyboard-selection.c +++ b/examples/demo/keyboard-selection.c @@ -52,8 +52,8 @@ keyboard_selection_new (GtkWindow *layer_window, GtkLayerShellKeyboardMode defau gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), i); } g_signal_connect (combo_box, "changed", G_CALLBACK (on_kb_selected), layer_window); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), combo_box, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), label); + gtk_box_append (GTK_BOX (vbox), combo_box); } return vbox; diff --git a/examples/demo/layer-selection.c b/examples/demo/layer-selection.c index 7a74a15..f071823 100644 --- a/examples/demo/layer-selection.c +++ b/examples/demo/layer-selection.c @@ -52,7 +52,7 @@ layer_selection_new (GtkWindow *layer_window, GtkLayerShellLayer default_layer) gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), i); } g_signal_connect (combo_box, "changed", G_CALLBACK (on_layer_selected), layer_window); - gtk_box_pack_start (GTK_BOX (vbox), combo_box, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), combo_box); } return vbox; diff --git a/examples/demo/margin-control.c b/examples/demo/margin-control.c index 42051da..4260393 100644 --- a/examples/demo/margin-control.c +++ b/examples/demo/margin-control.c @@ -76,37 +76,37 @@ margin_control_new (GtkWindow *layer_window, const int default_margins[GTK_LAYER g_signal_connect (layer_window, "orientation-changed", G_CALLBACK (on_orientation_changed), switch_box); { GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, spacing); - gtk_box_pack_start (GTK_BOX (switch_box), vbox, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (switch_box), vbox); { GtkWidget *button = margin_spin_button_new (layer_window, GTK_LAYER_SHELL_EDGE_LEFT, "Left margin", default_margins); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), button); } { GtkWidget *button = margin_spin_button_new (layer_window, GTK_LAYER_SHELL_EDGE_RIGHT, "Right margin", default_margins); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), button); } } { GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, spacing); - gtk_box_pack_start (GTK_BOX (switch_box), vbox, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (switch_box), vbox); { GtkWidget *button = margin_spin_button_new (layer_window, GTK_LAYER_SHELL_EDGE_TOP, "Top margin", default_margins); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), button); } { GtkWidget *button = margin_spin_button_new (layer_window, GTK_LAYER_SHELL_EDGE_BOTTOM, "Bottom margin", default_margins); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), button); } } GtkWidget *open_button = gtk_button_new_with_label ("Set margin"); gtk_widget_set_tooltip_text (open_button, "Space to leave empty around surface"); - GtkWidget *popover = gtk_popover_new (open_button); - gtk_popover_set_modal (GTK_POPOVER (popover), TRUE); - gtk_popover_set_constrain_to (GTK_POPOVER (popover), GTK_POPOVER_CONSTRAINT_WINDOW); + GtkWidget *popover = gtk_popover_new (); + gtk_popover_set_default_widget (GTK_POPOVER (popover), open_button); + gtk_popover_set_autohide (GTK_POPOVER (popover), TRUE); gtk_popover_set_position (GTK_POPOVER (popover), GTK_POS_BOTTOM); - gtk_container_add (GTK_CONTAINER (popover), switch_box); - gtk_widget_show_all (switch_box); + gtk_popover_set_child (GTK_POPOVER (popover), switch_box); + gtk_widget_set_visible (switch_box, TRUE); g_signal_connect (open_button, "clicked", G_CALLBACK (on_open_clicked), popover); return open_button; } diff --git a/examples/demo/menu-bar.c b/examples/demo/menu-bar.c index ce5a5c0..f29517f 100644 --- a/examples/demo/menu-bar.c +++ b/examples/demo/menu-bar.c @@ -12,61 +12,27 @@ #include "gtk-layer-demo.h" static void -on_close_clicked (GtkMenuItem *_item, GtkWindow *layer_window) -{ - (void)_item; - - gtk_window_close (layer_window); +quit_activated(GSimpleAction *action, GVariant *parameter, GApplication *application) { + g_application_quit (application); } -GtkWidget * -menu_bar_new (GtkWindow *layer_window) +void +set_up_menubar (GtkWindow *layer_window) { - GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - { - GtkWidget *menu_bar = gtk_menu_bar_new (); - gtk_box_pack_start (GTK_BOX (vbox), menu_bar, FALSE, FALSE, 0); - { - GtkWidget *menu_item = gtk_menu_item_new_with_label ("Popup menu"); - gtk_container_add (GTK_CONTAINER (menu_bar), menu_item); - { - GtkWidget *submenu = gtk_menu_new (); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), submenu); - { - GtkWidget *nested_menu_item = gtk_menu_item_new_with_label ("Nested popup"); - gtk_menu_shell_append (GTK_MENU_SHELL (submenu), nested_menu_item); - { - GtkWidget *nested_menu = gtk_menu_new (); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (nested_menu_item), nested_menu); - for (int i = 0; i < 3; i++) - { - GString *label = g_string_new (""); - g_string_printf (label, "Menu item %d", i); - GtkWidget *submenu_item = gtk_menu_item_new_with_label (label->str); - g_string_free (label, TRUE); - gtk_menu_shell_append (GTK_MENU_SHELL (nested_menu), submenu_item); - } - { - GtkWidget *submenu_item = gtk_menu_item_new_with_label ("Nested again"); - gtk_menu_shell_append (GTK_MENU_SHELL (nested_menu), submenu_item); - { - GtkWidget *nested_menu = gtk_menu_new (); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (submenu_item), nested_menu); - { - GtkWidget *submenu_item = gtk_menu_item_new_with_label ("Final item"); - gtk_menu_shell_append (GTK_MENU_SHELL (nested_menu), submenu_item); - } - } - } - } - } - { - GtkWidget *close_item = gtk_menu_item_new_with_label ("Close"); - g_signal_connect (close_item, "activate", G_CALLBACK (on_close_clicked), layer_window); - gtk_menu_shell_append (GTK_MENU_SHELL (submenu), close_item); - } - } - } - } - return vbox; + GSimpleAction *act_quit = g_simple_action_new ("quit", NULL); + g_action_map_add_action (G_ACTION_MAP (gtk_window_get_application (layer_window)), G_ACTION (act_quit)); + g_signal_connect (act_quit, "activate", G_CALLBACK (quit_activated), gtk_window_get_application (layer_window)); + + GMenu *menubar = g_menu_new (); + gtk_application_set_menubar (GTK_APPLICATION (gtk_window_get_application (layer_window)), G_MENU_MODEL (menubar)); + gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (layer_window), TRUE); + GMenuItem *menu_item = g_menu_item_new ("Menu", NULL); + g_menu_append_item (menubar, menu_item); + GMenu *menu = g_menu_new (); + GMenuItem *menu_item_quit = g_menu_item_new ("Quit", "app.quit"); + g_menu_append_item (menu, menu_item_quit); + g_menu_item_set_submenu (menu_item, G_MENU_MODEL (menu)); + g_menu_append_item (menubar, menu_item); + g_object_unref (menu_item_quit); + g_object_unref (menu_item); } diff --git a/examples/demo/monitor-selection.c b/examples/demo/monitor-selection.c index 0fbb2ef..4921cda 100644 --- a/examples/demo/monitor-selection.c +++ b/examples/demo/monitor-selection.c @@ -19,9 +19,9 @@ on_monitor_selected (GtkComboBox *combo_box, GtkWindow *layer_window) int monitor_index = gtk_combo_box_get_active (combo_box) - 1; // 1st element is default monitor GdkMonitor *monitor = NULL; if (monitor_index >= 0) { - GdkDisplay *display = gdk_display_get_default (); - g_return_if_fail (monitor_index < gdk_display_get_n_monitors (display)); - monitor = gdk_display_get_monitor (display, monitor_index); + GListModel *monitors = gdk_display_get_monitors (gdk_display_get_default ()); // owned by display + g_return_if_fail (monitor_index < g_list_model_get_n_items (monitors)); + monitor = g_list_model_get_item (monitors, monitor_index); } g_object_set_data (G_OBJECT (combo_box), current_monitor_key, monitor); gtk_layer_set_monitor (layer_window, monitor); @@ -38,8 +38,9 @@ on_monitors_changed (GdkDisplay *display, GdkMonitor *_monitor, GtkComboBox *com if (current_monitor == NULL) { gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0); } - for (int i = 0; i < gdk_display_get_n_monitors (display); i++) { - GdkMonitor *monitor = gdk_display_get_monitor (display, i); + GListModel *monitors = gdk_display_get_monitors (gdk_display_get_default ()); // owned by display + for (int i = 0; i < g_list_model_get_n_items (monitors); i++) { + GdkMonitor *monitor = g_list_model_get_item (monitors, i); GString *text = g_string_new (""); g_string_printf (text, "%d. %s", i + 1, gdk_monitor_get_model (monitor)); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), text->str); @@ -64,7 +65,7 @@ monitor_selection_new (GtkWindow *layer_window) g_signal_connect (display, "monitor-removed", G_CALLBACK (on_monitors_changed), combo_box); on_monitors_changed (display, NULL, GTK_COMBO_BOX (combo_box)); g_signal_connect (combo_box, "changed", G_CALLBACK (on_monitor_selected), layer_window); - gtk_box_pack_start (GTK_BOX (vbox), combo_box, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), combo_box); } return vbox; diff --git a/examples/demo/mscl-toggles.c b/examples/demo/mscl-toggles.c index 8c7261b..ad75cc1 100644 --- a/examples/demo/mscl-toggles.c +++ b/examples/demo/mscl-toggles.c @@ -34,7 +34,6 @@ on_fixed_size_set (GtkToggleButton *_toggle_button, gboolean state, GtkWindow *l } else { gtk_widget_set_size_request (GTK_WIDGET (layer_window), -1, -1); } - gtk_window_resize (layer_window, 1, 1); return FALSE; } @@ -55,10 +54,10 @@ mscl_toggles_new (GtkWindow *layer_window, GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); for (unsigned i = 0; i < sizeof (mscl_toggles) / sizeof (mscl_toggles[0]); i++) { GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (vbox), hbox); { GtkWidget *label = gtk_label_new (mscl_toggles[i].name); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (hbox), label); }{ GtkWidget *toggle = gtk_switch_new (); gtk_widget_set_tooltip_text (toggle, mscl_toggles[i].tooltip); @@ -71,7 +70,7 @@ mscl_toggles_new (GtkWindow *layer_window, g_assert_not_reached (); gtk_switch_set_active (GTK_SWITCH (toggle), default_value); g_signal_connect (toggle, "state-set", G_CALLBACK (mscl_toggles[i].callback), layer_window); - gtk_box_pack_end (GTK_BOX (hbox), toggle, FALSE, FALSE, 0); + gtk_box_append (GTK_BOX (hbox), toggle); } } return vbox; diff --git a/examples/simple-example.c b/examples/simple-example.c index 559006e..b4285b3 100644 --- a/examples/simple-example.c +++ b/examples/simple-example.c @@ -24,7 +24,7 @@ activate (GtkApplication* app, void *_data) gtk_layer_init_for_window (gtk_window); // Order below normal windows - gtk_layer_set_layer (gtk_window, GTK_LAYER_SHELL_LAYER_BOTTOM); + gtk_layer_set_layer (gtk_window, GTK_LAYER_SHELL_LAYER_TOP); // Push other windows out of the way gtk_layer_auto_exclusive_zone_enable (gtk_window); @@ -34,14 +34,14 @@ activate (GtkApplication* app, void *_data) // The margins are the gaps around the window's edges // Margins and anchors can be set like this... - gtk_layer_set_margin (gtk_window, GTK_LAYER_SHELL_EDGE_LEFT, 40); - gtk_layer_set_margin (gtk_window, GTK_LAYER_SHELL_EDGE_RIGHT, 40); - gtk_layer_set_margin (gtk_window, GTK_LAYER_SHELL_EDGE_TOP, 20); + //gtk_layer_set_margin (gtk_window, GTK_LAYER_SHELL_EDGE_LEFT, 40); + //gtk_layer_set_margin (gtk_window, GTK_LAYER_SHELL_EDGE_RIGHT, 40); + //gtk_layer_set_margin (gtk_window, GTK_LAYER_SHELL_EDGE_TOP, 20); // gtk_layer_set_margin (gtk_window, GTK_LAYER_SHELL_EDGE_BOTTOM, 0); // 0 is default // ... or like this // Anchors are if the window is pinned to each edge of the output - static const gboolean anchors[] = {TRUE, TRUE, FALSE, TRUE}; + static const gboolean anchors[] = {TRUE, FALSE, FALSE, TRUE}; for (int i = 0; i < GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER; i++) { gtk_layer_set_anchor (gtk_window, i, anchors[i]); } @@ -49,18 +49,17 @@ activate (GtkApplication* app, void *_data) // Set up a widget GtkWidget *label = gtk_label_new (""); gtk_label_set_markup (GTK_LABEL (label), - "" - "GTK Layer Shell example!" + "" + "GTK Layer\nShell example!" ""); - gtk_container_add (GTK_CONTAINER (gtk_window), label); - gtk_container_set_border_width (GTK_CONTAINER (gtk_window), 12); - gtk_widget_show_all (GTK_WIDGET (gtk_window)); + gtk_window_set_child (gtk_window, label); + gtk_window_present (gtk_window); } int main (int argc, char **argv) { - GtkApplication * app = gtk_application_new ("sh.wmww.gtk-layer-example", G_APPLICATION_FLAGS_NONE); + GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.example", G_APPLICATION_FLAGS_NONE); g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); int status = g_application_run (G_APPLICATION (app), argc, argv); g_object_unref (app); diff --git a/gtk-priv/README.md b/gtk-priv/README.md deleted file mode 100644 index fb2238a..0000000 --- a/gtk-priv/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# GTK private - -This subproject allows access into private and unstable GTK structs. The headers in h are automatically constructed from multiple versions of GTK3. This lets us be compatible with all supported GTK3 versions, despite using internals that are not part of the stable API. - -This was originally developed as a standalone project under the name gtk3-espionage. Git history can be found [here](https://github.com/wmww/gtk3-espionage). - -## Building the headers - -__NOTE: you don't need to rebuild the headers in order to build GTK Layer Shell__. Building the header files is only required when GTK has been updated or a structure is added. - -To build, run `./scripts/build.py` - -This script will -- Load the list of structures from [scripts/config.py](scripts/config.py) -- Clone the official GTK git repository -- Detect all supported versions of GTK -- Check out and extract data from each version -- Write header files for each structure diff --git a/gtk-priv/h/common.h b/gtk-priv/h/common.h deleted file mode 100644 index e5ef910..0000000 --- a/gtk-priv/h/common.h +++ /dev/null @@ -1,45 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef GTK_PRIV_COMMON_H -#define GTK_PRIV_COMMON_H - -void gtk_priv_assert_gtk_version_valid() { - if (gtk_get_major_version() != 3 || gtk_get_minor_version() < 22) { - g_error( - "gtk-layer-shell only supports GTK3 >= v3.22.0 (you have v%d.%d.%d)", - gtk_get_major_version(), - gtk_get_minor_version(), - gtk_get_micro_version()); - g_abort(); - } -} - -void gtk_priv_warn_gtk_version_may_be_unsupported() { - static gboolean shown = FALSE; - if (shown) - return; - if (getenv("GTK_LAYER_SHELL_UNSUPPORTED_GTK_WARNING")) { - g_warning( - "gtk-layer-shell v%d.%d.%d may not work on GTK v%d.%d.%d. " - "If you experience crashes, check " - "https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md", - GTK_LAYER_SHELL_MAJOR, - GTK_LAYER_SHELL_MINOR, - GTK_LAYER_SHELL_MICRO, - gtk_get_major_version(), - gtk_get_minor_version(), - gtk_get_micro_version()); - } - shown = TRUE; -} - -#endif // GTK_PRIV_COMMON_H diff --git a/gtk-priv/h/gdk_wayland_pointer_data_priv.h b/gtk-priv/h/gdk_wayland_pointer_data_priv.h deleted file mode 100644 index ce87318..0000000 --- a/gtk-priv/h/gdk_wayland_pointer_data_priv.h +++ /dev/null @@ -1,404 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 2009 Carlos Garnacho - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WAYLAND_POINTER_DATA_PRIV_H -#define GDK_WAYLAND_POINTER_DATA_PRIV_H - -#include "common.h" - -typedef struct _GdkWaylandPointerData GdkWaylandPointerData; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.24.35 (unreleased) -struct _GdkWaylandPointerData_v3_22_0 -{ - GdkWindow *focus; - double surface_x; - double surface_y; - GdkModifierType button_modifiers; - uint32_t time; - uint32_t enter_serial; - uint32_t press_serial; - GdkWindow *grab_window; - uint32_t grab_time; - struct wl_surface *pointer_surface; - GdkCursor *cursor; - guint cursor_timeout_id; - guint cursor_image_index; - guint cursor_image_delay; - guint current_output_scale; - GSList *pointer_surface_outputs; - struct _GdkWaylandPointerFrameData_v3_22_0 frame; -}; - -// For internal use only -int gdk_wayland_pointer_data_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - { - version_id = 0; - } - } - - return version_id; -} - -// GdkWaylandPointerData::focus - -GdkWindow * gdk_wayland_pointer_data_priv_get_focus(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->focus; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_focus(GdkWaylandPointerData * self, GdkWindow * focus) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->focus = focus; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::surface_x - -double gdk_wayland_pointer_data_priv_get_surface_x(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->surface_x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_surface_x(GdkWaylandPointerData * self, double surface_x) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->surface_x = surface_x; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::surface_y - -double gdk_wayland_pointer_data_priv_get_surface_y(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->surface_y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_surface_y(GdkWaylandPointerData * self, double surface_y) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->surface_y = surface_y; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::button_modifiers - -GdkModifierType * gdk_wayland_pointer_data_priv_get_button_modifiers_ptr(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return (GdkModifierType *)&((struct _GdkWaylandPointerData_v3_22_0*)self)->button_modifiers; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::time - -uint32_t gdk_wayland_pointer_data_priv_get_time(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->time; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_time(GdkWaylandPointerData * self, uint32_t time) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->time = time; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::enter_serial - -uint32_t gdk_wayland_pointer_data_priv_get_enter_serial(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->enter_serial; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_enter_serial(GdkWaylandPointerData * self, uint32_t enter_serial) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->enter_serial = enter_serial; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::press_serial - -uint32_t gdk_wayland_pointer_data_priv_get_press_serial(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->press_serial; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_press_serial(GdkWaylandPointerData * self, uint32_t press_serial) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->press_serial = press_serial; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::grab_window - -GdkWindow * gdk_wayland_pointer_data_priv_get_grab_window(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->grab_window; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_grab_window(GdkWaylandPointerData * self, GdkWindow * grab_window) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->grab_window = grab_window; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::grab_time - -uint32_t gdk_wayland_pointer_data_priv_get_grab_time(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->grab_time; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_grab_time(GdkWaylandPointerData * self, uint32_t grab_time) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->grab_time = grab_time; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::pointer_surface - -struct wl_surface * gdk_wayland_pointer_data_priv_get_pointer_surface(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->pointer_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_pointer_surface(GdkWaylandPointerData * self, struct wl_surface * pointer_surface) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->pointer_surface = pointer_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::cursor - -GdkCursor * gdk_wayland_pointer_data_priv_get_cursor(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_cursor(GdkWaylandPointerData * self, GdkCursor * cursor) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor = cursor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::cursor_timeout_id - -guint gdk_wayland_pointer_data_priv_get_cursor_timeout_id(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor_timeout_id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_cursor_timeout_id(GdkWaylandPointerData * self, guint cursor_timeout_id) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor_timeout_id = cursor_timeout_id; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::cursor_image_index - -guint gdk_wayland_pointer_data_priv_get_cursor_image_index(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor_image_index; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_cursor_image_index(GdkWaylandPointerData * self, guint cursor_image_index) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor_image_index = cursor_image_index; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::cursor_image_delay - -guint gdk_wayland_pointer_data_priv_get_cursor_image_delay(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor_image_delay; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_cursor_image_delay(GdkWaylandPointerData * self, guint cursor_image_delay) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->cursor_image_delay = cursor_image_delay; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::current_output_scale - -guint gdk_wayland_pointer_data_priv_get_current_output_scale(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->current_output_scale; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_current_output_scale(GdkWaylandPointerData * self, guint current_output_scale) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->current_output_scale = current_output_scale; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::pointer_surface_outputs - -GSList * gdk_wayland_pointer_data_priv_get_pointer_surface_outputs(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerData_v3_22_0*)self)->pointer_surface_outputs; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_data_priv_set_pointer_surface_outputs(GdkWaylandPointerData * self, GSList * pointer_surface_outputs) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerData_v3_22_0*)self)->pointer_surface_outputs = pointer_surface_outputs; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerData::frame - -GdkWaylandPointerFrameData * gdk_wayland_pointer_data_priv_get_frame_ptr(GdkWaylandPointerData * self) { - switch (gdk_wayland_pointer_data_priv_get_version_id()) { - case 0: return (GdkWaylandPointerFrameData *)&((struct _GdkWaylandPointerData_v3_22_0*)self)->frame; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WAYLAND_POINTER_DATA_PRIV_H diff --git a/gtk-priv/h/gdk_wayland_pointer_frame_data_priv.h b/gtk-priv/h/gdk_wayland_pointer_frame_data_priv.h deleted file mode 100644 index 7419980..0000000 --- a/gtk-priv/h/gdk_wayland_pointer_frame_data_priv.h +++ /dev/null @@ -1,206 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 2009 Carlos Garnacho - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WAYLAND_POINTER_FRAME_DATA_PRIV_H -#define GDK_WAYLAND_POINTER_FRAME_DATA_PRIV_H - -#include "common.h" - -typedef struct _GdkWaylandPointerFrameData GdkWaylandPointerFrameData; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.24.35 (unreleased) -struct _GdkWaylandPointerFrameData_v3_22_0 -{ - GdkEvent *event; - gdouble delta_x; - gdouble delta_y; - int32_t discrete_x; - int32_t discrete_y; - gint8 is_scroll_stop; - enum wl_pointer_axis_source source; -}; - -// For internal use only -int gdk_wayland_pointer_frame_data_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - { - version_id = 0; - } - } - - return version_id; -} - -// GdkWaylandPointerFrameData::event - -GdkEvent * gdk_wayland_pointer_frame_data_priv_get_event(GdkWaylandPointerFrameData * self) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->event; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_pointer_frame_data_priv_set_event(GdkWaylandPointerFrameData * self, GdkEvent * event) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->event = event; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerFrameData::delta_x - -gdouble * gdk_wayland_pointer_frame_data_priv_get_delta_x_ptr(GdkWaylandPointerFrameData * self) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: return (gdouble *)&((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->delta_x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerFrameData::delta_y - -gdouble * gdk_wayland_pointer_frame_data_priv_get_delta_y_ptr(GdkWaylandPointerFrameData * self) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: return (gdouble *)&((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->delta_y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerFrameData::discrete_x - -int32_t * gdk_wayland_pointer_frame_data_priv_get_discrete_x_ptr(GdkWaylandPointerFrameData * self) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: return (int32_t *)&((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->discrete_x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerFrameData::discrete_y - -int32_t * gdk_wayland_pointer_frame_data_priv_get_discrete_y_ptr(GdkWaylandPointerFrameData * self) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: return (int32_t *)&((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->discrete_y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerFrameData::is_scroll_stop - -gint8 * gdk_wayland_pointer_frame_data_priv_get_is_scroll_stop_ptr(GdkWaylandPointerFrameData * self) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: return (gint8 *)&((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->is_scroll_stop; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandPointerFrameData::source - -enum wl_pointer_axis_source * gdk_wayland_pointer_frame_data_priv_get_source_ptr(GdkWaylandPointerFrameData * self) { - switch (gdk_wayland_pointer_frame_data_priv_get_version_id()) { - case 0: return (enum wl_pointer_axis_source *)&((struct _GdkWaylandPointerFrameData_v3_22_0*)self)->source; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WAYLAND_POINTER_FRAME_DATA_PRIV_H diff --git a/gtk-priv/h/gdk_wayland_seat_priv.h b/gtk-priv/h/gdk_wayland_seat_priv.h deleted file mode 100644 index e00db2d..0000000 --- a/gtk-priv/h/gdk_wayland_seat_priv.h +++ /dev/null @@ -1,1475 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 2009 Carlos Garnacho - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WAYLAND_SEAT_PRIV_H -#define GDK_WAYLAND_SEAT_PRIV_H - -#include "common.h" - -typedef struct _GdkWaylandSeat GdkWaylandSeat; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.22.8 -struct _GdkWaylandSeat_v3_22_0 -{ - GdkSeat parent_instance; - guint32 id; - struct wl_seat *wl_seat; - struct wl_pointer *wl_pointer; - struct wl_keyboard *wl_keyboard; - struct wl_touch *wl_touch; - struct zwp_pointer_gesture_swipe_v1 *wp_pointer_gesture_swipe; - struct zwp_pointer_gesture_pinch_v1 *wp_pointer_gesture_pinch; - struct zwp_tablet_seat_v2 *wp_tablet_seat; - GdkDisplay *display; - GdkDeviceManager *device_manager; - GdkDevice *master_pointer; - GdkDevice *master_keyboard; - GdkDevice *pointer; - GdkDevice *wheel_scrolling; - GdkDevice *finger_scrolling; - GdkDevice *continuous_scrolling; - GdkDevice *keyboard; - GdkDevice *touch_master; - GdkDevice *touch; - GdkCursor *cursor; - GdkKeymap *keymap; - GHashTable *touches; - GList *tablets; - GList *tablet_tools; - GList *tablet_pads; - struct _GdkWaylandPointerData_v3_22_0 pointer_info; - struct _GdkWaylandPointerData_v3_22_0 touch_info; - GdkModifierType key_modifiers; - GdkWindow *keyboard_focus; - GdkAtom pending_selection; - GdkWindow *grab_window; - uint32_t grab_time; - gboolean have_server_repeat; - uint32_t server_repeat_rate; - uint32_t server_repeat_delay; - struct wl_callback *repeat_callback; - guint32 repeat_timer; - guint32 repeat_key; - guint32 repeat_count; - gint64 repeat_deadline; - GSettings *keyboard_settings; - uint32_t keyboard_time; - uint32_t keyboard_key_serial; - struct gtk_primary_selection_device *primary_data_device; - struct wl_data_device *data_device; - GdkDragContext *drop_context; - GdkWindow *foreign_dnd_window; - guint gesture_n_fingers; - gdouble gesture_scale; - GdkCursor *grab_cursor; -}; - -// Version ID 1 -// Diff from previous version: -// + gint32 nkeys; -// Valid for GTK v3.22.9 - v3.22.15 -struct _GdkWaylandSeat_v3_22_9 -{ - GdkSeat parent_instance; - guint32 id; - struct wl_seat *wl_seat; - struct wl_pointer *wl_pointer; - struct wl_keyboard *wl_keyboard; - struct wl_touch *wl_touch; - struct zwp_pointer_gesture_swipe_v1 *wp_pointer_gesture_swipe; - struct zwp_pointer_gesture_pinch_v1 *wp_pointer_gesture_pinch; - struct zwp_tablet_seat_v2 *wp_tablet_seat; - GdkDisplay *display; - GdkDeviceManager *device_manager; - GdkDevice *master_pointer; - GdkDevice *master_keyboard; - GdkDevice *pointer; - GdkDevice *wheel_scrolling; - GdkDevice *finger_scrolling; - GdkDevice *continuous_scrolling; - GdkDevice *keyboard; - GdkDevice *touch_master; - GdkDevice *touch; - GdkCursor *cursor; - GdkKeymap *keymap; - GHashTable *touches; - GList *tablets; - GList *tablet_tools; - GList *tablet_pads; - struct _GdkWaylandPointerData_v3_22_0 pointer_info; - struct _GdkWaylandPointerData_v3_22_0 touch_info; - GdkModifierType key_modifiers; - GdkWindow *keyboard_focus; - GdkAtom pending_selection; - GdkWindow *grab_window; - uint32_t grab_time; - gboolean have_server_repeat; - uint32_t server_repeat_rate; - uint32_t server_repeat_delay; - struct wl_callback *repeat_callback; - guint32 repeat_timer; - guint32 repeat_key; - guint32 repeat_count; - gint64 repeat_deadline; - gint32 nkeys; - GSettings *keyboard_settings; - uint32_t keyboard_time; - uint32_t keyboard_key_serial; - struct gtk_primary_selection_device *primary_data_device; - struct wl_data_device *data_device; - GdkDragContext *drop_context; - GdkWindow *foreign_dnd_window; - guint gesture_n_fingers; - gdouble gesture_scale; - GdkCursor *grab_cursor; -}; - -// Version ID 2 -// Diff from previous version: -// - gint32 nkeys; -// Valid for GTK v3.22.16 - v3.24.23 -struct _GdkWaylandSeat_v3_22_16 -{ - GdkSeat parent_instance; - guint32 id; - struct wl_seat *wl_seat; - struct wl_pointer *wl_pointer; - struct wl_keyboard *wl_keyboard; - struct wl_touch *wl_touch; - struct zwp_pointer_gesture_swipe_v1 *wp_pointer_gesture_swipe; - struct zwp_pointer_gesture_pinch_v1 *wp_pointer_gesture_pinch; - struct zwp_tablet_seat_v2 *wp_tablet_seat; - GdkDisplay *display; - GdkDeviceManager *device_manager; - GdkDevice *master_pointer; - GdkDevice *master_keyboard; - GdkDevice *pointer; - GdkDevice *wheel_scrolling; - GdkDevice *finger_scrolling; - GdkDevice *continuous_scrolling; - GdkDevice *keyboard; - GdkDevice *touch_master; - GdkDevice *touch; - GdkCursor *cursor; - GdkKeymap *keymap; - GHashTable *touches; - GList *tablets; - GList *tablet_tools; - GList *tablet_pads; - struct _GdkWaylandPointerData_v3_22_0 pointer_info; - struct _GdkWaylandPointerData_v3_22_0 touch_info; - GdkModifierType key_modifiers; - GdkWindow *keyboard_focus; - GdkAtom pending_selection; - GdkWindow *grab_window; - uint32_t grab_time; - gboolean have_server_repeat; - uint32_t server_repeat_rate; - uint32_t server_repeat_delay; - struct wl_callback *repeat_callback; - guint32 repeat_timer; - guint32 repeat_key; - guint32 repeat_count; - gint64 repeat_deadline; - GSettings *keyboard_settings; - uint32_t keyboard_time; - uint32_t keyboard_key_serial; - struct gtk_primary_selection_device *primary_data_device; - struct wl_data_device *data_device; - GdkDragContext *drop_context; - GdkWindow *foreign_dnd_window; - guint gesture_n_fingers; - gdouble gesture_scale; - GdkCursor *grab_cursor; -}; - -// Version ID 3 -// Diff from previous version: -// - struct gtk_primary_selection_device *primary_data_device; -// + struct gtk_primary_selection_device *gtk_primary_data_device; -// + struct zwp_primary_selection_device_v1 *zwp_primary_data_device_v1; -// Valid for GTK v3.24.24 - v3.24.35 (unreleased) -struct _GdkWaylandSeat_v3_24_24 -{ - GdkSeat parent_instance; - guint32 id; - struct wl_seat *wl_seat; - struct wl_pointer *wl_pointer; - struct wl_keyboard *wl_keyboard; - struct wl_touch *wl_touch; - struct zwp_pointer_gesture_swipe_v1 *wp_pointer_gesture_swipe; - struct zwp_pointer_gesture_pinch_v1 *wp_pointer_gesture_pinch; - struct zwp_tablet_seat_v2 *wp_tablet_seat; - GdkDisplay *display; - GdkDeviceManager *device_manager; - GdkDevice *master_pointer; - GdkDevice *master_keyboard; - GdkDevice *pointer; - GdkDevice *wheel_scrolling; - GdkDevice *finger_scrolling; - GdkDevice *continuous_scrolling; - GdkDevice *keyboard; - GdkDevice *touch_master; - GdkDevice *touch; - GdkCursor *cursor; - GdkKeymap *keymap; - GHashTable *touches; - GList *tablets; - GList *tablet_tools; - GList *tablet_pads; - struct _GdkWaylandPointerData_v3_22_0 pointer_info; - struct _GdkWaylandPointerData_v3_22_0 touch_info; - GdkModifierType key_modifiers; - GdkWindow *keyboard_focus; - GdkAtom pending_selection; - GdkWindow *grab_window; - uint32_t grab_time; - gboolean have_server_repeat; - uint32_t server_repeat_rate; - uint32_t server_repeat_delay; - struct wl_callback *repeat_callback; - guint32 repeat_timer; - guint32 repeat_key; - guint32 repeat_count; - gint64 repeat_deadline; - GSettings *keyboard_settings; - uint32_t keyboard_time; - uint32_t keyboard_key_serial; - struct gtk_primary_selection_device *gtk_primary_data_device; - struct zwp_primary_selection_device_v1 *zwp_primary_data_device_v1; - struct wl_data_device *data_device; - GdkDragContext *drop_context; - GdkWindow *foreign_dnd_window; - guint gesture_n_fingers; - gdouble gesture_scale; - GdkCursor *grab_cursor; -}; - -// For internal use only -int gdk_wayland_seat_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - if (combo >= 24024) { - version_id = 3; - } else if (combo >= 22016) { - version_id = 2; - } else if (combo >= 22009) { - version_id = 1; - } else { - version_id = 0; - } - } - - return version_id; -} - -// GdkWaylandSeat::parent_instance - -GdkSeat * gdk_wayland_seat_priv_get_parent_instance_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (GdkSeat *)&((struct _GdkWaylandSeat_v3_22_0*)self)->parent_instance; - case 1: return (GdkSeat *)&((struct _GdkWaylandSeat_v3_22_9*)self)->parent_instance; - case 2: return (GdkSeat *)&((struct _GdkWaylandSeat_v3_22_16*)self)->parent_instance; - case 3: return (GdkSeat *)&((struct _GdkWaylandSeat_v3_24_24*)self)->parent_instance; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::id - -guint32 * gdk_wayland_seat_priv_get_id_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_0*)self)->id; - case 1: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_9*)self)->id; - case 2: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_16*)self)->id; - case 3: return (guint32 *)&((struct _GdkWaylandSeat_v3_24_24*)self)->id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wl_seat - -struct wl_seat * gdk_wayland_seat_priv_get_wl_seat(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_seat; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_seat; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_seat; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_seat; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wl_seat(GdkWaylandSeat * self, struct wl_seat * wl_seat) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_seat = wl_seat; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_seat = wl_seat; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_seat = wl_seat; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_seat = wl_seat; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wl_pointer - -struct wl_pointer * gdk_wayland_seat_priv_get_wl_pointer(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_pointer; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_pointer; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_pointer; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_pointer; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wl_pointer(GdkWaylandSeat * self, struct wl_pointer * wl_pointer) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_pointer = wl_pointer; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_pointer = wl_pointer; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_pointer = wl_pointer; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_pointer = wl_pointer; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wl_keyboard - -struct wl_keyboard * gdk_wayland_seat_priv_get_wl_keyboard(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_keyboard; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_keyboard; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_keyboard; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_keyboard; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wl_keyboard(GdkWaylandSeat * self, struct wl_keyboard * wl_keyboard) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_keyboard = wl_keyboard; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_keyboard = wl_keyboard; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_keyboard = wl_keyboard; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_keyboard = wl_keyboard; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wl_touch - -struct wl_touch * gdk_wayland_seat_priv_get_wl_touch(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_touch; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_touch; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_touch; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_touch; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wl_touch(GdkWaylandSeat * self, struct wl_touch * wl_touch) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wl_touch = wl_touch; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wl_touch = wl_touch; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wl_touch = wl_touch; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wl_touch = wl_touch; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wp_pointer_gesture_swipe - -struct zwp_pointer_gesture_swipe_v1 * gdk_wayland_seat_priv_get_wp_pointer_gesture_swipe(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wp_pointer_gesture_swipe; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wp_pointer_gesture_swipe; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wp_pointer_gesture_swipe; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wp_pointer_gesture_swipe; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wp_pointer_gesture_swipe(GdkWaylandSeat * self, struct zwp_pointer_gesture_swipe_v1 * wp_pointer_gesture_swipe) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wp_pointer_gesture_swipe = wp_pointer_gesture_swipe; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wp_pointer_gesture_swipe = wp_pointer_gesture_swipe; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wp_pointer_gesture_swipe = wp_pointer_gesture_swipe; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wp_pointer_gesture_swipe = wp_pointer_gesture_swipe; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wp_pointer_gesture_pinch - -struct zwp_pointer_gesture_pinch_v1 * gdk_wayland_seat_priv_get_wp_pointer_gesture_pinch(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wp_pointer_gesture_pinch; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wp_pointer_gesture_pinch; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wp_pointer_gesture_pinch; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wp_pointer_gesture_pinch; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wp_pointer_gesture_pinch(GdkWaylandSeat * self, struct zwp_pointer_gesture_pinch_v1 * wp_pointer_gesture_pinch) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wp_pointer_gesture_pinch = wp_pointer_gesture_pinch; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wp_pointer_gesture_pinch = wp_pointer_gesture_pinch; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wp_pointer_gesture_pinch = wp_pointer_gesture_pinch; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wp_pointer_gesture_pinch = wp_pointer_gesture_pinch; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wp_tablet_seat - -struct zwp_tablet_seat_v2 * gdk_wayland_seat_priv_get_wp_tablet_seat(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wp_tablet_seat; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wp_tablet_seat; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wp_tablet_seat; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wp_tablet_seat; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wp_tablet_seat(GdkWaylandSeat * self, struct zwp_tablet_seat_v2 * wp_tablet_seat) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wp_tablet_seat = wp_tablet_seat; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wp_tablet_seat = wp_tablet_seat; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wp_tablet_seat = wp_tablet_seat; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wp_tablet_seat = wp_tablet_seat; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::display - -GdkDisplay * gdk_wayland_seat_priv_get_display(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->display; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->display; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->display; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->display; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_display(GdkWaylandSeat * self, GdkDisplay * display) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->display = display; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->display = display; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->display = display; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->display = display; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::device_manager - -GdkDeviceManager * gdk_wayland_seat_priv_get_device_manager(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->device_manager; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->device_manager; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->device_manager; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->device_manager; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_device_manager(GdkWaylandSeat * self, GdkDeviceManager * device_manager) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->device_manager = device_manager; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->device_manager = device_manager; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->device_manager = device_manager; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->device_manager = device_manager; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::master_pointer - -GdkDevice * gdk_wayland_seat_priv_get_master_pointer(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->master_pointer; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->master_pointer; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->master_pointer; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->master_pointer; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_master_pointer(GdkWaylandSeat * self, GdkDevice * master_pointer) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->master_pointer = master_pointer; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->master_pointer = master_pointer; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->master_pointer = master_pointer; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->master_pointer = master_pointer; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::master_keyboard - -GdkDevice * gdk_wayland_seat_priv_get_master_keyboard(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->master_keyboard; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->master_keyboard; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->master_keyboard; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->master_keyboard; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_master_keyboard(GdkWaylandSeat * self, GdkDevice * master_keyboard) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->master_keyboard = master_keyboard; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->master_keyboard = master_keyboard; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->master_keyboard = master_keyboard; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->master_keyboard = master_keyboard; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::pointer - -GdkDevice * gdk_wayland_seat_priv_get_pointer(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->pointer; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->pointer; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->pointer; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->pointer; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_pointer(GdkWaylandSeat * self, GdkDevice * pointer) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->pointer = pointer; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->pointer = pointer; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->pointer = pointer; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->pointer = pointer; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::wheel_scrolling - -GdkDevice * gdk_wayland_seat_priv_get_wheel_scrolling(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->wheel_scrolling; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->wheel_scrolling; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->wheel_scrolling; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->wheel_scrolling; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_wheel_scrolling(GdkWaylandSeat * self, GdkDevice * wheel_scrolling) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->wheel_scrolling = wheel_scrolling; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->wheel_scrolling = wheel_scrolling; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->wheel_scrolling = wheel_scrolling; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->wheel_scrolling = wheel_scrolling; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::finger_scrolling - -GdkDevice * gdk_wayland_seat_priv_get_finger_scrolling(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->finger_scrolling; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->finger_scrolling; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->finger_scrolling; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->finger_scrolling; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_finger_scrolling(GdkWaylandSeat * self, GdkDevice * finger_scrolling) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->finger_scrolling = finger_scrolling; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->finger_scrolling = finger_scrolling; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->finger_scrolling = finger_scrolling; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->finger_scrolling = finger_scrolling; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::continuous_scrolling - -GdkDevice * gdk_wayland_seat_priv_get_continuous_scrolling(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->continuous_scrolling; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->continuous_scrolling; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->continuous_scrolling; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->continuous_scrolling; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_continuous_scrolling(GdkWaylandSeat * self, GdkDevice * continuous_scrolling) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->continuous_scrolling = continuous_scrolling; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->continuous_scrolling = continuous_scrolling; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->continuous_scrolling = continuous_scrolling; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->continuous_scrolling = continuous_scrolling; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::keyboard - -GdkDevice * gdk_wayland_seat_priv_get_keyboard(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_keyboard(GdkWaylandSeat * self, GdkDevice * keyboard) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard = keyboard; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard = keyboard; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard = keyboard; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard = keyboard; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::touch_master - -GdkDevice * gdk_wayland_seat_priv_get_touch_master(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->touch_master; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->touch_master; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->touch_master; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->touch_master; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_touch_master(GdkWaylandSeat * self, GdkDevice * touch_master) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->touch_master = touch_master; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->touch_master = touch_master; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->touch_master = touch_master; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->touch_master = touch_master; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::touch - -GdkDevice * gdk_wayland_seat_priv_get_touch(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->touch; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->touch; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->touch; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->touch; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_touch(GdkWaylandSeat * self, GdkDevice * touch) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->touch = touch; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->touch = touch; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->touch = touch; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->touch = touch; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::cursor - -GdkCursor * gdk_wayland_seat_priv_get_cursor(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->cursor; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->cursor; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->cursor; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->cursor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_cursor(GdkWaylandSeat * self, GdkCursor * cursor) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->cursor = cursor; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->cursor = cursor; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->cursor = cursor; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->cursor = cursor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::keymap - -GdkKeymap * gdk_wayland_seat_priv_get_keymap(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->keymap; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->keymap; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->keymap; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->keymap; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_keymap(GdkWaylandSeat * self, GdkKeymap * keymap) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->keymap = keymap; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->keymap = keymap; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->keymap = keymap; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->keymap = keymap; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::touches - -GHashTable * gdk_wayland_seat_priv_get_touches(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->touches; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->touches; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->touches; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->touches; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_touches(GdkWaylandSeat * self, GHashTable * touches) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->touches = touches; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->touches = touches; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->touches = touches; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->touches = touches; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::tablets - -GList * gdk_wayland_seat_priv_get_tablets(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->tablets; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->tablets; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->tablets; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->tablets; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_tablets(GdkWaylandSeat * self, GList * tablets) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->tablets = tablets; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->tablets = tablets; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->tablets = tablets; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->tablets = tablets; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::tablet_tools - -GList * gdk_wayland_seat_priv_get_tablet_tools(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->tablet_tools; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->tablet_tools; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->tablet_tools; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->tablet_tools; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_tablet_tools(GdkWaylandSeat * self, GList * tablet_tools) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->tablet_tools = tablet_tools; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->tablet_tools = tablet_tools; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->tablet_tools = tablet_tools; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->tablet_tools = tablet_tools; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::tablet_pads - -GList * gdk_wayland_seat_priv_get_tablet_pads(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->tablet_pads; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->tablet_pads; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->tablet_pads; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->tablet_pads; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_tablet_pads(GdkWaylandSeat * self, GList * tablet_pads) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->tablet_pads = tablet_pads; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->tablet_pads = tablet_pads; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->tablet_pads = tablet_pads; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->tablet_pads = tablet_pads; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::pointer_info - -GdkWaylandPointerData * gdk_wayland_seat_priv_get_pointer_info_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_22_0*)self)->pointer_info; - case 1: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_22_9*)self)->pointer_info; - case 2: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_22_16*)self)->pointer_info; - case 3: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_24_24*)self)->pointer_info; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::touch_info - -GdkWaylandPointerData * gdk_wayland_seat_priv_get_touch_info_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_22_0*)self)->touch_info; - case 1: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_22_9*)self)->touch_info; - case 2: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_22_16*)self)->touch_info; - case 3: return (GdkWaylandPointerData *)&((struct _GdkWaylandSeat_v3_24_24*)self)->touch_info; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::key_modifiers - -GdkModifierType * gdk_wayland_seat_priv_get_key_modifiers_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (GdkModifierType *)&((struct _GdkWaylandSeat_v3_22_0*)self)->key_modifiers; - case 1: return (GdkModifierType *)&((struct _GdkWaylandSeat_v3_22_9*)self)->key_modifiers; - case 2: return (GdkModifierType *)&((struct _GdkWaylandSeat_v3_22_16*)self)->key_modifiers; - case 3: return (GdkModifierType *)&((struct _GdkWaylandSeat_v3_24_24*)self)->key_modifiers; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::keyboard_focus - -GdkWindow * gdk_wayland_seat_priv_get_keyboard_focus(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_focus; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_focus; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_focus; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_focus; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_keyboard_focus(GdkWaylandSeat * self, GdkWindow * keyboard_focus) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_focus = keyboard_focus; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_focus = keyboard_focus; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_focus = keyboard_focus; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_focus = keyboard_focus; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::pending_selection - -GdkAtom * gdk_wayland_seat_priv_get_pending_selection_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (GdkAtom *)&((struct _GdkWaylandSeat_v3_22_0*)self)->pending_selection; - case 1: return (GdkAtom *)&((struct _GdkWaylandSeat_v3_22_9*)self)->pending_selection; - case 2: return (GdkAtom *)&((struct _GdkWaylandSeat_v3_22_16*)self)->pending_selection; - case 3: return (GdkAtom *)&((struct _GdkWaylandSeat_v3_24_24*)self)->pending_selection; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::grab_window - -GdkWindow * gdk_wayland_seat_priv_get_grab_window(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->grab_window; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->grab_window; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->grab_window; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->grab_window; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_grab_window(GdkWaylandSeat * self, GdkWindow * grab_window) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->grab_window = grab_window; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->grab_window = grab_window; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->grab_window = grab_window; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->grab_window = grab_window; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::grab_time - -uint32_t gdk_wayland_seat_priv_get_grab_time(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->grab_time; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->grab_time; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->grab_time; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->grab_time; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_grab_time(GdkWaylandSeat * self, uint32_t grab_time) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->grab_time = grab_time; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->grab_time = grab_time; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->grab_time = grab_time; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->grab_time = grab_time; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::have_server_repeat - -gboolean gdk_wayland_seat_priv_get_have_server_repeat(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->have_server_repeat; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->have_server_repeat; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->have_server_repeat; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->have_server_repeat; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_have_server_repeat(GdkWaylandSeat * self, gboolean have_server_repeat) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->have_server_repeat = have_server_repeat; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->have_server_repeat = have_server_repeat; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->have_server_repeat = have_server_repeat; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->have_server_repeat = have_server_repeat; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::server_repeat_rate - -uint32_t gdk_wayland_seat_priv_get_server_repeat_rate(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->server_repeat_rate; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->server_repeat_rate; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->server_repeat_rate; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->server_repeat_rate; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_server_repeat_rate(GdkWaylandSeat * self, uint32_t server_repeat_rate) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->server_repeat_rate = server_repeat_rate; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->server_repeat_rate = server_repeat_rate; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->server_repeat_rate = server_repeat_rate; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->server_repeat_rate = server_repeat_rate; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::server_repeat_delay - -uint32_t gdk_wayland_seat_priv_get_server_repeat_delay(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->server_repeat_delay; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->server_repeat_delay; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->server_repeat_delay; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->server_repeat_delay; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_server_repeat_delay(GdkWaylandSeat * self, uint32_t server_repeat_delay) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->server_repeat_delay = server_repeat_delay; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->server_repeat_delay = server_repeat_delay; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->server_repeat_delay = server_repeat_delay; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->server_repeat_delay = server_repeat_delay; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::repeat_callback - -struct wl_callback * gdk_wayland_seat_priv_get_repeat_callback(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->repeat_callback; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->repeat_callback; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->repeat_callback; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->repeat_callback; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_repeat_callback(GdkWaylandSeat * self, struct wl_callback * repeat_callback) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->repeat_callback = repeat_callback; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->repeat_callback = repeat_callback; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->repeat_callback = repeat_callback; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->repeat_callback = repeat_callback; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::repeat_timer - -guint32 * gdk_wayland_seat_priv_get_repeat_timer_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_0*)self)->repeat_timer; - case 1: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_9*)self)->repeat_timer; - case 2: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_16*)self)->repeat_timer; - case 3: return (guint32 *)&((struct _GdkWaylandSeat_v3_24_24*)self)->repeat_timer; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::repeat_key - -guint32 * gdk_wayland_seat_priv_get_repeat_key_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_0*)self)->repeat_key; - case 1: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_9*)self)->repeat_key; - case 2: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_16*)self)->repeat_key; - case 3: return (guint32 *)&((struct _GdkWaylandSeat_v3_24_24*)self)->repeat_key; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::repeat_count - -guint32 * gdk_wayland_seat_priv_get_repeat_count_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_0*)self)->repeat_count; - case 1: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_9*)self)->repeat_count; - case 2: return (guint32 *)&((struct _GdkWaylandSeat_v3_22_16*)self)->repeat_count; - case 3: return (guint32 *)&((struct _GdkWaylandSeat_v3_24_24*)self)->repeat_count; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::repeat_deadline - -gint64 * gdk_wayland_seat_priv_get_repeat_deadline_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (gint64 *)&((struct _GdkWaylandSeat_v3_22_0*)self)->repeat_deadline; - case 1: return (gint64 *)&((struct _GdkWaylandSeat_v3_22_9*)self)->repeat_deadline; - case 2: return (gint64 *)&((struct _GdkWaylandSeat_v3_22_16*)self)->repeat_deadline; - case 3: return (gint64 *)&((struct _GdkWaylandSeat_v3_24_24*)self)->repeat_deadline; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::keyboard_settings - -GSettings * gdk_wayland_seat_priv_get_keyboard_settings(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_settings; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_settings; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_settings; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_settings; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_keyboard_settings(GdkWaylandSeat * self, GSettings * keyboard_settings) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_settings = keyboard_settings; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_settings = keyboard_settings; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_settings = keyboard_settings; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_settings = keyboard_settings; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::keyboard_time - -uint32_t gdk_wayland_seat_priv_get_keyboard_time(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_time; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_time; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_time; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_time; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_keyboard_time(GdkWaylandSeat * self, uint32_t keyboard_time) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_time = keyboard_time; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_time = keyboard_time; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_time = keyboard_time; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_time = keyboard_time; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::keyboard_key_serial - -uint32_t gdk_wayland_seat_priv_get_keyboard_key_serial(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_key_serial; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_key_serial; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_key_serial; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_key_serial; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_keyboard_key_serial(GdkWaylandSeat * self, uint32_t keyboard_key_serial) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->keyboard_key_serial = keyboard_key_serial; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->keyboard_key_serial = keyboard_key_serial; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->keyboard_key_serial = keyboard_key_serial; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->keyboard_key_serial = keyboard_key_serial; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::primary_data_device - -gboolean gdk_wayland_seat_priv_get_primary_data_device_supported() { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return TRUE; - case 1: return TRUE; - case 2: return TRUE; - case 3: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct gtk_primary_selection_device * gdk_wayland_seat_priv_get_primary_data_device_or_abort(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->primary_data_device; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->primary_data_device; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->primary_data_device; - case 3: g_error("GdkWaylandSeat::primary_data_device not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_primary_data_device_or_abort(GdkWaylandSeat * self, struct gtk_primary_selection_device * primary_data_device) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->primary_data_device = primary_data_device; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->primary_data_device = primary_data_device; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->primary_data_device = primary_data_device; break; - case 3: g_error("GdkWaylandSeat::primary_data_device not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::data_device - -struct wl_data_device * gdk_wayland_seat_priv_get_data_device(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->data_device; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->data_device; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->data_device; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->data_device; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_data_device(GdkWaylandSeat * self, struct wl_data_device * data_device) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->data_device = data_device; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->data_device = data_device; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->data_device = data_device; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->data_device = data_device; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::drop_context - -GdkDragContext * gdk_wayland_seat_priv_get_drop_context(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->drop_context; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->drop_context; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->drop_context; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->drop_context; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_drop_context(GdkWaylandSeat * self, GdkDragContext * drop_context) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->drop_context = drop_context; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->drop_context = drop_context; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->drop_context = drop_context; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->drop_context = drop_context; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::foreign_dnd_window - -GdkWindow * gdk_wayland_seat_priv_get_foreign_dnd_window(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->foreign_dnd_window; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->foreign_dnd_window; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->foreign_dnd_window; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->foreign_dnd_window; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_foreign_dnd_window(GdkWaylandSeat * self, GdkWindow * foreign_dnd_window) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->foreign_dnd_window = foreign_dnd_window; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->foreign_dnd_window = foreign_dnd_window; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->foreign_dnd_window = foreign_dnd_window; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->foreign_dnd_window = foreign_dnd_window; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::gesture_n_fingers - -guint gdk_wayland_seat_priv_get_gesture_n_fingers(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->gesture_n_fingers; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->gesture_n_fingers; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->gesture_n_fingers; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->gesture_n_fingers; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_gesture_n_fingers(GdkWaylandSeat * self, guint gesture_n_fingers) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->gesture_n_fingers = gesture_n_fingers; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->gesture_n_fingers = gesture_n_fingers; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->gesture_n_fingers = gesture_n_fingers; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->gesture_n_fingers = gesture_n_fingers; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::gesture_scale - -gdouble * gdk_wayland_seat_priv_get_gesture_scale_ptr(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return (gdouble *)&((struct _GdkWaylandSeat_v3_22_0*)self)->gesture_scale; - case 1: return (gdouble *)&((struct _GdkWaylandSeat_v3_22_9*)self)->gesture_scale; - case 2: return (gdouble *)&((struct _GdkWaylandSeat_v3_22_16*)self)->gesture_scale; - case 3: return (gdouble *)&((struct _GdkWaylandSeat_v3_24_24*)self)->gesture_scale; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::grab_cursor - -GdkCursor * gdk_wayland_seat_priv_get_grab_cursor(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandSeat_v3_22_0*)self)->grab_cursor; - case 1: return ((struct _GdkWaylandSeat_v3_22_9*)self)->grab_cursor; - case 2: return ((struct _GdkWaylandSeat_v3_22_16*)self)->grab_cursor; - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->grab_cursor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_grab_cursor(GdkWaylandSeat * self, GdkCursor * grab_cursor) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: ((struct _GdkWaylandSeat_v3_22_0*)self)->grab_cursor = grab_cursor; break; - case 1: ((struct _GdkWaylandSeat_v3_22_9*)self)->grab_cursor = grab_cursor; break; - case 2: ((struct _GdkWaylandSeat_v3_22_16*)self)->grab_cursor = grab_cursor; break; - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->grab_cursor = grab_cursor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::nkeys - -gboolean gdk_wayland_seat_priv_get_nkeys_supported() { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return FALSE; - case 1: return TRUE; - case 2: return FALSE; - case 3: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -gint32 * gdk_wayland_seat_priv_get_nkeys_ptr_or_null(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return NULL; - case 1: return (gint32 *)&((struct _GdkWaylandSeat_v3_22_9*)self)->nkeys; - case 2: return NULL; - case 3: return NULL; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::gtk_primary_data_device - -gboolean gdk_wayland_seat_priv_get_gtk_primary_data_device_supported() { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct gtk_primary_selection_device * gdk_wayland_seat_priv_get_gtk_primary_data_device_or_abort(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: g_error("GdkWaylandSeat::gtk_primary_data_device not supported on this GTK"); g_abort(); - case 1: g_error("GdkWaylandSeat::gtk_primary_data_device not supported on this GTK"); g_abort(); - case 2: g_error("GdkWaylandSeat::gtk_primary_data_device not supported on this GTK"); g_abort(); - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->gtk_primary_data_device; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_gtk_primary_data_device_or_abort(GdkWaylandSeat * self, struct gtk_primary_selection_device * gtk_primary_data_device) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: g_error("GdkWaylandSeat::gtk_primary_data_device not supported on this GTK"); g_abort(); - case 1: g_error("GdkWaylandSeat::gtk_primary_data_device not supported on this GTK"); g_abort(); - case 2: g_error("GdkWaylandSeat::gtk_primary_data_device not supported on this GTK"); g_abort(); - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->gtk_primary_data_device = gtk_primary_data_device; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandSeat::zwp_primary_data_device_v1 - -gboolean gdk_wayland_seat_priv_get_zwp_primary_data_device_v1_supported() { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct zwp_primary_selection_device_v1 * gdk_wayland_seat_priv_get_zwp_primary_data_device_v1_or_abort(GdkWaylandSeat * self) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: g_error("GdkWaylandSeat::zwp_primary_data_device_v1 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWaylandSeat::zwp_primary_data_device_v1 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWaylandSeat::zwp_primary_data_device_v1 not supported on this GTK"); g_abort(); - case 3: return ((struct _GdkWaylandSeat_v3_24_24*)self)->zwp_primary_data_device_v1; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_seat_priv_set_zwp_primary_data_device_v1_or_abort(GdkWaylandSeat * self, struct zwp_primary_selection_device_v1 * zwp_primary_data_device_v1) { - switch (gdk_wayland_seat_priv_get_version_id()) { - case 0: g_error("GdkWaylandSeat::zwp_primary_data_device_v1 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWaylandSeat::zwp_primary_data_device_v1 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWaylandSeat::zwp_primary_data_device_v1 not supported on this GTK"); g_abort(); - case 3: ((struct _GdkWaylandSeat_v3_24_24*)self)->zwp_primary_data_device_v1 = zwp_primary_data_device_v1; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WAYLAND_SEAT_PRIV_H diff --git a/gtk-priv/h/gdk_wayland_tablet_data_priv.h b/gtk-priv/h/gdk_wayland_tablet_data_priv.h deleted file mode 100644 index 87e3b2e..0000000 --- a/gtk-priv/h/gdk_wayland_tablet_data_priv.h +++ /dev/null @@ -1,370 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 2009 Carlos Garnacho - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WAYLAND_TABLET_DATA_PRIV_H -#define GDK_WAYLAND_TABLET_DATA_PRIV_H - -#include "common.h" - -typedef struct _GdkWaylandTabletData GdkWaylandTabletData; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.24.35 (unreleased) -struct _GdkWaylandTabletData_v3_22_0 -{ - struct zwp_tablet_v2 *wp_tablet; - gchar *name; - gchar *path; - uint32_t vid; - uint32_t pid; - GdkDevice *master; - GdkDevice *stylus_device; - GdkDevice *eraser_device; - GdkDevice *current_device; - GdkSeat *seat; - struct _GdkWaylandPointerData_v3_22_0 pointer_info; - GList *pads; - GdkWaylandTabletToolData *current_tool; - gint axis_indices[GDK_AXIS_LAST]; - gdouble *axes; -}; - -// For internal use only -int gdk_wayland_tablet_data_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - { - version_id = 0; - } - } - - return version_id; -} - -// GdkWaylandTabletData::wp_tablet - -struct zwp_tablet_v2 * gdk_wayland_tablet_data_priv_get_wp_tablet(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->wp_tablet; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_wp_tablet(GdkWaylandTabletData * self, struct zwp_tablet_v2 * wp_tablet) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->wp_tablet = wp_tablet; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::name - -gchar * gdk_wayland_tablet_data_priv_get_name(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->name; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_name(GdkWaylandTabletData * self, gchar * name) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->name = name; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::path - -gchar * gdk_wayland_tablet_data_priv_get_path(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->path; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_path(GdkWaylandTabletData * self, gchar * path) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->path = path; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::vid - -uint32_t gdk_wayland_tablet_data_priv_get_vid(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->vid; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_vid(GdkWaylandTabletData * self, uint32_t vid) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->vid = vid; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::pid - -uint32_t gdk_wayland_tablet_data_priv_get_pid(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->pid; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_pid(GdkWaylandTabletData * self, uint32_t pid) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->pid = pid; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::master - -GdkDevice * gdk_wayland_tablet_data_priv_get_master(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->master; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_master(GdkWaylandTabletData * self, GdkDevice * master) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->master = master; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::stylus_device - -GdkDevice * gdk_wayland_tablet_data_priv_get_stylus_device(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->stylus_device; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_stylus_device(GdkWaylandTabletData * self, GdkDevice * stylus_device) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->stylus_device = stylus_device; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::eraser_device - -GdkDevice * gdk_wayland_tablet_data_priv_get_eraser_device(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->eraser_device; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_eraser_device(GdkWaylandTabletData * self, GdkDevice * eraser_device) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->eraser_device = eraser_device; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::current_device - -GdkDevice * gdk_wayland_tablet_data_priv_get_current_device(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->current_device; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_current_device(GdkWaylandTabletData * self, GdkDevice * current_device) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->current_device = current_device; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::seat - -GdkSeat * gdk_wayland_tablet_data_priv_get_seat(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->seat; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_seat(GdkWaylandTabletData * self, GdkSeat * seat) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->seat = seat; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::pointer_info - -GdkWaylandPointerData * gdk_wayland_tablet_data_priv_get_pointer_info_ptr(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return (GdkWaylandPointerData *)&((struct _GdkWaylandTabletData_v3_22_0*)self)->pointer_info; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::pads - -GList * gdk_wayland_tablet_data_priv_get_pads(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->pads; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_pads(GdkWaylandTabletData * self, GList * pads) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->pads = pads; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::current_tool - -GdkWaylandTabletToolData * gdk_wayland_tablet_data_priv_get_current_tool(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->current_tool; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_current_tool(GdkWaylandTabletData * self, GdkWaylandTabletToolData * current_tool) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->current_tool = current_tool; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::axis_indices - -gint* * gdk_wayland_tablet_data_priv_get_axis_indices_ptr(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return (gint* *)&((struct _GdkWaylandTabletData_v3_22_0*)self)->axis_indices; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTabletData::axes - -gdouble * gdk_wayland_tablet_data_priv_get_axes(GdkWaylandTabletData * self) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTabletData_v3_22_0*)self)->axes; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_tablet_data_priv_set_axes(GdkWaylandTabletData * self, gdouble * axes) { - switch (gdk_wayland_tablet_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTabletData_v3_22_0*)self)->axes = axes; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WAYLAND_TABLET_DATA_PRIV_H diff --git a/gtk-priv/h/gdk_wayland_touch_data_priv.h b/gtk-priv/h/gdk_wayland_touch_data_priv.h deleted file mode 100644 index cb01af3..0000000 --- a/gtk-priv/h/gdk_wayland_touch_data_priv.h +++ /dev/null @@ -1,217 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 2009 Carlos Garnacho - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WAYLAND_TOUCH_DATA_PRIV_H -#define GDK_WAYLAND_TOUCH_DATA_PRIV_H - -#include "common.h" - -typedef struct _GdkWaylandTouchData GdkWaylandTouchData; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.24.35 (unreleased) -struct _GdkWaylandTouchData_v3_22_0 -{ - uint32_t id; - gdouble x; - gdouble y; - GdkWindow *window; - uint32_t touch_down_serial; - guint initial_touch : 1; -}; - -// For internal use only -int gdk_wayland_touch_data_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - { - version_id = 0; - } - } - - return version_id; -} - -// GdkWaylandTouchData::id - -uint32_t gdk_wayland_touch_data_priv_get_id(GdkWaylandTouchData * self) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTouchData_v3_22_0*)self)->id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_touch_data_priv_set_id(GdkWaylandTouchData * self, uint32_t id) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTouchData_v3_22_0*)self)->id = id; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTouchData::x - -gdouble * gdk_wayland_touch_data_priv_get_x_ptr(GdkWaylandTouchData * self) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: return (gdouble *)&((struct _GdkWaylandTouchData_v3_22_0*)self)->x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTouchData::y - -gdouble * gdk_wayland_touch_data_priv_get_y_ptr(GdkWaylandTouchData * self) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: return (gdouble *)&((struct _GdkWaylandTouchData_v3_22_0*)self)->y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTouchData::window - -GdkWindow * gdk_wayland_touch_data_priv_get_window(GdkWaylandTouchData * self) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTouchData_v3_22_0*)self)->window; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_touch_data_priv_set_window(GdkWaylandTouchData * self, GdkWindow * window) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTouchData_v3_22_0*)self)->window = window; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTouchData::touch_down_serial - -uint32_t gdk_wayland_touch_data_priv_get_touch_down_serial(GdkWaylandTouchData * self) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTouchData_v3_22_0*)self)->touch_down_serial; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_touch_data_priv_set_touch_down_serial(GdkWaylandTouchData * self, uint32_t touch_down_serial) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTouchData_v3_22_0*)self)->touch_down_serial = touch_down_serial; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWaylandTouchData::initial_touch - -guint gdk_wayland_touch_data_priv_get_initial_touch(GdkWaylandTouchData * self) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: return ((struct _GdkWaylandTouchData_v3_22_0*)self)->initial_touch; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_wayland_touch_data_priv_set_initial_touch(GdkWaylandTouchData * self, guint initial_touch) { - switch (gdk_wayland_touch_data_priv_get_version_id()) { - case 0: ((struct _GdkWaylandTouchData_v3_22_0*)self)->initial_touch = initial_touch; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WAYLAND_TOUCH_DATA_PRIV_H diff --git a/gtk-priv/h/gdk_window_impl_class_priv.h b/gtk-priv/h/gdk_window_impl_class_priv.h deleted file mode 100644 index b45c715..0000000 --- a/gtk-priv/h/gdk_window_impl_class_priv.h +++ /dev/null @@ -1,1686 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WINDOW_IMPL_CLASS_PRIV_H -#define GDK_WINDOW_IMPL_CLASS_PRIV_H - -#include "common.h" - -typedef struct _GdkWindowImplClass GdkWindowImplClass; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.24.35 (unreleased) -struct _GdkWindowImplClass_v3_22_0 -{ - GObjectClass parent_class; - cairo_surface_t * (* ref_cairo_surface) (GdkWindow *window); - cairo_surface_t * (* create_similar_image_surface) (GdkWindow *window, cairo_format_t format, int width, int height); - void (* show) (GdkWindow *window, gboolean already_mapped); - void (* hide) (GdkWindow *window); - void (* withdraw) (GdkWindow *window); - void (* raise) (GdkWindow *window); - void (* lower) (GdkWindow *window); - void (* restack_under) (GdkWindow *window, GList *native_siblings); - void (* restack_toplevel) (GdkWindow *window, GdkWindow *sibling, gboolean above); - void (* move_resize) (GdkWindow *window, gboolean with_move, gint x, gint y, gint width, gint height); - void (* move_to_rect) (GdkWindow *window, const GdkRectangle *rect, GdkGravity rect_anchor, GdkGravity window_anchor, GdkAnchorHints anchor_hints, gint rect_anchor_dx, gint rect_anchor_dy); - void (* set_background) (GdkWindow *window, cairo_pattern_t *pattern); - GdkEventMask (* get_events) (GdkWindow *window); - void (* set_events) (GdkWindow *window, GdkEventMask event_mask); - gboolean (* reparent) (GdkWindow *window, GdkWindow *new_parent, gint x, gint y); - void (* set_device_cursor) (GdkWindow *window, GdkDevice *device, GdkCursor *cursor); - void (* get_geometry) (GdkWindow *window, gint *x, gint *y, gint *width, gint *height); - void (* get_root_coords) (GdkWindow *window, gint x, gint y, gint *root_x, gint *root_y); - gboolean (* get_device_state) (GdkWindow *window, GdkDevice *device, gdouble *x, gdouble *y, GdkModifierType *mask); - gboolean (* begin_paint) (GdkWindow *window); - void (* end_paint) (GdkWindow *window); - cairo_region_t * (* get_shape) (GdkWindow *window); - cairo_region_t * (* get_input_shape) (GdkWindow *window); - void (* shape_combine_region) (GdkWindow *window, const cairo_region_t *shape_region, gint offset_x, gint offset_y); - void (* input_shape_combine_region) (GdkWindow *window, const cairo_region_t *shape_region, gint offset_x, gint offset_y); - void (* queue_antiexpose) (GdkWindow *window, cairo_region_t *update_area); - void (* destroy) (GdkWindow *window, gboolean recursing, gboolean foreign_destroy); - void (* destroy_foreign) (GdkWindow *window); - gboolean (* beep) (GdkWindow *window); - void (* focus) (GdkWindow *window, guint32 timestamp); - void (* set_type_hint) (GdkWindow *window, GdkWindowTypeHint hint); - GdkWindowTypeHint (* get_type_hint) (GdkWindow *window); - void (* set_modal_hint) (GdkWindow *window, gboolean modal); - void (* set_skip_taskbar_hint) (GdkWindow *window, gboolean skips_taskbar); - void (* set_skip_pager_hint) (GdkWindow *window, gboolean skips_pager); - void (* set_urgency_hint) (GdkWindow *window, gboolean urgent); - void (* set_geometry_hints) (GdkWindow *window, const GdkGeometry *geometry, GdkWindowHints geom_mask); - void (* set_title) (GdkWindow *window, const gchar *title); - void (* set_role) (GdkWindow *window, const gchar *role); - void (* set_startup_id) (GdkWindow *window, const gchar *startup_id); - void (* set_transient_for) (GdkWindow *window, GdkWindow *parent); - void (* get_frame_extents) (GdkWindow *window, GdkRectangle *rect); - void (* set_override_redirect) (GdkWindow *window, gboolean override_redirect); - void (* set_accept_focus) (GdkWindow *window, gboolean accept_focus); - void (* set_focus_on_map) (GdkWindow *window, gboolean focus_on_map); - void (* set_icon_list) (GdkWindow *window, GList *pixbufs); - void (* set_icon_name) (GdkWindow *window, const gchar *name); - void (* iconify) (GdkWindow *window); - void (* deiconify) (GdkWindow *window); - void (* stick) (GdkWindow *window); - void (* unstick) (GdkWindow *window); - void (* maximize) (GdkWindow *window); - void (* unmaximize) (GdkWindow *window); - void (* fullscreen) (GdkWindow *window); - void (* fullscreen_on_monitor) (GdkWindow *window, gint monitor); - void (* apply_fullscreen_mode) (GdkWindow *window); - void (* unfullscreen) (GdkWindow *window); - void (* set_keep_above) (GdkWindow *window, gboolean setting); - void (* set_keep_below) (GdkWindow *window, gboolean setting); - GdkWindow * (* get_group) (GdkWindow *window); - void (* set_group) (GdkWindow *window, GdkWindow *leader); - void (* set_decorations) (GdkWindow *window, GdkWMDecoration decorations); - gboolean (* get_decorations) (GdkWindow *window, GdkWMDecoration *decorations); - void (* set_functions) (GdkWindow *window, GdkWMFunction functions); - void (* begin_resize_drag) (GdkWindow *window, GdkWindowEdge edge, GdkDevice *device, gint button, gint root_x, gint root_y, guint32 timestamp); - void (* begin_move_drag) (GdkWindow *window, GdkDevice *device, gint button, gint root_x, gint root_y, guint32 timestamp); - void (* enable_synchronized_configure) (GdkWindow *window); - void (* configure_finished) (GdkWindow *window); - void (* set_opacity) (GdkWindow *window, gdouble opacity); - void (* set_composited) (GdkWindow *window, gboolean composited); - void (* destroy_notify) (GdkWindow *window); - GdkDragProtocol (* get_drag_protocol) (GdkWindow *window, GdkWindow **target); - void (* register_dnd) (GdkWindow *window); - GdkDragContext * (* drag_begin) (GdkWindow *window, GdkDevice *device, GList *targets, gint x_root, gint y_root); - void (* process_updates_recurse) (GdkWindow *window, cairo_region_t *region); - void (* sync_rendering) (GdkWindow *window); - gboolean (* simulate_key) (GdkWindow *window, gint x, gint y, guint keyval, GdkModifierType modifiers, GdkEventType event_type); - gboolean (* simulate_button) (GdkWindow *window, gint x, gint y, guint button, GdkModifierType modifiers, GdkEventType event_type); - gboolean (* get_property) (GdkWindow *window, GdkAtom property, GdkAtom type, gulong offset, gulong length, gint pdelete, GdkAtom *actual_type, gint *actual_format, gint *actual_length, guchar **data); - void (* change_property) (GdkWindow *window, GdkAtom property, GdkAtom type, gint format, GdkPropMode mode, const guchar *data, gint n_elements); - void (* delete_property) (GdkWindow *window, GdkAtom property); - gint (* get_scale_factor) (GdkWindow *window); - void (* get_unscaled_size) (GdkWindow *window, int *unscaled_width, int *unscaled_height); - void (* set_opaque_region) (GdkWindow *window, cairo_region_t *region); - void (* set_shadow_width) (GdkWindow *window, gint left, gint right, gint top, gint bottom); - gboolean (* show_window_menu) (GdkWindow *window, GdkEvent *event); - GdkGLContext * (* create_gl_context) (GdkWindow *window, gboolean attached, GdkGLContext *share, GError **error); - gboolean (* realize_gl_context) (GdkWindow *window, GdkGLContext *context, GError **error); - void (* invalidate_for_new_frame) (GdkWindow *window, cairo_region_t *update_area); - GdkDrawingContext * (* create_draw_context) (GdkWindow *window, const cairo_region_t *region); - void (* destroy_draw_context) (GdkWindow *window, GdkDrawingContext *context); -}; - -// For internal use only -int gdk_window_impl_class_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - { - version_id = 0; - } - } - - return version_id; -} - -// GdkWindowImplClass::parent_class - -GObjectClass * gdk_window_impl_class_priv_get_parent_class_ptr(GdkWindowImplClass * self) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return (GObjectClass *)&((struct _GdkWindowImplClass_v3_22_0*)self)->parent_class; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::ref_cairo_surface - -cairo_surface_t * (* gdk_window_impl_class_priv_get_ref_cairo_surface(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->ref_cairo_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_ref_cairo_surface(GdkWindowImplClass * self, cairo_surface_t * (* ref_cairo_surface) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->ref_cairo_surface = ref_cairo_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::create_similar_image_surface - -cairo_surface_t * (* gdk_window_impl_class_priv_get_create_similar_image_surface(GdkWindowImplClass * self)) (GdkWindow *window, cairo_format_t format, int width, int height) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->create_similar_image_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_create_similar_image_surface(GdkWindowImplClass * self, cairo_surface_t * (* create_similar_image_surface) (GdkWindow *window, cairo_format_t format, int width, int height)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->create_similar_image_surface = create_similar_image_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::show - -void (* gdk_window_impl_class_priv_get_show(GdkWindowImplClass * self)) (GdkWindow *window, gboolean already_mapped) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->show; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_show(GdkWindowImplClass * self, void (* show) (GdkWindow *window, gboolean already_mapped)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->show = show; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::hide - -void (* gdk_window_impl_class_priv_get_hide(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->hide; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_hide(GdkWindowImplClass * self, void (* hide) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->hide = hide; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::withdraw - -void (* gdk_window_impl_class_priv_get_withdraw(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->withdraw; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_withdraw(GdkWindowImplClass * self, void (* withdraw) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->withdraw = withdraw; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::raise - -void (* gdk_window_impl_class_priv_get_raise(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->raise; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_raise(GdkWindowImplClass * self, void (* raise) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->raise = raise; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::lower - -void (* gdk_window_impl_class_priv_get_lower(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->lower; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_lower(GdkWindowImplClass * self, void (* lower) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->lower = lower; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::restack_under - -void (* gdk_window_impl_class_priv_get_restack_under(GdkWindowImplClass * self)) (GdkWindow *window, GList *native_siblings) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->restack_under; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_restack_under(GdkWindowImplClass * self, void (* restack_under) (GdkWindow *window, GList *native_siblings)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->restack_under = restack_under; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::restack_toplevel - -void (* gdk_window_impl_class_priv_get_restack_toplevel(GdkWindowImplClass * self)) (GdkWindow *window, GdkWindow *sibling, gboolean above) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->restack_toplevel; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_restack_toplevel(GdkWindowImplClass * self, void (* restack_toplevel) (GdkWindow *window, GdkWindow *sibling, gboolean above)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->restack_toplevel = restack_toplevel; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::move_resize - -void (* gdk_window_impl_class_priv_get_move_resize(GdkWindowImplClass * self)) (GdkWindow *window, gboolean with_move, gint x, gint y, gint width, gint height) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->move_resize; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_move_resize(GdkWindowImplClass * self, void (* move_resize) (GdkWindow *window, gboolean with_move, gint x, gint y, gint width, gint height)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->move_resize = move_resize; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::move_to_rect - -void (* gdk_window_impl_class_priv_get_move_to_rect(GdkWindowImplClass * self)) (GdkWindow *window, const GdkRectangle *rect, GdkGravity rect_anchor, GdkGravity window_anchor, GdkAnchorHints anchor_hints, gint rect_anchor_dx, gint rect_anchor_dy) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->move_to_rect; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_move_to_rect(GdkWindowImplClass * self, void (* move_to_rect) (GdkWindow *window, const GdkRectangle *rect, GdkGravity rect_anchor, GdkGravity window_anchor, GdkAnchorHints anchor_hints, gint rect_anchor_dx, gint rect_anchor_dy)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->move_to_rect = move_to_rect; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_background - -void (* gdk_window_impl_class_priv_get_set_background(GdkWindowImplClass * self)) (GdkWindow *window, cairo_pattern_t *pattern) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_background; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_background(GdkWindowImplClass * self, void (* set_background) (GdkWindow *window, cairo_pattern_t *pattern)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_background = set_background; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_events - -GdkEventMask (* gdk_window_impl_class_priv_get_get_events(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_events; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_events(GdkWindowImplClass * self, GdkEventMask (* get_events) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_events = get_events; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_events - -void (* gdk_window_impl_class_priv_get_set_events(GdkWindowImplClass * self)) (GdkWindow *window, GdkEventMask event_mask) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_events; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_events(GdkWindowImplClass * self, void (* set_events) (GdkWindow *window, GdkEventMask event_mask)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_events = set_events; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::reparent - -gboolean (* gdk_window_impl_class_priv_get_reparent(GdkWindowImplClass * self)) (GdkWindow *window, GdkWindow *new_parent, gint x, gint y) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->reparent; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_reparent(GdkWindowImplClass * self, gboolean (* reparent) (GdkWindow *window, GdkWindow *new_parent, gint x, gint y)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->reparent = reparent; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_device_cursor - -void (* gdk_window_impl_class_priv_get_set_device_cursor(GdkWindowImplClass * self)) (GdkWindow *window, GdkDevice *device, GdkCursor *cursor) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_device_cursor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_device_cursor(GdkWindowImplClass * self, void (* set_device_cursor) (GdkWindow *window, GdkDevice *device, GdkCursor *cursor)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_device_cursor = set_device_cursor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_geometry - -void (* gdk_window_impl_class_priv_get_get_geometry(GdkWindowImplClass * self)) (GdkWindow *window, gint *x, gint *y, gint *width, gint *height) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_geometry; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_geometry(GdkWindowImplClass * self, void (* get_geometry) (GdkWindow *window, gint *x, gint *y, gint *width, gint *height)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_geometry = get_geometry; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_root_coords - -void (* gdk_window_impl_class_priv_get_get_root_coords(GdkWindowImplClass * self)) (GdkWindow *window, gint x, gint y, gint *root_x, gint *root_y) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_root_coords; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_root_coords(GdkWindowImplClass * self, void (* get_root_coords) (GdkWindow *window, gint x, gint y, gint *root_x, gint *root_y)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_root_coords = get_root_coords; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_device_state - -gboolean (* gdk_window_impl_class_priv_get_get_device_state(GdkWindowImplClass * self)) (GdkWindow *window, GdkDevice *device, gdouble *x, gdouble *y, GdkModifierType *mask) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_device_state; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_device_state(GdkWindowImplClass * self, gboolean (* get_device_state) (GdkWindow *window, GdkDevice *device, gdouble *x, gdouble *y, GdkModifierType *mask)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_device_state = get_device_state; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::begin_paint - -gboolean (* gdk_window_impl_class_priv_get_begin_paint(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->begin_paint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_begin_paint(GdkWindowImplClass * self, gboolean (* begin_paint) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->begin_paint = begin_paint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::end_paint - -void (* gdk_window_impl_class_priv_get_end_paint(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->end_paint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_end_paint(GdkWindowImplClass * self, void (* end_paint) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->end_paint = end_paint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_shape - -cairo_region_t * (* gdk_window_impl_class_priv_get_get_shape(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_shape; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_shape(GdkWindowImplClass * self, cairo_region_t * (* get_shape) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_shape = get_shape; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_input_shape - -cairo_region_t * (* gdk_window_impl_class_priv_get_get_input_shape(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_input_shape; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_input_shape(GdkWindowImplClass * self, cairo_region_t * (* get_input_shape) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_input_shape = get_input_shape; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::shape_combine_region - -void (* gdk_window_impl_class_priv_get_shape_combine_region(GdkWindowImplClass * self)) (GdkWindow *window, const cairo_region_t *shape_region, gint offset_x, gint offset_y) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->shape_combine_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_shape_combine_region(GdkWindowImplClass * self, void (* shape_combine_region) (GdkWindow *window, const cairo_region_t *shape_region, gint offset_x, gint offset_y)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->shape_combine_region = shape_combine_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::input_shape_combine_region - -void (* gdk_window_impl_class_priv_get_input_shape_combine_region(GdkWindowImplClass * self)) (GdkWindow *window, const cairo_region_t *shape_region, gint offset_x, gint offset_y) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->input_shape_combine_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_input_shape_combine_region(GdkWindowImplClass * self, void (* input_shape_combine_region) (GdkWindow *window, const cairo_region_t *shape_region, gint offset_x, gint offset_y)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->input_shape_combine_region = input_shape_combine_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::queue_antiexpose - -void (* gdk_window_impl_class_priv_get_queue_antiexpose(GdkWindowImplClass * self)) (GdkWindow *window, cairo_region_t *update_area) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->queue_antiexpose; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_queue_antiexpose(GdkWindowImplClass * self, void (* queue_antiexpose) (GdkWindow *window, cairo_region_t *update_area)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->queue_antiexpose = queue_antiexpose; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::destroy - -void (* gdk_window_impl_class_priv_get_destroy(GdkWindowImplClass * self)) (GdkWindow *window, gboolean recursing, gboolean foreign_destroy) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_destroy(GdkWindowImplClass * self, void (* destroy) (GdkWindow *window, gboolean recursing, gboolean foreign_destroy)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy = destroy; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::destroy_foreign - -void (* gdk_window_impl_class_priv_get_destroy_foreign(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy_foreign; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_destroy_foreign(GdkWindowImplClass * self, void (* destroy_foreign) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy_foreign = destroy_foreign; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::beep - -gboolean (* gdk_window_impl_class_priv_get_beep(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->beep; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_beep(GdkWindowImplClass * self, gboolean (* beep) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->beep = beep; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::focus - -void (* gdk_window_impl_class_priv_get_focus(GdkWindowImplClass * self)) (GdkWindow *window, guint32 timestamp) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->focus; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_focus(GdkWindowImplClass * self, void (* focus) (GdkWindow *window, guint32 timestamp)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->focus = focus; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_type_hint - -void (* gdk_window_impl_class_priv_get_set_type_hint(GdkWindowImplClass * self)) (GdkWindow *window, GdkWindowTypeHint hint) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_type_hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_type_hint(GdkWindowImplClass * self, void (* set_type_hint) (GdkWindow *window, GdkWindowTypeHint hint)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_type_hint = set_type_hint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_type_hint - -GdkWindowTypeHint (* gdk_window_impl_class_priv_get_get_type_hint(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_type_hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_type_hint(GdkWindowImplClass * self, GdkWindowTypeHint (* get_type_hint) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_type_hint = get_type_hint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_modal_hint - -void (* gdk_window_impl_class_priv_get_set_modal_hint(GdkWindowImplClass * self)) (GdkWindow *window, gboolean modal) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_modal_hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_modal_hint(GdkWindowImplClass * self, void (* set_modal_hint) (GdkWindow *window, gboolean modal)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_modal_hint = set_modal_hint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_skip_taskbar_hint - -void (* gdk_window_impl_class_priv_get_set_skip_taskbar_hint(GdkWindowImplClass * self)) (GdkWindow *window, gboolean skips_taskbar) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_skip_taskbar_hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_skip_taskbar_hint(GdkWindowImplClass * self, void (* set_skip_taskbar_hint) (GdkWindow *window, gboolean skips_taskbar)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_skip_taskbar_hint = set_skip_taskbar_hint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_skip_pager_hint - -void (* gdk_window_impl_class_priv_get_set_skip_pager_hint(GdkWindowImplClass * self)) (GdkWindow *window, gboolean skips_pager) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_skip_pager_hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_skip_pager_hint(GdkWindowImplClass * self, void (* set_skip_pager_hint) (GdkWindow *window, gboolean skips_pager)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_skip_pager_hint = set_skip_pager_hint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_urgency_hint - -void (* gdk_window_impl_class_priv_get_set_urgency_hint(GdkWindowImplClass * self)) (GdkWindow *window, gboolean urgent) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_urgency_hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_urgency_hint(GdkWindowImplClass * self, void (* set_urgency_hint) (GdkWindow *window, gboolean urgent)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_urgency_hint = set_urgency_hint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_geometry_hints - -void (* gdk_window_impl_class_priv_get_set_geometry_hints(GdkWindowImplClass * self)) (GdkWindow *window, const GdkGeometry *geometry, GdkWindowHints geom_mask) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_geometry_hints; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_geometry_hints(GdkWindowImplClass * self, void (* set_geometry_hints) (GdkWindow *window, const GdkGeometry *geometry, GdkWindowHints geom_mask)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_geometry_hints = set_geometry_hints; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_title - -void (* gdk_window_impl_class_priv_get_set_title(GdkWindowImplClass * self)) (GdkWindow *window, const gchar *title) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_title; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_title(GdkWindowImplClass * self, void (* set_title) (GdkWindow *window, const gchar *title)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_title = set_title; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_role - -void (* gdk_window_impl_class_priv_get_set_role(GdkWindowImplClass * self)) (GdkWindow *window, const gchar *role) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_role; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_role(GdkWindowImplClass * self, void (* set_role) (GdkWindow *window, const gchar *role)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_role = set_role; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_startup_id - -void (* gdk_window_impl_class_priv_get_set_startup_id(GdkWindowImplClass * self)) (GdkWindow *window, const gchar *startup_id) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_startup_id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_startup_id(GdkWindowImplClass * self, void (* set_startup_id) (GdkWindow *window, const gchar *startup_id)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_startup_id = set_startup_id; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_transient_for - -void (* gdk_window_impl_class_priv_get_set_transient_for(GdkWindowImplClass * self)) (GdkWindow *window, GdkWindow *parent) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_transient_for; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_transient_for(GdkWindowImplClass * self, void (* set_transient_for) (GdkWindow *window, GdkWindow *parent)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_transient_for = set_transient_for; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_frame_extents - -void (* gdk_window_impl_class_priv_get_get_frame_extents(GdkWindowImplClass * self)) (GdkWindow *window, GdkRectangle *rect) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_frame_extents; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_frame_extents(GdkWindowImplClass * self, void (* get_frame_extents) (GdkWindow *window, GdkRectangle *rect)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_frame_extents = get_frame_extents; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_override_redirect - -void (* gdk_window_impl_class_priv_get_set_override_redirect(GdkWindowImplClass * self)) (GdkWindow *window, gboolean override_redirect) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_override_redirect; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_override_redirect(GdkWindowImplClass * self, void (* set_override_redirect) (GdkWindow *window, gboolean override_redirect)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_override_redirect = set_override_redirect; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_accept_focus - -void (* gdk_window_impl_class_priv_get_set_accept_focus(GdkWindowImplClass * self)) (GdkWindow *window, gboolean accept_focus) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_accept_focus; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_accept_focus(GdkWindowImplClass * self, void (* set_accept_focus) (GdkWindow *window, gboolean accept_focus)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_accept_focus = set_accept_focus; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_focus_on_map - -void (* gdk_window_impl_class_priv_get_set_focus_on_map(GdkWindowImplClass * self)) (GdkWindow *window, gboolean focus_on_map) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_focus_on_map; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_focus_on_map(GdkWindowImplClass * self, void (* set_focus_on_map) (GdkWindow *window, gboolean focus_on_map)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_focus_on_map = set_focus_on_map; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_icon_list - -void (* gdk_window_impl_class_priv_get_set_icon_list(GdkWindowImplClass * self)) (GdkWindow *window, GList *pixbufs) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_icon_list; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_icon_list(GdkWindowImplClass * self, void (* set_icon_list) (GdkWindow *window, GList *pixbufs)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_icon_list = set_icon_list; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_icon_name - -void (* gdk_window_impl_class_priv_get_set_icon_name(GdkWindowImplClass * self)) (GdkWindow *window, const gchar *name) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_icon_name; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_icon_name(GdkWindowImplClass * self, void (* set_icon_name) (GdkWindow *window, const gchar *name)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_icon_name = set_icon_name; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::iconify - -void (* gdk_window_impl_class_priv_get_iconify(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->iconify; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_iconify(GdkWindowImplClass * self, void (* iconify) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->iconify = iconify; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::deiconify - -void (* gdk_window_impl_class_priv_get_deiconify(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->deiconify; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_deiconify(GdkWindowImplClass * self, void (* deiconify) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->deiconify = deiconify; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::stick - -void (* gdk_window_impl_class_priv_get_stick(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->stick; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_stick(GdkWindowImplClass * self, void (* stick) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->stick = stick; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::unstick - -void (* gdk_window_impl_class_priv_get_unstick(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->unstick; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_unstick(GdkWindowImplClass * self, void (* unstick) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->unstick = unstick; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::maximize - -void (* gdk_window_impl_class_priv_get_maximize(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->maximize; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_maximize(GdkWindowImplClass * self, void (* maximize) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->maximize = maximize; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::unmaximize - -void (* gdk_window_impl_class_priv_get_unmaximize(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->unmaximize; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_unmaximize(GdkWindowImplClass * self, void (* unmaximize) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->unmaximize = unmaximize; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::fullscreen - -void (* gdk_window_impl_class_priv_get_fullscreen(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->fullscreen; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_fullscreen(GdkWindowImplClass * self, void (* fullscreen) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->fullscreen = fullscreen; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::fullscreen_on_monitor - -void (* gdk_window_impl_class_priv_get_fullscreen_on_monitor(GdkWindowImplClass * self)) (GdkWindow *window, gint monitor) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->fullscreen_on_monitor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_fullscreen_on_monitor(GdkWindowImplClass * self, void (* fullscreen_on_monitor) (GdkWindow *window, gint monitor)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->fullscreen_on_monitor = fullscreen_on_monitor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::apply_fullscreen_mode - -void (* gdk_window_impl_class_priv_get_apply_fullscreen_mode(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->apply_fullscreen_mode; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_apply_fullscreen_mode(GdkWindowImplClass * self, void (* apply_fullscreen_mode) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->apply_fullscreen_mode = apply_fullscreen_mode; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::unfullscreen - -void (* gdk_window_impl_class_priv_get_unfullscreen(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->unfullscreen; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_unfullscreen(GdkWindowImplClass * self, void (* unfullscreen) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->unfullscreen = unfullscreen; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_keep_above - -void (* gdk_window_impl_class_priv_get_set_keep_above(GdkWindowImplClass * self)) (GdkWindow *window, gboolean setting) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_keep_above; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_keep_above(GdkWindowImplClass * self, void (* set_keep_above) (GdkWindow *window, gboolean setting)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_keep_above = set_keep_above; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_keep_below - -void (* gdk_window_impl_class_priv_get_set_keep_below(GdkWindowImplClass * self)) (GdkWindow *window, gboolean setting) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_keep_below; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_keep_below(GdkWindowImplClass * self, void (* set_keep_below) (GdkWindow *window, gboolean setting)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_keep_below = set_keep_below; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_group - -GdkWindow * (* gdk_window_impl_class_priv_get_get_group(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_group; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_group(GdkWindowImplClass * self, GdkWindow * (* get_group) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_group = get_group; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_group - -void (* gdk_window_impl_class_priv_get_set_group(GdkWindowImplClass * self)) (GdkWindow *window, GdkWindow *leader) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_group; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_group(GdkWindowImplClass * self, void (* set_group) (GdkWindow *window, GdkWindow *leader)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_group = set_group; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_decorations - -void (* gdk_window_impl_class_priv_get_set_decorations(GdkWindowImplClass * self)) (GdkWindow *window, GdkWMDecoration decorations) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_decorations; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_decorations(GdkWindowImplClass * self, void (* set_decorations) (GdkWindow *window, GdkWMDecoration decorations)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_decorations = set_decorations; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_decorations - -gboolean (* gdk_window_impl_class_priv_get_get_decorations(GdkWindowImplClass * self)) (GdkWindow *window, GdkWMDecoration *decorations) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_decorations; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_decorations(GdkWindowImplClass * self, gboolean (* get_decorations) (GdkWindow *window, GdkWMDecoration *decorations)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_decorations = get_decorations; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_functions - -void (* gdk_window_impl_class_priv_get_set_functions(GdkWindowImplClass * self)) (GdkWindow *window, GdkWMFunction functions) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_functions; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_functions(GdkWindowImplClass * self, void (* set_functions) (GdkWindow *window, GdkWMFunction functions)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_functions = set_functions; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::begin_resize_drag - -void (* gdk_window_impl_class_priv_get_begin_resize_drag(GdkWindowImplClass * self)) (GdkWindow *window, GdkWindowEdge edge, GdkDevice *device, gint button, gint root_x, gint root_y, guint32 timestamp) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->begin_resize_drag; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_begin_resize_drag(GdkWindowImplClass * self, void (* begin_resize_drag) (GdkWindow *window, GdkWindowEdge edge, GdkDevice *device, gint button, gint root_x, gint root_y, guint32 timestamp)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->begin_resize_drag = begin_resize_drag; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::begin_move_drag - -void (* gdk_window_impl_class_priv_get_begin_move_drag(GdkWindowImplClass * self)) (GdkWindow *window, GdkDevice *device, gint button, gint root_x, gint root_y, guint32 timestamp) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->begin_move_drag; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_begin_move_drag(GdkWindowImplClass * self, void (* begin_move_drag) (GdkWindow *window, GdkDevice *device, gint button, gint root_x, gint root_y, guint32 timestamp)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->begin_move_drag = begin_move_drag; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::enable_synchronized_configure - -void (* gdk_window_impl_class_priv_get_enable_synchronized_configure(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->enable_synchronized_configure; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_enable_synchronized_configure(GdkWindowImplClass * self, void (* enable_synchronized_configure) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->enable_synchronized_configure = enable_synchronized_configure; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::configure_finished - -void (* gdk_window_impl_class_priv_get_configure_finished(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->configure_finished; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_configure_finished(GdkWindowImplClass * self, void (* configure_finished) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->configure_finished = configure_finished; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_opacity - -void (* gdk_window_impl_class_priv_get_set_opacity(GdkWindowImplClass * self)) (GdkWindow *window, gdouble opacity) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_opacity; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_opacity(GdkWindowImplClass * self, void (* set_opacity) (GdkWindow *window, gdouble opacity)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_opacity = set_opacity; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_composited - -void (* gdk_window_impl_class_priv_get_set_composited(GdkWindowImplClass * self)) (GdkWindow *window, gboolean composited) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_composited; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_composited(GdkWindowImplClass * self, void (* set_composited) (GdkWindow *window, gboolean composited)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_composited = set_composited; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::destroy_notify - -void (* gdk_window_impl_class_priv_get_destroy_notify(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy_notify; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_destroy_notify(GdkWindowImplClass * self, void (* destroy_notify) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy_notify = destroy_notify; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_drag_protocol - -GdkDragProtocol (* gdk_window_impl_class_priv_get_get_drag_protocol(GdkWindowImplClass * self)) (GdkWindow *window, GdkWindow **target) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_drag_protocol; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_drag_protocol(GdkWindowImplClass * self, GdkDragProtocol (* get_drag_protocol) (GdkWindow *window, GdkWindow **target)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_drag_protocol = get_drag_protocol; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::register_dnd - -void (* gdk_window_impl_class_priv_get_register_dnd(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->register_dnd; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_register_dnd(GdkWindowImplClass * self, void (* register_dnd) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->register_dnd = register_dnd; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::drag_begin - -GdkDragContext * (* gdk_window_impl_class_priv_get_drag_begin(GdkWindowImplClass * self)) (GdkWindow *window, GdkDevice *device, GList *targets, gint x_root, gint y_root) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->drag_begin; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_drag_begin(GdkWindowImplClass * self, GdkDragContext * (* drag_begin) (GdkWindow *window, GdkDevice *device, GList *targets, gint x_root, gint y_root)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->drag_begin = drag_begin; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::process_updates_recurse - -void (* gdk_window_impl_class_priv_get_process_updates_recurse(GdkWindowImplClass * self)) (GdkWindow *window, cairo_region_t *region) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->process_updates_recurse; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_process_updates_recurse(GdkWindowImplClass * self, void (* process_updates_recurse) (GdkWindow *window, cairo_region_t *region)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->process_updates_recurse = process_updates_recurse; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::sync_rendering - -void (* gdk_window_impl_class_priv_get_sync_rendering(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->sync_rendering; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_sync_rendering(GdkWindowImplClass * self, void (* sync_rendering) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->sync_rendering = sync_rendering; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::simulate_key - -gboolean (* gdk_window_impl_class_priv_get_simulate_key(GdkWindowImplClass * self)) (GdkWindow *window, gint x, gint y, guint keyval, GdkModifierType modifiers, GdkEventType event_type) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->simulate_key; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_simulate_key(GdkWindowImplClass * self, gboolean (* simulate_key) (GdkWindow *window, gint x, gint y, guint keyval, GdkModifierType modifiers, GdkEventType event_type)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->simulate_key = simulate_key; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::simulate_button - -gboolean (* gdk_window_impl_class_priv_get_simulate_button(GdkWindowImplClass * self)) (GdkWindow *window, gint x, gint y, guint button, GdkModifierType modifiers, GdkEventType event_type) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->simulate_button; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_simulate_button(GdkWindowImplClass * self, gboolean (* simulate_button) (GdkWindow *window, gint x, gint y, guint button, GdkModifierType modifiers, GdkEventType event_type)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->simulate_button = simulate_button; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_property - -gboolean (* gdk_window_impl_class_priv_get_get_property(GdkWindowImplClass * self)) (GdkWindow *window, GdkAtom property, GdkAtom type, gulong offset, gulong length, gint pdelete, GdkAtom *actual_type, gint *actual_format, gint *actual_length, guchar **data) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_property; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_property(GdkWindowImplClass * self, gboolean (* get_property) (GdkWindow *window, GdkAtom property, GdkAtom type, gulong offset, gulong length, gint pdelete, GdkAtom *actual_type, gint *actual_format, gint *actual_length, guchar **data)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_property = get_property; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::change_property - -void (* gdk_window_impl_class_priv_get_change_property(GdkWindowImplClass * self)) (GdkWindow *window, GdkAtom property, GdkAtom type, gint format, GdkPropMode mode, const guchar *data, gint n_elements) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->change_property; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_change_property(GdkWindowImplClass * self, void (* change_property) (GdkWindow *window, GdkAtom property, GdkAtom type, gint format, GdkPropMode mode, const guchar *data, gint n_elements)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->change_property = change_property; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::delete_property - -void (* gdk_window_impl_class_priv_get_delete_property(GdkWindowImplClass * self)) (GdkWindow *window, GdkAtom property) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->delete_property; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_delete_property(GdkWindowImplClass * self, void (* delete_property) (GdkWindow *window, GdkAtom property)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->delete_property = delete_property; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_scale_factor - -gint (* gdk_window_impl_class_priv_get_get_scale_factor(GdkWindowImplClass * self)) (GdkWindow *window) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_scale_factor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_scale_factor(GdkWindowImplClass * self, gint (* get_scale_factor) (GdkWindow *window)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_scale_factor = get_scale_factor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::get_unscaled_size - -void (* gdk_window_impl_class_priv_get_get_unscaled_size(GdkWindowImplClass * self)) (GdkWindow *window, int *unscaled_width, int *unscaled_height) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->get_unscaled_size; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_get_unscaled_size(GdkWindowImplClass * self, void (* get_unscaled_size) (GdkWindow *window, int *unscaled_width, int *unscaled_height)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->get_unscaled_size = get_unscaled_size; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_opaque_region - -void (* gdk_window_impl_class_priv_get_set_opaque_region(GdkWindowImplClass * self)) (GdkWindow *window, cairo_region_t *region) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_opaque_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_opaque_region(GdkWindowImplClass * self, void (* set_opaque_region) (GdkWindow *window, cairo_region_t *region)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_opaque_region = set_opaque_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::set_shadow_width - -void (* gdk_window_impl_class_priv_get_set_shadow_width(GdkWindowImplClass * self)) (GdkWindow *window, gint left, gint right, gint top, gint bottom) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->set_shadow_width; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_set_shadow_width(GdkWindowImplClass * self, void (* set_shadow_width) (GdkWindow *window, gint left, gint right, gint top, gint bottom)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->set_shadow_width = set_shadow_width; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::show_window_menu - -gboolean (* gdk_window_impl_class_priv_get_show_window_menu(GdkWindowImplClass * self)) (GdkWindow *window, GdkEvent *event) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->show_window_menu; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_show_window_menu(GdkWindowImplClass * self, gboolean (* show_window_menu) (GdkWindow *window, GdkEvent *event)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->show_window_menu = show_window_menu; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::create_gl_context - -GdkGLContext * (* gdk_window_impl_class_priv_get_create_gl_context(GdkWindowImplClass * self)) (GdkWindow *window, gboolean attached, GdkGLContext *share, GError **error) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->create_gl_context; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_create_gl_context(GdkWindowImplClass * self, GdkGLContext * (* create_gl_context) (GdkWindow *window, gboolean attached, GdkGLContext *share, GError **error)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->create_gl_context = create_gl_context; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::realize_gl_context - -gboolean (* gdk_window_impl_class_priv_get_realize_gl_context(GdkWindowImplClass * self)) (GdkWindow *window, GdkGLContext *context, GError **error) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->realize_gl_context; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_realize_gl_context(GdkWindowImplClass * self, gboolean (* realize_gl_context) (GdkWindow *window, GdkGLContext *context, GError **error)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->realize_gl_context = realize_gl_context; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::invalidate_for_new_frame - -void (* gdk_window_impl_class_priv_get_invalidate_for_new_frame(GdkWindowImplClass * self)) (GdkWindow *window, cairo_region_t *update_area) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->invalidate_for_new_frame; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_invalidate_for_new_frame(GdkWindowImplClass * self, void (* invalidate_for_new_frame) (GdkWindow *window, cairo_region_t *update_area)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->invalidate_for_new_frame = invalidate_for_new_frame; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::create_draw_context - -GdkDrawingContext * (* gdk_window_impl_class_priv_get_create_draw_context(GdkWindowImplClass * self)) (GdkWindow *window, const cairo_region_t *region) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->create_draw_context; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_create_draw_context(GdkWindowImplClass * self, GdkDrawingContext * (* create_draw_context) (GdkWindow *window, const cairo_region_t *region)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->create_draw_context = create_draw_context; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplClass::destroy_draw_context - -void (* gdk_window_impl_class_priv_get_destroy_draw_context(GdkWindowImplClass * self)) (GdkWindow *window, GdkDrawingContext *context) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy_draw_context; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_class_priv_set_destroy_draw_context(GdkWindowImplClass * self, void (* destroy_draw_context) (GdkWindow *window, GdkDrawingContext *context)) { - switch (gdk_window_impl_class_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplClass_v3_22_0*)self)->destroy_draw_context = destroy_draw_context; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WINDOW_IMPL_CLASS_PRIV_H diff --git a/gtk-priv/h/gdk_window_impl_priv.h b/gtk-priv/h/gdk_window_impl_priv.h deleted file mode 100644 index 0af63ce..0000000 --- a/gtk-priv/h/gdk_window_impl_priv.h +++ /dev/null @@ -1,139 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WINDOW_IMPL_PRIV_H -#define GDK_WINDOW_IMPL_PRIV_H - -#include "common.h" - -typedef struct _GdkWindowImpl GdkWindowImpl; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.24.35 (unreleased) -struct _GdkWindowImpl_v3_22_0 -{ - GObject parent; -}; - -// For internal use only -int gdk_window_impl_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - { - version_id = 0; - } - } - - return version_id; -} - -// GdkWindowImpl::parent - -GObject * gdk_window_impl_priv_get_parent_ptr(GdkWindowImpl * self) { - switch (gdk_window_impl_priv_get_version_id()) { - case 0: return (GObject *)&((struct _GdkWindowImpl_v3_22_0*)self)->parent; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WINDOW_IMPL_PRIV_H diff --git a/gtk-priv/h/gdk_window_impl_wayland_class_priv.h b/gtk-priv/h/gdk_window_impl_wayland_class_priv.h deleted file mode 100644 index eb8ddc1..0000000 --- a/gtk-priv/h/gdk_window_impl_wayland_class_priv.h +++ /dev/null @@ -1,139 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright © 2010 Intel Corporation - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WINDOW_IMPL_WAYLAND_CLASS_PRIV_H -#define GDK_WINDOW_IMPL_WAYLAND_CLASS_PRIV_H - -#include "common.h" - -typedef struct _GdkWindowImplWaylandClass GdkWindowImplWaylandClass; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.24.35 (unreleased) -struct _GdkWindowImplWaylandClass_v3_22_0 -{ - struct _GdkWindowImplClass_v3_22_0 parent_class; -}; - -// For internal use only -int gdk_window_impl_wayland_class_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - { - version_id = 0; - } - } - - return version_id; -} - -// GdkWindowImplWaylandClass::parent_class - -GdkWindowImplClass * gdk_window_impl_wayland_class_priv_get_parent_class_ptr(GdkWindowImplWaylandClass * self) { - switch (gdk_window_impl_wayland_class_priv_get_version_id()) { - case 0: return (GdkWindowImplClass *)&((struct _GdkWindowImplWaylandClass_v3_22_0*)self)->parent_class; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WINDOW_IMPL_WAYLAND_CLASS_PRIV_H diff --git a/gtk-priv/h/gdk_window_impl_wayland_priv.h b/gtk-priv/h/gdk_window_impl_wayland_priv.h deleted file mode 100644 index 0028b01..0000000 --- a/gtk-priv/h/gdk_window_impl_wayland_priv.h +++ /dev/null @@ -1,4850 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright © 2010 Intel Corporation - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WINDOW_IMPL_WAYLAND_PRIV_H -#define GDK_WINDOW_IMPL_WAYLAND_PRIV_H - -#include "common.h" - -typedef struct _GdkWindowImplWayland GdkWindowImplWayland; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.22.15 -struct _GdkWindowImplWayland_v3_22_0 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct zxdg_surface_v6 *xdg_surface; - struct zxdg_toplevel_v6 *xdg_toplevel; - struct zxdg_popup_v6 *xdg_popup; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - GdkWaylandWindowExported callback; - gpointer user_data; - GDestroyNotify destroy_func; - } exported; - struct zxdg_imported_v1 *imported_transient_for; -}; - -// Version ID 1 -// Diff from previous version: -// - GdkWaylandWindowExported callback; -// - gpointer user_data; -// - GDestroyNotify destroy_func; -// + char *handle; -// + int export_count; -// + GList *closures; -// + guint idle_source_id; -// Valid for GTK v3.22.16 - v3.22.17 -struct _GdkWindowImplWayland_v3_22_16 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct zxdg_surface_v6 *xdg_surface; - struct zxdg_toplevel_v6 *xdg_toplevel; - struct zxdg_popup_v6 *xdg_popup; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; -}; - -// Version ID 2 -// Diff from previous version: -// + GHashTable *shortcuts_inhibitors; -// Valid for GTK v3.22.18 - v3.22.24 -struct _GdkWindowImplWayland_v3_22_18 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct zxdg_surface_v6 *xdg_surface; - struct zxdg_toplevel_v6 *xdg_toplevel; - struct zxdg_popup_v6 *xdg_popup; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 3 -// Diff from previous version: -// + struct org_kde_kwin_server_decoration *server_decoration; -// Valid for GTK v3.22.25 - v3.22.29 -struct _GdkWindowImplWayland_v3_22_25 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct zxdg_surface_v6 *xdg_surface; - struct zxdg_toplevel_v6 *xdg_toplevel; - struct zxdg_popup_v6 *xdg_popup; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 4 -// Diff from previous version: -// - struct zxdg_surface_v6 *xdg_surface; -// - struct zxdg_toplevel_v6 *xdg_toplevel; -// - struct zxdg_popup_v6 *xdg_popup; -// + struct xdg_surface *xdg_surface; -// + struct xdg_toplevel *xdg_toplevel; -// + struct xdg_popup *xdg_popup; -// + struct zxdg_surface_v6 *zxdg_surface_v6; -// + struct zxdg_toplevel_v6 *zxdg_toplevel_v6; -// + struct zxdg_popup_v6 *zxdg_popup_v6; -// Valid for GTK v3.22.30 - v3.23.0 -struct _GdkWindowImplWayland_v3_22_30 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 5 -// Diff from previous version: -// + unsigned int using_csd : 1; -// Valid for GTK v3.23.1 - v3.23.2 -struct _GdkWindowImplWayland_v3_23_1 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - unsigned int using_csd : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 6 -// Diff from previous version: -// + int subsurface_x; -// + int subsurface_y; -// Valid for GTK v3.23.3 - v3.24.3 -struct _GdkWindowImplWayland_v3_23_3 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - unsigned int using_csd : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - int subsurface_x; - int subsurface_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 7 -// Diff from previous version: -// + unsigned int configuring_popup : 1; -// Valid for GTK v3.24.4 - v3.24.16 -struct _GdkWindowImplWayland_v3_24_4 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int configuring_popup : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - unsigned int using_csd : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - int subsurface_x; - int subsurface_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 8 -// Diff from previous version: -// + int unconfigured_width; -// + int unconfigured_height; -// + int fixed_size_width; -// + int fixed_size_height; -// Valid for GTK v3.24.17 - v3.24.21 -struct _GdkWindowImplWayland_v3_24_17 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int configuring_popup : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - unsigned int using_csd : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - int subsurface_x; - int subsurface_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - int unconfigured_width; - int unconfigured_height; - int fixed_size_width; - int fixed_size_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 9 -// Diff from previous version: -// + gboolean saved_size_changed; -// Valid for GTK v3.24.22 - v3.24.24 -struct _GdkWindowImplWayland_v3_24_22 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int configuring_popup : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - unsigned int using_csd : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - int subsurface_x; - int subsurface_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gboolean saved_size_changed; - int unconfigured_width; - int unconfigured_height; - int fixed_size_width; - int fixed_size_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// Version ID 10 -// Diff from previous version: -// + struct wl_callback *surface_callback; -// + GHashTable *frame_callback_surfaces; -// Valid for GTK v3.24.25 - v3.24.34 -struct _GdkWindowImplWayland_v3_24_25 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int configuring_popup : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - unsigned int using_csd : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - int subsurface_x; - int subsurface_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gboolean saved_size_changed; - int unconfigured_width; - int unconfigured_height; - int fixed_size_width; - int fixed_size_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; - struct wl_callback *surface_callback; - GHashTable *frame_callback_surfaces; -}; - -// Version ID 11 -// Diff from previous version: -// - struct wl_callback *surface_callback; -// - GHashTable *frame_callback_surfaces; -// Valid for GTK v3.24.35 (unreleased) -struct _GdkWindowImplWayland_v3_24_35 -{ - struct _GdkWindowImpl_v3_22_0 parent_instance; - GdkWindow *wrapper; - struct { - GSList *outputs; - struct wl_surface *wl_surface; - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; - struct xdg_popup *xdg_popup; - struct zxdg_surface_v6 *zxdg_surface_v6; - struct zxdg_toplevel_v6 *zxdg_toplevel_v6; - struct zxdg_popup_v6 *zxdg_popup_v6; - struct gtk_surface1 *gtk_surface; - struct wl_subsurface *wl_subsurface; - struct wl_egl_window *egl_window; - struct wl_egl_window *dummy_egl_window; - struct zxdg_exported_v1 *xdg_exported; - struct org_kde_kwin_server_decoration *server_decoration; - } display_server; - EGLSurface egl_surface; - EGLSurface dummy_egl_surface; - unsigned int initial_configure_received : 1; - unsigned int configuring_popup : 1; - unsigned int mapped : 1; - unsigned int use_custom_surface : 1; - unsigned int pending_buffer_attached : 1; - unsigned int pending_commit : 1; - unsigned int awaiting_frame : 1; - unsigned int using_csd : 1; - GdkWindowTypeHint hint; - GdkWindow *transient_for; - GdkWindow *popup_parent; - PositionMethod position_method; - cairo_surface_t *staging_cairo_surface; - cairo_surface_t *committed_cairo_surface; - cairo_surface_t *backfill_cairo_surface; - int pending_buffer_offset_x; - int pending_buffer_offset_y; - int subsurface_x; - int subsurface_y; - gchar *title; - struct { - gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; - } application; - GdkGeometry geometry_hints; - GdkWindowHints geometry_mask; - GdkSeat *grab_input_seat; - gint64 pending_frame_counter; - guint32 scale; - int margin_left; - int margin_right; - int margin_top; - int margin_bottom; - gboolean margin_dirty; - int initial_fullscreen_monitor; - cairo_region_t *opaque_region; - gboolean opaque_region_dirty; - cairo_region_t *input_region; - gboolean input_region_dirty; - cairo_region_t *staged_updates_region; - int saved_width; - int saved_height; - gboolean saved_size_changed; - int unconfigured_width; - int unconfigured_height; - int fixed_size_width; - int fixed_size_height; - gulong parent_surface_committed_handler; - struct { - GdkRectangle rect; - GdkGravity rect_anchor; - GdkGravity window_anchor; - GdkAnchorHints anchor_hints; - gint rect_anchor_dx; - gint rect_anchor_dy; - } pending_move_to_rect; - struct { - int width; - int height; - GdkWindowState state; - } pending; - struct { - char *handle; - int export_count; - GList *closures; - guint idle_source_id; - } exported; - struct zxdg_imported_v1 *imported_transient_for; - GHashTable *shortcuts_inhibitors; -}; - -// For internal use only -int gdk_window_impl_wayland_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - if (combo >= 24035) { - version_id = 11; - } else if (combo >= 24025) { - version_id = 10; - } else if (combo >= 24022) { - version_id = 9; - } else if (combo >= 24017) { - version_id = 8; - } else if (combo >= 24004) { - version_id = 7; - } else if (combo >= 23003) { - version_id = 6; - } else if (combo >= 23001) { - version_id = 5; - } else if (combo >= 22030) { - version_id = 4; - } else if (combo >= 22025) { - version_id = 3; - } else if (combo >= 22018) { - version_id = 2; - } else if (combo >= 22016) { - version_id = 1; - } else { - version_id = 0; - } - } - - return version_id; -} - -// GdkWindowImplWayland::parent_instance - -GdkWindowImpl * gdk_window_impl_wayland_priv_get_parent_instance_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->parent_instance; - case 1: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->parent_instance; - case 2: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->parent_instance; - case 3: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->parent_instance; - case 4: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->parent_instance; - case 5: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->parent_instance; - case 6: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->parent_instance; - case 7: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->parent_instance; - case 8: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->parent_instance; - case 9: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->parent_instance; - case 10: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->parent_instance; - case 11: return (GdkWindowImpl *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->parent_instance; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::wrapper - -GdkWindow * gdk_window_impl_wayland_priv_get_wrapper(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->wrapper; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->wrapper; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->wrapper; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->wrapper; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->wrapper; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->wrapper; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->wrapper; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->wrapper; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->wrapper; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->wrapper; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->wrapper; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->wrapper; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_wrapper(GdkWindowImplWayland * self, GdkWindow * wrapper) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->wrapper = wrapper; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->wrapper = wrapper; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->wrapper = wrapper; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->wrapper = wrapper; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->wrapper = wrapper; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->wrapper = wrapper; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->wrapper = wrapper; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->wrapper = wrapper; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->wrapper = wrapper; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->wrapper = wrapper; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->wrapper = wrapper; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->wrapper = wrapper; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.outputs - -GSList * gdk_window_impl_wayland_priv_get_display_server_outputs(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.outputs; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.outputs; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.outputs; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.outputs; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.outputs; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.outputs; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.outputs; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.outputs; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.outputs; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.outputs; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.outputs; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.outputs; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_outputs(GdkWindowImplWayland * self, GSList * display_server_outputs) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.outputs = display_server_outputs; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.outputs = display_server_outputs; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.outputs = display_server_outputs; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.outputs = display_server_outputs; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.outputs = display_server_outputs; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.outputs = display_server_outputs; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.outputs = display_server_outputs; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.outputs = display_server_outputs; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.outputs = display_server_outputs; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.outputs = display_server_outputs; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.outputs = display_server_outputs; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.outputs = display_server_outputs; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.wl_surface - -struct wl_surface * gdk_window_impl_wayland_priv_get_display_server_wl_surface(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.wl_surface; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.wl_surface; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.wl_surface; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.wl_surface; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.wl_surface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.wl_surface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.wl_surface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.wl_surface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.wl_surface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.wl_surface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.wl_surface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.wl_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_wl_surface(GdkWindowImplWayland * self, struct wl_surface * display_server_wl_surface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.wl_surface = display_server_wl_surface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.wl_surface = display_server_wl_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.gtk_surface - -struct gtk_surface1 * gdk_window_impl_wayland_priv_get_display_server_gtk_surface(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.gtk_surface; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.gtk_surface; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.gtk_surface; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.gtk_surface; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.gtk_surface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.gtk_surface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.gtk_surface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.gtk_surface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.gtk_surface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.gtk_surface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.gtk_surface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.gtk_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_gtk_surface(GdkWindowImplWayland * self, struct gtk_surface1 * display_server_gtk_surface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.gtk_surface = display_server_gtk_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.wl_subsurface - -struct wl_subsurface * gdk_window_impl_wayland_priv_get_display_server_wl_subsurface(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.wl_subsurface; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.wl_subsurface; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.wl_subsurface; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.wl_subsurface; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.wl_subsurface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.wl_subsurface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.wl_subsurface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.wl_subsurface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.wl_subsurface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.wl_subsurface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.wl_subsurface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.wl_subsurface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_wl_subsurface(GdkWindowImplWayland * self, struct wl_subsurface * display_server_wl_subsurface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.wl_subsurface = display_server_wl_subsurface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.egl_window - -struct wl_egl_window * gdk_window_impl_wayland_priv_get_display_server_egl_window(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.egl_window; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.egl_window; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.egl_window; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.egl_window; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.egl_window; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.egl_window; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.egl_window; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.egl_window; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.egl_window; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.egl_window; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.egl_window; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.egl_window; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_egl_window(GdkWindowImplWayland * self, struct wl_egl_window * display_server_egl_window) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.egl_window = display_server_egl_window; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.egl_window = display_server_egl_window; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.egl_window = display_server_egl_window; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.egl_window = display_server_egl_window; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.egl_window = display_server_egl_window; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.egl_window = display_server_egl_window; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.egl_window = display_server_egl_window; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.egl_window = display_server_egl_window; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.egl_window = display_server_egl_window; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.egl_window = display_server_egl_window; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.egl_window = display_server_egl_window; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.egl_window = display_server_egl_window; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.dummy_egl_window - -struct wl_egl_window * gdk_window_impl_wayland_priv_get_display_server_dummy_egl_window(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.dummy_egl_window; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.dummy_egl_window; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.dummy_egl_window; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.dummy_egl_window; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.dummy_egl_window; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.dummy_egl_window; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.dummy_egl_window; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.dummy_egl_window; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.dummy_egl_window; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.dummy_egl_window; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.dummy_egl_window; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.dummy_egl_window; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_dummy_egl_window(GdkWindowImplWayland * self, struct wl_egl_window * display_server_dummy_egl_window) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.dummy_egl_window = display_server_dummy_egl_window; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.xdg_exported - -struct zxdg_exported_v1 * gdk_window_impl_wayland_priv_get_display_server_xdg_exported(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.xdg_exported; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.xdg_exported; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.xdg_exported; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.xdg_exported; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_exported; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_exported; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_exported; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_exported; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_exported; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_exported; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_exported; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_exported; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_xdg_exported(GdkWindowImplWayland * self, struct zxdg_exported_v1 * display_server_xdg_exported) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_exported = display_server_xdg_exported; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::egl_surface - -EGLSurface * gdk_window_impl_wayland_priv_get_egl_surface_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->egl_surface; - case 1: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->egl_surface; - case 2: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->egl_surface; - case 3: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->egl_surface; - case 4: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->egl_surface; - case 5: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->egl_surface; - case 6: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->egl_surface; - case 7: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->egl_surface; - case 8: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->egl_surface; - case 9: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->egl_surface; - case 10: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->egl_surface; - case 11: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->egl_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::dummy_egl_surface - -EGLSurface * gdk_window_impl_wayland_priv_get_dummy_egl_surface_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->dummy_egl_surface; - case 1: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->dummy_egl_surface; - case 2: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->dummy_egl_surface; - case 3: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->dummy_egl_surface; - case 4: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->dummy_egl_surface; - case 5: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->dummy_egl_surface; - case 6: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->dummy_egl_surface; - case 7: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->dummy_egl_surface; - case 8: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->dummy_egl_surface; - case 9: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->dummy_egl_surface; - case 10: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->dummy_egl_surface; - case 11: return (EGLSurface *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->dummy_egl_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::initial_configure_received - -unsigned int gdk_window_impl_wayland_priv_get_initial_configure_received(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->initial_configure_received; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->initial_configure_received; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->initial_configure_received; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->initial_configure_received; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->initial_configure_received; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->initial_configure_received; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->initial_configure_received; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->initial_configure_received; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->initial_configure_received; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->initial_configure_received; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->initial_configure_received; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->initial_configure_received; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_initial_configure_received(GdkWindowImplWayland * self, unsigned int initial_configure_received) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->initial_configure_received = initial_configure_received; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->initial_configure_received = initial_configure_received; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->initial_configure_received = initial_configure_received; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->initial_configure_received = initial_configure_received; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->initial_configure_received = initial_configure_received; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->initial_configure_received = initial_configure_received; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->initial_configure_received = initial_configure_received; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->initial_configure_received = initial_configure_received; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->initial_configure_received = initial_configure_received; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->initial_configure_received = initial_configure_received; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->initial_configure_received = initial_configure_received; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->initial_configure_received = initial_configure_received; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::mapped - -unsigned int gdk_window_impl_wayland_priv_get_mapped(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->mapped; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->mapped; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->mapped; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->mapped; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->mapped; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->mapped; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->mapped; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->mapped; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->mapped; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->mapped; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->mapped; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->mapped; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_mapped(GdkWindowImplWayland * self, unsigned int mapped) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->mapped = mapped; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->mapped = mapped; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->mapped = mapped; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->mapped = mapped; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->mapped = mapped; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->mapped = mapped; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->mapped = mapped; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->mapped = mapped; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->mapped = mapped; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->mapped = mapped; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->mapped = mapped; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->mapped = mapped; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::use_custom_surface - -unsigned int gdk_window_impl_wayland_priv_get_use_custom_surface(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->use_custom_surface; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->use_custom_surface; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->use_custom_surface; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->use_custom_surface; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->use_custom_surface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->use_custom_surface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->use_custom_surface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->use_custom_surface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->use_custom_surface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->use_custom_surface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->use_custom_surface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->use_custom_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_use_custom_surface(GdkWindowImplWayland * self, unsigned int use_custom_surface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->use_custom_surface = use_custom_surface; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->use_custom_surface = use_custom_surface; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->use_custom_surface = use_custom_surface; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->use_custom_surface = use_custom_surface; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->use_custom_surface = use_custom_surface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->use_custom_surface = use_custom_surface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->use_custom_surface = use_custom_surface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->use_custom_surface = use_custom_surface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->use_custom_surface = use_custom_surface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->use_custom_surface = use_custom_surface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->use_custom_surface = use_custom_surface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->use_custom_surface = use_custom_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_buffer_attached - -unsigned int gdk_window_impl_wayland_priv_get_pending_buffer_attached(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_buffer_attached; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_buffer_attached; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_buffer_attached; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_buffer_attached; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_buffer_attached; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_buffer_attached; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_buffer_attached; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_buffer_attached; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_buffer_attached; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_buffer_attached; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_buffer_attached; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_buffer_attached; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_buffer_attached(GdkWindowImplWayland * self, unsigned int pending_buffer_attached) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_buffer_attached = pending_buffer_attached; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_buffer_attached = pending_buffer_attached; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_commit - -unsigned int gdk_window_impl_wayland_priv_get_pending_commit(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_commit; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_commit; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_commit; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_commit; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_commit; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_commit; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_commit; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_commit; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_commit; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_commit; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_commit; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_commit; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_commit(GdkWindowImplWayland * self, unsigned int pending_commit) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_commit = pending_commit; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_commit = pending_commit; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_commit = pending_commit; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_commit = pending_commit; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_commit = pending_commit; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_commit = pending_commit; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_commit = pending_commit; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_commit = pending_commit; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_commit = pending_commit; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_commit = pending_commit; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_commit = pending_commit; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_commit = pending_commit; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::awaiting_frame - -unsigned int gdk_window_impl_wayland_priv_get_awaiting_frame(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->awaiting_frame; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->awaiting_frame; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->awaiting_frame; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->awaiting_frame; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->awaiting_frame; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->awaiting_frame; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->awaiting_frame; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->awaiting_frame; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->awaiting_frame; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->awaiting_frame; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->awaiting_frame; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->awaiting_frame; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_awaiting_frame(GdkWindowImplWayland * self, unsigned int awaiting_frame) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->awaiting_frame = awaiting_frame; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->awaiting_frame = awaiting_frame; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->awaiting_frame = awaiting_frame; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->awaiting_frame = awaiting_frame; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->awaiting_frame = awaiting_frame; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->awaiting_frame = awaiting_frame; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->awaiting_frame = awaiting_frame; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->awaiting_frame = awaiting_frame; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->awaiting_frame = awaiting_frame; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->awaiting_frame = awaiting_frame; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->awaiting_frame = awaiting_frame; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->awaiting_frame = awaiting_frame; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::hint - -GdkWindowTypeHint * gdk_window_impl_wayland_priv_get_hint_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->hint; - case 1: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->hint; - case 2: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->hint; - case 3: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->hint; - case 4: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->hint; - case 5: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->hint; - case 6: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->hint; - case 7: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->hint; - case 8: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->hint; - case 9: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->hint; - case 10: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->hint; - case 11: return (GdkWindowTypeHint *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::transient_for - -GdkWindow * gdk_window_impl_wayland_priv_get_transient_for(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->transient_for; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->transient_for; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->transient_for; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->transient_for; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->transient_for; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->transient_for; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->transient_for; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->transient_for; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->transient_for; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->transient_for; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->transient_for; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->transient_for; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_transient_for(GdkWindowImplWayland * self, GdkWindow * transient_for) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->transient_for = transient_for; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->transient_for = transient_for; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->transient_for = transient_for; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->transient_for = transient_for; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->transient_for = transient_for; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->transient_for = transient_for; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->transient_for = transient_for; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->transient_for = transient_for; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->transient_for = transient_for; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->transient_for = transient_for; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->transient_for = transient_for; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->transient_for = transient_for; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::popup_parent - -GdkWindow * gdk_window_impl_wayland_priv_get_popup_parent(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->popup_parent; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->popup_parent; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->popup_parent; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->popup_parent; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->popup_parent; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->popup_parent; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->popup_parent; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->popup_parent; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->popup_parent; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->popup_parent; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->popup_parent; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->popup_parent; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_popup_parent(GdkWindowImplWayland * self, GdkWindow * popup_parent) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->popup_parent = popup_parent; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->popup_parent = popup_parent; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->popup_parent = popup_parent; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->popup_parent = popup_parent; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->popup_parent = popup_parent; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->popup_parent = popup_parent; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->popup_parent = popup_parent; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->popup_parent = popup_parent; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->popup_parent = popup_parent; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->popup_parent = popup_parent; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->popup_parent = popup_parent; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->popup_parent = popup_parent; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::position_method - -PositionMethod * gdk_window_impl_wayland_priv_get_position_method_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->position_method; - case 1: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->position_method; - case 2: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->position_method; - case 3: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->position_method; - case 4: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->position_method; - case 5: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->position_method; - case 6: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->position_method; - case 7: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->position_method; - case 8: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->position_method; - case 9: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->position_method; - case 10: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->position_method; - case 11: return (PositionMethod *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->position_method; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::staging_cairo_surface - -cairo_surface_t * gdk_window_impl_wayland_priv_get_staging_cairo_surface(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->staging_cairo_surface; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->staging_cairo_surface; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->staging_cairo_surface; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->staging_cairo_surface; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->staging_cairo_surface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->staging_cairo_surface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->staging_cairo_surface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->staging_cairo_surface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->staging_cairo_surface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->staging_cairo_surface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->staging_cairo_surface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->staging_cairo_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_staging_cairo_surface(GdkWindowImplWayland * self, cairo_surface_t * staging_cairo_surface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->staging_cairo_surface = staging_cairo_surface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->staging_cairo_surface = staging_cairo_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::committed_cairo_surface - -cairo_surface_t * gdk_window_impl_wayland_priv_get_committed_cairo_surface(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->committed_cairo_surface; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->committed_cairo_surface; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->committed_cairo_surface; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->committed_cairo_surface; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->committed_cairo_surface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->committed_cairo_surface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->committed_cairo_surface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->committed_cairo_surface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->committed_cairo_surface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->committed_cairo_surface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->committed_cairo_surface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->committed_cairo_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_committed_cairo_surface(GdkWindowImplWayland * self, cairo_surface_t * committed_cairo_surface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->committed_cairo_surface = committed_cairo_surface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->committed_cairo_surface = committed_cairo_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::backfill_cairo_surface - -cairo_surface_t * gdk_window_impl_wayland_priv_get_backfill_cairo_surface(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->backfill_cairo_surface; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->backfill_cairo_surface; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->backfill_cairo_surface; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->backfill_cairo_surface; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->backfill_cairo_surface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->backfill_cairo_surface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->backfill_cairo_surface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->backfill_cairo_surface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->backfill_cairo_surface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->backfill_cairo_surface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->backfill_cairo_surface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->backfill_cairo_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_backfill_cairo_surface(GdkWindowImplWayland * self, cairo_surface_t * backfill_cairo_surface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->backfill_cairo_surface = backfill_cairo_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_buffer_offset_x - -int gdk_window_impl_wayland_priv_get_pending_buffer_offset_x(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_buffer_offset_x; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_buffer_offset_x; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_buffer_offset_x; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_buffer_offset_x; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_buffer_offset_x; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_buffer_offset_x; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_buffer_offset_x; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_buffer_offset_x; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_buffer_offset_x; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_buffer_offset_x; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_buffer_offset_x; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_buffer_offset_x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_buffer_offset_x(GdkWindowImplWayland * self, int pending_buffer_offset_x) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_buffer_offset_x = pending_buffer_offset_x; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_buffer_offset_y - -int gdk_window_impl_wayland_priv_get_pending_buffer_offset_y(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_buffer_offset_y; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_buffer_offset_y; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_buffer_offset_y; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_buffer_offset_y; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_buffer_offset_y; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_buffer_offset_y; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_buffer_offset_y; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_buffer_offset_y; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_buffer_offset_y; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_buffer_offset_y; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_buffer_offset_y; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_buffer_offset_y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_buffer_offset_y(GdkWindowImplWayland * self, int pending_buffer_offset_y) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_buffer_offset_y = pending_buffer_offset_y; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::title - -gchar * gdk_window_impl_wayland_priv_get_title(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->title; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->title; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->title; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->title; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->title; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->title; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->title; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->title; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->title; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->title; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->title; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->title; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_title(GdkWindowImplWayland * self, gchar * title) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->title = title; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->title = title; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->title = title; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->title = title; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->title = title; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->title = title; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->title = title; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->title = title; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->title = title; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->title = title; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->title = title; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->title = title; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::application.was_set - -gboolean gdk_window_impl_wayland_priv_get_application_was_set(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.was_set; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.was_set; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.was_set; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.was_set; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.was_set; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.was_set; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.was_set; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.was_set; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.was_set; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.was_set; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.was_set; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.was_set; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_application_was_set(GdkWindowImplWayland * self, gboolean application_was_set) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.was_set = application_was_set; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.was_set = application_was_set; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.was_set = application_was_set; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.was_set = application_was_set; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.was_set = application_was_set; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.was_set = application_was_set; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.was_set = application_was_set; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.was_set = application_was_set; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.was_set = application_was_set; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.was_set = application_was_set; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.was_set = application_was_set; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.was_set = application_was_set; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::application.application_id - -gchar * gdk_window_impl_wayland_priv_get_application_application_id(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.application_id; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.application_id; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.application_id; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.application_id; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.application_id; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.application_id; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.application_id; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.application_id; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.application_id; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.application_id; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.application_id; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.application_id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_application_application_id(GdkWindowImplWayland * self, gchar * application_application_id) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.application_id = application_application_id; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.application_id = application_application_id; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.application_id = application_application_id; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.application_id = application_application_id; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.application_id = application_application_id; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.application_id = application_application_id; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.application_id = application_application_id; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.application_id = application_application_id; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.application_id = application_application_id; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.application_id = application_application_id; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.application_id = application_application_id; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.application_id = application_application_id; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::application.app_menu_path - -gchar * gdk_window_impl_wayland_priv_get_application_app_menu_path(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.app_menu_path; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.app_menu_path; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.app_menu_path; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.app_menu_path; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.app_menu_path; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.app_menu_path; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.app_menu_path; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.app_menu_path; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.app_menu_path; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.app_menu_path; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.app_menu_path; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.app_menu_path; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_application_app_menu_path(GdkWindowImplWayland * self, gchar * application_app_menu_path) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.app_menu_path = application_app_menu_path; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.app_menu_path = application_app_menu_path; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.app_menu_path = application_app_menu_path; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.app_menu_path = application_app_menu_path; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.app_menu_path = application_app_menu_path; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.app_menu_path = application_app_menu_path; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.app_menu_path = application_app_menu_path; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.app_menu_path = application_app_menu_path; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.app_menu_path = application_app_menu_path; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.app_menu_path = application_app_menu_path; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.app_menu_path = application_app_menu_path; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.app_menu_path = application_app_menu_path; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::application.menubar_path - -gchar * gdk_window_impl_wayland_priv_get_application_menubar_path(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.menubar_path; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.menubar_path; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.menubar_path; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.menubar_path; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.menubar_path; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.menubar_path; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.menubar_path; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.menubar_path; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.menubar_path; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.menubar_path; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.menubar_path; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.menubar_path; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_application_menubar_path(GdkWindowImplWayland * self, gchar * application_menubar_path) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.menubar_path = application_menubar_path; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.menubar_path = application_menubar_path; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.menubar_path = application_menubar_path; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.menubar_path = application_menubar_path; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.menubar_path = application_menubar_path; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.menubar_path = application_menubar_path; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.menubar_path = application_menubar_path; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.menubar_path = application_menubar_path; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.menubar_path = application_menubar_path; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.menubar_path = application_menubar_path; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.menubar_path = application_menubar_path; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.menubar_path = application_menubar_path; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::application.window_object_path - -gchar * gdk_window_impl_wayland_priv_get_application_window_object_path(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.window_object_path; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.window_object_path; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.window_object_path; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.window_object_path; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.window_object_path; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.window_object_path; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.window_object_path; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.window_object_path; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.window_object_path; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.window_object_path; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.window_object_path; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.window_object_path; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_application_window_object_path(GdkWindowImplWayland * self, gchar * application_window_object_path) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.window_object_path = application_window_object_path; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.window_object_path = application_window_object_path; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.window_object_path = application_window_object_path; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.window_object_path = application_window_object_path; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.window_object_path = application_window_object_path; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.window_object_path = application_window_object_path; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.window_object_path = application_window_object_path; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.window_object_path = application_window_object_path; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.window_object_path = application_window_object_path; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.window_object_path = application_window_object_path; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.window_object_path = application_window_object_path; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.window_object_path = application_window_object_path; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::application.application_object_path - -gchar * gdk_window_impl_wayland_priv_get_application_application_object_path(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.application_object_path; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.application_object_path; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.application_object_path; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.application_object_path; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.application_object_path; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.application_object_path; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.application_object_path; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.application_object_path; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.application_object_path; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.application_object_path; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.application_object_path; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.application_object_path; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_application_application_object_path(GdkWindowImplWayland * self, gchar * application_application_object_path) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.application_object_path = application_application_object_path; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.application_object_path = application_application_object_path; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.application_object_path = application_application_object_path; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.application_object_path = application_application_object_path; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.application_object_path = application_application_object_path; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.application_object_path = application_application_object_path; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.application_object_path = application_application_object_path; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.application_object_path = application_application_object_path; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.application_object_path = application_application_object_path; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.application_object_path = application_application_object_path; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.application_object_path = application_application_object_path; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.application_object_path = application_application_object_path; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::application.unique_bus_name - -gchar * gdk_window_impl_wayland_priv_get_application_unique_bus_name(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.unique_bus_name; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.unique_bus_name; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.unique_bus_name; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.unique_bus_name; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.unique_bus_name; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.unique_bus_name; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.unique_bus_name; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.unique_bus_name; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.unique_bus_name; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.unique_bus_name; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.unique_bus_name; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.unique_bus_name; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_application_unique_bus_name(GdkWindowImplWayland * self, gchar * application_unique_bus_name) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->application.unique_bus_name = application_unique_bus_name; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->application.unique_bus_name = application_unique_bus_name; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::geometry_hints - -GdkGeometry * gdk_window_impl_wayland_priv_get_geometry_hints_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->geometry_hints; - case 1: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->geometry_hints; - case 2: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->geometry_hints; - case 3: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->geometry_hints; - case 4: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->geometry_hints; - case 5: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->geometry_hints; - case 6: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->geometry_hints; - case 7: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->geometry_hints; - case 8: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->geometry_hints; - case 9: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->geometry_hints; - case 10: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->geometry_hints; - case 11: return (GdkGeometry *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->geometry_hints; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::geometry_mask - -GdkWindowHints * gdk_window_impl_wayland_priv_get_geometry_mask_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->geometry_mask; - case 1: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->geometry_mask; - case 2: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->geometry_mask; - case 3: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->geometry_mask; - case 4: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->geometry_mask; - case 5: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->geometry_mask; - case 6: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->geometry_mask; - case 7: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->geometry_mask; - case 8: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->geometry_mask; - case 9: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->geometry_mask; - case 10: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->geometry_mask; - case 11: return (GdkWindowHints *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->geometry_mask; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::grab_input_seat - -GdkSeat * gdk_window_impl_wayland_priv_get_grab_input_seat(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->grab_input_seat; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->grab_input_seat; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->grab_input_seat; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->grab_input_seat; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->grab_input_seat; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->grab_input_seat; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->grab_input_seat; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->grab_input_seat; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->grab_input_seat; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->grab_input_seat; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->grab_input_seat; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->grab_input_seat; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_grab_input_seat(GdkWindowImplWayland * self, GdkSeat * grab_input_seat) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->grab_input_seat = grab_input_seat; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->grab_input_seat = grab_input_seat; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->grab_input_seat = grab_input_seat; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->grab_input_seat = grab_input_seat; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->grab_input_seat = grab_input_seat; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->grab_input_seat = grab_input_seat; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->grab_input_seat = grab_input_seat; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->grab_input_seat = grab_input_seat; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->grab_input_seat = grab_input_seat; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->grab_input_seat = grab_input_seat; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->grab_input_seat = grab_input_seat; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->grab_input_seat = grab_input_seat; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_frame_counter - -gint64 * gdk_window_impl_wayland_priv_get_pending_frame_counter_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (gint64 *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_frame_counter; - case 1: return (gint64 *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_frame_counter; - case 2: return (gint64 *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_frame_counter; - case 3: return (gint64 *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_frame_counter; - case 4: return (gint64 *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_frame_counter; - case 5: return (gint64 *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_frame_counter; - case 6: return (gint64 *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_frame_counter; - case 7: return (gint64 *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_frame_counter; - case 8: return (gint64 *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_frame_counter; - case 9: return (gint64 *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_frame_counter; - case 10: return (gint64 *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_frame_counter; - case 11: return (gint64 *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_frame_counter; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::scale - -guint32 * gdk_window_impl_wayland_priv_get_scale_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (guint32 *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->scale; - case 1: return (guint32 *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->scale; - case 2: return (guint32 *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->scale; - case 3: return (guint32 *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->scale; - case 4: return (guint32 *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->scale; - case 5: return (guint32 *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->scale; - case 6: return (guint32 *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->scale; - case 7: return (guint32 *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->scale; - case 8: return (guint32 *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->scale; - case 9: return (guint32 *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->scale; - case 10: return (guint32 *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->scale; - case 11: return (guint32 *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->scale; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::margin_left - -int gdk_window_impl_wayland_priv_get_margin_left(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_left; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_left; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_left; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_left; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_left; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_left; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_left; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_left; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_left; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_left; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_left; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_left; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_margin_left(GdkWindowImplWayland * self, int margin_left) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_left = margin_left; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_left = margin_left; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_left = margin_left; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_left = margin_left; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_left = margin_left; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_left = margin_left; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_left = margin_left; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_left = margin_left; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_left = margin_left; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_left = margin_left; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_left = margin_left; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_left = margin_left; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::margin_right - -int gdk_window_impl_wayland_priv_get_margin_right(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_right; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_right; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_right; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_right; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_right; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_right; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_right; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_right; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_right; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_right; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_right; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_right; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_margin_right(GdkWindowImplWayland * self, int margin_right) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_right = margin_right; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_right = margin_right; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_right = margin_right; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_right = margin_right; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_right = margin_right; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_right = margin_right; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_right = margin_right; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_right = margin_right; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_right = margin_right; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_right = margin_right; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_right = margin_right; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_right = margin_right; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::margin_top - -int gdk_window_impl_wayland_priv_get_margin_top(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_top; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_top; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_top; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_top; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_top; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_top; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_top; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_top; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_top; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_top; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_top; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_top; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_margin_top(GdkWindowImplWayland * self, int margin_top) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_top = margin_top; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_top = margin_top; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_top = margin_top; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_top = margin_top; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_top = margin_top; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_top = margin_top; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_top = margin_top; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_top = margin_top; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_top = margin_top; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_top = margin_top; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_top = margin_top; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_top = margin_top; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::margin_bottom - -int gdk_window_impl_wayland_priv_get_margin_bottom(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_bottom; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_bottom; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_bottom; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_bottom; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_bottom; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_bottom; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_bottom; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_bottom; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_bottom; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_bottom; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_bottom; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_bottom; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_margin_bottom(GdkWindowImplWayland * self, int margin_bottom) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_bottom = margin_bottom; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_bottom = margin_bottom; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_bottom = margin_bottom; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_bottom = margin_bottom; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_bottom = margin_bottom; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_bottom = margin_bottom; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_bottom = margin_bottom; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_bottom = margin_bottom; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_bottom = margin_bottom; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_bottom = margin_bottom; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_bottom = margin_bottom; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_bottom = margin_bottom; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::margin_dirty - -gboolean gdk_window_impl_wayland_priv_get_margin_dirty(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_dirty; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_dirty; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_dirty; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_dirty; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_dirty; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_dirty; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_dirty; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_dirty; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_dirty; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_dirty; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_dirty; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_dirty; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_margin_dirty(GdkWindowImplWayland * self, gboolean margin_dirty) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->margin_dirty = margin_dirty; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->margin_dirty = margin_dirty; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->margin_dirty = margin_dirty; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->margin_dirty = margin_dirty; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->margin_dirty = margin_dirty; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->margin_dirty = margin_dirty; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->margin_dirty = margin_dirty; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->margin_dirty = margin_dirty; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->margin_dirty = margin_dirty; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->margin_dirty = margin_dirty; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->margin_dirty = margin_dirty; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->margin_dirty = margin_dirty; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::initial_fullscreen_monitor - -int gdk_window_impl_wayland_priv_get_initial_fullscreen_monitor(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->initial_fullscreen_monitor; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->initial_fullscreen_monitor; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->initial_fullscreen_monitor; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->initial_fullscreen_monitor; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->initial_fullscreen_monitor; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->initial_fullscreen_monitor; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->initial_fullscreen_monitor; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->initial_fullscreen_monitor; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->initial_fullscreen_monitor; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->initial_fullscreen_monitor; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->initial_fullscreen_monitor; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->initial_fullscreen_monitor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_initial_fullscreen_monitor(GdkWindowImplWayland * self, int initial_fullscreen_monitor) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->initial_fullscreen_monitor = initial_fullscreen_monitor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::opaque_region - -cairo_region_t * gdk_window_impl_wayland_priv_get_opaque_region(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->opaque_region; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->opaque_region; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->opaque_region; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->opaque_region; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->opaque_region; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->opaque_region; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->opaque_region; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->opaque_region; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->opaque_region; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->opaque_region; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->opaque_region; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->opaque_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_opaque_region(GdkWindowImplWayland * self, cairo_region_t * opaque_region) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->opaque_region = opaque_region; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->opaque_region = opaque_region; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->opaque_region = opaque_region; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->opaque_region = opaque_region; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->opaque_region = opaque_region; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->opaque_region = opaque_region; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->opaque_region = opaque_region; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->opaque_region = opaque_region; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->opaque_region = opaque_region; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->opaque_region = opaque_region; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->opaque_region = opaque_region; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->opaque_region = opaque_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::opaque_region_dirty - -gboolean gdk_window_impl_wayland_priv_get_opaque_region_dirty(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->opaque_region_dirty; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->opaque_region_dirty; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->opaque_region_dirty; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->opaque_region_dirty; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->opaque_region_dirty; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->opaque_region_dirty; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->opaque_region_dirty; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->opaque_region_dirty; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->opaque_region_dirty; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->opaque_region_dirty; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->opaque_region_dirty; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->opaque_region_dirty; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_opaque_region_dirty(GdkWindowImplWayland * self, gboolean opaque_region_dirty) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->opaque_region_dirty = opaque_region_dirty; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->opaque_region_dirty = opaque_region_dirty; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::input_region - -cairo_region_t * gdk_window_impl_wayland_priv_get_input_region(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->input_region; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->input_region; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->input_region; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->input_region; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->input_region; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->input_region; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->input_region; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->input_region; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->input_region; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->input_region; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->input_region; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->input_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_input_region(GdkWindowImplWayland * self, cairo_region_t * input_region) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->input_region = input_region; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->input_region = input_region; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->input_region = input_region; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->input_region = input_region; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->input_region = input_region; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->input_region = input_region; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->input_region = input_region; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->input_region = input_region; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->input_region = input_region; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->input_region = input_region; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->input_region = input_region; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->input_region = input_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::input_region_dirty - -gboolean gdk_window_impl_wayland_priv_get_input_region_dirty(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->input_region_dirty; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->input_region_dirty; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->input_region_dirty; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->input_region_dirty; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->input_region_dirty; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->input_region_dirty; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->input_region_dirty; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->input_region_dirty; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->input_region_dirty; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->input_region_dirty; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->input_region_dirty; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->input_region_dirty; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_input_region_dirty(GdkWindowImplWayland * self, gboolean input_region_dirty) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->input_region_dirty = input_region_dirty; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->input_region_dirty = input_region_dirty; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->input_region_dirty = input_region_dirty; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->input_region_dirty = input_region_dirty; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->input_region_dirty = input_region_dirty; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->input_region_dirty = input_region_dirty; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->input_region_dirty = input_region_dirty; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->input_region_dirty = input_region_dirty; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->input_region_dirty = input_region_dirty; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->input_region_dirty = input_region_dirty; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->input_region_dirty = input_region_dirty; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->input_region_dirty = input_region_dirty; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::staged_updates_region - -cairo_region_t * gdk_window_impl_wayland_priv_get_staged_updates_region(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->staged_updates_region; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->staged_updates_region; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->staged_updates_region; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->staged_updates_region; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->staged_updates_region; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->staged_updates_region; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->staged_updates_region; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->staged_updates_region; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->staged_updates_region; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->staged_updates_region; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->staged_updates_region; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->staged_updates_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_staged_updates_region(GdkWindowImplWayland * self, cairo_region_t * staged_updates_region) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->staged_updates_region = staged_updates_region; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->staged_updates_region = staged_updates_region; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->staged_updates_region = staged_updates_region; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->staged_updates_region = staged_updates_region; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->staged_updates_region = staged_updates_region; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->staged_updates_region = staged_updates_region; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->staged_updates_region = staged_updates_region; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->staged_updates_region = staged_updates_region; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->staged_updates_region = staged_updates_region; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->staged_updates_region = staged_updates_region; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->staged_updates_region = staged_updates_region; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->staged_updates_region = staged_updates_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::saved_width - -int gdk_window_impl_wayland_priv_get_saved_width(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->saved_width; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->saved_width; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->saved_width; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->saved_width; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->saved_width; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->saved_width; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->saved_width; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->saved_width; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->saved_width; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->saved_width; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->saved_width; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->saved_width; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_saved_width(GdkWindowImplWayland * self, int saved_width) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->saved_width = saved_width; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->saved_width = saved_width; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->saved_width = saved_width; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->saved_width = saved_width; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->saved_width = saved_width; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->saved_width = saved_width; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->saved_width = saved_width; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->saved_width = saved_width; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->saved_width = saved_width; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->saved_width = saved_width; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->saved_width = saved_width; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->saved_width = saved_width; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::saved_height - -int gdk_window_impl_wayland_priv_get_saved_height(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->saved_height; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->saved_height; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->saved_height; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->saved_height; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->saved_height; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->saved_height; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->saved_height; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->saved_height; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->saved_height; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->saved_height; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->saved_height; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->saved_height; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_saved_height(GdkWindowImplWayland * self, int saved_height) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->saved_height = saved_height; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->saved_height = saved_height; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->saved_height = saved_height; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->saved_height = saved_height; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->saved_height = saved_height; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->saved_height = saved_height; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->saved_height = saved_height; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->saved_height = saved_height; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->saved_height = saved_height; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->saved_height = saved_height; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->saved_height = saved_height; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->saved_height = saved_height; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::parent_surface_committed_handler - -gulong * gdk_window_impl_wayland_priv_get_parent_surface_committed_handler_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (gulong *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->parent_surface_committed_handler; - case 1: return (gulong *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->parent_surface_committed_handler; - case 2: return (gulong *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->parent_surface_committed_handler; - case 3: return (gulong *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->parent_surface_committed_handler; - case 4: return (gulong *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->parent_surface_committed_handler; - case 5: return (gulong *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->parent_surface_committed_handler; - case 6: return (gulong *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->parent_surface_committed_handler; - case 7: return (gulong *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->parent_surface_committed_handler; - case 8: return (gulong *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->parent_surface_committed_handler; - case 9: return (gulong *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->parent_surface_committed_handler; - case 10: return (gulong *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->parent_surface_committed_handler; - case 11: return (gulong *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->parent_surface_committed_handler; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_move_to_rect.rect - -GdkRectangle * gdk_window_impl_wayland_priv_get_pending_move_to_rect_rect_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.rect; - case 1: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.rect; - case 2: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.rect; - case 3: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.rect; - case 4: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.rect; - case 5: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.rect; - case 6: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.rect; - case 7: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.rect; - case 8: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.rect; - case 9: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.rect; - case 10: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.rect; - case 11: return (GdkRectangle *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.rect; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_move_to_rect.rect_anchor - -GdkGravity * gdk_window_impl_wayland_priv_get_pending_move_to_rect_rect_anchor_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.rect_anchor; - case 1: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.rect_anchor; - case 2: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.rect_anchor; - case 3: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.rect_anchor; - case 4: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.rect_anchor; - case 5: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.rect_anchor; - case 6: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.rect_anchor; - case 7: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.rect_anchor; - case 8: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.rect_anchor; - case 9: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.rect_anchor; - case 10: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.rect_anchor; - case 11: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.rect_anchor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_move_to_rect.window_anchor - -GdkGravity * gdk_window_impl_wayland_priv_get_pending_move_to_rect_window_anchor_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.window_anchor; - case 1: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.window_anchor; - case 2: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.window_anchor; - case 3: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.window_anchor; - case 4: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.window_anchor; - case 5: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.window_anchor; - case 6: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.window_anchor; - case 7: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.window_anchor; - case 8: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.window_anchor; - case 9: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.window_anchor; - case 10: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.window_anchor; - case 11: return (GdkGravity *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.window_anchor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_move_to_rect.anchor_hints - -GdkAnchorHints * gdk_window_impl_wayland_priv_get_pending_move_to_rect_anchor_hints_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.anchor_hints; - case 1: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.anchor_hints; - case 2: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.anchor_hints; - case 3: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.anchor_hints; - case 4: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.anchor_hints; - case 5: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.anchor_hints; - case 6: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.anchor_hints; - case 7: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.anchor_hints; - case 8: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.anchor_hints; - case 9: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.anchor_hints; - case 10: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.anchor_hints; - case 11: return (GdkAnchorHints *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.anchor_hints; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_move_to_rect.rect_anchor_dx - -gint gdk_window_impl_wayland_priv_get_pending_move_to_rect_rect_anchor_dx(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.rect_anchor_dx; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.rect_anchor_dx; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.rect_anchor_dx; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.rect_anchor_dx; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.rect_anchor_dx; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.rect_anchor_dx; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.rect_anchor_dx; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.rect_anchor_dx; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.rect_anchor_dx; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.rect_anchor_dx; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.rect_anchor_dx; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.rect_anchor_dx; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_move_to_rect_rect_anchor_dx(GdkWindowImplWayland * self, gint pending_move_to_rect_rect_anchor_dx) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.rect_anchor_dx = pending_move_to_rect_rect_anchor_dx; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending_move_to_rect.rect_anchor_dy - -gint gdk_window_impl_wayland_priv_get_pending_move_to_rect_rect_anchor_dy(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.rect_anchor_dy; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.rect_anchor_dy; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.rect_anchor_dy; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.rect_anchor_dy; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.rect_anchor_dy; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.rect_anchor_dy; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.rect_anchor_dy; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.rect_anchor_dy; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.rect_anchor_dy; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.rect_anchor_dy; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.rect_anchor_dy; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.rect_anchor_dy; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_move_to_rect_rect_anchor_dy(GdkWindowImplWayland * self, gint pending_move_to_rect_rect_anchor_dy) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending_move_to_rect.rect_anchor_dy = pending_move_to_rect_rect_anchor_dy; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending.width - -int gdk_window_impl_wayland_priv_get_pending_width(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending.width; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending.width; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending.width; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending.width; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending.width; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending.width; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending.width; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending.width; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending.width; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending.width; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending.width; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending.width; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_width(GdkWindowImplWayland * self, int pending_width) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending.width = pending_width; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending.width = pending_width; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending.width = pending_width; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending.width = pending_width; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending.width = pending_width; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending.width = pending_width; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending.width = pending_width; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending.width = pending_width; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending.width = pending_width; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending.width = pending_width; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending.width = pending_width; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending.width = pending_width; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending.height - -int gdk_window_impl_wayland_priv_get_pending_height(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending.height; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending.height; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending.height; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending.height; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending.height; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending.height; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending.height; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending.height; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending.height; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending.height; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending.height; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending.height; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_pending_height(GdkWindowImplWayland * self, int pending_height) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->pending.height = pending_height; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->pending.height = pending_height; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->pending.height = pending_height; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->pending.height = pending_height; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->pending.height = pending_height; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->pending.height = pending_height; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->pending.height = pending_height; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->pending.height = pending_height; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->pending.height = pending_height; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->pending.height = pending_height; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->pending.height = pending_height; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->pending.height = pending_height; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::pending.state - -GdkWindowState * gdk_window_impl_wayland_priv_get_pending_state_ptr(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->pending.state; - case 1: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_22_16*)self)->pending.state; - case 2: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_22_18*)self)->pending.state; - case 3: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_22_25*)self)->pending.state; - case 4: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_22_30*)self)->pending.state; - case 5: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_23_1*)self)->pending.state; - case 6: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_23_3*)self)->pending.state; - case 7: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_24_4*)self)->pending.state; - case 8: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_24_17*)self)->pending.state; - case 9: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_24_22*)self)->pending.state; - case 10: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_24_25*)self)->pending.state; - case 11: return (GdkWindowState *)&((struct _GdkWindowImplWayland_v3_24_35*)self)->pending.state; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::exported.callback - -gboolean gdk_window_impl_wayland_priv_get_exported_callback_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return TRUE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return FALSE; - case 9: return FALSE; - case 10: return FALSE; - case 11: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -GdkWaylandWindowExported * gdk_window_impl_wayland_priv_get_exported_callback_ptr_or_null(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GdkWaylandWindowExported *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->exported.callback; - case 1: return NULL; - case 2: return NULL; - case 3: return NULL; - case 4: return NULL; - case 5: return NULL; - case 6: return NULL; - case 7: return NULL; - case 8: return NULL; - case 9: return NULL; - case 10: return NULL; - case 11: return NULL; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::exported.user_data - -gboolean gdk_window_impl_wayland_priv_get_exported_user_data_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return TRUE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return FALSE; - case 9: return FALSE; - case 10: return FALSE; - case 11: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -gpointer gdk_window_impl_wayland_priv_get_exported_user_data_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->exported.user_data; - case 1: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 9: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 10: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 11: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_exported_user_data_or_abort(GdkWindowImplWayland * self, gpointer exported_user_data) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->exported.user_data = exported_user_data; break; - case 1: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 9: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 10: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - case 11: g_error("GdkWindowImplWayland::exported.user_data not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::exported.destroy_func - -gboolean gdk_window_impl_wayland_priv_get_exported_destroy_func_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return TRUE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return FALSE; - case 9: return FALSE; - case 10: return FALSE; - case 11: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -GDestroyNotify * gdk_window_impl_wayland_priv_get_exported_destroy_func_ptr_or_null(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return (GDestroyNotify *)&((struct _GdkWindowImplWayland_v3_22_0*)self)->exported.destroy_func; - case 1: return NULL; - case 2: return NULL; - case 3: return NULL; - case 4: return NULL; - case 5: return NULL; - case 6: return NULL; - case 7: return NULL; - case 8: return NULL; - case 9: return NULL; - case 10: return NULL; - case 11: return NULL; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::imported_transient_for - -struct zxdg_imported_v1 * gdk_window_impl_wayland_priv_get_imported_transient_for(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return ((struct _GdkWindowImplWayland_v3_22_0*)self)->imported_transient_for; - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->imported_transient_for; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->imported_transient_for; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->imported_transient_for; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->imported_transient_for; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->imported_transient_for; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->imported_transient_for; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->imported_transient_for; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->imported_transient_for; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->imported_transient_for; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->imported_transient_for; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->imported_transient_for; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_imported_transient_for(GdkWindowImplWayland * self, struct zxdg_imported_v1 * imported_transient_for) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: ((struct _GdkWindowImplWayland_v3_22_0*)self)->imported_transient_for = imported_transient_for; break; - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->imported_transient_for = imported_transient_for; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->imported_transient_for = imported_transient_for; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->imported_transient_for = imported_transient_for; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->imported_transient_for = imported_transient_for; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->imported_transient_for = imported_transient_for; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->imported_transient_for = imported_transient_for; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->imported_transient_for = imported_transient_for; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->imported_transient_for = imported_transient_for; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->imported_transient_for = imported_transient_for; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->imported_transient_for = imported_transient_for; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->imported_transient_for = imported_transient_for; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::exported.handle - -gboolean gdk_window_impl_wayland_priv_get_exported_handle_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return TRUE; - case 2: return TRUE; - case 3: return TRUE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -char * gdk_window_impl_wayland_priv_get_exported_handle_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.handle not supported on this GTK"); g_abort(); - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.handle; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.handle; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.handle; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.handle; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.handle; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.handle; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.handle; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.handle; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.handle; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.handle; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.handle; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_exported_handle_or_abort(GdkWindowImplWayland * self, char * exported_handle) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.handle not supported on this GTK"); g_abort(); - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.handle = exported_handle; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.handle = exported_handle; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.handle = exported_handle; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.handle = exported_handle; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.handle = exported_handle; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.handle = exported_handle; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.handle = exported_handle; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.handle = exported_handle; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.handle = exported_handle; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.handle = exported_handle; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.handle = exported_handle; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::exported.export_count - -gboolean gdk_window_impl_wayland_priv_get_exported_export_count_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return TRUE; - case 2: return TRUE; - case 3: return TRUE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -int gdk_window_impl_wayland_priv_get_exported_export_count_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.export_count not supported on this GTK"); g_abort(); - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.export_count; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.export_count; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.export_count; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.export_count; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.export_count; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.export_count; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.export_count; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.export_count; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.export_count; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.export_count; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.export_count; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_exported_export_count_or_abort(GdkWindowImplWayland * self, int exported_export_count) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.export_count not supported on this GTK"); g_abort(); - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.export_count = exported_export_count; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.export_count = exported_export_count; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.export_count = exported_export_count; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.export_count = exported_export_count; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.export_count = exported_export_count; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.export_count = exported_export_count; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.export_count = exported_export_count; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.export_count = exported_export_count; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.export_count = exported_export_count; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.export_count = exported_export_count; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.export_count = exported_export_count; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::exported.closures - -gboolean gdk_window_impl_wayland_priv_get_exported_closures_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return TRUE; - case 2: return TRUE; - case 3: return TRUE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -GList * gdk_window_impl_wayland_priv_get_exported_closures_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.closures not supported on this GTK"); g_abort(); - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.closures; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.closures; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.closures; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.closures; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.closures; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.closures; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.closures; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.closures; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.closures; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.closures; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.closures; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_exported_closures_or_abort(GdkWindowImplWayland * self, GList * exported_closures) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.closures not supported on this GTK"); g_abort(); - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.closures = exported_closures; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.closures = exported_closures; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.closures = exported_closures; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.closures = exported_closures; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.closures = exported_closures; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.closures = exported_closures; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.closures = exported_closures; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.closures = exported_closures; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.closures = exported_closures; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.closures = exported_closures; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.closures = exported_closures; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::exported.idle_source_id - -gboolean gdk_window_impl_wayland_priv_get_exported_idle_source_id_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return TRUE; - case 2: return TRUE; - case 3: return TRUE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -guint gdk_window_impl_wayland_priv_get_exported_idle_source_id_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.idle_source_id not supported on this GTK"); g_abort(); - case 1: return ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.idle_source_id; - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.idle_source_id; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.idle_source_id; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.idle_source_id; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.idle_source_id; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.idle_source_id; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.idle_source_id; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.idle_source_id; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.idle_source_id; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.idle_source_id; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.idle_source_id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_exported_idle_source_id_or_abort(GdkWindowImplWayland * self, guint exported_idle_source_id) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::exported.idle_source_id not supported on this GTK"); g_abort(); - case 1: ((struct _GdkWindowImplWayland_v3_22_16*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->exported.idle_source_id = exported_idle_source_id; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->exported.idle_source_id = exported_idle_source_id; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::shortcuts_inhibitors - -gboolean gdk_window_impl_wayland_priv_get_shortcuts_inhibitors_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return TRUE; - case 3: return TRUE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -GHashTable * gdk_window_impl_wayland_priv_get_shortcuts_inhibitors_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::shortcuts_inhibitors not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::shortcuts_inhibitors not supported on this GTK"); g_abort(); - case 2: return ((struct _GdkWindowImplWayland_v3_22_18*)self)->shortcuts_inhibitors; - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->shortcuts_inhibitors; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->shortcuts_inhibitors; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->shortcuts_inhibitors; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->shortcuts_inhibitors; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->shortcuts_inhibitors; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->shortcuts_inhibitors; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->shortcuts_inhibitors; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->shortcuts_inhibitors; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->shortcuts_inhibitors; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_shortcuts_inhibitors_or_abort(GdkWindowImplWayland * self, GHashTable * shortcuts_inhibitors) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::shortcuts_inhibitors not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::shortcuts_inhibitors not supported on this GTK"); g_abort(); - case 2: ((struct _GdkWindowImplWayland_v3_22_18*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->shortcuts_inhibitors = shortcuts_inhibitors; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.server_decoration - -gboolean gdk_window_impl_wayland_priv_get_display_server_server_decoration_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return TRUE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct org_kde_kwin_server_decoration * gdk_window_impl_wayland_priv_get_display_server_server_decoration_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.server_decoration not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.server_decoration not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.server_decoration not supported on this GTK"); g_abort(); - case 3: return ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.server_decoration; - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.server_decoration; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.server_decoration; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.server_decoration; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.server_decoration; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.server_decoration; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.server_decoration; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.server_decoration; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.server_decoration; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_server_decoration_or_abort(GdkWindowImplWayland * self, struct org_kde_kwin_server_decoration * display_server_server_decoration) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.server_decoration not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.server_decoration not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.server_decoration not supported on this GTK"); g_abort(); - case 3: ((struct _GdkWindowImplWayland_v3_22_25*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.server_decoration = display_server_server_decoration; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.server_decoration = display_server_server_decoration; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.xdg_surface - -gboolean gdk_window_impl_wayland_priv_get_display_server_xdg_surface_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct xdg_surface * gdk_window_impl_wayland_priv_get_display_server_xdg_surface_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_surface; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_surface; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_surface; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_surface; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_surface; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_surface; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_surface; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_xdg_surface_or_abort(GdkWindowImplWayland * self, struct xdg_surface * display_server_xdg_surface) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.xdg_surface not supported on this GTK"); g_abort(); - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_surface = display_server_xdg_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.xdg_toplevel - -gboolean gdk_window_impl_wayland_priv_get_display_server_xdg_toplevel_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct xdg_toplevel * gdk_window_impl_wayland_priv_get_display_server_xdg_toplevel_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_toplevel; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_toplevel; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_toplevel; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_toplevel; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_toplevel; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_toplevel; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_toplevel; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_toplevel; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_xdg_toplevel_or_abort(GdkWindowImplWayland * self, struct xdg_toplevel * display_server_xdg_toplevel) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.xdg_toplevel not supported on this GTK"); g_abort(); - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_toplevel = display_server_xdg_toplevel; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.xdg_popup - -gboolean gdk_window_impl_wayland_priv_get_display_server_xdg_popup_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct xdg_popup * gdk_window_impl_wayland_priv_get_display_server_xdg_popup_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_popup; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_popup; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_popup; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_popup; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_popup; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_popup; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_popup; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_popup; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_xdg_popup_or_abort(GdkWindowImplWayland * self, struct xdg_popup * display_server_xdg_popup) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.xdg_popup not supported on this GTK"); g_abort(); - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.xdg_popup = display_server_xdg_popup; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.zxdg_surface_v6 - -gboolean gdk_window_impl_wayland_priv_get_display_server_zxdg_surface_v6_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct zxdg_surface_v6 * gdk_window_impl_wayland_priv_get_display_server_zxdg_surface_v6_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.zxdg_surface_v6; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.zxdg_surface_v6; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.zxdg_surface_v6; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.zxdg_surface_v6; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.zxdg_surface_v6; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.zxdg_surface_v6; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.zxdg_surface_v6; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.zxdg_surface_v6; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_zxdg_surface_v6_or_abort(GdkWindowImplWayland * self, struct zxdg_surface_v6 * display_server_zxdg_surface_v6) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.zxdg_surface_v6 not supported on this GTK"); g_abort(); - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.zxdg_surface_v6 = display_server_zxdg_surface_v6; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.zxdg_toplevel_v6 - -gboolean gdk_window_impl_wayland_priv_get_display_server_zxdg_toplevel_v6_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct zxdg_toplevel_v6 * gdk_window_impl_wayland_priv_get_display_server_zxdg_toplevel_v6_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.zxdg_toplevel_v6; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.zxdg_toplevel_v6; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.zxdg_toplevel_v6; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.zxdg_toplevel_v6; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.zxdg_toplevel_v6; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.zxdg_toplevel_v6; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.zxdg_toplevel_v6; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.zxdg_toplevel_v6; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_zxdg_toplevel_v6_or_abort(GdkWindowImplWayland * self, struct zxdg_toplevel_v6 * display_server_zxdg_toplevel_v6) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.zxdg_toplevel_v6 not supported on this GTK"); g_abort(); - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.zxdg_toplevel_v6 = display_server_zxdg_toplevel_v6; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::display_server.zxdg_popup_v6 - -gboolean gdk_window_impl_wayland_priv_get_display_server_zxdg_popup_v6_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return TRUE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct zxdg_popup_v6 * gdk_window_impl_wayland_priv_get_display_server_zxdg_popup_v6_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 4: return ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.zxdg_popup_v6; - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.zxdg_popup_v6; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.zxdg_popup_v6; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.zxdg_popup_v6; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.zxdg_popup_v6; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.zxdg_popup_v6; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.zxdg_popup_v6; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.zxdg_popup_v6; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_display_server_zxdg_popup_v6_or_abort(GdkWindowImplWayland * self, struct zxdg_popup_v6 * display_server_zxdg_popup_v6) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::display_server.zxdg_popup_v6 not supported on this GTK"); g_abort(); - case 4: ((struct _GdkWindowImplWayland_v3_22_30*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->display_server.zxdg_popup_v6 = display_server_zxdg_popup_v6; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::using_csd - -gboolean gdk_window_impl_wayland_priv_get_using_csd_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return TRUE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -unsigned int gdk_window_impl_wayland_priv_get_using_csd_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 5: return ((struct _GdkWindowImplWayland_v3_23_1*)self)->using_csd; - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->using_csd; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->using_csd; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->using_csd; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->using_csd; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->using_csd; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->using_csd; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_using_csd_or_abort(GdkWindowImplWayland * self, unsigned int using_csd) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::using_csd not supported on this GTK"); g_abort(); - case 5: ((struct _GdkWindowImplWayland_v3_23_1*)self)->using_csd = using_csd; break; - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->using_csd = using_csd; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->using_csd = using_csd; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->using_csd = using_csd; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->using_csd = using_csd; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->using_csd = using_csd; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->using_csd = using_csd; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::subsurface_x - -gboolean gdk_window_impl_wayland_priv_get_subsurface_x_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -int gdk_window_impl_wayland_priv_get_subsurface_x_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->subsurface_x; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->subsurface_x; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->subsurface_x; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->subsurface_x; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->subsurface_x; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->subsurface_x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_subsurface_x_or_abort(GdkWindowImplWayland * self, int subsurface_x) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::subsurface_x not supported on this GTK"); g_abort(); - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->subsurface_x = subsurface_x; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->subsurface_x = subsurface_x; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->subsurface_x = subsurface_x; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->subsurface_x = subsurface_x; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->subsurface_x = subsurface_x; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->subsurface_x = subsurface_x; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::subsurface_y - -gboolean gdk_window_impl_wayland_priv_get_subsurface_y_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return TRUE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -int gdk_window_impl_wayland_priv_get_subsurface_y_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 6: return ((struct _GdkWindowImplWayland_v3_23_3*)self)->subsurface_y; - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->subsurface_y; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->subsurface_y; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->subsurface_y; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->subsurface_y; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->subsurface_y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_subsurface_y_or_abort(GdkWindowImplWayland * self, int subsurface_y) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::subsurface_y not supported on this GTK"); g_abort(); - case 6: ((struct _GdkWindowImplWayland_v3_23_3*)self)->subsurface_y = subsurface_y; break; - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->subsurface_y = subsurface_y; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->subsurface_y = subsurface_y; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->subsurface_y = subsurface_y; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->subsurface_y = subsurface_y; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->subsurface_y = subsurface_y; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::configuring_popup - -gboolean gdk_window_impl_wayland_priv_get_configuring_popup_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return TRUE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -unsigned int gdk_window_impl_wayland_priv_get_configuring_popup_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 7: return ((struct _GdkWindowImplWayland_v3_24_4*)self)->configuring_popup; - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->configuring_popup; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->configuring_popup; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->configuring_popup; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->configuring_popup; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_configuring_popup_or_abort(GdkWindowImplWayland * self, unsigned int configuring_popup) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::configuring_popup not supported on this GTK"); g_abort(); - case 7: ((struct _GdkWindowImplWayland_v3_24_4*)self)->configuring_popup = configuring_popup; break; - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->configuring_popup = configuring_popup; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->configuring_popup = configuring_popup; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->configuring_popup = configuring_popup; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->configuring_popup = configuring_popup; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::unconfigured_width - -gboolean gdk_window_impl_wayland_priv_get_unconfigured_width_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -int gdk_window_impl_wayland_priv_get_unconfigured_width_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->unconfigured_width; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->unconfigured_width; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->unconfigured_width; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->unconfigured_width; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_unconfigured_width_or_abort(GdkWindowImplWayland * self, int unconfigured_width) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::unconfigured_width not supported on this GTK"); g_abort(); - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->unconfigured_width = unconfigured_width; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->unconfigured_width = unconfigured_width; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->unconfigured_width = unconfigured_width; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->unconfigured_width = unconfigured_width; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::unconfigured_height - -gboolean gdk_window_impl_wayland_priv_get_unconfigured_height_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -int gdk_window_impl_wayland_priv_get_unconfigured_height_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->unconfigured_height; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->unconfigured_height; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->unconfigured_height; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->unconfigured_height; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_unconfigured_height_or_abort(GdkWindowImplWayland * self, int unconfigured_height) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::unconfigured_height not supported on this GTK"); g_abort(); - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->unconfigured_height = unconfigured_height; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->unconfigured_height = unconfigured_height; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->unconfigured_height = unconfigured_height; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->unconfigured_height = unconfigured_height; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::fixed_size_width - -gboolean gdk_window_impl_wayland_priv_get_fixed_size_width_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -int gdk_window_impl_wayland_priv_get_fixed_size_width_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->fixed_size_width; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->fixed_size_width; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->fixed_size_width; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->fixed_size_width; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_fixed_size_width_or_abort(GdkWindowImplWayland * self, int fixed_size_width) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::fixed_size_width not supported on this GTK"); g_abort(); - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->fixed_size_width = fixed_size_width; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->fixed_size_width = fixed_size_width; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->fixed_size_width = fixed_size_width; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->fixed_size_width = fixed_size_width; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::fixed_size_height - -gboolean gdk_window_impl_wayland_priv_get_fixed_size_height_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return TRUE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -int gdk_window_impl_wayland_priv_get_fixed_size_height_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 8: return ((struct _GdkWindowImplWayland_v3_24_17*)self)->fixed_size_height; - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->fixed_size_height; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->fixed_size_height; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->fixed_size_height; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_fixed_size_height_or_abort(GdkWindowImplWayland * self, int fixed_size_height) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::fixed_size_height not supported on this GTK"); g_abort(); - case 8: ((struct _GdkWindowImplWayland_v3_24_17*)self)->fixed_size_height = fixed_size_height; break; - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->fixed_size_height = fixed_size_height; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->fixed_size_height = fixed_size_height; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->fixed_size_height = fixed_size_height; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::saved_size_changed - -gboolean gdk_window_impl_wayland_priv_get_saved_size_changed_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return FALSE; - case 9: return TRUE; - case 10: return TRUE; - case 11: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -gboolean gdk_window_impl_wayland_priv_get_saved_size_changed_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 9: return ((struct _GdkWindowImplWayland_v3_24_22*)self)->saved_size_changed; - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->saved_size_changed; - case 11: return ((struct _GdkWindowImplWayland_v3_24_35*)self)->saved_size_changed; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_saved_size_changed_or_abort(GdkWindowImplWayland * self, gboolean saved_size_changed) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::saved_size_changed not supported on this GTK"); g_abort(); - case 9: ((struct _GdkWindowImplWayland_v3_24_22*)self)->saved_size_changed = saved_size_changed; break; - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->saved_size_changed = saved_size_changed; break; - case 11: ((struct _GdkWindowImplWayland_v3_24_35*)self)->saved_size_changed = saved_size_changed; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::surface_callback - -gboolean gdk_window_impl_wayland_priv_get_surface_callback_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return FALSE; - case 9: return FALSE; - case 10: return TRUE; - case 11: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -struct wl_callback * gdk_window_impl_wayland_priv_get_surface_callback_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 9: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->surface_callback; - case 11: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_surface_callback_or_abort(GdkWindowImplWayland * self, struct wl_callback * surface_callback) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 9: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->surface_callback = surface_callback; break; - case 11: g_error("GdkWindowImplWayland::surface_callback not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindowImplWayland::frame_callback_surfaces - -gboolean gdk_window_impl_wayland_priv_get_frame_callback_surfaces_supported() { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return FALSE; - case 3: return FALSE; - case 4: return FALSE; - case 5: return FALSE; - case 6: return FALSE; - case 7: return FALSE; - case 8: return FALSE; - case 9: return FALSE; - case 10: return TRUE; - case 11: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -GHashTable * gdk_window_impl_wayland_priv_get_frame_callback_surfaces_or_abort(GdkWindowImplWayland * self) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 9: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 10: return ((struct _GdkWindowImplWayland_v3_24_25*)self)->frame_callback_surfaces; - case 11: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_impl_wayland_priv_set_frame_callback_surfaces_or_abort(GdkWindowImplWayland * self, GHashTable * frame_callback_surfaces) { - switch (gdk_window_impl_wayland_priv_get_version_id()) { - case 0: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 2: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 3: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 4: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 5: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 6: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 7: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 8: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 9: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - case 10: ((struct _GdkWindowImplWayland_v3_24_25*)self)->frame_callback_surfaces = frame_callback_surfaces; break; - case 11: g_error("GdkWindowImplWayland::frame_callback_surfaces not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WINDOW_IMPL_WAYLAND_PRIV_H diff --git a/gtk-priv/h/gdk_window_priv.h b/gtk-priv/h/gdk_window_priv.h deleted file mode 100644 index e8677ae..0000000 --- a/gtk-priv/h/gdk_window_priv.h +++ /dev/null @@ -1,1861 +0,0 @@ -/* AUTOGENERATED, DO NOT EDIT DIRECTLY - * See gtk-priv/README.md for more information - * - * This file is part of gtk-layer-shell - * - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * Copyright © 2022 gtk-priv/scripts/code.py - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef GDK_WINDOW_PRIV_H -#define GDK_WINDOW_PRIV_H - -#include "common.h" - -typedef struct _GdkWindow GdkWindow; - -// Version ID 0 -// Valid for GTK v3.22.0 - v3.22.18 -struct _GdkWindow_v3_22_0 -{ - GObject parent_instance; - GdkWindowImpl *impl; - GdkWindow *parent; - GdkWindow *transient_for; - GdkVisual *visual; - gpointer user_data; - gint x; - gint y; - GdkEventMask event_mask; - guint8 window_type; - guint8 depth; - guint8 resize_count; - gint8 toplevel_window_type; - GList *filters; - GList *children; - GList children_list_node; - GList *native_children; - cairo_pattern_t *background; - struct { - cairo_surface_t *surface; - cairo_region_t *region; - cairo_region_t *flushed_region; - cairo_region_t *need_blend_region; - gboolean surface_needs_composite; - gboolean use_gl; - } current_paint; - GdkGLContext *gl_paint_context; - cairo_region_t *update_area; - guint update_freeze_count; - cairo_region_t *active_update_area; - cairo_region_t * old_updated_area[2]; - GdkWindowState old_state; - GdkWindowState state; - guint8 alpha; - guint8 fullscreen_mode; - guint input_only : 1; - guint pass_through : 1; - guint modal_hint : 1; - guint composited : 1; - guint has_alpha_background : 1; - guint destroyed : 2; - guint accept_focus : 1; - guint focus_on_map : 1; - guint shaped : 1; - guint support_multidevice : 1; - guint synthesize_crossing_event_queued : 1; - guint effective_visibility : 2; - guint visibility : 2; - guint native_visibility : 2; - guint viewable : 1; - guint applied_shape : 1; - guint in_update : 1; - guint geometry_dirty : 1; - guint event_compression : 1; - guint frame_clock_events_paused : 1; - GdkWindow *impl_window; - guint update_and_descendants_freeze_count; - gint abs_x; - gint abs_y; - gint width; - gint height; - gint shadow_top; - gint shadow_left; - gint shadow_right; - gint shadow_bottom; - guint num_offscreen_children; - cairo_region_t *clip_region; - GdkCursor *cursor; - GHashTable *device_cursor; - cairo_region_t *shape; - cairo_region_t *input_shape; - GList *devices_inside; - GHashTable *device_events; - GHashTable *source_event_masks; - gulong device_added_handler_id; - gulong device_changed_handler_id; - GdkFrameClock *frame_clock; - GdkWindowInvalidateHandlerFunc invalidate_handler; - GdkDrawingContext *drawing_context; -}; - -// Version ID 1 -// Diff from previous version: -// + cairo_region_t *opaque_region; -// Valid for GTK v3.22.19 - v3.24.10 -struct _GdkWindow_v3_22_19 -{ - GObject parent_instance; - GdkWindowImpl *impl; - GdkWindow *parent; - GdkWindow *transient_for; - GdkVisual *visual; - gpointer user_data; - gint x; - gint y; - GdkEventMask event_mask; - guint8 window_type; - guint8 depth; - guint8 resize_count; - gint8 toplevel_window_type; - GList *filters; - GList *children; - GList children_list_node; - GList *native_children; - cairo_pattern_t *background; - struct { - cairo_surface_t *surface; - cairo_region_t *region; - cairo_region_t *flushed_region; - cairo_region_t *need_blend_region; - gboolean surface_needs_composite; - gboolean use_gl; - } current_paint; - GdkGLContext *gl_paint_context; - cairo_region_t *update_area; - guint update_freeze_count; - cairo_region_t *active_update_area; - cairo_region_t * old_updated_area[2]; - GdkWindowState old_state; - GdkWindowState state; - guint8 alpha; - guint8 fullscreen_mode; - guint input_only : 1; - guint pass_through : 1; - guint modal_hint : 1; - guint composited : 1; - guint has_alpha_background : 1; - guint destroyed : 2; - guint accept_focus : 1; - guint focus_on_map : 1; - guint shaped : 1; - guint support_multidevice : 1; - guint synthesize_crossing_event_queued : 1; - guint effective_visibility : 2; - guint visibility : 2; - guint native_visibility : 2; - guint viewable : 1; - guint applied_shape : 1; - guint in_update : 1; - guint geometry_dirty : 1; - guint event_compression : 1; - guint frame_clock_events_paused : 1; - GdkWindow *impl_window; - guint update_and_descendants_freeze_count; - gint abs_x; - gint abs_y; - gint width; - gint height; - gint shadow_top; - gint shadow_left; - gint shadow_right; - gint shadow_bottom; - guint num_offscreen_children; - cairo_region_t *clip_region; - GdkCursor *cursor; - GHashTable *device_cursor; - cairo_region_t *shape; - cairo_region_t *input_shape; - GList *devices_inside; - GHashTable *device_events; - GHashTable *source_event_masks; - gulong device_added_handler_id; - gulong device_changed_handler_id; - GdkFrameClock *frame_clock; - GdkWindowInvalidateHandlerFunc invalidate_handler; - GdkDrawingContext *drawing_context; - cairo_region_t *opaque_region; -}; - -// Version ID 2 -// Diff from previous version: -// + guint synthesized_crossing_event_id; -// - guint synthesize_crossing_event_queued : 1; -// Valid for GTK v3.24.11 - v3.24.35 (unreleased) -struct _GdkWindow_v3_24_11 -{ - GObject parent_instance; - GdkWindowImpl *impl; - GdkWindow *parent; - GdkWindow *transient_for; - GdkVisual *visual; - gpointer user_data; - gint x; - gint y; - GdkEventMask event_mask; - guint8 window_type; - guint8 depth; - guint8 resize_count; - gint8 toplevel_window_type; - GList *filters; - GList *children; - GList children_list_node; - GList *native_children; - cairo_pattern_t *background; - struct { - cairo_surface_t *surface; - cairo_region_t *region; - cairo_region_t *flushed_region; - cairo_region_t *need_blend_region; - gboolean surface_needs_composite; - gboolean use_gl; - } current_paint; - GdkGLContext *gl_paint_context; - cairo_region_t *update_area; - guint update_freeze_count; - cairo_region_t *active_update_area; - cairo_region_t * old_updated_area[2]; - GdkWindowState old_state; - GdkWindowState state; - guint synthesized_crossing_event_id; - guint8 alpha; - guint8 fullscreen_mode; - guint input_only : 1; - guint pass_through : 1; - guint modal_hint : 1; - guint composited : 1; - guint has_alpha_background : 1; - guint destroyed : 2; - guint accept_focus : 1; - guint focus_on_map : 1; - guint shaped : 1; - guint support_multidevice : 1; - guint effective_visibility : 2; - guint visibility : 2; - guint native_visibility : 2; - guint viewable : 1; - guint applied_shape : 1; - guint in_update : 1; - guint geometry_dirty : 1; - guint event_compression : 1; - guint frame_clock_events_paused : 1; - GdkWindow *impl_window; - guint update_and_descendants_freeze_count; - gint abs_x; - gint abs_y; - gint width; - gint height; - gint shadow_top; - gint shadow_left; - gint shadow_right; - gint shadow_bottom; - guint num_offscreen_children; - cairo_region_t *clip_region; - GdkCursor *cursor; - GHashTable *device_cursor; - cairo_region_t *shape; - cairo_region_t *input_shape; - GList *devices_inside; - GHashTable *device_events; - GHashTable *source_event_masks; - gulong device_added_handler_id; - gulong device_changed_handler_id; - GdkFrameClock *frame_clock; - GdkWindowInvalidateHandlerFunc invalidate_handler; - GdkDrawingContext *drawing_context; - cairo_region_t *opaque_region; -}; - -// For internal use only -int gdk_window_priv_get_version_id() { - static int version_id = -1; - - if (version_id == -1) { - gtk_priv_assert_gtk_version_valid(); - int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); - - switch (combo) { - case 22000: - case 22001: - case 22002: - case 22003: - case 22004: - case 22005: - case 22006: - case 22007: - case 22008: - case 22009: - case 22010: - case 22011: - case 22012: - case 22013: - case 22014: - case 22015: - case 22016: - case 22017: - case 22018: - case 22019: - case 22020: - case 22021: - case 22022: - case 22023: - case 22024: - case 22025: - case 22026: - case 22027: - case 22028: - case 22029: - case 22030: - case 23000: - case 23001: - case 23002: - case 23003: - case 24000: - case 24001: - case 24002: - case 24003: - case 24004: - case 24005: - case 24006: - case 24007: - case 24008: - case 24009: - case 24010: - case 24011: - case 24012: - case 24013: - case 24014: - case 24015: - case 24016: - case 24017: - case 24018: - case 24020: - case 24021: - case 24022: - case 24023: - case 24024: - case 24025: - case 24026: - case 24027: - case 24028: - case 24029: - case 24030: - case 24031: - case 24032: - case 24033: - case 24034: - break; - - default: - gtk_priv_warn_gtk_version_may_be_unsupported(); - } - - if (combo >= 24011) { - version_id = 2; - } else if (combo >= 22019) { - version_id = 1; - } else { - version_id = 0; - } - } - - return version_id; -} - -// GdkWindow::parent_instance - -GObject * gdk_window_priv_get_parent_instance_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (GObject *)&((struct _GdkWindow_v3_22_0*)self)->parent_instance; - case 1: return (GObject *)&((struct _GdkWindow_v3_22_19*)self)->parent_instance; - case 2: return (GObject *)&((struct _GdkWindow_v3_24_11*)self)->parent_instance; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::impl - -GdkWindowImpl * gdk_window_priv_get_impl(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->impl; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->impl; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->impl; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_impl(GdkWindow * self, GdkWindowImpl * impl) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->impl = impl; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->impl = impl; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->impl = impl; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::parent - -GdkWindow * gdk_window_priv_get_parent(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->parent; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->parent; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->parent; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_parent(GdkWindow * self, GdkWindow * parent) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->parent = parent; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->parent = parent; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->parent = parent; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::transient_for - -GdkWindow * gdk_window_priv_get_transient_for(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->transient_for; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->transient_for; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->transient_for; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_transient_for(GdkWindow * self, GdkWindow * transient_for) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->transient_for = transient_for; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->transient_for = transient_for; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->transient_for = transient_for; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::visual - -GdkVisual * gdk_window_priv_get_visual(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->visual; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->visual; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->visual; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_visual(GdkWindow * self, GdkVisual * visual) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->visual = visual; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->visual = visual; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->visual = visual; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::user_data - -gpointer gdk_window_priv_get_user_data(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->user_data; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->user_data; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->user_data; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_user_data(GdkWindow * self, gpointer user_data) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->user_data = user_data; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->user_data = user_data; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->user_data = user_data; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::x - -gint gdk_window_priv_get_x(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->x; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->x; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_x(GdkWindow * self, gint x) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->x = x; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->x = x; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->x = x; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::y - -gint gdk_window_priv_get_y(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->y; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->y; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_y(GdkWindow * self, gint y) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->y = y; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->y = y; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->y = y; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::event_mask - -GdkEventMask * gdk_window_priv_get_event_mask_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (GdkEventMask *)&((struct _GdkWindow_v3_22_0*)self)->event_mask; - case 1: return (GdkEventMask *)&((struct _GdkWindow_v3_22_19*)self)->event_mask; - case 2: return (GdkEventMask *)&((struct _GdkWindow_v3_24_11*)self)->event_mask; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::window_type - -guint8 * gdk_window_priv_get_window_type_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (guint8 *)&((struct _GdkWindow_v3_22_0*)self)->window_type; - case 1: return (guint8 *)&((struct _GdkWindow_v3_22_19*)self)->window_type; - case 2: return (guint8 *)&((struct _GdkWindow_v3_24_11*)self)->window_type; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::depth - -guint8 * gdk_window_priv_get_depth_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (guint8 *)&((struct _GdkWindow_v3_22_0*)self)->depth; - case 1: return (guint8 *)&((struct _GdkWindow_v3_22_19*)self)->depth; - case 2: return (guint8 *)&((struct _GdkWindow_v3_24_11*)self)->depth; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::resize_count - -guint8 * gdk_window_priv_get_resize_count_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (guint8 *)&((struct _GdkWindow_v3_22_0*)self)->resize_count; - case 1: return (guint8 *)&((struct _GdkWindow_v3_22_19*)self)->resize_count; - case 2: return (guint8 *)&((struct _GdkWindow_v3_24_11*)self)->resize_count; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::toplevel_window_type - -gint8 * gdk_window_priv_get_toplevel_window_type_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (gint8 *)&((struct _GdkWindow_v3_22_0*)self)->toplevel_window_type; - case 1: return (gint8 *)&((struct _GdkWindow_v3_22_19*)self)->toplevel_window_type; - case 2: return (gint8 *)&((struct _GdkWindow_v3_24_11*)self)->toplevel_window_type; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::filters - -GList * gdk_window_priv_get_filters(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->filters; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->filters; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->filters; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_filters(GdkWindow * self, GList * filters) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->filters = filters; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->filters = filters; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->filters = filters; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::children - -GList * gdk_window_priv_get_children(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->children; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->children; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->children; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_children(GdkWindow * self, GList * children) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->children = children; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->children = children; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->children = children; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::children_list_node - -GList * gdk_window_priv_get_children_list_node_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (GList *)&((struct _GdkWindow_v3_22_0*)self)->children_list_node; - case 1: return (GList *)&((struct _GdkWindow_v3_22_19*)self)->children_list_node; - case 2: return (GList *)&((struct _GdkWindow_v3_24_11*)self)->children_list_node; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::native_children - -GList * gdk_window_priv_get_native_children(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->native_children; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->native_children; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->native_children; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_native_children(GdkWindow * self, GList * native_children) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->native_children = native_children; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->native_children = native_children; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->native_children = native_children; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::background - -cairo_pattern_t * gdk_window_priv_get_background(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->background; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->background; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->background; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_background(GdkWindow * self, cairo_pattern_t * background) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->background = background; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->background = background; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->background = background; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::current_paint.surface - -cairo_surface_t * gdk_window_priv_get_current_paint_surface(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->current_paint.surface; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->current_paint.surface; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->current_paint.surface; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_current_paint_surface(GdkWindow * self, cairo_surface_t * current_paint_surface) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->current_paint.surface = current_paint_surface; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->current_paint.surface = current_paint_surface; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->current_paint.surface = current_paint_surface; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::current_paint.region - -cairo_region_t * gdk_window_priv_get_current_paint_region(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->current_paint.region; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->current_paint.region; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->current_paint.region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_current_paint_region(GdkWindow * self, cairo_region_t * current_paint_region) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->current_paint.region = current_paint_region; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->current_paint.region = current_paint_region; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->current_paint.region = current_paint_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::current_paint.flushed_region - -cairo_region_t * gdk_window_priv_get_current_paint_flushed_region(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->current_paint.flushed_region; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->current_paint.flushed_region; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->current_paint.flushed_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_current_paint_flushed_region(GdkWindow * self, cairo_region_t * current_paint_flushed_region) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->current_paint.flushed_region = current_paint_flushed_region; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->current_paint.flushed_region = current_paint_flushed_region; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->current_paint.flushed_region = current_paint_flushed_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::current_paint.need_blend_region - -cairo_region_t * gdk_window_priv_get_current_paint_need_blend_region(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->current_paint.need_blend_region; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->current_paint.need_blend_region; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->current_paint.need_blend_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_current_paint_need_blend_region(GdkWindow * self, cairo_region_t * current_paint_need_blend_region) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->current_paint.need_blend_region = current_paint_need_blend_region; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->current_paint.need_blend_region = current_paint_need_blend_region; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->current_paint.need_blend_region = current_paint_need_blend_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::current_paint.surface_needs_composite - -gboolean gdk_window_priv_get_current_paint_surface_needs_composite(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->current_paint.surface_needs_composite; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->current_paint.surface_needs_composite; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->current_paint.surface_needs_composite; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_current_paint_surface_needs_composite(GdkWindow * self, gboolean current_paint_surface_needs_composite) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->current_paint.surface_needs_composite = current_paint_surface_needs_composite; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->current_paint.surface_needs_composite = current_paint_surface_needs_composite; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->current_paint.surface_needs_composite = current_paint_surface_needs_composite; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::current_paint.use_gl - -gboolean gdk_window_priv_get_current_paint_use_gl(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->current_paint.use_gl; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->current_paint.use_gl; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->current_paint.use_gl; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_current_paint_use_gl(GdkWindow * self, gboolean current_paint_use_gl) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->current_paint.use_gl = current_paint_use_gl; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->current_paint.use_gl = current_paint_use_gl; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->current_paint.use_gl = current_paint_use_gl; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::gl_paint_context - -GdkGLContext * gdk_window_priv_get_gl_paint_context(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->gl_paint_context; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->gl_paint_context; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->gl_paint_context; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_gl_paint_context(GdkWindow * self, GdkGLContext * gl_paint_context) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->gl_paint_context = gl_paint_context; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->gl_paint_context = gl_paint_context; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->gl_paint_context = gl_paint_context; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::update_area - -cairo_region_t * gdk_window_priv_get_update_area(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->update_area; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->update_area; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->update_area; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_update_area(GdkWindow * self, cairo_region_t * update_area) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->update_area = update_area; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->update_area = update_area; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->update_area = update_area; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::update_freeze_count - -guint gdk_window_priv_get_update_freeze_count(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->update_freeze_count; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->update_freeze_count; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->update_freeze_count; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_update_freeze_count(GdkWindow * self, guint update_freeze_count) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->update_freeze_count = update_freeze_count; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->update_freeze_count = update_freeze_count; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->update_freeze_count = update_freeze_count; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::active_update_area - -cairo_region_t * gdk_window_priv_get_active_update_area(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->active_update_area; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->active_update_area; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->active_update_area; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_active_update_area(GdkWindow * self, cairo_region_t * active_update_area) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->active_update_area = active_update_area; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->active_update_area = active_update_area; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->active_update_area = active_update_area; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::old_updated_area - -cairo_region_t ** * gdk_window_priv_get_old_updated_area_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (cairo_region_t ** *)&((struct _GdkWindow_v3_22_0*)self)->old_updated_area; - case 1: return (cairo_region_t ** *)&((struct _GdkWindow_v3_22_19*)self)->old_updated_area; - case 2: return (cairo_region_t ** *)&((struct _GdkWindow_v3_24_11*)self)->old_updated_area; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::old_state - -GdkWindowState * gdk_window_priv_get_old_state_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (GdkWindowState *)&((struct _GdkWindow_v3_22_0*)self)->old_state; - case 1: return (GdkWindowState *)&((struct _GdkWindow_v3_22_19*)self)->old_state; - case 2: return (GdkWindowState *)&((struct _GdkWindow_v3_24_11*)self)->old_state; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::state - -GdkWindowState * gdk_window_priv_get_state_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (GdkWindowState *)&((struct _GdkWindow_v3_22_0*)self)->state; - case 1: return (GdkWindowState *)&((struct _GdkWindow_v3_22_19*)self)->state; - case 2: return (GdkWindowState *)&((struct _GdkWindow_v3_24_11*)self)->state; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::alpha - -guint8 * gdk_window_priv_get_alpha_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (guint8 *)&((struct _GdkWindow_v3_22_0*)self)->alpha; - case 1: return (guint8 *)&((struct _GdkWindow_v3_22_19*)self)->alpha; - case 2: return (guint8 *)&((struct _GdkWindow_v3_24_11*)self)->alpha; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::fullscreen_mode - -guint8 * gdk_window_priv_get_fullscreen_mode_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (guint8 *)&((struct _GdkWindow_v3_22_0*)self)->fullscreen_mode; - case 1: return (guint8 *)&((struct _GdkWindow_v3_22_19*)self)->fullscreen_mode; - case 2: return (guint8 *)&((struct _GdkWindow_v3_24_11*)self)->fullscreen_mode; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::input_only - -guint gdk_window_priv_get_input_only(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->input_only; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->input_only; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->input_only; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_input_only(GdkWindow * self, guint input_only) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->input_only = input_only; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->input_only = input_only; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->input_only = input_only; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::pass_through - -guint gdk_window_priv_get_pass_through(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->pass_through; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->pass_through; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->pass_through; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_pass_through(GdkWindow * self, guint pass_through) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->pass_through = pass_through; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->pass_through = pass_through; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->pass_through = pass_through; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::modal_hint - -guint gdk_window_priv_get_modal_hint(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->modal_hint; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->modal_hint; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->modal_hint; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_modal_hint(GdkWindow * self, guint modal_hint) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->modal_hint = modal_hint; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->modal_hint = modal_hint; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->modal_hint = modal_hint; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::composited - -guint gdk_window_priv_get_composited(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->composited; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->composited; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->composited; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_composited(GdkWindow * self, guint composited) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->composited = composited; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->composited = composited; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->composited = composited; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::has_alpha_background - -guint gdk_window_priv_get_has_alpha_background(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->has_alpha_background; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->has_alpha_background; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->has_alpha_background; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_has_alpha_background(GdkWindow * self, guint has_alpha_background) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->has_alpha_background = has_alpha_background; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->has_alpha_background = has_alpha_background; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->has_alpha_background = has_alpha_background; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::destroyed - -guint gdk_window_priv_get_destroyed(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->destroyed; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->destroyed; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->destroyed; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_destroyed(GdkWindow * self, guint destroyed) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->destroyed = destroyed; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->destroyed = destroyed; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->destroyed = destroyed; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::accept_focus - -guint gdk_window_priv_get_accept_focus(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->accept_focus; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->accept_focus; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->accept_focus; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_accept_focus(GdkWindow * self, guint accept_focus) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->accept_focus = accept_focus; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->accept_focus = accept_focus; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->accept_focus = accept_focus; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::focus_on_map - -guint gdk_window_priv_get_focus_on_map(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->focus_on_map; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->focus_on_map; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->focus_on_map; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_focus_on_map(GdkWindow * self, guint focus_on_map) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->focus_on_map = focus_on_map; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->focus_on_map = focus_on_map; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->focus_on_map = focus_on_map; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::shaped - -guint gdk_window_priv_get_shaped(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->shaped; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->shaped; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->shaped; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_shaped(GdkWindow * self, guint shaped) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->shaped = shaped; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->shaped = shaped; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->shaped = shaped; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::support_multidevice - -guint gdk_window_priv_get_support_multidevice(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->support_multidevice; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->support_multidevice; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->support_multidevice; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_support_multidevice(GdkWindow * self, guint support_multidevice) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->support_multidevice = support_multidevice; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->support_multidevice = support_multidevice; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->support_multidevice = support_multidevice; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::synthesize_crossing_event_queued - -gboolean gdk_window_priv_get_synthesize_crossing_event_queued_supported() { - switch (gdk_window_priv_get_version_id()) { - case 0: return TRUE; - case 1: return TRUE; - case 2: return FALSE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -guint gdk_window_priv_get_synthesize_crossing_event_queued_or_abort(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->synthesize_crossing_event_queued; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->synthesize_crossing_event_queued; - case 2: g_error("GdkWindow::synthesize_crossing_event_queued not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_synthesize_crossing_event_queued_or_abort(GdkWindow * self, guint synthesize_crossing_event_queued) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->synthesize_crossing_event_queued = synthesize_crossing_event_queued; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->synthesize_crossing_event_queued = synthesize_crossing_event_queued; break; - case 2: g_error("GdkWindow::synthesize_crossing_event_queued not supported on this GTK"); g_abort(); - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::effective_visibility - -guint gdk_window_priv_get_effective_visibility(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->effective_visibility; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->effective_visibility; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->effective_visibility; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_effective_visibility(GdkWindow * self, guint effective_visibility) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->effective_visibility = effective_visibility; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->effective_visibility = effective_visibility; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->effective_visibility = effective_visibility; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::visibility - -guint gdk_window_priv_get_visibility(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->visibility; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->visibility; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->visibility; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_visibility(GdkWindow * self, guint visibility) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->visibility = visibility; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->visibility = visibility; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->visibility = visibility; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::native_visibility - -guint gdk_window_priv_get_native_visibility(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->native_visibility; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->native_visibility; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->native_visibility; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_native_visibility(GdkWindow * self, guint native_visibility) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->native_visibility = native_visibility; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->native_visibility = native_visibility; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->native_visibility = native_visibility; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::viewable - -guint gdk_window_priv_get_viewable(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->viewable; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->viewable; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->viewable; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_viewable(GdkWindow * self, guint viewable) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->viewable = viewable; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->viewable = viewable; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->viewable = viewable; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::applied_shape - -guint gdk_window_priv_get_applied_shape(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->applied_shape; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->applied_shape; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->applied_shape; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_applied_shape(GdkWindow * self, guint applied_shape) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->applied_shape = applied_shape; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->applied_shape = applied_shape; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->applied_shape = applied_shape; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::in_update - -guint gdk_window_priv_get_in_update(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->in_update; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->in_update; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->in_update; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_in_update(GdkWindow * self, guint in_update) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->in_update = in_update; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->in_update = in_update; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->in_update = in_update; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::geometry_dirty - -guint gdk_window_priv_get_geometry_dirty(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->geometry_dirty; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->geometry_dirty; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->geometry_dirty; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_geometry_dirty(GdkWindow * self, guint geometry_dirty) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->geometry_dirty = geometry_dirty; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->geometry_dirty = geometry_dirty; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->geometry_dirty = geometry_dirty; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::event_compression - -guint gdk_window_priv_get_event_compression(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->event_compression; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->event_compression; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->event_compression; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_event_compression(GdkWindow * self, guint event_compression) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->event_compression = event_compression; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->event_compression = event_compression; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->event_compression = event_compression; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::frame_clock_events_paused - -guint gdk_window_priv_get_frame_clock_events_paused(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->frame_clock_events_paused; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->frame_clock_events_paused; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->frame_clock_events_paused; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_frame_clock_events_paused(GdkWindow * self, guint frame_clock_events_paused) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->frame_clock_events_paused = frame_clock_events_paused; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->frame_clock_events_paused = frame_clock_events_paused; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->frame_clock_events_paused = frame_clock_events_paused; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::impl_window - -GdkWindow * gdk_window_priv_get_impl_window(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->impl_window; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->impl_window; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->impl_window; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_impl_window(GdkWindow * self, GdkWindow * impl_window) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->impl_window = impl_window; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->impl_window = impl_window; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->impl_window = impl_window; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::update_and_descendants_freeze_count - -guint gdk_window_priv_get_update_and_descendants_freeze_count(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->update_and_descendants_freeze_count; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->update_and_descendants_freeze_count; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->update_and_descendants_freeze_count; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_update_and_descendants_freeze_count(GdkWindow * self, guint update_and_descendants_freeze_count) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->update_and_descendants_freeze_count = update_and_descendants_freeze_count; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->update_and_descendants_freeze_count = update_and_descendants_freeze_count; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->update_and_descendants_freeze_count = update_and_descendants_freeze_count; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::abs_x - -gint gdk_window_priv_get_abs_x(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->abs_x; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->abs_x; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->abs_x; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_abs_x(GdkWindow * self, gint abs_x) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->abs_x = abs_x; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->abs_x = abs_x; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->abs_x = abs_x; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::abs_y - -gint gdk_window_priv_get_abs_y(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->abs_y; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->abs_y; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->abs_y; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_abs_y(GdkWindow * self, gint abs_y) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->abs_y = abs_y; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->abs_y = abs_y; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->abs_y = abs_y; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::width - -gint gdk_window_priv_get_width(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->width; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->width; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->width; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_width(GdkWindow * self, gint width) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->width = width; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->width = width; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->width = width; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::height - -gint gdk_window_priv_get_height(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->height; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->height; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->height; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_height(GdkWindow * self, gint height) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->height = height; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->height = height; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->height = height; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::shadow_top - -gint gdk_window_priv_get_shadow_top(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->shadow_top; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->shadow_top; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->shadow_top; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_shadow_top(GdkWindow * self, gint shadow_top) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->shadow_top = shadow_top; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->shadow_top = shadow_top; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->shadow_top = shadow_top; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::shadow_left - -gint gdk_window_priv_get_shadow_left(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->shadow_left; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->shadow_left; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->shadow_left; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_shadow_left(GdkWindow * self, gint shadow_left) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->shadow_left = shadow_left; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->shadow_left = shadow_left; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->shadow_left = shadow_left; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::shadow_right - -gint gdk_window_priv_get_shadow_right(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->shadow_right; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->shadow_right; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->shadow_right; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_shadow_right(GdkWindow * self, gint shadow_right) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->shadow_right = shadow_right; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->shadow_right = shadow_right; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->shadow_right = shadow_right; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::shadow_bottom - -gint gdk_window_priv_get_shadow_bottom(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->shadow_bottom; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->shadow_bottom; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->shadow_bottom; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_shadow_bottom(GdkWindow * self, gint shadow_bottom) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->shadow_bottom = shadow_bottom; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->shadow_bottom = shadow_bottom; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->shadow_bottom = shadow_bottom; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::num_offscreen_children - -guint gdk_window_priv_get_num_offscreen_children(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->num_offscreen_children; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->num_offscreen_children; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->num_offscreen_children; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_num_offscreen_children(GdkWindow * self, guint num_offscreen_children) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->num_offscreen_children = num_offscreen_children; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->num_offscreen_children = num_offscreen_children; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->num_offscreen_children = num_offscreen_children; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::clip_region - -cairo_region_t * gdk_window_priv_get_clip_region(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->clip_region; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->clip_region; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->clip_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_clip_region(GdkWindow * self, cairo_region_t * clip_region) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->clip_region = clip_region; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->clip_region = clip_region; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->clip_region = clip_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::cursor - -GdkCursor * gdk_window_priv_get_cursor(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->cursor; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->cursor; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->cursor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_cursor(GdkWindow * self, GdkCursor * cursor) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->cursor = cursor; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->cursor = cursor; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->cursor = cursor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::device_cursor - -GHashTable * gdk_window_priv_get_device_cursor(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->device_cursor; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->device_cursor; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->device_cursor; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_device_cursor(GdkWindow * self, GHashTable * device_cursor) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->device_cursor = device_cursor; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->device_cursor = device_cursor; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->device_cursor = device_cursor; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::shape - -cairo_region_t * gdk_window_priv_get_shape(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->shape; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->shape; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->shape; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_shape(GdkWindow * self, cairo_region_t * shape) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->shape = shape; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->shape = shape; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->shape = shape; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::input_shape - -cairo_region_t * gdk_window_priv_get_input_shape(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->input_shape; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->input_shape; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->input_shape; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_input_shape(GdkWindow * self, cairo_region_t * input_shape) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->input_shape = input_shape; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->input_shape = input_shape; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->input_shape = input_shape; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::devices_inside - -GList * gdk_window_priv_get_devices_inside(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->devices_inside; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->devices_inside; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->devices_inside; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_devices_inside(GdkWindow * self, GList * devices_inside) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->devices_inside = devices_inside; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->devices_inside = devices_inside; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->devices_inside = devices_inside; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::device_events - -GHashTable * gdk_window_priv_get_device_events(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->device_events; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->device_events; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->device_events; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_device_events(GdkWindow * self, GHashTable * device_events) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->device_events = device_events; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->device_events = device_events; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->device_events = device_events; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::source_event_masks - -GHashTable * gdk_window_priv_get_source_event_masks(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->source_event_masks; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->source_event_masks; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->source_event_masks; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_source_event_masks(GdkWindow * self, GHashTable * source_event_masks) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->source_event_masks = source_event_masks; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->source_event_masks = source_event_masks; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->source_event_masks = source_event_masks; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::device_added_handler_id - -gulong * gdk_window_priv_get_device_added_handler_id_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (gulong *)&((struct _GdkWindow_v3_22_0*)self)->device_added_handler_id; - case 1: return (gulong *)&((struct _GdkWindow_v3_22_19*)self)->device_added_handler_id; - case 2: return (gulong *)&((struct _GdkWindow_v3_24_11*)self)->device_added_handler_id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::device_changed_handler_id - -gulong * gdk_window_priv_get_device_changed_handler_id_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (gulong *)&((struct _GdkWindow_v3_22_0*)self)->device_changed_handler_id; - case 1: return (gulong *)&((struct _GdkWindow_v3_22_19*)self)->device_changed_handler_id; - case 2: return (gulong *)&((struct _GdkWindow_v3_24_11*)self)->device_changed_handler_id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::frame_clock - -GdkFrameClock * gdk_window_priv_get_frame_clock(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->frame_clock; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->frame_clock; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->frame_clock; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_frame_clock(GdkWindow * self, GdkFrameClock * frame_clock) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->frame_clock = frame_clock; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->frame_clock = frame_clock; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->frame_clock = frame_clock; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::invalidate_handler - -GdkWindowInvalidateHandlerFunc * gdk_window_priv_get_invalidate_handler_ptr(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return (GdkWindowInvalidateHandlerFunc *)&((struct _GdkWindow_v3_22_0*)self)->invalidate_handler; - case 1: return (GdkWindowInvalidateHandlerFunc *)&((struct _GdkWindow_v3_22_19*)self)->invalidate_handler; - case 2: return (GdkWindowInvalidateHandlerFunc *)&((struct _GdkWindow_v3_24_11*)self)->invalidate_handler; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::drawing_context - -GdkDrawingContext * gdk_window_priv_get_drawing_context(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: return ((struct _GdkWindow_v3_22_0*)self)->drawing_context; - case 1: return ((struct _GdkWindow_v3_22_19*)self)->drawing_context; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->drawing_context; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_drawing_context(GdkWindow * self, GdkDrawingContext * drawing_context) { - switch (gdk_window_priv_get_version_id()) { - case 0: ((struct _GdkWindow_v3_22_0*)self)->drawing_context = drawing_context; break; - case 1: ((struct _GdkWindow_v3_22_19*)self)->drawing_context = drawing_context; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->drawing_context = drawing_context; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::opaque_region - -gboolean gdk_window_priv_get_opaque_region_supported() { - switch (gdk_window_priv_get_version_id()) { - case 0: return FALSE; - case 1: return TRUE; - case 2: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -cairo_region_t * gdk_window_priv_get_opaque_region_or_abort(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: g_error("GdkWindow::opaque_region not supported on this GTK"); g_abort(); - case 1: return ((struct _GdkWindow_v3_22_19*)self)->opaque_region; - case 2: return ((struct _GdkWindow_v3_24_11*)self)->opaque_region; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_opaque_region_or_abort(GdkWindow * self, cairo_region_t * opaque_region) { - switch (gdk_window_priv_get_version_id()) { - case 0: g_error("GdkWindow::opaque_region not supported on this GTK"); g_abort(); - case 1: ((struct _GdkWindow_v3_22_19*)self)->opaque_region = opaque_region; break; - case 2: ((struct _GdkWindow_v3_24_11*)self)->opaque_region = opaque_region; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -// GdkWindow::synthesized_crossing_event_id - -gboolean gdk_window_priv_get_synthesized_crossing_event_id_supported() { - switch (gdk_window_priv_get_version_id()) { - case 0: return FALSE; - case 1: return FALSE; - case 2: return TRUE; - default: g_error("Invalid version ID"); g_abort(); - } -} - -guint gdk_window_priv_get_synthesized_crossing_event_id_or_abort(GdkWindow * self) { - switch (gdk_window_priv_get_version_id()) { - case 0: g_error("GdkWindow::synthesized_crossing_event_id not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindow::synthesized_crossing_event_id not supported on this GTK"); g_abort(); - case 2: return ((struct _GdkWindow_v3_24_11*)self)->synthesized_crossing_event_id; - default: g_error("Invalid version ID"); g_abort(); - } -} - -void gdk_window_priv_set_synthesized_crossing_event_id_or_abort(GdkWindow * self, guint synthesized_crossing_event_id) { - switch (gdk_window_priv_get_version_id()) { - case 0: g_error("GdkWindow::synthesized_crossing_event_id not supported on this GTK"); g_abort(); - case 1: g_error("GdkWindow::synthesized_crossing_event_id not supported on this GTK"); g_abort(); - case 2: ((struct _GdkWindow_v3_24_11*)self)->synthesized_crossing_event_id = synthesized_crossing_event_id; break; - default: g_error("Invalid version ID"); g_abort(); - } -} - -#endif // GDK_WINDOW_PRIV_H diff --git a/gtk-priv/meson.build b/gtk-priv/meson.build deleted file mode 100644 index fa4849e..0000000 --- a/gtk-priv/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -gtk_priv = declare_dependency( - include_directories: include_directories('h')) diff --git a/gtk-priv/scripts/ast.py b/gtk-priv/scripts/ast.py deleted file mode 100644 index f943902..0000000 --- a/gtk-priv/scripts/ast.py +++ /dev/null @@ -1,257 +0,0 @@ -''' -MIT License - -Copyright 2020 Sophie Winter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import logging -import re - -from version import Version -import code - -logger = logging.getLogger(__name__) - -def remove_comments(code): - return re.sub(r'(/\*.*?\*/|//.*?\n)', '', code, flags=re.DOTALL) - -# These can be combined in any order, we do not check that it is valid -std_types = set([ - 'void', - 'int', - 'char', - 'signed', - 'unsigned', - 'short', - 'long', - 'float', - 'double', - 'uint32_t', - 'gint', - 'guint', - 'gchar', - 'gboolean', - 'gpointer', -]) - -def is_std_type(name): - for i in name.split(): - if not i in std_types: - return False - return True - -class CType: - def __str__(self): - return self.str_left(False) + self.str_right(False) - - def str_right(self, resolved): - return '' - - def __eq__(self, other): - return str(self) == str(other) - -class StdType(CType): - def __init__(self, name): - assert isinstance(name, str) - assert is_std_type(name), name - self.name = name - - def resolve(self, ctx): - pass - - def str_left(self, resolved): - return self.name - -class CustomType(CType): - def __init__(self, name): - assert isinstance(name, str) - self.explicit_struct = False - if name.startswith('struct'): - name = name[6:].strip() - self.explicit_struct = True - self.explicit_enum = False - if name.startswith('enum'): - name = name[4:].strip() - self.explicit_enum = True - self.name = name - self.version = None - self.resolved_struct = None - - def resolve(self, ctx): - if self.explicit_enum: - struct = None - elif self.explicit_struct: - struct = ctx.project.lookup_struct_name(self.name) - else: - struct = ctx.project.lookup_typedef(self.name) - - if struct: - self.resolved_struct = struct - self.version = ctx.version - - def str_left(self, resolved): - if self.resolved_struct and resolved: - v = self.resolved_struct.lookup_version(self.version) - return 'struct ' + v.versioned_struct_name() - else: - result = '' - if self.explicit_struct: - result += 'struct ' - if self.explicit_enum: - result += 'enum ' - result += self.name - return result - -class PtrType(CType): - def __init__(self, inner): - assert isinstance(inner, CType) - self.inner = inner - - def resolve(self, ctx): - self.inner.resolve(ctx) - - def str_left(self, resolved): - result = self.inner.str_left(False) - if not isinstance(self.inner, PtrType): - result += ' ' - result += '*' - return result - - def str_right(self, resolved): - return self.inner.str_right(False) - -class ConstType(CType): - def __init__(self, inner): - assert isinstance(inner, CType) - self.inner = inner - - def resolve(self, ctx): - self.inner.resolve(ctx) - - def str_left(self, resolved): - return 'const ' + self.inner.str_left(resolved) - - def str_right(self, resolved): - return self.inner.str_right(resolved) - -# Note the first (and usually only) layer of "pointer" is consumed by this type -# Do not wrap in a PtrType in most cases -class FpType(CType): - def __init__(self, return_type, arg_list): - assert isinstance(return_type, CType) - assert isinstance(arg_list, list) - for i in arg_list: - assert isinstance(i, PropertyNode), str(i) + ' is not a property node' - self.return_type = return_type - self.arg_list = arg_list - - def resolve(self, ctx): - self.return_type.resolve(ctx) - for arg in self.arg_list: - arg.resolve(ctx) - - def str_left(self, resolved): - return str(self.return_type) + ' (*' - - def str_right(self, resolved): - return ') (' + str(', '.join([str(t) for t in self.arg_list])) + ')' - -class ArrayType(CType): - def __init__(self, inner, size): - assert isinstance(inner, CType) - assert isinstance(size, str) - self.inner = inner - self.size = size - - def resolve(self, ctx): - self.inner.resolve(ctx) - - def str_left(self, resolved): - if resolved: - return self.inner.str_left(True) - else: - return self.inner.str_left(False) + '*' - - def str_right(self, resolved): - if resolved: - return '[' + self.size + ']' + self.inner.str_right(True) - else: - return self.inner.str_right(False) - -class AstNode: - def __eq__(self, other): - return str(self) == str(other) - -class PropertyNode(AstNode): - def __init__(self, c_type, name, bit_field): - assert isinstance(c_type, CType) - assert name is None or isinstance(name, str) - assert bit_field is None or isinstance(bit_field, int) - self.c_type = c_type - self.name = name - self.statement = False - self.bit_field = bit_field - - def resolve(self, ctx): - self.c_type.resolve(ctx) - - def get_property_list(self, prefix): - return [(self.c_type, prefix + self.name)] - - def __str__(self): - result = self.c_type.str_left(True) - if self.name: - if not isinstance(self.c_type, PtrType): - result += ' ' - result += self.name - result += self.c_type.str_right(True) - if self.bit_field: - result += ' : ' + str(self.bit_field) - if self.statement: - result += ';\n' - return result - -class ListNode(AstNode): - def __init__(self, nodes): - assert isinstance(nodes, list) - for node in nodes: - assert isinstance(node, AstNode) - self.nodes = nodes - - def resolve(self, ctx): - for node in self.nodes: - node.resolve(ctx) - - def get_property_list(self, prefix): - result = [] - for node in self.nodes: - result += node.get_property_list(prefix) - return result - - def __str__(self): - return ''.join(str(node) for node in self.nodes) - -class SubStructNode(AstNode): - def __init__(self, name, content): - assert isinstance(name, str) - assert isinstance(content, AstNode) - self.name = name - self.content = content - - def resolve(self, ctx): - self.content.resolve(ctx) - - def get_property_list(self, prefix): - return self.content.get_property_list(prefix + self.name + '.') - - def __str__(self): - return ( - 'struct {' + - ('\n' + code.INDENT).join([''] + str(self.content).splitlines()) + - '\n} ' + self.name + ';\n') diff --git a/gtk-priv/scripts/build.py b/gtk-priv/scripts/build.py deleted file mode 100755 index cab8895..0000000 --- a/gtk-priv/scripts/build.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/python3 - -''' -MIT License - -Copyright 2020 Sophie Winter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import logging -from os import path -import os -import sys - -from version import parse_tags_and_branches -from repo import Repo -from code import Project -from config import STRUCT_LIST - -def get_project_root(): - return path.dirname(path.dirname(path.realpath(__file__))) - -GTK_GIT_URL = 'https://gitlab.gnome.org/GNOME/gtk.git' -BUILD_DIR = path.join(get_project_root(), 'build') -OUTPUT_DIR = path.join(get_project_root(), 'h') -REPO_DIR = path.join(BUILD_DIR, 'gtk') - -logger = logging.getLogger('build.py') -logging.basicConfig(level=logging.DEBUG) - -def build(): - if not path.exists(BUILD_DIR): - logger.info('Creating directory ' + BUILD_DIR) - os.makedirs(BUILD_DIR) - repo = Repo(GTK_GIT_URL, REPO_DIR) - tags = repo.get_tags() - branches = repo.get_branches() - versions = parse_tags_and_branches(tags, branches) - project = Project(REPO_DIR, STRUCT_LIST) - for i, v in enumerate(versions): - percent = int(((i + 1) / len(versions)) * 1000) / 10 - logger.info('[' + str(percent) + '%] Checking out ' + v.get_checkout_name()) - repo.checkout(v.get_checkout_name()) - project.update(v) - project.simplify() - project.write(OUTPUT_DIR) - -if __name__ == '__main__': - build() diff --git a/gtk-priv/scripts/code.py b/gtk-priv/scripts/code.py deleted file mode 100644 index 4286cb5..0000000 --- a/gtk-priv/scripts/code.py +++ /dev/null @@ -1,506 +0,0 @@ -''' -MIT License - -Copyright 2020 Sophie Winter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import logging -from datetime import datetime -import os -from os import path -import re -import mmap -from collections import OrderedDict -import tempfile -import subprocess - -import parse -from ast import * -from version import COMBO_FACTOR, Version - -logger = logging.getLogger(__name__) - -INDENT = ' ' # used for generating code -PROJECT_NAME = 'gtk-layer-shell' - -LGPL3_HEADER = ''' -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program; if not, write to the Free Software Foundation, -Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -''' - -CODE_EXTENSIONS = set(['.h', '.hpp', '.c', '.cpp', '.cc']) - -def typdef_to_struct_name(typedef): - return '_' + typedef - -def get_all_source_files(search_dir): - result = [] - for item in os.listdir(search_dir): - p = path.join(search_dir, item) - if path.isdir(p): - result += get_all_source_files(p) - elif path.splitext(p)[1] in CODE_EXTENSIONS: - result.append(p) - return result - -def remove_headers_from_dir(header_dir): - logger.info('Clearing header files out of ' + header_dir) - for item in os.listdir(header_dir): - p = path.join(header_dir, item) - if item != 'common.h' and path.splitext(p)[1] == '.h': - os.remove(p) - -def struct_regex_string(struct_name): - return r'struct\s+' + struct_name + r'\s*\{' - -def extract_body(file_content, struct_name): - halves = re.split(struct_regex_string(struct_name), file_content) - if len(halves) < 2: - raise RuntimeError(struct_name + ' not declared in ' + code_path + ' (even though it was detected)') - if len(halves) > 2: - raise RuntimeError(struct_name + ' declared multiple times in ' + code_path) - body = '' - brace_level = 1 - for c in halves[1]: - if c == '{': - brace_level += 1 - elif c == '}': - brace_level -= 1 - if brace_level <= 0: - break - body += c - return body - -def camel_case_to_words(name): - result = [] - word = '' - for l in name: - if l.isupper() and word: - result.append(word) - word = '' - word += l.lower() - if word: - result.append(word) - return result - -def c_function(return_type, name, arg_list, body): - result = '' - result += return_type.str_left(False) - result += ' ' + name + '(' - arg_strs = [c_type.str_left(False) + ' ' + name + c_type.str_right(False) for c_type, name in arg_list] - result += ', '.join(arg_strs) - result += ')' + return_type.str_right(False) + ' {\n' - for line in body.strip().splitlines(): - result += INDENT + line + '\n' - result += '}\n' - return result - -def write_tmp_file(text): - f = tempfile.NamedTemporaryFile(mode='w', delete=True) - f.write(text) - f.flush() - return f - -def diff_between(old, new): - old_f = write_tmp_file(old) - new_f = write_tmp_file(new) - result = subprocess.run(['diff', old_f.name, new_f.name], capture_output=True, text=True) - code = '' - for line in result.stdout.splitlines(): - if line.startswith('<'): - code += '// -' + line[1:] + '\n' - elif line.startswith('>'): - code += '// +' + line[1:] + '\n' - return code - -class ResolveContext: - def __init__(self, project, struct, version): - self.project = project - self.struct = struct - self.version = version - -class StructVersion: - def __init__(self, code_path, project, struct, version): - with open(code_path, 'r') as f: - source_code = f.read() - self.code_path = code_path - self.first_version = version - self.last_version = version - self.struct_name = struct.struct_name - self.copyright_lines = set(re.findall(r'[Cc]opyright .*(?=\n)', source_code)) - self.body = extract_body(source_code, self.struct_name) - self.ast = parse.parse_ast(self.body) - self.ast.resolve(ResolveContext(project, struct, version)) - - def get_code_path(self): - return self.code_path - - def get_property_list(self): - return self.ast.get_property_list('') - - def version_range_str(self): - if self.first_version == self.last_version: - return str(self.first_version) - else: - return str(self.first_version) + ' - ' + str(self.last_version) - - def emit_definition(self, generated): - result = '' - result += '// Valid for GTK ' + self.version_range_str() + '\n' - result += 'struct ' + str(self) + '\n{' - if generated: - result += ( - '\n' + INDENT + - ('\n' + INDENT).join(str(self.ast).splitlines()) + - '\n') - else: - result += self.body - result += '};\n' - return result - - def is_valid_for(self, version): - return version >= self.first_version and version <= self.last_version - - def versioned_struct_name(self): - return self.struct_name + '_' + self.first_version.c_id() - - def __str__(self): - return self.versioned_struct_name() - - def __eq__(self, other): - assert isinstance(other, StructVersion) - return self.ast == other.ast - -class Property: - def __init__(self, struct, c_type, name, version_ids): - assert isinstance(struct, Struct) - assert isinstance(c_type, CType) - assert isinstance(name, str) - assert isinstance(version_ids, list) - for i in version_ids: - assert isinstance(i, bool) # If this property is supported for each version ID - self.struct = struct - self.c_type = c_type - self.name = name - self.version_ids = version_ids - - def all_versions_supported(self): - for i in self.version_ids: - if not i: - return False - return True - - def get_id_name(self): - return self.name.replace('.', '_') - - def get_fn_name(self, action, suffix): - result = '' - result += '_'.join(camel_case_to_words(self.struct.typedef)) - result += '_priv_' - if action: - result += action + '_' - result += self.get_id_name() - if suffix: - result += '_' + suffix - return result - - def emit_version_id_switch(self, on_supported, on_unsupported): - result = '' - result += 'switch (' + self.struct.get_version_id_fn_name() + '()) {\n' - for i, supported in enumerate(self.version_ids): - result += INDENT + 'case ' + str(i) + ': ' - type_name = 'struct ' + self.struct.versions[i].versioned_struct_name() - if supported: - result += on_supported(type_name) - else: - result += on_unsupported(type_name) - result += '\n' - result += INDENT + 'default: g_error("Invalid version ID"); g_abort();\n' - result += '}' - return result - - def emit_ptr_getter(self): - ret_type = PtrType(self.c_type) - suffix = 'ptr' if self.all_versions_supported() else 'ptr_or_null' - fn_name = self.get_fn_name('get', suffix) - arg_list = [(self.struct.get_ptr_type(), 'self')] - body = self.emit_version_id_switch( - lambda type_name: 'return (' + str(ret_type) + ')&((' + type_name + '*)self)->' + self.name + ';', - lambda type_name: 'return NULL;') - return c_function(ret_type, fn_name, arg_list, body) - - def emit_is_supported(self): - ret_type = StdType('gboolean') - fn_name = self.get_fn_name('get', 'supported') - body = self.emit_version_id_switch( - lambda type_name: 'return TRUE;', - lambda type_name: 'return FALSE;') - return c_function(ret_type, fn_name, [], body) - - def emit_not_supported_error(self, type_name): - msg = '"' + self.struct.typedef + '::' + self.name + ' not supported on this GTK"' - return 'g_error(' + msg + '); g_abort();' - - def emit_getter(self): - ret_type = self.c_type - suffix = '' if self.all_versions_supported() else 'or_abort' - fn_name = self.get_fn_name('get', suffix) - arg_list = [(self.struct.get_ptr_type(), 'self')] - body = self.emit_version_id_switch( - lambda type_name: 'return ((' + type_name + '*)self)->' + self.name + ';', - self.emit_not_supported_error) - return c_function(ret_type, fn_name, arg_list, body) - - def emit_setter(self): - ret_type = StdType('void') - suffix = '' if self.all_versions_supported() else 'or_abort' - fn_name = self.get_fn_name('set', suffix) - arg_list = [(self.struct.get_ptr_type(), 'self'), (self.c_type, self.get_id_name())] - body = self.emit_version_id_switch( - lambda type_name: '((' + type_name + '*)self)->' + self.name + ' = ' + self.get_id_name() + '; break;', - self.emit_not_supported_error) - return c_function(ret_type, fn_name, arg_list, body) - - def emit_functions(self): - result = '' - result += '// ' + self.struct.typedef + '::' + self.name + '\n\n' - if not self.all_versions_supported(): - result += self.emit_is_supported() - result += '\n' - if isinstance(self.c_type, CustomType) or isinstance(self.c_type, ArrayType): - result += self.emit_ptr_getter() - else: - result += self.emit_getter() - result += '\n' - result += self.emit_setter() - return result - -class Struct: - def __init__(self, typedef): - self.typedef = typedef - self.struct_name = typdef_to_struct_name(typedef) - self.versions = [] - self.supported_versions = [] - self.copyright_lines = set() - self.search_regex = re.compile(bytes(struct_regex_string(self.struct_name), 'utf-8')) - - def lookup_version(self, version): - for i in self.versions: - if i.is_valid_for(version): - return i - - def get_code_path(self): - if self.versions: - return self.versions[-1].get_code_path() - else: - return None - - def get_ptr_type(self): - return PtrType(CustomType(self.typedef)) - - def get_version_id_fn_name(self): - return '_'.join(camel_case_to_words(self.typedef)) + '_priv_get_version_id' - - def header_name(self): - return '_'.join(camel_case_to_words(self.typedef)) + '_priv.h' - - def macro_name(self): - return self.header_name().replace('.', '_').upper() - - def add_version(self, new): - self.versions.append(new) - self.supported_versions.append(new.first_version) - self.copyright_lines = self.copyright_lines.union(new.copyright_lines) - - # Returns if any changes were made - def simplify(self): - new_versions = [] - dropped_versions = 0 - for v in self.versions: - if new_versions and new_versions[-1] == v: - dropped_versions += 1 - new_versions[-1].last_version = v.last_version - else: - new_versions.append(v) - if dropped_versions > 0: - logger.info('Found ' + str(dropped_versions) + ' unnecessary versions of ' + self.typedef); - self.versions = new_versions - return dropped_versions > 0 - - def setup_properties(self): - prop_dict = OrderedDict() - for i, v in enumerate(self.versions): - for c_type, name in v.get_property_list(): - if name in prop_dict and not (prop_dict[name][0] == c_type): - logger.warning( - 'Property ' + name + - ' changes type from ' + str(prop_dict[name][0]) + - ' to ' + str(c_type) + - ', ignoring old type') - del prop_dict[name] - if name in prop_dict: - assert prop_dict[name][0] == c_type - prop_dict[name][1].add(i) - else: - prop_dict[name] = (c_type, set([i])) - self.properties = [] - for name, (c_type, supported_ids) in prop_dict.items(): - versions_ids = [bool(i in supported_ids) for i in range(len(self.versions))] - self.properties.append(Property(self, c_type, name, versions_ids)) - - def emit_get_version_id_fn(self): - return_type = StdType('int') - fn_name = self.get_version_id_fn_name() - body = '' - body += 'static int version_id = -1;\n' - body += '\n' - body += 'if (version_id == -1) {\n' - body += INDENT + 'gtk_priv_assert_gtk_version_valid();' - body += '\n' - body += INDENT + 'int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version();\n' - body += '\n' - body += INDENT + 'switch (combo) {\n' - for v in self.supported_versions: - if v.is_released(): - body += INDENT * 2 + 'case ' + str(v.get_combo()) + ':\n' - body += INDENT * 3 + 'break;\n' - body += '\n' - body += INDENT * 2 + 'default:\n' - body += INDENT * 3 + 'gtk_priv_warn_gtk_version_may_be_unsupported();\n' - body += INDENT + '}\n' - body += '\n' - body += INDENT - for i in range(len(self.versions) - 1, -1, -1): - if i > 0: - body += 'if (combo >= ' + str(self.versions[i].first_version.get_combo()) + ') ' - body += '{\n' - body += INDENT * 2 + 'version_id = ' + str(i) + ';\n' - body += INDENT + '}' - if i > 0: - body += ' else ' - body += '\n' - body += '}\n' - body += '\n' - body += 'return version_id;\n' - return c_function(return_type, fn_name, [], body) - - def emit_header(self, generated): - result = '' - result += '/* AUTOGENERATED, DO NOT EDIT DIRECTLY\n' - result += ' * See gtk-priv/README.md for more information\n' - result += ' *\n' - result += ' * This file is part of ' + PROJECT_NAME + '\n' - result += ' *\n' - me = path.relpath(__file__, path.dirname(path.dirname(path.dirname(__file__)))) - my_copyright_line = 'Copyright © ' + str(datetime.now().year) + ' ' + me - for line in list(self.copyright_lines) + [my_copyright_line]: - result += ' * ' + line + '\n' - result += ' *' - result += '\n * '.join(LGPL3_HEADER.splitlines()) - result += '\n */\n' - result += '\n' - result += '#ifndef ' + self.macro_name() + '\n' - result += '#define ' + self.macro_name() + '\n' - result += '\n' - result += '#include "common.h"\n' - result += '\n' - result += 'typedef struct ' + self.struct_name + ' ' + self.typedef + ';\n' - result += '\n' - prev_definition = None - for i, struct in enumerate(self.versions): - result += '// Version ID ' + str(i) + '\n' - definition = struct.emit_definition(generated) - if prev_definition: - result += '// Diff from previous version:\n' - result += '\n'.join(diff_between(prev_definition, definition).splitlines()[4:]) + '\n' - prev_definition = definition - result += definition - result += '\n' - result += '// For internal use only\n' - result += self.emit_get_version_id_fn() - result += '\n' - for p in self.properties: - result += p.emit_functions() - result += '\n' - result += '#endif // ' + self.macro_name() + '\n' - return result - -def file_contains_byte_regex(source_file, regex): - try: - with open(source_file) as f: - with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as s: - return bool(regex.search(s)) - except (ValueError, FileNotFoundError): - return False - -class Project: - def __init__(self, repo_dir, typedef_names): - self.repo_dir = repo_dir - structs = [Struct(typedef) for typedef in typedef_names] - self.typedefs = {struct.typedef: struct for struct in structs} - self.struct_names = {struct.struct_name: struct for struct in structs} - - def lookup_struct_name(self, struct_name): - return self.struct_names.get(struct_name) - - def lookup_typedef(self, typedef): - return self.typedefs.get(typedef) - - def update(self, version): - source_files = None - for typedef, struct in self.typedefs.items(): - code_path = struct.get_code_path() - search_regex = struct.search_regex - if not code_path or not file_contains_byte_regex(code_path, search_regex): - if source_files is None: - source_files = get_all_source_files(self.repo_dir) - files = set() - for source_file in source_files: - if file_contains_byte_regex(source_file, search_regex): - files.add(source_file) - if not files: - raise RuntimeError('Could not find ' + typedef + ' in ' + str(version)) - if len(files) > 1: - raise RuntimeError(typedef + ' implemented multiple places: ' + str(files)) - code_path = list(files)[0] - struct_version = StructVersion(code_path, self, struct, version) - struct.add_version(struct_version) - - def simplify(self): - i = 1; - while True: - logger.info('Detecting identical versions, round ' + str(i)) - i += 1 - made_change = False - for _, struct in self.typedefs.items(): - if struct.simplify(): - made_change = True - if not made_change: - break - for _, struct in self.typedefs.items(): - struct.setup_properties() - - def write(self, output_dir): - remove_headers_from_dir(output_dir) - for typedef, struct in self.typedefs.items(): - output_path = path.join(output_dir, struct.header_name()) - logger.info('Writing ' + str(len(struct.versions)) + ' versions of ' + typedef + ' to ' + output_path) - with open(output_path, "w") as f: - f.write(struct.emit_header(True)) diff --git a/gtk-priv/scripts/config.py b/gtk-priv/scripts/config.py deleted file mode 100644 index 50e9060..0000000 --- a/gtk-priv/scripts/config.py +++ /dev/null @@ -1,32 +0,0 @@ -''' -MIT License - -Copyright 2020 Sophie Winter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -''' -The list of GTK structures to build header for -It is assumed these are the 'typedef' names, and the actual struct names are the same with an underscore prepended -Adding a name here is all that's needed to start building it's header (searching, naming the header, etc are all done automatically) -''' -STRUCT_LIST = [ - 'GdkWindow', - 'GdkWindowImplWayland', - 'GdkWindowImplWaylandClass', - 'GdkWindowImpl', - 'GdkWindowImplClass', - 'GdkWaylandSeat', - 'GdkWaylandPointerData', - 'GdkWaylandPointerFrameData', - 'GdkWaylandTouchData', - 'GdkWaylandTabletData', -] - -MIN_SUPPORTED_GTK = '3.22.0' # same format as the tag names -MAX_SUPPORTED_GTK = '3.70.0' # they randomly jumped to 3.89.1 for beta 4.0 releases diff --git a/gtk-priv/scripts/parse.py b/gtk-priv/scripts/parse.py deleted file mode 100644 index 29e8395..0000000 --- a/gtk-priv/scripts/parse.py +++ /dev/null @@ -1,114 +0,0 @@ -''' -MIT License - -Copyright 2020 Sophie Winter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import logging -import re - -from ast import * - -logger = logging.getLogger(__name__) - -def remove_comments(code): - return re.sub(r'(/\*.*?\*/|//.*?\n)', '', code, flags=re.DOTALL) - -def parse_type(code): - code = code.strip() - if code.endswith('*'): - return PtrType(parse_type(code[:-1])) - elif code.startswith('const '): - return ConstType(parse_type(code[5:])) - if code.endswith(' const'): - return ConstType(parse_type(code[:5])) - elif is_std_type(code): - return StdType(code) - elif re.search(r'^((struct|enum)\s+)?\w+$', code): - return CustomType(code) - else: - assert False, 'Unknown type `' + code + '`' - -def parse_property(code): - code = code.strip() - bit_field = None - bit_field_split = code.rsplit(':', 1) - if len(bit_field_split) > 1: - code = bit_field_split[0].strip() - bit_field = int(bit_field_split[1].strip()) - fp = re.search(r'^(.*)\(\s*(\*\s*)+(\w*)\s*\)\s*\((.*)\)$', code) - if fp: - assert bit_field is None - ret = parse_type(fp.group(1)) - pointer_count = fp.group(2).count('*') - 1 - assert pointer_count == 0, ( - 'Function pointers with multiple levels of indirection not supported ' - '(indirection count: ' + str(pointer_count) + ' for ' + code + ')') - name = fp.group(3) - if name == '': - name = None - args = [] - for i in fp.group(4).split(','): - args.append(parse_property(i)) - c_type = FpType(ret, args) - return PropertyNode(c_type, name, None) - array = re.search(r'^(.*)\[(.*)\]$', code) - if array: - prop = parse_property(array.group(1)) - prop.c_type = ArrayType(prop.c_type, array.group(2).strip()) - return prop - normal = re.search(r'^((\w+\s*[^\w\,])+(\*\s*)*)([\w\s\,]*)$', code) - if normal: - c_type = parse_type(normal.group(1)) - names = normal.group(4).split(',') - names = [name.strip() for name in names if name.strip()] - if len(names) > 1: - nodes = [] - for name in names: - nodes.append(PropertyNode(c_type, name, None)) - nodes[-1].statement = True - return ListNode(nodes) - elif len(names) == 1: - return PropertyNode(c_type, names[0], bit_field) - else: - return PropertyNode(c_type, None, bit_field) - assert False, 'Could not parse property `' + code + '`' - -def parse_token_list(tokens, i): - nodes = [] - while i < len(tokens): - token = tokens[i].strip() - if token == '' or token == ';': - pass - elif token == 'struct' and tokens[i + 1].strip() == '{': - i, node = parse_token_list(tokens, i + 2) - i += 1 - assert i < len(tokens) - name = tokens[i].strip() - assert re.search(r'^\w+$', name) - struct = SubStructNode(name, node) - nodes.append(struct) - elif token == '}': - break - else: - node = parse_property(token) - if isinstance(node, PropertyNode): - node.statement = True - nodes.append(node) - i += 1 - return i, ListNode(nodes) - -def parse_ast(code): - code = remove_comments(code) - code = code.replace('\n', ' ') - code = code.replace('\t', ' ') - tokens = re.split(r'([;\{\}])', code) - i, node = parse_token_list(tokens, 0) - assert i == len(tokens), code - return node diff --git a/gtk-priv/scripts/repo.py b/gtk-priv/scripts/repo.py deleted file mode 100644 index c043d3d..0000000 --- a/gtk-priv/scripts/repo.py +++ /dev/null @@ -1,66 +0,0 @@ -''' -MIT License - -Copyright 2020 Sophie Winter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import subprocess -import logging -from os import path - -logger = logging.getLogger(__name__) - -class Repo: - def __init__(self, repo_url, repo_dir): - self.repo_dir = repo_dir - if not path.exists(self.repo_dir): - logger.info('Cloning ' + repo_url + ' into ' + self.repo_dir) - subprocess.run( - ['git', 'clone', repo_url, self.repo_dir] - ).check_returncode() - else: - logger.info('Fetching') - subprocess.run( - ['git', 'fetch'], - cwd=self.repo_dir - ).check_returncode() - - def get_branches(self): - result = subprocess.run( - ['git', 'branch', '-r'], - capture_output=True, - encoding='utf-8', - cwd=self.repo_dir) - result.check_returncode() - branches = result.stdout.splitlines() - # strip of origin/ - branches = [branch.split('/')[-1] for branch in branches] - logger.info('Found ' + str(len(branches)) + ' git branches') - return branches - - def get_tags(self): - '''Returns a list of git tags''' - result = subprocess.run( - ['git', 'tag', '-l'], - capture_output=True, - encoding='utf-8', - cwd=self.repo_dir) - result.check_returncode() - tags = result.stdout.splitlines() - logger.info('Found ' + str(len(tags)) + ' git tags') - return tags - - def checkout(self, tag): - '''Checks out a branch or tag''' - # logger.info('Checking out ' + tag) - result = subprocess.run( - ['git', 'checkout', tag], - cwd=self.repo_dir, - capture_output=True - ).check_returncode() diff --git a/gtk-priv/scripts/version.py b/gtk-priv/scripts/version.py deleted file mode 100644 index dc4fb50..0000000 --- a/gtk-priv/scripts/version.py +++ /dev/null @@ -1,105 +0,0 @@ -''' -MIT License - -Copyright 2020 Sophie Winter - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -''' - -import logging -import functools -import re - -from config import MIN_SUPPORTED_GTK, MAX_SUPPORTED_GTK - -logger = logging.getLogger(__name__) - -COMBO_FACTOR = 1000 - -@functools.total_ordering # implement all comparisons with just eq and lt -class Version: - def __init__(self, git_name, minor, micro, released): - self.git_name = git_name - self.minor = minor - self.micro = micro - self.released = released - - def __eq__(self, other): - return self.minor == other.minor and self.micro == other.micro - - def __lt__(self, other): - if self.minor == other.minor: - return self.micro < other.micro - else: - return self.minor < other.minor - - def get_checkout_name(self): - return self.git_name - - def is_supported(self): - '''Returns if the version is one we support''' - return ( - self >= min_supported_version and - self <= max_supported_version and - self != bad_release_3_24_19) - - def is_released(self): - return self.released - - def get_combo(self): - return self.minor * 1000 + self.micro - - def __str__(self): - result = 'v3.' + str(self.minor) + '.' + str(self.micro) - if not self.is_released(): - result += ' (unreleased)' - return result - - def c_id(self): - '''a string suitable for a C identifier''' - return 'v3_' + str(self.minor) + '_' + str(self.micro) - -def parse_tag(tag): - match = re.search(r'^3\.(\d+)\.(\d+)$', tag) - if match: - minor = int(match.group(1)) - micro = int(match.group(2)) - return Version(tag, minor, micro, True) - else: - return None - -def parse_branch(branch): - match = re.search(r'^gtk\-3\-(\d+)$', branch) - if match: - minor = int(match.group(1)) - return minor - else: - return None - -min_supported_version = parse_tag(MIN_SUPPORTED_GTK) -max_supported_version = parse_tag(MAX_SUPPORTED_GTK) -bad_release_3_24_19 = parse_tag('3.24.19') # this is not a good release - -def parse_tags_and_branches(tags, branches): - result = [] - for tag in tags: - version = parse_tag(tag) - if version and version.is_supported(): - result.append(version) - highest_micro = {} - for v in result: - highest_micro[v.minor] = max(v.micro, highest_micro.get(v.minor, -1)) - for branch in branches: - minor = parse_branch(branch) - if minor is not None: - micro = highest_micro.get(minor, -1) + 1 - version = Version(branch, minor, micro, False) - if version.is_supported(): - result.append(version) - result.sort() - logger.info('Found ' + str(len(result)) + ' supported versions') - return result diff --git a/meson.build b/meson.build index 0e76461..c426eb6 100644 --- a/meson.build +++ b/meson.build @@ -8,10 +8,15 @@ project('gtk-layer-shell', lib_so_version = '0' add_project_arguments( - ['-Wno-pedantic', '-Werror=unused-function'], + [ + '-Wno-pedantic', + '-Werror=unused-function', + '-Werror=implicit-function-declaration', + '-Werror=return-type', + ], language: 'c') -gtk = dependency('gtk+-3.0', version: '>=3.22.0') +gtk = dependency('gtk4') wayland_client = dependency('wayland-client', version: '>=1.10.0') # only required for the tests @@ -28,7 +33,6 @@ gnome = import('gnome') subdir('include') subdir('protocol') -subdir('gtk-priv') subdir('src') gtk_layer_shell = declare_dependency( @@ -41,7 +45,7 @@ if get_option('docs') subdir('doc') endif -if get_option('tests') +if false # get_option('tests') subdir('test') else # Add a single always-failing test to tell the user to reconfigure with tests enabled diff --git a/src/api.c b/src/api.c index 483b09f..69c2d57 100644 --- a/src/api.c +++ b/src/api.c @@ -10,13 +10,10 @@ */ #include "gtk-layer-shell.h" -#include "gtk-wayland.h" -#include "custom-shell-surface.h" -#include "simple-conversions.h" +#include "wayland-utils.h" #include "layer-surface.h" -#include "xdg-toplevel-surface.h" -#include +#include guint gtk_layer_get_major_version () @@ -58,17 +55,12 @@ gtk_layer_get_protocol_version () } static LayerSurface* -gtk_window_get_layer_surface (GtkWindow *window) +gtk_window_get_layer_surface_or_warn (GtkWindow *window) { g_return_val_if_fail (window, NULL); - CustomShellSurface *shell_surface = gtk_window_get_custom_shell_surface (window); - if (!shell_surface) { - g_critical ("GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()"); - return NULL; - } - LayerSurface *layer_surface = custom_shell_surface_get_layer_surface (shell_surface); + LayerSurface *layer_surface = gtk_window_get_layer_surface (window); if (!layer_surface) { - g_critical ("Custom wayland shell surface is not a layer surface, your Wayland compositor may not support Layer Shell"); + g_warning ("GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()"); return NULL; } return layer_surface; @@ -80,95 +72,84 @@ gtk_layer_init_for_window (GtkWindow *window) gtk_wayland_init_if_needed (); LayerSurface* layer_surface = layer_surface_new (window); if (!layer_surface) { - g_warning ("Falling back to XDG shell instead of Layer Shell (surface should appear but layer features will not work)"); - XdgToplevelSurface* toplevel_surface = xdg_toplevel_surface_new (window); - if (!toplevel_surface) - { - g_warning ("Shell does not support XDG shell stable. Falling back to default GTK behavior"); - } + g_warning ("Shell does not support Layer Shell. Falling back to default GTK behavior"); } } gboolean gtk_layer_is_layer_window (GtkWindow *window) { - g_return_val_if_fail (window, FALSE); - CustomShellSurface *shell_surface = gtk_window_get_custom_shell_surface (window); - if (!shell_surface) - return FALSE; - LayerSurface *layer_surface = custom_shell_surface_get_layer_surface (shell_surface); - return layer_surface != NULL; + return gtk_window_get_layer_surface (window) != NULL; } struct zwlr_layer_surface_v1 * gtk_layer_get_zwlr_layer_surface_v1 (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return NULL; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return NULL; return layer_surface->layer_surface; } void gtk_layer_set_namespace (GtkWindow *window, char const* name_space) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; layer_surface_set_name_space (layer_surface, name_space); } const char * gtk_layer_get_namespace (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - // If layer_surface is NULL, error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); return layer_surface_get_namespace (layer_surface); // NULL-safe } void gtk_layer_set_layer (GtkWindow *window, GtkLayerShellLayer layer) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; layer_surface_set_layer (layer_surface, layer); } GtkLayerShellLayer gtk_layer_get_layer (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return GTK_LAYER_SHELL_LAYER_TOP; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return GTK_LAYER_SHELL_LAYER_TOP; return layer_surface->layer; } void gtk_layer_set_monitor (GtkWindow *window, GdkMonitor *monitor) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; layer_surface_set_monitor (layer_surface, monitor); } GdkMonitor * gtk_layer_get_monitor (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return NULL; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return NULL; return layer_surface->monitor; } void gtk_layer_set_anchor (GtkWindow *window, GtkLayerShellEdge edge, gboolean anchor_to_edge) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; layer_surface_set_anchor (layer_surface, edge, anchor_to_edge); } gboolean gtk_layer_get_anchor (GtkWindow *window, GtkLayerShellEdge edge) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return FALSE; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return FALSE; g_return_val_if_fail(edge >= 0 && edge < GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER, FALSE); return layer_surface->anchors[edge]; } @@ -176,16 +157,16 @@ gtk_layer_get_anchor (GtkWindow *window, GtkLayerShellEdge edge) void gtk_layer_set_margin (GtkWindow *window, GtkLayerShellEdge edge, int margin_size) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; layer_surface_set_margin (layer_surface, edge, margin_size); } int gtk_layer_get_margin (GtkWindow *window, GtkLayerShellEdge edge) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return 0; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return 0; g_return_val_if_fail(edge >= 0 && edge < GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER, FALSE); return layer_surface->margins[edge]; } @@ -193,32 +174,32 @@ gtk_layer_get_margin (GtkWindow *window, GtkLayerShellEdge edge) void gtk_layer_set_exclusive_zone (GtkWindow *window, int exclusive_zone) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; layer_surface_set_exclusive_zone (layer_surface, exclusive_zone); } int gtk_layer_get_exclusive_zone (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return 0; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return 0; return layer_surface->exclusive_zone; } void gtk_layer_auto_exclusive_zone_enable (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; layer_surface_auto_exclusive_zone_enable (layer_surface); } gboolean gtk_layer_auto_exclusive_zone_is_enabled (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return FALSE; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return FALSE; return layer_surface->auto_exclusive_zone; } @@ -253,8 +234,8 @@ void gtk_layer_set_keyboard_mode (GtkWindow *window, GtkLayerShellKeyboardMode mode) { g_return_if_fail(mode < GTK_LAYER_SHELL_KEYBOARD_MODE_ENTRY_NUMBER); - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return; if (mode != GTK_LAYER_SHELL_KEYBOARD_MODE_NONE && mode != GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE) { if (gtk_layer_get_protocol_version () < 4) { g_warning ( @@ -268,7 +249,7 @@ gtk_layer_set_keyboard_mode (GtkWindow *window, GtkLayerShellKeyboardMode mode) GtkLayerShellKeyboardMode gtk_layer_get_keyboard_mode (GtkWindow *window) { - LayerSurface *layer_surface = gtk_window_get_layer_surface (window); - if (!layer_surface) return GTK_LAYER_SHELL_KEYBOARD_MODE_NONE; // Error message already shown in gtk_window_get_layer_surface + LayerSurface *layer_surface = gtk_window_get_layer_surface_or_warn (window); + if (!layer_surface) return GTK_LAYER_SHELL_KEYBOARD_MODE_NONE; return layer_surface->keyboard_mode; } diff --git a/src/custom-shell-surface.c b/src/custom-shell-surface.c deleted file mode 100644 index 2d95cf5..0000000 --- a/src/custom-shell-surface.c +++ /dev/null @@ -1,142 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "custom-shell-surface.h" -#include "gtk-wayland.h" -#include "gtk-priv-access.h" - -#include -#include -#include - -static const char *custom_shell_surface_key = "wayland_custom_shell_surface"; - -struct _CustomShellSurfacePrivate -{ - GtkWindow *gtk_window; -}; - -static void -custom_shell_surface_on_window_destroy (CustomShellSurface *self) -{ - self->virtual->finalize (self); - g_free (self->private); - g_free (self); -} - -static void -custom_shell_surface_on_window_realize (GtkWidget *widget, CustomShellSurface *self) -{ - g_return_if_fail (GTK_WIDGET (self->private->gtk_window) == widget); - - GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (self->private->gtk_window)); - g_return_if_fail (gdk_window); - - gtk_priv_access_init (gdk_window); - gdk_wayland_window_set_use_custom_surface (gdk_window); -} - -static void -custom_shell_surface_on_window_map (GtkWidget *widget, CustomShellSurface *self) -{ - g_return_if_fail (GTK_WIDGET (self->private->gtk_window) == widget); - - GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (self->private->gtk_window)); - g_return_if_fail (gdk_window); - - struct wl_surface *wl_surface = gdk_wayland_window_get_wl_surface (gdk_window); - g_return_if_fail (wl_surface); - - // In some cases (observed when a mate panel has an image background) GDK will attach a buffer just after creating - // the surface (see the implementation of gdk_wayland_window_show() for details). Giving the surface a role with a - // buffer attached is a protocol violation, so we attach a null buffer. GDK hasn't committed the buffer it may have - // attached, so we don't need to commit. If this is removed, test-window-with-initially-attached-buffer should fail. - wl_surface_attach (wl_surface, NULL, 0, 0); - - self->virtual->map (self, wl_surface); - gdk_window_set_priv_mapped (gdk_window); - - wl_surface_commit (wl_surface); - wl_display_roundtrip (gdk_wayland_display_get_wl_display (gdk_display_get_default ())); -} - -void -custom_shell_surface_init (CustomShellSurface *self, GtkWindow *gtk_window) -{ - g_assert (self->virtual); // Subclass should have set this up first - - self->private = g_new0 (CustomShellSurfacePrivate, 1); - self->private->gtk_window = gtk_window; - - g_return_if_fail (gtk_window); - g_return_if_fail (!gtk_widget_get_mapped (GTK_WIDGET (gtk_window))); - g_object_set_data_full (G_OBJECT (gtk_window), - custom_shell_surface_key, - self, - (GDestroyNotify) custom_shell_surface_on_window_destroy); - g_signal_connect (gtk_window, "realize", G_CALLBACK (custom_shell_surface_on_window_realize), self); - g_signal_connect (gtk_window, "map", G_CALLBACK (custom_shell_surface_on_window_map), self); - - if (gtk_widget_get_realized (GTK_WIDGET (gtk_window))) { - // We must be in the process of realizing now - custom_shell_surface_on_window_realize (GTK_WIDGET (gtk_window), self); - } -} - -CustomShellSurface * -gtk_window_get_custom_shell_surface (GtkWindow *gtk_window) -{ - if (!gtk_window) - return NULL; - - return g_object_get_data (G_OBJECT (gtk_window), custom_shell_surface_key); -} - -GtkWindow * -custom_shell_surface_get_gtk_window (CustomShellSurface *self) -{ - g_return_val_if_fail (self, NULL); - return self->private->gtk_window; -} - -void -custom_shell_surface_get_window_geom (CustomShellSurface *self, GdkRectangle *geom) -{ - g_return_if_fail (self); - // TODO: Store the actual window geometry used - *geom = gtk_wayland_get_logical_geom (self->private->gtk_window); -} - -void -custom_shell_surface_needs_commit (CustomShellSurface *self) -{ - if (!self->private->gtk_window) - return; - - GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (self->private->gtk_window)); - - if (!gdk_window) - return; - - // Hopefully this will trigger a commit - // Don't commit directly, as that screws up GTK's internal state - // (see https://github.com/wmww/gtk-layer-shell/issues/51) - gdk_window_invalidate_rect (gdk_window, NULL, FALSE); -} - -void -custom_shell_surface_remap (CustomShellSurface *self) -{ - GtkWidget *window_widget = GTK_WIDGET (self->private->gtk_window); - g_return_if_fail (window_widget); - gtk_widget_hide (window_widget); - gtk_widget_show (window_widget); -} diff --git a/src/custom-shell-surface.h b/src/custom-shell-surface.h deleted file mode 100644 index 7acb28e..0000000 --- a/src/custom-shell-surface.h +++ /dev/null @@ -1,71 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef CUSTOM_SHELL_SURFACE_H -#define CUSTOM_SHELL_SURFACE_H - -#include -#include - -struct wl_surface; -struct xdg_surface; -struct xdg_positioner; - -typedef struct _CustomShellSurface CustomShellSurface; -typedef struct _CustomShellSurfacePrivate CustomShellSurfacePrivate; -typedef struct _CustomShellSurfaceVirtual CustomShellSurfaceVirtual; - -struct _CustomShellSurfaceVirtual -{ - // Called during the window's gtk signal of the same name - // Should create the wayland objects needed to map the surface - void (*map) (CustomShellSurface *super, struct wl_surface *wl_surface); - - // Must be called before the associated GtkWindow is unmapped - void (*unmap) (CustomShellSurface *super); - - // Will usually call unmap; can be the same function if no other resources need to be freed - void (*finalize) (CustomShellSurface *super); - - struct xdg_popup *(*get_popup) (CustomShellSurface *super, - struct xdg_surface *popup_xdg_surface, - struct xdg_positioner *positioner); - - // Returns the logical geometry of the window (excludes shadows and such) - GdkRectangle (*get_logical_geom) (CustomShellSurface *super); -}; - -struct _CustomShellSurface -{ - CustomShellSurfaceVirtual const *virtual; - CustomShellSurfacePrivate *private; -}; - -// Usually called by the subclass constructors -// Does not map the surface yet -void custom_shell_surface_init (CustomShellSurface *self, GtkWindow *gtk_window); - -// If the window has a shell surface, return it; else return NULL -// NULL input is handled gracefully -CustomShellSurface *gtk_window_get_custom_shell_surface (GtkWindow *gtk_window); - -GtkWindow *custom_shell_surface_get_gtk_window (CustomShellSurface *self); - -// In theory this could commit once on next event loop, but for now it will just commit every time it is called -// Does nothing is the shell surface does not currently have a GdkWindow with a wl_surface -void custom_shell_surface_needs_commit (CustomShellSurface *self); - -// Unmap and remap a currently mapped shell surface -void custom_shell_surface_remap (CustomShellSurface *self); - -// Destruction is taken care of automatically when the associated window is destroyed - -#endif // CUSTOM_SHELL_SURFACE_H diff --git a/src/gtk-priv-access.c b/src/gtk-priv-access.c deleted file mode 100644 index b439da5..0000000 --- a/src/gtk-priv-access.c +++ /dev/null @@ -1,193 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "gtk-priv-access.h" -#include "gtk-wayland.h" -#include "xdg-popup-surface.h" - -#include "wayland-client.h" - -typedef enum _PositionMethod -{ - POSITION_METHOD_ENUM -} PositionMethod; -typedef void *EGLSurface; -typedef void *GdkWaylandWindowExported; -typedef void *GdkWaylandTabletToolData; - -#include "gdk_window_impl_priv.h" -#include "gdk_window_priv.h" -#include "gdk_window_impl_wayland_priv.h" -#include "gdk_window_impl_class_priv.h" -#include "gdk_wayland_pointer_frame_data_priv.h" -#include "gdk_wayland_pointer_data_priv.h" -#include "gdk_wayland_seat_priv.h" -#include "gdk_wayland_touch_data_priv.h" -#include "gdk_wayland_tablet_data_priv.h" - -#include - -// The type of the function pointer of GdkWindowImpl's move_to_rect method (gdkwindowimpl.h:78)' -typedef void (*MoveToRectFunc) (GdkWindow *window, - const GdkRectangle *rect, - GdkGravity rect_anchor, - GdkGravity window_anchor, - GdkAnchorHints anchor_hints, - int rect_anchor_dx, - int rect_anchor_dy); - -static MoveToRectFunc gdk_window_move_to_rect_real = NULL; - -static GdkWindow * -gdk_window_get_priv_transient_for (GdkWindow *gdk_window) -{ - GdkWindow *window_transient_for = gdk_window_priv_get_transient_for (gdk_window); - GdkWindowImplWayland *window_impl = (GdkWindowImplWayland *)gdk_window_priv_get_impl (gdk_window); - GdkWindow *wayland_transient_for = gdk_window_impl_wayland_priv_get_transient_for (window_impl); - if (wayland_transient_for) - return wayland_transient_for; - else - return window_transient_for; -} - -uint32_t -gdk_window_get_priv_latest_serial (GdkSeat *seat) -{ - uint32_t serial = 0; - GdkWaylandSeat *wayland_seat = (GdkWaylandSeat *)seat; - - serial = MAX(serial, gdk_wayland_seat_priv_get_keyboard_key_serial (wayland_seat)); - - GdkWaylandPointerData* pointer_data = gdk_wayland_seat_priv_get_pointer_info_ptr (wayland_seat); - serial = MAX(serial, gdk_wayland_pointer_data_priv_get_press_serial (pointer_data)); - - GHashTableIter i; - GdkWaylandTouchData *touch; - g_hash_table_iter_init (&i, gdk_wayland_seat_priv_get_touches (wayland_seat)); - while (g_hash_table_iter_next (&i, NULL, (gpointer *)&touch)) - serial = MAX(serial, gdk_wayland_touch_data_priv_get_touch_down_serial (touch)); - - for (GList *l = gdk_wayland_seat_priv_get_tablets (wayland_seat); l; l = l->next) { - GdkWaylandTabletData *tablet_data = l->data; - GdkWaylandPointerData *pointer_data = gdk_wayland_tablet_data_priv_get_pointer_info_ptr (tablet_data); - serial = MAX(serial, gdk_wayland_pointer_data_priv_get_press_serial (pointer_data)); - } - - return serial; -} - -static GdkSeat * -gdk_window_get_priv_grab_seat_for_single_window (GdkWindow *gdk_window) -{ - if (!gdk_window) - return NULL; - - GdkWindowImplWayland *window_impl = (GdkWindowImplWayland *)gdk_window_priv_get_impl (gdk_window); - return gdk_window_impl_wayland_priv_get_grab_input_seat (window_impl); -} - -GdkSeat * -gdk_window_get_priv_grab_seat (GdkWindow *gdk_window) -{ - GdkSeat *seat = NULL; - - seat = gdk_window_get_priv_grab_seat_for_single_window (gdk_window); - if (seat) - return seat; - - // see the comment in find_grab_input_seat () - GdkWindow* grab_window = g_object_get_data (G_OBJECT (gdk_window), "gdk-attached-grab-window"); - seat = gdk_window_get_priv_grab_seat_for_single_window (grab_window); - if (seat) - return seat; - - while (gdk_window) - { - gdk_window = gdk_window_get_priv_transient_for (gdk_window); - - seat = gdk_window_get_priv_grab_seat_for_single_window (gdk_window); - if (seat) - return seat; - } - - return NULL; -} - -static void -gdk_window_move_to_rect_impl_override (GdkWindow *window, - const GdkRectangle *rect, - GdkGravity rect_anchor, - GdkGravity window_anchor, - GdkAnchorHints anchor_hints, - int rect_anchor_dx, - int rect_anchor_dy) -{ - g_assert (gdk_window_move_to_rect_real); - gdk_window_move_to_rect_real (window, - rect, - rect_anchor, - window_anchor, - anchor_hints, - rect_anchor_dx, - rect_anchor_dy); - - GdkWindow *transient_for_gdk_window = gdk_window_get_priv_transient_for (window); - CustomShellSurface *transient_for_shell_surface = NULL; - GdkWindow *toplevel_gdk_window = transient_for_gdk_window; - while (toplevel_gdk_window) { - toplevel_gdk_window = gdk_window_get_toplevel (toplevel_gdk_window); - GtkWindow *toplevel_gtk_window = gtk_wayland_gdk_to_gtk_window (toplevel_gdk_window); - transient_for_shell_surface = gtk_window_get_custom_shell_surface (toplevel_gtk_window); - if (transient_for_shell_surface) - break; - toplevel_gdk_window = gdk_window_get_priv_transient_for (toplevel_gdk_window); - } - if (transient_for_shell_surface) { - g_return_if_fail (rect); - XdgPopupPosition position = { - .transient_for_shell_surface = transient_for_shell_surface, - .transient_for_gdk_window = transient_for_gdk_window, - .rect = *rect, - .rect_anchor = rect_anchor, - .window_anchor = window_anchor, - .anchor_hints = anchor_hints, - .rect_anchor_d = { - .x = rect_anchor_dx, - .y = rect_anchor_dy, - }, - }; - gtk_wayland_setup_window_as_custom_popup (window, &position); - } -} - -void -gdk_window_set_priv_mapped (GdkWindow *gdk_window) -{ - GdkWindowImplWayland *window_impl = (GdkWindowImplWayland *)gdk_window_priv_get_impl (gdk_window); - gdk_window_impl_wayland_priv_set_mapped (window_impl, TRUE); -} - -void -gtk_priv_access_init (GdkWindow *gdk_window) -{ - // Don't do anything once this has run successfully once - if (gdk_window_move_to_rect_real) - return; - - GdkWindowImplWayland *window_impl = (GdkWindowImplWayland *)gdk_window_priv_get_impl (gdk_window); - GdkWindowImplClass *window_class = (GdkWindowImplClass *)G_OBJECT_GET_CLASS(window_impl); - - // If we have not already done the override, set the window's function to be the override and our "real" fp to the one that was there before - if (gdk_window_impl_class_priv_get_move_to_rect (window_class) != gdk_window_move_to_rect_impl_override) { - gdk_window_move_to_rect_real = gdk_window_impl_class_priv_get_move_to_rect (window_class); - gdk_window_impl_class_priv_set_move_to_rect (window_class, gdk_window_move_to_rect_impl_override); - } -} diff --git a/src/gtk-priv-access.h b/src/gtk-priv-access.h deleted file mode 100644 index 290fa06..0000000 --- a/src/gtk-priv-access.h +++ /dev/null @@ -1,33 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef GDK_WINDOW_HACK_H -#define GDK_WINDOW_HACK_H - -#include -#include - -// This only has an effect the first time it's called -// It enables gtk_window_hack_get_position () working later -void gtk_priv_access_init (GdkWindow *gdk_window); - -// Returns the laster serial from a user input event -// Can be used for popups grabs and such -uint32_t gdk_window_get_priv_latest_serial (GdkSeat *seat); - -// Returns the GdkSeat that can be used for popup grabs -GdkSeat *gdk_window_get_priv_grab_seat (GdkWindow *gdk_window); - -// Sets the window as mapped (mapped is set to false automatically in gdk_wayland_window_hide_surface ()) -// If window is not set to mapped, some subsurfaces fail (see https://github.com/wmww/gtk-layer-shell/issues/38) -void gdk_window_set_priv_mapped (GdkWindow *gdk_window); - -#endif // GDK_WINDOW_HACK_H diff --git a/src/gtk-wayland.c b/src/gtk-wayland.c deleted file mode 100644 index 4c06ff0..0000000 --- a/src/gtk-wayland.c +++ /dev/null @@ -1,217 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "gtk-wayland.h" - -#include "custom-shell-surface.h" -#include "xdg-popup-surface.h" -#include "gtk-priv-access.h" - -#include "xdg-shell-client.h" -#include "wlr-layer-shell-unstable-v1-client.h" - -#include -#include -#include - -static const char *gtk_window_key = "linked-gtk-window"; -static const char *popup_position_key = "custom-popup-position"; - -static struct wl_registry *wl_registry_global = NULL; -static struct xdg_wm_base *xdg_wm_base_global = NULL; -static struct zwlr_layer_shell_v1 *layer_shell_global = NULL; - -static gboolean has_initialized = FALSE; - -gboolean -gtk_wayland_get_has_initialized (void) -{ - return has_initialized; -} - -struct zwlr_layer_shell_v1 * -gtk_wayland_get_layer_shell_global () -{ - return layer_shell_global; -} - -struct xdg_wm_base * -gtk_wayland_get_xdg_wm_base_global () -{ - return xdg_wm_base_global; -} - -static void -wl_registry_handle_global (void *_data, - struct wl_registry *registry, - uint32_t id, - const char *interface, - uint32_t version) -{ - (void)_data; - - // pull out needed globals - if (strcmp (interface, zwlr_layer_shell_v1_interface.name) == 0) { - g_warn_if_fail (zwlr_layer_shell_v1_interface.version >= 3); - layer_shell_global = wl_registry_bind (registry, - id, - &zwlr_layer_shell_v1_interface, - MIN((uint32_t)zwlr_layer_shell_v1_interface.version, version)); - } else if (strcmp (interface, xdg_wm_base_interface.name) == 0) { - g_warn_if_fail (xdg_wm_base_interface.version >= 2); - xdg_wm_base_global = wl_registry_bind (registry, - id, - &xdg_wm_base_interface, - MIN((uint32_t)xdg_wm_base_interface.version, version)); - } -} - -static void -wl_registry_handle_global_remove (void *_data, - struct wl_registry *_registry, - uint32_t _id) -{ - (void)_data; - (void)_registry; - (void)_id; - - // TODO -} - -static const struct wl_registry_listener wl_registry_listener = { - .global = wl_registry_handle_global, - .global_remove = wl_registry_handle_global_remove, -}; - -// Does not take ownership of position -static void -gtk_wayland_setup_custom_popup (GtkWindow *gtk_window, XdgPopupPosition const *position) -{ - CustomShellSurface *shell_surface = gtk_window_get_custom_shell_surface (gtk_window); - if (shell_surface) { - XdgPopupSurface *popup_surface = custom_shell_surface_get_xdg_popup (shell_surface); - // If there's already a custom surface on the window, it better be a popup - g_return_if_fail (popup_surface); - xdg_popup_surface_update_position (popup_surface, position); - } else { - xdg_popup_surface_new (gtk_window, position); - } -} - -// This function associates a GTK window with a GDK window -// It overrides the default so it can run for EVERY window without needed to be attached to each one -static void -gtk_wayland_override_on_window_realize (GtkWindow *gtk_window, void *_data) -{ - (void)_data; - - // Call the super class's realize handler - GValue args[1] = { G_VALUE_INIT }; - g_value_init_from_instance (&args[0], gtk_window); - g_signal_chain_from_overridden (args, NULL); - g_value_unset (&args[0]); - - GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (gtk_window)); - g_object_set_data (G_OBJECT (gdk_window), gtk_window_key, gtk_window); - - XdgPopupPosition *position = g_object_get_data (G_OBJECT (gdk_window), popup_position_key); - if (position) { - // This is a custom popup waiting to be realized - gtk_wayland_setup_custom_popup (gtk_window, position); - g_object_set_data (G_OBJECT (gdk_window), popup_position_key, NULL); - } -} - -// This callback must override the default unmap handler, so it can run first -// The custom surface's unmap method must be called before GtkWidget's unmap, or Wayland objects are destroyed in the wrong order -static void -gtk_wayland_override_on_window_unmap (GtkWindow *gtk_window, void *_data) -{ - (void)_data; - - CustomShellSurface *shell_surface = gtk_window_get_custom_shell_surface (gtk_window); - if (shell_surface) - shell_surface->virtual->unmap (shell_surface); - - // Call the super class's unmap handler - GValue args[1] = { G_VALUE_INIT }; - g_value_init_from_instance (&args[0], gtk_window); - g_signal_chain_from_overridden (args, NULL); - g_value_unset (&args[0]); -} - -void -gtk_wayland_init_if_needed () -{ - if (has_initialized) - return; - - GdkDisplay *gdk_display = gdk_display_get_default (); - g_return_if_fail (gdk_display); - g_return_if_fail (GDK_IS_WAYLAND_DISPLAY (gdk_display)); - - struct wl_display *wl_display = gdk_wayland_display_get_wl_display (gdk_display); - wl_registry_global = wl_display_get_registry (wl_display); - wl_registry_add_listener (wl_registry_global, &wl_registry_listener, NULL); - wl_display_roundtrip (wl_display); - - if (!layer_shell_global) - g_warning ("It appears your Wayland compositor does not support the Layer Shell protocol"); - - if (!xdg_wm_base_global) - g_warning ("It appears your Wayland compositor does not support the XDG Shell stable protocol"); - - gint realize_signal_id = g_signal_lookup ("realize", GTK_TYPE_WINDOW); - GClosure *realize_closure = g_cclosure_new (G_CALLBACK (gtk_wayland_override_on_window_realize), NULL, NULL); - g_signal_override_class_closure (realize_signal_id, GTK_TYPE_WINDOW, realize_closure); - - gint unmap_signal_id = g_signal_lookup ("unmap", GTK_TYPE_WINDOW); - GClosure *unmap_closure = g_cclosure_new (G_CALLBACK (gtk_wayland_override_on_window_unmap), NULL, NULL); - g_signal_override_class_closure (unmap_signal_id, GTK_TYPE_WINDOW, unmap_closure); - - has_initialized = TRUE; -} - -GtkWindow * -gtk_wayland_gdk_to_gtk_window (GdkWindow *gdk_window) -{ - return GTK_WINDOW (g_object_get_data (G_OBJECT (gdk_window), gtk_window_key)); -} - -void -gtk_wayland_setup_window_as_custom_popup (GdkWindow *gdk_window, XdgPopupPosition const *position) -{ - GtkWindow *gtk_window = gtk_wayland_gdk_to_gtk_window (gdk_window); - if (GTK_IS_WINDOW (gtk_window)) { - // The GDK window has been connected to a GTK window - gtk_wayland_setup_custom_popup (gtk_window, position); - } else { - // We need to hold the position and wait for a connected GTK window to be realized - XdgPopupPosition *position_owned = g_new (XdgPopupPosition, 1); - *position_owned = *position; - g_object_set_data_full (G_OBJECT (gdk_window), popup_position_key, position_owned, g_free); - } -} - -// Gets the upper left and size of the portion of the window that is actually used (not shadows and whatnot) -// It does this by walking down the gdk_window tree, as long as there is exactly one child -GdkRectangle -gtk_wayland_get_logical_geom (GtkWindow *gtk_window) -{ - GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (gtk_window)); - GList *list = gdk_window_get_children (window); - if (list && !list->next) // If there is exactly one child window - window = list->data; - g_list_free(list); - GdkRectangle geom; - gdk_window_get_geometry (window, &geom.x, &geom.y, &geom.width, &geom.height); - return geom; -} diff --git a/src/gtk-wayland.h b/src/gtk-wayland.h deleted file mode 100644 index 3424314..0000000 --- a/src/gtk-wayland.h +++ /dev/null @@ -1,33 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef WAYLAND_GLOBALS_H -#define WAYLAND_GLOBALS_H - -#include -#include - -#include "xdg-popup-surface.h" - -gboolean gtk_wayland_get_has_initialized (void); -struct xdg_wm_base *gtk_wayland_get_xdg_wm_base_global (void); -struct zwlr_layer_shell_v1 *gtk_wayland_get_layer_shell_global (void); - -void gtk_wayland_init_if_needed (void); - -GtkWindow *gtk_wayland_gdk_to_gtk_window (GdkWindow *gdk_window); - -// Does not take ownership of position -void gtk_wayland_setup_window_as_custom_popup (GdkWindow *gdk_window, XdgPopupPosition const *position); - -GdkRectangle gtk_wayland_get_logical_geom (GtkWindow *widget); - -#endif // WAYLAND_GLOBALS_H diff --git a/src/layer-surface.c b/src/layer-surface.c index 574f416..d9a9678 100644 --- a/src/layer-surface.c +++ b/src/layer-surface.c @@ -12,15 +12,57 @@ #include "layer-surface.h" #include "gtk-layer-shell.h" -#include "simple-conversions.h" -#include "custom-shell-surface.h" -#include "gtk-wayland.h" +#include "wayland-utils.h" +#include "libwayland-wrappers.h" #include "wlr-layer-shell-unstable-v1-client.h" #include "xdg-shell-client.h" #include -#include +#include + +LayerSurface *pending_layer_surface = NULL; + + +static const char *layer_surface_key = "wayland_layer_surface"; + +LayerSurface * +gtk_window_get_layer_surface (GtkWindow *gtk_window) +{ + if (!gtk_window) + return NULL; + + return g_object_get_data (G_OBJECT (gtk_window), layer_surface_key); +} + +void +layer_surface_needs_commit (LayerSurface *self) +{ + if (!self->gtk_window) + return; + + // GdkSurface *gdk_surface = gtk_native_get_surface (GTK_NATIVE (self->gtk_window)); + + // if (!gdk_surface) + // return; + + // Hopefully this will trigger a commit + // Don't commit directly, as that screws up GTK's internal state + // (see https://github.com/wmww/gtk-layer-shell/issues/51) + // TODO + // gdk_window_invalidate_rect (gdk_window, NULL, FALSE); + + gtk_widget_queue_draw (GTK_WIDGET (self->gtk_window)); +} + +void +layer_surface_remap (LayerSurface *self) +{ + GtkWidget *window_widget = GTK_WIDGET (self->gtk_window); + g_return_if_fail (window_widget); + gtk_widget_set_visible (window_widget, FALSE); + gtk_widget_set_visible (window_widget, TRUE); +} /* * Sends the .set_size request if the current allocation differs from the last size sent @@ -65,8 +107,6 @@ layer_surface_send_set_size (LayerSurface *self) static void layer_surface_update_size (LayerSurface *self) { - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - gint width = -1; gint height = -1; @@ -81,6 +121,7 @@ layer_surface_update_size (LayerSurface *self) height = self->last_configure_size.height; } + /* GdkGeometry hints; hints.min_width = width; hints.max_width = width; @@ -91,6 +132,7 @@ layer_surface_update_size (LayerSurface *self) NULL, &hints, GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE); + */ // This will usually get called in a moment by the layer_surface_on_size_allocate () triggered by the above // gtk_window_set_geometry_hints (). However in some cases (such as a streatching a window after a size request has @@ -109,6 +151,38 @@ layer_surface_handle_configure (void *data, { LayerSurface *self = data; + if (self->client_facing_xdg_surface && self->client_facing_xdg_toplevel) { + struct wl_array states; + wl_array_init(&states); + { + uint32_t *state = wl_array_add(&states, sizeof(uint32_t)); + g_assert(state); + *state = XDG_TOPLEVEL_STATE_ACTIVATED; + } + { + uint32_t *state = wl_array_add(&states, sizeof(uint32_t)); + g_assert(state); + *state = XDG_TOPLEVEL_STATE_MAXIMIZED; + } + DISPATCH_CLIENT_FACING_EVENT( + xdg_toplevel_listener, + self->client_facing_xdg_toplevel, + configure, + self->client_facing_xdg_toplevel, + w, h, + &states); + wl_array_release(&states); + + DISPATCH_CLIENT_FACING_EVENT( + xdg_surface_listener, + self->client_facing_xdg_surface, + configure, + self->client_facing_xdg_surface, + serial); + } else { + g_warning ("no XDG surface to configure"); + } + zwlr_layer_surface_v1_ack_configure (surface, serial); self->last_configure_size = (GtkRequisition) { @@ -126,8 +200,7 @@ layer_surface_handle_closed (void *data, LayerSurface *self = data; (void)_surface; - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - gtk_window_close (gtk_window); + gtk_window_close (self->gtk_window); } static const struct zwlr_layer_surface_v1_listener layer_surface_listener = { @@ -157,12 +230,25 @@ layer_surface_send_set_margin (LayerSurface *self) } static void -layer_surface_map (CustomShellSurface *super, struct wl_surface *wl_surface) +layer_surface_on_window_realize (GtkWidget *widget, LayerSurface *self) { - LayerSurface *self = (LayerSurface *)super; - + g_return_if_fail (GTK_WIDGET (self->gtk_window) == widget); g_return_if_fail (!self->layer_surface); + GdkSurface *gdk_surface = gtk_native_get_surface (GTK_NATIVE (self->gtk_window)); + g_return_if_fail (gdk_surface); + + self->wl_surface = gdk_wayland_surface_get_wl_surface (gdk_surface); + g_return_if_fail(self->wl_surface); + + pending_layer_surface = self; +} + +static void +layer_surface_create_surface_object (LayerSurface *self) +{ + pending_layer_surface = NULL; + struct zwlr_layer_shell_v1 *layer_shell_global = gtk_wayland_get_layer_shell_global (); g_return_if_fail (layer_shell_global); @@ -175,7 +261,7 @@ layer_surface_map (CustomShellSurface *super, struct wl_surface *wl_surface) enum zwlr_layer_shell_v1_layer layer = gtk_layer_shell_layer_get_zwlr_layer_shell_v1_layer(self->layer); self->layer_surface = zwlr_layer_shell_v1_get_layer_surface (layer_shell_global, - wl_surface, + self->wl_surface, output, layer, name_space); @@ -185,16 +271,19 @@ layer_surface_map (CustomShellSurface *super, struct wl_surface *wl_surface) zwlr_layer_surface_v1_set_exclusive_zone (self->layer_surface, self->exclusive_zone); layer_surface_send_set_anchor (self); layer_surface_send_set_margin (self); + zwlr_layer_surface_v1_set_size (self->layer_surface, 300, 300); + /* if (self->cached_layer_size.width >= 0 && self->cached_layer_size.height >= 0) { zwlr_layer_surface_v1_set_size (self->layer_surface, self->cached_layer_size.width, self->cached_layer_size.height); } + */ zwlr_layer_surface_v1_add_listener (self->layer_surface, &layer_surface_listener, self); } static void -layer_surface_unmap (CustomShellSurface *super) +layer_surface_unmap (LayerSurface *super) { LayerSurface *self = (LayerSurface *)super; @@ -202,48 +291,20 @@ layer_surface_unmap (CustomShellSurface *super) zwlr_layer_surface_v1_destroy (self->layer_surface); self->layer_surface = NULL; } + + clear_client_facing_proxy_data((struct wl_proxy *)self->client_facing_xdg_surface); + clear_client_facing_proxy_data((struct wl_proxy *)self->client_facing_xdg_toplevel); } static void -layer_surface_finalize (CustomShellSurface *super) +layer_surface_destroy (LayerSurface *self) { - LayerSurface *self = (LayerSurface *)super; - layer_surface_unmap (super); + layer_surface_unmap (self); g_free ((gpointer)self->name_space); -} - -static struct xdg_popup * -layer_surface_get_popup (CustomShellSurface *super, - struct xdg_surface *popup_xdg_surface, - struct xdg_positioner *positioner) -{ - LayerSurface *self = (LayerSurface *)super; - - if (!self->layer_surface) { - g_critical ("layer_surface_get_popup () called when the layer surface wayland object has not yet been created"); - return NULL; - } + g_free (self); - struct xdg_popup *xdg_popup = xdg_surface_get_popup (popup_xdg_surface, NULL, positioner); - zwlr_layer_surface_v1_get_popup (self->layer_surface, xdg_popup); - return xdg_popup; } -static GdkRectangle -layer_surface_get_logical_geom (CustomShellSurface *super) -{ - (void)super; - return (GdkRectangle){0, 0, 0, 0}; -} - -static const CustomShellSurfaceVirtual layer_surface_virtual = { - .map = layer_surface_map, - .unmap = layer_surface_unmap, - .finalize = layer_surface_finalize, - .get_popup = layer_surface_get_popup, - .get_logical_geom = layer_surface_get_logical_geom, -}; - static void layer_surface_update_auto_exclusive_zone (LayerSurface *self) { @@ -302,10 +363,23 @@ LayerSurface * layer_surface_new (GtkWindow *gtk_window) { g_return_val_if_fail (gtk_wayland_get_layer_shell_global (), NULL); + g_return_val_if_fail (gtk_window, NULL); + g_return_val_if_fail (!gtk_widget_get_mapped (GTK_WIDGET (gtk_window)), NULL); LayerSurface *self = g_new0 (LayerSurface, 1); - self->super.virtual = &layer_surface_virtual; - custom_shell_surface_init ((CustomShellSurface *)self, gtk_window); + + self->gtk_window = gtk_window; + + g_object_set_data_full (G_OBJECT (gtk_window), + layer_surface_key, + self, + (GDestroyNotify) layer_surface_destroy); + g_signal_connect (gtk_window, "realize", G_CALLBACK (layer_surface_on_window_realize), self); + + if (gtk_widget_get_realized (GTK_WIDGET (gtk_window))) { + // We must be in the process of realizing now + layer_surface_on_window_realize (GTK_WIDGET (gtk_window), self); + } self->current_allocation = (GtkRequisition) { .width = 0, @@ -327,15 +401,6 @@ layer_surface_new (GtkWindow *gtk_window) return self; } -LayerSurface * -custom_shell_surface_get_layer_surface (CustomShellSurface *shell_surface) -{ - if (shell_surface && shell_surface->virtual == &layer_surface_virtual) - return (LayerSurface *)shell_surface; - else - return NULL; -} - void layer_surface_set_monitor (LayerSurface *self, GdkMonitor *monitor) { @@ -343,7 +408,7 @@ layer_surface_set_monitor (LayerSurface *self, GdkMonitor *monitor) if (monitor != self->monitor) { self->monitor = monitor; if (self->layer_surface) { - custom_shell_surface_remap ((CustomShellSurface *)self); + layer_surface_remap (self); } } } @@ -355,7 +420,7 @@ layer_surface_set_name_space (LayerSurface *self, char const* name_space) g_free ((gpointer)self->name_space); self->name_space = g_strdup (name_space); if (self->layer_surface) { - custom_shell_surface_remap ((CustomShellSurface *)self); + layer_surface_remap (self); } } } @@ -370,9 +435,9 @@ layer_surface_set_layer (LayerSurface *self, GtkLayerShellLayer layer) if (version >= ZWLR_LAYER_SURFACE_V1_SET_LAYER_SINCE_VERSION) { enum zwlr_layer_shell_v1_layer wlr_layer = gtk_layer_shell_layer_get_zwlr_layer_shell_v1_layer(layer); zwlr_layer_surface_v1_set_layer (self->layer_surface, wlr_layer); - custom_shell_surface_needs_commit ((CustomShellSurface *)self); + layer_surface_needs_commit (self); } else { - custom_shell_surface_remap ((CustomShellSurface *)self); + layer_surface_remap (self); } } } @@ -389,7 +454,7 @@ layer_surface_set_anchor (LayerSurface *self, GtkLayerShellEdge edge, gboolean a layer_surface_send_set_anchor (self); layer_surface_update_size (self); layer_surface_update_auto_exclusive_zone (self); - custom_shell_surface_needs_commit ((CustomShellSurface *)self); + layer_surface_needs_commit (self); } } } @@ -402,7 +467,7 @@ layer_surface_set_margin (LayerSurface *self, GtkLayerShellEdge edge, int margin self->margins[edge] = margin_size; layer_surface_send_set_margin (self); layer_surface_update_auto_exclusive_zone (self); - custom_shell_surface_needs_commit ((CustomShellSurface *)self); + layer_surface_needs_commit (self); } } @@ -416,7 +481,7 @@ layer_surface_set_exclusive_zone (LayerSurface *self, int exclusive_zone) self->exclusive_zone = exclusive_zone; if (self->layer_surface) { zwlr_layer_surface_v1_set_exclusive_zone (self->layer_surface, self->exclusive_zone); - custom_shell_surface_needs_commit ((CustomShellSurface *)self); + layer_surface_needs_commit (self); } } } @@ -446,7 +511,7 @@ layer_surface_set_keyboard_mode (LayerSurface *self, GtkLayerShellKeyboardMode m self->keyboard_mode = mode; if (self->layer_surface) { zwlr_layer_surface_v1_set_keyboard_interactivity (self->layer_surface, self->keyboard_mode); - custom_shell_surface_needs_commit ((CustomShellSurface *)self); + layer_surface_needs_commit (self); } } } @@ -459,3 +524,99 @@ layer_surface_get_namespace (LayerSurface *self) else return "gtk-layer-shell"; } + +static struct wl_proxy * +stubbed_xdg_toplevel_handle_request ( + void* data, + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args) +{ + // TODO + return NULL; +} + +static struct wl_proxy * +stubbed_xdg_surface_handle_request ( + void* data, + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args) +{ + LayerSurface *self = (LayerSurface *)data; + if (opcode == XDG_SURFACE_GET_TOPLEVEL) { + struct wl_proxy *toplevel = create_client_facing_proxy ( + proxy, + &xdg_toplevel_interface, + version, + stubbed_xdg_toplevel_handle_request, + NULL, + data); + self->client_facing_xdg_toplevel = (struct xdg_toplevel *)toplevel; + return toplevel; + } else if (opcode == XDG_SURFACE_GET_POPUP) { + g_critical ("XDG surface intercepted, but is now being used as popup"); + return create_client_facing_proxy (proxy, &xdg_popup_interface, version, NULL, NULL, NULL); + } else { + return NULL; + } +} + +static void +stubbed_xdg_surface_handle_destroy (void* data, struct wl_proxy *proxy) +{ + LayerSurface *self = (LayerSurface *)data; + layer_surface_unmap(self); +} + +struct wl_proxy * +layer_surface_handle_request ( + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args) +{ + const char* type = proxy->object.interface->name; + if (strcmp(type, xdg_wm_base_interface.name) == 0) { + if (opcode == XDG_WM_BASE_GET_XDG_SURFACE) { + if (pending_layer_surface && pending_layer_surface->wl_surface == (struct wl_surface *)args[1].o) { + struct wl_proxy *xdg_surface = create_client_facing_proxy ( + proxy, + &xdg_surface_interface, + version, + stubbed_xdg_surface_handle_request, + stubbed_xdg_surface_handle_destroy, + pending_layer_surface); + pending_layer_surface->client_facing_xdg_surface = (struct xdg_surface *)xdg_surface; + layer_surface_create_surface_object(pending_layer_surface); + return xdg_surface; + } + } + } else if (strcmp(type, xdg_surface_interface.name) == 0) { + if (opcode == XDG_SURFACE_GET_POPUP) { + LayerSurface *self = get_client_facing_proxy_data ((struct wl_proxy *)args[1].o, stubbed_xdg_surface_handle_request); + if (self) { + if (self->layer_surface) { + struct xdg_popup *xdg_popup = xdg_surface_get_popup ( + (struct xdg_surface *)proxy, + NULL, + (struct xdg_positioner *)args[2].o); + zwlr_layer_surface_v1_get_popup (self->layer_surface, xdg_popup); + return (struct wl_proxy *)xdg_popup; + } else { + g_critical ("tried to create popup before layer shell surface"); + return create_client_facing_proxy (proxy, &xdg_popup_interface, version, NULL, NULL, NULL); + } + } + } + } + return real_wl_proxy_marshal_array_flags (proxy, opcode, interface, version, flags, args); +} diff --git a/src/layer-surface.h b/src/layer-surface.h index 7833231..c43ca7e 100644 --- a/src/layer-surface.h +++ b/src/layer-surface.h @@ -12,19 +12,22 @@ #ifndef LAYER_SHELL_SURFACE_H #define LAYER_SHELL_SURFACE_H -#include "custom-shell-surface.h" #include "wlr-layer-shell-unstable-v1-client.h" #include "gtk-layer-shell.h" #include -// A LayerSurface * can be safely cast to a CustomShellSurface * +struct wl_surface; +struct xdg_surface; +struct xdg_positioner; + typedef struct _LayerSurface LayerSurface; // Functions that mutate this structure should all be in layer-surface.c to make the logic easier to understand // Struct is declared in this header to prevent the need for excess getters struct _LayerSurface { - CustomShellSurface super; + GtkWindow *gtk_window; + struct wl_surface *wl_surface; // Can be set at any time gboolean anchors[GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER]; // The current anchor @@ -43,12 +46,14 @@ struct _LayerSurface GtkRequisition current_allocation; // Last size allocation, or (0, 0) if there hasn't been one GtkRequisition cached_layer_size; // Last size sent to zwlr_layer_surface_v1_set_size (starts as 0, 0) GtkRequisition last_configure_size; // Last size received from a configure event + + struct xdg_surface *client_facing_xdg_surface; + struct xdg_toplevel *client_facing_xdg_toplevel; }; LayerSurface *layer_surface_new (GtkWindow *gtk_window); -// Safe cast, returns NULL if wrong type sent -LayerSurface *custom_shell_surface_get_layer_surface (CustomShellSurface *shell_surface); +LayerSurface *gtk_window_get_layer_surface (GtkWindow *gtk_window); // Surface is remapped in order to set void layer_surface_set_monitor (LayerSurface *self, GdkMonitor *monitor); // Can be null for default @@ -62,7 +67,16 @@ void layer_surface_set_exclusive_zone (LayerSurface *self, int exclusive_zone); void layer_surface_auto_exclusive_zone_enable (LayerSurface *self); void layer_surface_set_keyboard_mode (LayerSurface *self, GtkLayerShellKeyboardMode mode); -// Returns the effective namespace (default if unset). Does not return ownership. Never returns NULL. Handles null self. +// Returns the effective namespace (default if unset). Does not return ownership. Never returns NULL. Handles NULL self. const char* layer_surface_get_namespace (LayerSurface *self); +// Used by libwayland wrappers +struct wl_proxy *layer_surface_handle_request ( + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args); + #endif // LAYER_SHELL_SURFACE_H diff --git a/src/libwayland-wrappers.c b/src/libwayland-wrappers.c new file mode 100644 index 0000000..5f29587 --- /dev/null +++ b/src/libwayland-wrappers.c @@ -0,0 +1,339 @@ +#include +#include +#include +#include "libwayland-wrappers.h" +#include "layer-surface.h" +#include "wayland-utils.h" + +struct wl_proxy *(*real_wl_proxy_marshal_array_flags) ( + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args) = NULL; + +void (*real_wl_proxy_destroy) (struct wl_proxy *proxy) = NULL; + +int (*real_wl_proxy_add_dispatcher)(struct wl_proxy *proxy, + wl_dispatcher_func_t dispatcher_func, + const void * dispatcher_data, void *data) = NULL; + +static void +libwayland_wrappers_init () +{ + if (real_wl_proxy_marshal_array_flags && real_wl_proxy_destroy) + return; + + void *handle = dlopen("libwayland-client.so", RTLD_LAZY); + if (handle == NULL) { + g_error ("failed to dlopen libwayland"); + } + +#define INIT_SYM(name) if (!(real_##name = dlsym(handle, #name))) {\ + g_error ("dlsym failed to load %s", #name); } + + INIT_SYM(wl_proxy_marshal_array_flags); + INIT_SYM(wl_proxy_destroy); + INIT_SYM(wl_proxy_add_dispatcher); + +#undef INIT_SYM + + //dlclose(handle); +} + +// From wayland-private.h in libwayland +#define WL_CLOSURE_MAX_ARGS 20 + +// From wayland-private.h in libwayland +struct argument_details { + char type; + int nullable; +}; + +// From connection.c in libwayland +static const char * +get_next_argument(const char *signature, struct argument_details *details) +{ + details->nullable = 0; + for(; *signature; ++signature) { + switch(*signature) { + case 'i': + case 'u': + case 'f': + case 's': + case 'o': + case 'n': + case 'a': + case 'h': + details->type = *signature; + return signature + 1; + case '?': + details->nullable = 1; + } + } + details->type = '\0'; + return signature; +} + +// From connection.c in libwayland +static void +wl_argument_from_va_list(const char *signature, union wl_argument *args, + int count, va_list ap) +{ + int i; + const char *sig_iter; + struct argument_details arg; + + sig_iter = signature; + for (i = 0; i < count; i++) { + sig_iter = get_next_argument(sig_iter, &arg); + + switch(arg.type) { + case 'i': + args[i].i = va_arg(ap, int32_t); + break; + case 'u': + args[i].u = va_arg(ap, uint32_t); + break; + case 'f': + args[i].f = va_arg(ap, wl_fixed_t); + break; + case 's': + args[i].s = va_arg(ap, const char *); + break; + case 'o': + args[i].o = va_arg(ap, struct wl_object *); + break; + case 'n': + args[i].o = va_arg(ap, struct wl_object *); + break; + case 'a': + args[i].a = va_arg(ap, struct wl_array *); + break; + case 'h': + args[i].h = va_arg(ap, int32_t); + break; + case '\0': + return; + } + } +} + +struct wrapped_proxy { + struct wl_proxy proxy; + client_facing_proxy_handler_func_t handler; + client_facing_proxy_destroy_func_t destroy; + void* data; +}; + +// The ID for ALL proxies that are created by us and not managed by the real libwayland +const uint32_t client_facing_proxy_id = 6942069; + +struct wl_proxy * +create_client_facing_proxy ( + struct wl_proxy *factory, + const struct wl_interface *interface, + uint32_t version, + client_facing_proxy_handler_func_t handler, + client_facing_proxy_destroy_func_t destroy, + void* data) +{ + struct wrapped_proxy* allocation = g_new0 (struct wrapped_proxy, 1); + g_assert (allocation); + allocation->proxy.object.interface = interface; + allocation->proxy.display = factory->display; + allocation->proxy.queue = factory->queue; + allocation->proxy.refcount = 1; + allocation->proxy.version = version; + allocation->proxy.object.id = client_facing_proxy_id; + allocation->handler = handler; + allocation->destroy = destroy; + allocation->data = data; + return &allocation->proxy; +} + +void +clear_client_facing_proxy_data (struct wl_proxy *proxy) +{ + if (!proxy) { + return; + } + g_assert(proxy->object.id == client_facing_proxy_id); + struct wrapped_proxy *wrapper = (struct wrapped_proxy *)proxy; + wrapper->data = NULL; + wrapper->destroy = NULL; + wrapper->handler = NULL; +} + +void * +get_client_facing_proxy_data (struct wl_proxy *proxy, void* expected_handler) +{ + if (proxy && proxy->object.id == client_facing_proxy_id) { + struct wrapped_proxy *wrapper = (struct wrapped_proxy *)proxy; + if (wrapper->handler == expected_handler) { + return wrapper->data; + } else { + return NULL; + } + } else { + return NULL; + } +} + +// Overrides the function in wayland-client.c in libwayland +struct wl_proxy * +wl_proxy_marshal_array_flags ( + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args) +{ + libwayland_wrappers_init (); + if (proxy->object.id == client_facing_proxy_id) { + struct wrapped_proxy *wrapper = (struct wrapped_proxy *)proxy; + if (wrapper->handler) { + return wrapper->handler(wrapper->data, proxy, opcode, interface, version, flags, args); + } else { + return NULL; + } + } else { + return layer_surface_handle_request (proxy, opcode, interface, version, flags, args); + } +} + +// Overrides the function in wayland-client.c in libwayland +struct wl_proxy * +wl_proxy_marshal_flags(struct wl_proxy *proxy, uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, ...) +{ + union wl_argument args[WL_CLOSURE_MAX_ARGS]; + va_list ap; + + va_start(ap, flags); + wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, + args, WL_CLOSURE_MAX_ARGS, ap); + va_end(ap); + + return wl_proxy_marshal_array_flags(proxy, opcode, interface, version, flags, args); +} + +// Overrides the function in wayland-client.c in libwayland +void +wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...) +{ + union wl_argument args[WL_CLOSURE_MAX_ARGS]; + va_list ap; + + va_start(ap, opcode); + wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, + args, WL_CLOSURE_MAX_ARGS, ap); + va_end(ap); + + wl_proxy_marshal_array_constructor(proxy, opcode, args, NULL); +} + +// Overrides the function in wayland-client.c in libwayland +void +wl_proxy_marshal_array(struct wl_proxy *proxy, uint32_t opcode, + union wl_argument *args) +{ + wl_proxy_marshal_array_constructor(proxy, opcode, args, NULL); +} + +// Overrides the function in wayland-client.c in libwayland +struct wl_proxy * +wl_proxy_marshal_constructor(struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + ...) +{ + union wl_argument args[WL_CLOSURE_MAX_ARGS]; + va_list ap; + + va_start(ap, interface); + wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, + args, WL_CLOSURE_MAX_ARGS, ap); + va_end(ap); + + return wl_proxy_marshal_array_constructor(proxy, opcode, + args, interface); +} + +// Overrides the function in wayland-client.c in libwayland +struct wl_proxy * +wl_proxy_marshal_constructor_versioned(struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + ...) +{ + union wl_argument args[WL_CLOSURE_MAX_ARGS]; + va_list ap; + + va_start(ap, version); + wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, + args, WL_CLOSURE_MAX_ARGS, ap); + va_end(ap); + + return wl_proxy_marshal_array_constructor_versioned(proxy, opcode, + args, interface, + version); +} + +// Overrides the function in wayland-client.c in libwayland +struct wl_proxy * +wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, + uint32_t opcode, union wl_argument *args, + const struct wl_interface *interface) +{ + return wl_proxy_marshal_array_constructor_versioned(proxy, opcode, + args, interface, + proxy->version); +} + +// Overrides the function in wayland-client.c in libwayland +struct wl_proxy * +wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, + uint32_t opcode, + union wl_argument *args, + const struct wl_interface *interface, + uint32_t version) +{ + return wl_proxy_marshal_array_flags(proxy, opcode, interface, version, 0, args); +} + +// Overrides the function in wayland-client.c in libwayland +int +wl_proxy_add_dispatcher(struct wl_proxy *proxy, + wl_dispatcher_func_t dispatcher_func, + const void * dispatcher_data, void *data) +{ + libwayland_wrappers_init (); + if (proxy->object.id == client_facing_proxy_id) { + g_critical ("wl_proxy_add_dispatcher () not supported for client-facing proxies"); + } + return real_wl_proxy_add_dispatcher(proxy, dispatcher_func, dispatcher_data, data); +} + +// Overrides the function in wayland-client.c in libwayland +void +wl_proxy_destroy (struct wl_proxy *proxy) +{ + libwayland_wrappers_init (); + if (proxy->object.id == client_facing_proxy_id) { + struct wrapped_proxy *wrapper = (struct wrapped_proxy *)proxy; + if (wrapper->destroy) { + wrapper->destroy(wrapper->data, proxy); + } + // No need to worry about the refcount since it's only accessibly within libwayland, and it's only used by + // functions that never see client facing objects + g_free (proxy); + } else { + real_wl_proxy_destroy (proxy); + } +} diff --git a/src/libwayland-wrappers.h b/src/libwayland-wrappers.h new file mode 100644 index 0000000..d9ca3bf --- /dev/null +++ b/src/libwayland-wrappers.h @@ -0,0 +1,63 @@ +#ifndef LIBWAYLAND_WRAPPERS_H +#define LIBWAYLAND_WRAPPERS_H + +#include + +#define DISPATCH_CLIENT_FACING_EVENT(listener, proxy, event, ...) if (((struct wl_proxy*)proxy)->object.implementation) { \ + ((struct listener *)((struct wl_proxy*)proxy)->object.implementation)->event( \ + ((struct wl_proxy*)proxy)->user_data, __VA_ARGS__); } + +// From wayland-private.h in libwayland +struct wl_object { + const struct wl_interface *interface; + const void *implementation; + uint32_t id; +}; + +// From wayland-client.c in libwayland +struct wl_proxy { + struct wl_object object; + struct wl_display *display; + struct wl_event_queue *queue; + uint32_t flags; + int refcount; + void *user_data; + wl_dispatcher_func_t dispatcher; + uint32_t version; + const char * const *tag; +}; + +typedef struct wl_proxy *(*client_facing_proxy_handler_func_t) ( + void* data, + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args); + +typedef void (*client_facing_proxy_destroy_func_t) ( + void* data, + struct wl_proxy *proxy); + +struct wl_proxy *create_client_facing_proxy ( + struct wl_proxy *factory, + const struct wl_interface *interface, + uint32_t version, + client_facing_proxy_handler_func_t handler, + client_facing_proxy_destroy_func_t destroy, + void* data); + +void clear_client_facing_proxy_data (struct wl_proxy *proxy); + +void *get_client_facing_proxy_data (struct wl_proxy *proxy, void* expected_handler); + +extern struct wl_proxy * (*real_wl_proxy_marshal_array_flags) ( + struct wl_proxy *proxy, + uint32_t opcode, + const struct wl_interface *interface, + uint32_t version, + uint32_t flags, + union wl_argument *args); + +#endif // LIBWAYLAND_WRAPPERS_H diff --git a/src/meson.build b/src/meson.build index 6d75d79..aeb1812 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,12 +1,8 @@ srcs = files( 'api.c', - 'gtk-wayland.c', - 'custom-shell-surface.c', + 'libwayland-wrappers.c', 'layer-surface.c', - 'xdg-popup-surface.c', - 'xdg-toplevel-surface.c', - 'gtk-priv-access.c', - 'simple-conversions.c') + 'wayland-utils.c') version_args = [ '-DGTK_LAYER_SHELL_MAJOR=' + meson.project_version().split('.')[0], @@ -18,7 +14,7 @@ gtk_layer_shell_lib = library('gtk-layer-shell', srcs, client_protocol_srcs, c_args: version_args, include_directories: [gtk_layer_shell_inc], - dependencies: [gtk, wayland_client, gtk_priv], + dependencies: [gtk, wayland_client], version: meson.project_version(), soversion: lib_so_version, install: true) diff --git a/src/simple-conversions.c b/src/wayland-utils.c similarity index 68% rename from src/simple-conversions.c rename to src/wayland-utils.c index 33777b7..9e63306 100644 --- a/src/simple-conversions.c +++ b/src/wayland-utils.c @@ -9,7 +9,78 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "simple-conversions.h" +#include "wayland-utils.h" +#include +#include +#include + +static struct wl_registry *wl_registry_global = NULL; +static struct zwlr_layer_shell_v1 *layer_shell_global = NULL; + +static gboolean has_initialized = FALSE; + +struct zwlr_layer_shell_v1 * +gtk_wayland_get_layer_shell_global () +{ + return layer_shell_global; +} + +static void +wl_registry_handle_global (void *_data, + struct wl_registry *registry, + uint32_t id, + const char *interface, + uint32_t version) +{ + (void)_data; + + // pull out needed globals + if (strcmp (interface, zwlr_layer_shell_v1_interface.name) == 0) { + g_warn_if_fail (zwlr_layer_shell_v1_interface.version >= 3); + layer_shell_global = wl_registry_bind (registry, + id, + &zwlr_layer_shell_v1_interface, + MIN((uint32_t)zwlr_layer_shell_v1_interface.version, version)); + } +} + +static void +wl_registry_handle_global_remove (void *_data, + struct wl_registry *_registry, + uint32_t _id) +{ + (void)_data; + (void)_registry; + (void)_id; + + // TODO +} + +static const struct wl_registry_listener wl_registry_listener = { + .global = wl_registry_handle_global, + .global_remove = wl_registry_handle_global_remove, +}; + +void +gtk_wayland_init_if_needed () +{ + if (has_initialized) + return; + + GdkDisplay *gdk_display = gdk_display_get_default (); + g_return_if_fail (gdk_display); + g_return_if_fail (GDK_IS_WAYLAND_DISPLAY (gdk_display)); + + struct wl_display *wl_display = gdk_wayland_display_get_wl_display (gdk_display); + wl_registry_global = wl_display_get_registry (wl_display); + wl_registry_add_listener (wl_registry_global, &wl_registry_listener, NULL); + wl_display_roundtrip (wl_display); + + if (!layer_shell_global) + g_warning ("it appears your Wayland compositor does not support the Layer Shell protocol"); + + has_initialized = TRUE; +} enum zwlr_layer_shell_v1_layer gtk_layer_shell_layer_get_zwlr_layer_shell_v1_layer (GtkLayerShellLayer layer) diff --git a/src/simple-conversions.h b/src/wayland-utils.h similarity index 89% rename from src/simple-conversions.h rename to src/wayland-utils.h index bea2294..34b52fb 100644 --- a/src/simple-conversions.h +++ b/src/wayland-utils.h @@ -9,13 +9,17 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SIMPLE_CONVERSIONS_H -#define SIMPLE_CONVERSIONS_H +#ifndef WAYLAND_UTILS_H +#define WAYLAND_UTILS_H #include "xdg-shell-client.h" #include "wlr-layer-shell-unstable-v1-client.h" #include "gtk-layer-shell.h" #include +#include + +void gtk_wayland_init_if_needed (void); +struct zwlr_layer_shell_v1 *gtk_wayland_get_layer_shell_global (void); enum zwlr_layer_shell_v1_layer gtk_layer_shell_layer_get_zwlr_layer_shell_v1_layer (GtkLayerShellLayer layer); uint32_t gtk_layer_shell_edge_array_get_zwlr_layer_shell_v1_anchor (gboolean edges[GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER]); @@ -23,4 +27,4 @@ enum xdg_positioner_gravity gdk_gravity_get_xdg_positioner_gravity (GdkGravity g enum xdg_positioner_anchor gdk_gravity_get_xdg_positioner_anchor (GdkGravity anchor); enum xdg_positioner_constraint_adjustment gdk_anchor_hints_get_xdg_positioner_constraint_adjustment (GdkAnchorHints hints); -#endif // SIMPLE_CONVERSIONS_H +#endif // WAYLAND_UTILS_H diff --git a/src/xdg-popup-surface.c b/src/xdg-popup-surface.c deleted file mode 100644 index aa194fb..0000000 --- a/src/xdg-popup-surface.c +++ /dev/null @@ -1,308 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "xdg-popup-surface.h" - -#include "custom-shell-surface.h" -#include "gtk-wayland.h" -#include "simple-conversions.h" -#include "gtk-priv-access.h" - -#include "xdg-shell-client.h" - -#include -#include -#include - -struct _XdgPopupSurface -{ - CustomShellSurface super; - - XdgPopupPosition position; - - GdkRectangle cached_allocation; - GdkRectangle geom; - - // These can be NULL - struct xdg_surface *xdg_surface; - struct xdg_popup *xdg_popup; -}; - -static void -xdg_surface_handle_configure (void *data, - struct xdg_surface *_xdg_surface, - uint32_t serial) -{ - XdgPopupSurface *self = data; - (void)_xdg_surface; - - xdg_surface_ack_configure (self->xdg_surface, serial); -} - -static const struct xdg_surface_listener xdg_surface_listener = { - .configure = xdg_surface_handle_configure, -}; - -static void -xdg_popup_handle_configure (void *data, - struct xdg_popup *_xdg_popup, - int32_t _x, - int32_t _y, - int32_t width, - int32_t height) -{ - XdgPopupSurface *self = data; - (void)_xdg_popup; - (void)_x; - (void)_y; - - g_return_if_fail(width >= 0 && height >= 0); // Protocol error - - // Technically this should not be applied until we get a xdg_surface.configure - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - gtk_window_resize (gtk_window, width, height); - GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (gtk_window)); - g_return_if_fail (gdk_window); - // calculating the correct values is hard, but we're not required to provide them - g_signal_emit_by_name (gdk_window, "moved-to-rect", NULL, NULL, FALSE, FALSE); -} - -static void -xdg_popup_handle_popup_done (void *data, - struct xdg_popup *_xdg_popup) -{ - (void)_xdg_popup; - - XdgPopupSurface *self = data; - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - gtk_widget_unmap (GTK_WIDGET (gtk_window)); -} - -static const struct xdg_popup_listener xdg_popup_listener = { - .configure = xdg_popup_handle_configure, - .popup_done = xdg_popup_handle_popup_done, -}; - -static void -xdg_popup_surface_get_anchor_rect (XdgPopupSurface *self, GdkRectangle *rect) -{ - // The anchor rect is given relative to the actual top-left of the parent GDK window surface - // We need it realative to the logical geometry of the transient-for window, which may be sevel layers up - *rect = self->position.rect; - // It is a protocol error for size to be <= 0 - rect->width = MAX (rect->width, 1); - rect->height = MAX (rect->height, 1); - GdkWindow *parent_window = self->position.transient_for_gdk_window; - CustomShellSurface *transient_for_shell_surface = self->position.transient_for_shell_surface; - GtkWidget *transient_for_widget = GTK_WIDGET (custom_shell_surface_get_gtk_window (transient_for_shell_surface)); - GdkWindow *transient_for_window = gtk_widget_get_window (transient_for_widget); - g_return_if_fail (parent_window); - g_return_if_fail (transient_for_window); - // Traverse up to the transient-for window adding each window's position relative to it's parent along the way - while (parent_window && parent_window != transient_for_window) { - gint x, y; - gdk_window_get_position (parent_window, &x, &y); - rect->x += x; - rect->y += y; - parent_window = gdk_window_get_effective_parent (parent_window); - } - if (parent_window != transient_for_window) { - g_warning ("Could not find position of child window %p relative to parent window %p", - (void *)self->position.transient_for_gdk_window, - (void *)transient_for_window); - } - // Subtract the transient-for window's logical top-left - GdkRectangle transient_for_geom = - transient_for_shell_surface->virtual->get_logical_geom (transient_for_shell_surface); - rect->x -= transient_for_geom.x; - rect->y -= transient_for_geom.y; -} - -static void -xdg_popup_surface_maybe_grab (XdgPopupSurface *self, GdkWindow *gdk_window) -{ - GdkSeat *grab_gdk_seat = gdk_window_get_priv_grab_seat (gdk_window); - if (!grab_gdk_seat) { - // If we really wanted a seat we could get the default one - // but grab_gdk_seat being null is an indication we should not grab - return; - } - - struct wl_seat *grab_wl_seat = gdk_wayland_seat_get_wl_seat (grab_gdk_seat); - if (!grab_wl_seat) - return; // unlikely - - uint32_t serial = gdk_window_get_priv_latest_serial (grab_gdk_seat); - - // serial might be 0, but the compositor might not care; YOLO - xdg_popup_grab(self->xdg_popup, grab_wl_seat, serial); -} - -static void -xdg_popup_surface_map (CustomShellSurface *super, struct wl_surface *wl_surface) -{ - XdgPopupSurface *self = (XdgPopupSurface *)super; - - g_return_if_fail (!self->xdg_popup); - g_return_if_fail (!self->xdg_surface); - - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window (super); - GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (gtk_window)); - g_return_if_fail (gdk_window); - GdkRectangle rect; - xdg_popup_surface_get_anchor_rect (self, &rect); - struct xdg_wm_base *xdg_wm_base_global = gtk_wayland_get_xdg_wm_base_global (); - g_return_if_fail (xdg_wm_base_global); - struct xdg_positioner *positioner = xdg_wm_base_create_positioner (xdg_wm_base_global); - self->geom = gtk_wayland_get_logical_geom (gtk_window); - enum xdg_positioner_anchor anchor = gdk_gravity_get_xdg_positioner_anchor(self->position.rect_anchor); - enum xdg_positioner_gravity gravity = gdk_gravity_get_xdg_positioner_gravity(self->position.window_anchor); - enum xdg_positioner_constraint_adjustment constraint_adjustment = - gdk_anchor_hints_get_xdg_positioner_constraint_adjustment (self->position.anchor_hints); - xdg_positioner_set_size (positioner, self->geom.width, self->geom.height); - xdg_positioner_set_anchor_rect (positioner, rect.x, rect.y, rect.width, rect.height); - xdg_positioner_set_offset (positioner, self->position.rect_anchor_d.x, self->position.rect_anchor_d.y); - xdg_positioner_set_anchor (positioner, anchor); - xdg_positioner_set_gravity (positioner, gravity); - xdg_positioner_set_constraint_adjustment (positioner, constraint_adjustment); - - self->xdg_surface = xdg_wm_base_get_xdg_surface (xdg_wm_base_global, wl_surface); - g_return_if_fail (self->xdg_surface); - xdg_surface_add_listener (self->xdg_surface, &xdg_surface_listener, self); - - CustomShellSurface *transient_for_shell_surface = self->position.transient_for_shell_surface; - self->xdg_popup = transient_for_shell_surface->virtual->get_popup (transient_for_shell_surface, - self->xdg_surface, - positioner); - g_return_if_fail (self->xdg_popup); - xdg_popup_add_listener (self->xdg_popup, &xdg_popup_listener, self); - - xdg_positioner_destroy (positioner); - - xdg_popup_surface_maybe_grab (self, gdk_window); - xdg_surface_set_window_geometry (self->xdg_surface, - self->geom.x, - self->geom.y, - self->geom.width, - self->geom.height); -} - -static void -xdg_popup_surface_unmap (CustomShellSurface *super) -{ - XdgPopupSurface *self = (XdgPopupSurface *)super; - - if (self->xdg_popup) { - xdg_popup_destroy (self->xdg_popup); - self->xdg_popup = NULL; - } - - if (self->xdg_surface) { - xdg_surface_destroy (self->xdg_surface); - self->xdg_surface = NULL; - } -} - -static void -xdg_popup_surface_finalize (CustomShellSurface *super) -{ - xdg_popup_surface_unmap (super); -} - -static struct xdg_popup * -xdg_popup_surface_get_popup (CustomShellSurface *super, - struct xdg_surface *popup_xdg_surface, - struct xdg_positioner *positioner) -{ - XdgPopupSurface *self = (XdgPopupSurface *)super; - - if (!self->xdg_surface) { - g_critical ("xdg_popup_surface_get_popup () called when the xdg surface wayland object has not yet been created"); - return NULL; - } - - return xdg_surface_get_popup (popup_xdg_surface, self->xdg_surface, positioner); -} - -static GdkRectangle -xdg_popup_surface_get_logical_geom (CustomShellSurface *super) -{ - XdgPopupSurface *self = (XdgPopupSurface *)super; - return self->geom; -} - -static const CustomShellSurfaceVirtual xdg_popup_surface_virtual = { - .map = xdg_popup_surface_map, - .unmap = xdg_popup_surface_unmap, - .finalize = xdg_popup_surface_finalize, - .get_popup = xdg_popup_surface_get_popup, - .get_logical_geom = xdg_popup_surface_get_logical_geom, -}; - -static void -xdg_popup_surface_on_size_allocate (GtkWidget *_widget, - GdkRectangle *allocation, - XdgPopupSurface *self) -{ - (void)_widget; - - if (self->xdg_surface && !gdk_rectangle_equal (&self->cached_allocation, allocation)) { - self->cached_allocation = *allocation; - // allocation only used for catching duplicate calls. To get the correct geom we need to check something else - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - self->geom = gtk_wayland_get_logical_geom (gtk_window); - xdg_surface_set_window_geometry (self->xdg_surface, - self->geom.x, - self->geom.y, - self->geom.width, - self->geom.height); - } -} - -XdgPopupSurface * -xdg_popup_surface_new (GtkWindow *gtk_window, XdgPopupPosition const* position) -{ - XdgPopupSurface *self = g_new0 (XdgPopupSurface, 1); - g_assert (gtk_window); - g_assert (position); - self->super.virtual = &xdg_popup_surface_virtual; - custom_shell_surface_init ((CustomShellSurface *)self, gtk_window); - - self->position = *position; - self->cached_allocation = (GdkRectangle) { - .x = 0, - .y = 0, - .width = 0, - .height = 0, - }; - self->xdg_surface = NULL; - self->xdg_popup = NULL; - - g_signal_connect (gtk_window, "size-allocate", G_CALLBACK (xdg_popup_surface_on_size_allocate), self); - - return self; -} - -void -xdg_popup_surface_update_position (XdgPopupSurface *self, XdgPopupPosition const* position) -{ - self->position = *position; - // Don't bother trying to remap. It's not needed and breaks shit -} - -XdgPopupSurface * -custom_shell_surface_get_xdg_popup (CustomShellSurface *shell_surface) -{ - if (shell_surface && shell_surface->virtual == &xdg_popup_surface_virtual) - return (XdgPopupSurface *)shell_surface; - else - return NULL; -} diff --git a/src/xdg-popup-surface.h b/src/xdg-popup-surface.h deleted file mode 100644 index 35c4478..0000000 --- a/src/xdg-popup-surface.h +++ /dev/null @@ -1,39 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef XDG_POPUP_SURFACE_H -#define XDG_POPUP_SURFACE_H - -#include "custom-shell-surface.h" - -// an XdgPopupSurface * can be safely cast to a CustomShellSurface * -typedef struct _XdgPopupSurface XdgPopupSurface; - -typedef struct -{ - CustomShellSurface *transient_for_shell_surface; - GdkWindow *transient_for_gdk_window; - GdkRectangle rect; - GdkGravity rect_anchor, window_anchor; - GdkAnchorHints anchor_hints; - GdkPoint rect_anchor_d; -} XdgPopupPosition; - -// Copies position, does not take ownership -XdgPopupSurface *xdg_popup_surface_new (GtkWindow *gtk_window, XdgPopupPosition const* position); - -// Copies position, does not take ownership -void xdg_popup_surface_update_position (XdgPopupSurface *self, XdgPopupPosition const* position); - -// Safe cast, returns NULL if wrong type sent -XdgPopupSurface *custom_shell_surface_get_xdg_popup (CustomShellSurface *shell_surface); - -#endif // XDG_POPUP_SURFACE_H diff --git a/src/xdg-toplevel-surface.c b/src/xdg-toplevel-surface.c deleted file mode 100644 index 0f98a0b..0000000 --- a/src/xdg-toplevel-surface.c +++ /dev/null @@ -1,222 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "xdg-toplevel-surface.h" - -#include "custom-shell-surface.h" -#include "gtk-wayland.h" -#include "simple-conversions.h" - -#include "xdg-shell-client.h" - -#include -#include -#include - -struct _XdgToplevelSurface -{ - CustomShellSurface super; - - GdkRectangle cached_allocation; - GdkRectangle geom; - - // These can be NULL - struct xdg_surface *xdg_surface; - struct xdg_toplevel *xdg_toplevel; -}; - -static void -xdg_surface_handle_configure (void *_data, - struct xdg_surface *xdg_surface, - uint32_t serial) -{ - (void)_data; - - xdg_surface_ack_configure (xdg_surface, serial); -} - -static const struct xdg_surface_listener xdg_surface_listener = { - .configure = xdg_surface_handle_configure, -}; - -static void -xdg_toplevel_handle_configure (void *data, - struct xdg_toplevel *_xdg_toplevel, - int32_t width, - int32_t height, - struct wl_array *_states) -{ - XdgToplevelSurface *self = data; - (void)_xdg_toplevel; - (void)_states; - - // Technically this should not be applied until we get a xdg_surface.configure - if (width > 0 || height > 0) { - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - gtk_window_resize (gtk_window, width, height); - } - // Ignore the states -} - -static void -xdg_toplevel_handle_close (void *data, - struct xdg_toplevel *_xdg_toplevel) -{ - XdgToplevelSurface *self = data; - (void)_xdg_toplevel; - - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - gtk_window_close (gtk_window); -} - -static const struct xdg_toplevel_listener xdg_toplevel_listener = { - .configure = xdg_toplevel_handle_configure, - .close = xdg_toplevel_handle_close, -}; - -static void -xdg_toplevel_surface_map (CustomShellSurface *super, struct wl_surface *wl_surface) -{ - XdgToplevelSurface *self = (XdgToplevelSurface *)super; - - g_return_if_fail (!self->xdg_toplevel); - g_return_if_fail (!self->xdg_surface); - - struct xdg_wm_base *xdg_wm_base_global = gtk_wayland_get_xdg_wm_base_global (); - g_return_if_fail (xdg_wm_base_global); - - self->xdg_surface = xdg_wm_base_get_xdg_surface (xdg_wm_base_global, wl_surface); - g_return_if_fail (self->xdg_surface); - xdg_surface_add_listener (self->xdg_surface, &xdg_surface_listener, self); - - self->xdg_toplevel = xdg_surface_get_toplevel (self->xdg_surface); - - // name is either static or managed by the window widget - const char *name = gtk_window_get_title (custom_shell_surface_get_gtk_window (super)); - if (name == NULL) - name = "gtk-layer-shell"; - xdg_toplevel_set_title (self->xdg_toplevel, name); - - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window (super); - self->geom = gtk_wayland_get_logical_geom (gtk_window); - xdg_surface_set_window_geometry (self->xdg_surface, - self->geom.x, - self->geom.y, - self->geom.width, - self->geom.height); - xdg_toplevel_add_listener (self->xdg_toplevel, &xdg_toplevel_listener, self); -} - -static void -xdg_toplevel_surface_unmap (CustomShellSurface *super) -{ - XdgToplevelSurface *self = (XdgToplevelSurface *)super; - - if (self->xdg_toplevel) { - xdg_toplevel_destroy (self->xdg_toplevel); - self->xdg_toplevel = NULL; - } - - if (self->xdg_surface) { - xdg_surface_destroy (self->xdg_surface); - self->xdg_surface = NULL; - } -} - -static void -xdg_toplevel_surface_finalize (CustomShellSurface *super) -{ - xdg_toplevel_surface_unmap (super); -} - -static struct xdg_popup * -xdg_toplevel_surface_get_popup (CustomShellSurface *super, - struct xdg_surface *popup_xdg_surface, - struct xdg_positioner *positioner) -{ - XdgToplevelSurface *self = (XdgToplevelSurface *)super; - - if (!self->xdg_surface) { - g_critical ("xdg_toplevel_surface_get_popup () called when the xdg surface wayland object has not yet been created"); - return NULL; - } - - return xdg_surface_get_popup (popup_xdg_surface, self->xdg_surface, positioner); -} - -static GdkRectangle -xdg_toplevel_surface_get_logical_geom (CustomShellSurface *super) -{ - XdgToplevelSurface *self = (XdgToplevelSurface *)super; - return self->geom; -} - -static const CustomShellSurfaceVirtual xdg_toplevel_surface_virtual = { - .map = xdg_toplevel_surface_map, - .unmap = xdg_toplevel_surface_unmap, - .finalize = xdg_toplevel_surface_finalize, - .get_popup = xdg_toplevel_surface_get_popup, - .get_logical_geom = xdg_toplevel_surface_get_logical_geom, -}; - -static void -xdg_toplevel_surface_on_size_allocate (GtkWidget *_widget, - GdkRectangle *allocation, - XdgToplevelSurface *self) -{ - (void)_widget; - - if (self->xdg_surface && !gdk_rectangle_equal (&self->cached_allocation, allocation)) { - self->cached_allocation = *allocation; - // allocation only used for catching duplicate calls. To get the correct geom we need to check something else - GtkWindow *gtk_window = custom_shell_surface_get_gtk_window ((CustomShellSurface *)self); - self->geom = gtk_wayland_get_logical_geom (gtk_window); - xdg_surface_set_window_geometry (self->xdg_surface, - self->geom.x, - self->geom.y, - self->geom.width, - self->geom.height); - } -} - -XdgToplevelSurface * -xdg_toplevel_surface_new (GtkWindow *gtk_window) -{ - g_return_val_if_fail (gtk_wayland_get_xdg_wm_base_global (), NULL); - - XdgToplevelSurface *self = g_new0 (XdgToplevelSurface, 1); - self->super.virtual = &xdg_toplevel_surface_virtual; - custom_shell_surface_init ((CustomShellSurface *)self, gtk_window); - - self->cached_allocation = (GdkRectangle) { - .x = 0, - .y = 0, - .width = 0, - .height = 0, - }; - self->xdg_surface = NULL; - self->xdg_toplevel = NULL; - - gtk_window_set_decorated (gtk_window, FALSE); - g_signal_connect (gtk_window, "size-allocate", G_CALLBACK (xdg_toplevel_surface_on_size_allocate), self); - - return self; -} - -XdgToplevelSurface * -custom_shell_surface_get_xdg_toplevel (CustomShellSurface *shell_surface) -{ - if (shell_surface && shell_surface->virtual == &xdg_toplevel_surface_virtual) - return (XdgToplevelSurface *)shell_surface; - else - return NULL; -} - diff --git a/src/xdg-toplevel-surface.h b/src/xdg-toplevel-surface.h deleted file mode 100644 index b9fd3b7..0000000 --- a/src/xdg-toplevel-surface.h +++ /dev/null @@ -1,25 +0,0 @@ -/* This entire file is licensed under MIT - * - * Copyright 2020 Sophie Winter - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef XDG_TOPLEVEL_SURFACE_H -#define XDG_TOPLEVEL_SURFACE_H - -#include "custom-shell-surface.h" - -// an XdgToplevelSurface * can be safely cast to a CustomShellSurface * -typedef struct _XdgToplevelSurface XdgToplevelSurface; - -XdgToplevelSurface *xdg_toplevel_surface_new (GtkWindow *gtk_window); - -// Safe cast, returns NULL if wrong type sent -XdgToplevelSurface *custom_shell_surface_get_xdg_toplevel (CustomShellSurface *shell_surface); - -#endif // XDG_TOPLEVEL_SURFACE_H