123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- From a040ccb96094f1d3a1ee81a6733c9434722bdf6c Mon Sep 17 00:00:00 2001
- From: Evan Maddock <5157277+EbonJaeger@users.noreply.github.com>
- Date: Sat, 2 Mar 2024 09:54:41 -0500
- Subject: [PATCH] vapi: Update libxfce4windowing to 4.19.3 (#547)
- Fixes #546
- Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
- ---
- src/daemon/tabswitcher.vala | 6 +--
- src/panel/applets/workspaces/WindowIcon.vala | 2 +-
- .../applets/workspaces/WorkspaceItem.vala | 2 +-
- .../applets/workspaces/WorkspacesApplet.vala | 6 +--
- vapi/README.md | 33 +++++++++---
- vapi/libxfce4windowing-0.deps | 1 +
- vapi/libxfce4windowing-0.vapi | 52 ++++++++++++++-----
- 7 files changed, 75 insertions(+), 27 deletions(-)
- diff --git a/src/daemon/tabswitcher.vala b/src/daemon/tabswitcher.vala
- index 8aa97db6d..d7dbd8286 100644
- --- a/src/daemon/tabswitcher.vala
- +++ b/src/daemon/tabswitcher.vala
- @@ -61,7 +61,7 @@ namespace Budgie {
- public TabSwitcherWidget(Budgie.AppSystem app_system, libxfce4windowing.Window? win) {
- Object();
- window = win;
- - var uid = window.get_id();
- + ulong uid = (ulong) window.x11_get_xid();
- id = uid.to_string();
- set_title();
-
- @@ -334,7 +334,7 @@ namespace Budgie {
- }
-
- private void set_window_as_activated(libxfce4windowing.Window window) {
- - string id = window.get_id().to_string();
- + string id = ((ulong) window.x11_get_xid()).to_string();
- unowned List<string> entries = recency.find_custom(id, strcmp);
- recency.remove_link(entries);
- recency.prepend(id);
- @@ -365,7 +365,7 @@ namespace Budgie {
- /* Switch focus to the item with the xid */
- public void focus_item(bool backwards) {
- unowned libxfce4windowing.Window? active_window = xfce_screen.get_active_window();
- - TabSwitcherWidget? widget = active_window != null ? ids.get(active_window.get_id().to_string()) : null;
- + TabSwitcherWidget? widget = active_window != null ? ids.get(((ulong) active_window.x11_get_xid()).to_string()) : null;
-
- // Visible, each input should cycle to previous / next
- if (visible) {
- diff --git a/src/panel/applets/workspaces/WindowIcon.vala b/src/panel/applets/workspaces/WindowIcon.vala
- index a9efc0232..7e36cafe0 100644
- --- a/src/panel/applets/workspaces/WindowIcon.vala
- +++ b/src/panel/applets/workspaces/WindowIcon.vala
- @@ -72,7 +72,7 @@ namespace Workspaces {
- }
-
- public void on_drag_data_get(Gtk.Widget widget, Gdk.DragContext context, Gtk.SelectionData selection_data, uint target_type, uint time) {
- - ulong window_xid = (ulong)window.get_id();
- + ulong window_xid = (ulong)window.x11_get_xid();
- uchar[] buf;
- convert_ulong_to_bytes(window_xid, out buf);
- selection_data.set(
- diff --git a/src/panel/applets/workspaces/WorkspaceItem.vala b/src/panel/applets/workspaces/WorkspaceItem.vala
- index eccab8e70..ef76ee904 100644
- --- a/src/panel/applets/workspaces/WorkspaceItem.vala
- +++ b/src/panel/applets/workspaces/WorkspaceItem.vala
- @@ -179,7 +179,7 @@ namespace Workspaces {
- if (data != null) {
- try {
- foreach (libxfce4windowing.Window window in WorkspacesApplet.xfce_screen.get_windows()) {
- - if (window.get_id() == *data) {
- + if (window.x11_get_xid() == *data) {
- window.move_to_workspace(this.workspace);
- dnd_success = true;
- break;
- diff --git a/src/panel/applets/workspaces/WorkspacesApplet.vala b/src/panel/applets/workspaces/WorkspacesApplet.vala
- index 5d3435ac4..237bacd2e 100644
- --- a/src/panel/applets/workspaces/WorkspacesApplet.vala
- +++ b/src/panel/applets/workspaces/WorkspacesApplet.vala
- @@ -278,8 +278,8 @@ namespace Workspaces {
- }
-
- private void connect_signals() {
- - connections += workspace_group.workspace_created.connect(workspace_added);
- - connections += workspace_group.workspace_destroyed.connect(workspace_removed);
- + connections += workspace_group.workspace_added.connect(workspace_added);
- + connections += workspace_group.workspace_removed.connect(workspace_removed);
- connections += workspace_group.active_workspace_changed.connect(set_current_workspace);
- connections += xfce_screen.active_window_changed.connect(update_workspaces);
- connections += xfce_screen.window_opened.connect(window_opened);
- @@ -403,7 +403,7 @@ namespace Workspaces {
-
- libxfce4windowing.Window? window = null;
- foreach (libxfce4windowing.Window win in xfce_screen.get_windows()) {
- - if (win.get_id() == *data) {
- + if (win.x11_get_xid() == *data) {
- window = win;
- break;
- }
- diff --git a/vapi/README.md b/vapi/README.md
- index 6bd29f17d..857655b35 100644
- --- a/vapi/README.md
- +++ b/vapi/README.md
- @@ -1,17 +1,36 @@
- -Refreshing vapis
- ---------------
- +## Refreshing vapis
- +
- +### Polkit
-
- To refresh the Polkit vapi files:
-
- - vapigen --library polkit-gobject-1 /usr/share/gir-1.0/Polkit-1.0.gir --pkg gio-unix-2.0
- - vapigen --library polkit-agent-1 /usr/share/gir-1.0/PolkitAgent-1.0.gir --pkg gio-unix-2.0 --pkg polkit-gobject-1 --girdir=. --vapidir=.
- +```bash
- +vapigen --library polkit-gobject-1 /usr/share/gir-1.0/Polkit-1.0.gir --pkg gio-unix-2.0
- +vapigen --library polkit-agent-1 /usr/share/gir-1.0/PolkitAgent-1.0.gir --pkg gio-unix-2.0 --pkg polkit-gobject-1 --girdir=. --vapidir=.
- +```
- +
- +Then have fun un-mangling it to support vala async syntax.
- +
- +### Libxfce4windowing
-
- -Then have fun un-mangling it to support vala async syntax
- +To generate the libxfce4windowing vapi files:
- +
- +```bash
- +vapigen --library libxfce4windowing-0 /usr/share/gir-1.0/Libxfce4windowing-0-0.gir --metadatadir .
- +```
- +
- +### UPower
-
- To generate the UPower vapi files:
-
- - vapigen --library upower-glib /usr/share/gir-1.0/UpowerGlib-1.0.gir --metadatadir . --pkg gio-unix-2.0 UPowerGlib-1.0-custom.vala
- +```bash
- +vapigen --library upower-glib /usr/share/gir-1.0/UpowerGlib-1.0.gir --metadatadir . --pkg gio-unix-2.0 UPowerGlib-1.0-custom.vala
- +```
- +
- +### Mutter
-
- For mutter (and shipped cogl and clutter), once you defined the relative `*.deps`, `*.metadata` and `*-custom.vala` files, you can run:
-
- - ./vapi/generate-mutter-vapi.sh <mutter-version>
- +```bash
- +./vapi/generate-mutter-vapi.sh <mutter-version>
- +```
- diff --git a/vapi/libxfce4windowing-0.deps b/vapi/libxfce4windowing-0.deps
- index 319bc395a..bfc6c0973 100644
- --- a/vapi/libxfce4windowing-0.deps
- +++ b/vapi/libxfce4windowing-0.deps
- @@ -1,3 +1,4 @@
- gdk-3.0
- glib-2.0
- +gtk+-3.0
- libwnck-3.0
- diff --git a/vapi/libxfce4windowing-0.vapi b/vapi/libxfce4windowing-0.vapi
- index ed3a282b2..50da752bc 100644
- --- a/vapi/libxfce4windowing-0.vapi
- +++ b/vapi/libxfce4windowing-0.vapi
- @@ -6,13 +6,14 @@ namespace libxfce4windowing {
- public abstract class Application : GLib.Object {
- [CCode (has_construct_function = false)]
- protected Application ();
- + [CCode (cname = "xfw_application_get_class_id")]
- + [Version (since = "4.19.3")]
- + public unowned string get_class_id ();
- [CCode (cname = "xfw_application_get_gicon")]
- [Version (since = "4.19.1")]
- public unowned GLib.Icon get_gicon ();
- [CCode (cname = "xfw_application_get_icon")]
- public unowned Gdk.Pixbuf? get_icon (int size, int scale);
- - [CCode (cname = "xfw_application_get_id")]
- - public uint64 get_id ();
- [CCode (cname = "xfw_application_get_instance")]
- public unowned libxfce4windowing.ApplicationInstance? get_instance (libxfce4windowing.Window window);
- [CCode (cname = "xfw_application_get_instances")]
- @@ -25,9 +26,10 @@ namespace libxfce4windowing {
- [Version (since = "4.19.1")]
- public bool icon_is_fallback ();
- [NoAccessorMethod]
- - public GLib.Icon gicon { owned get; }
- + [Version (since = "4.19.3")]
- + public string class_id { owned get; }
- [NoAccessorMethod]
- - public uint64 id { get; }
- + public GLib.Icon gicon { owned get; }
- [NoAccessorMethod]
- public void* instances { get; }
- [NoAccessorMethod]
- @@ -87,6 +89,9 @@ namespace libxfce4windowing {
- public unowned libxfce4windowing.Application get_application ();
- [CCode (cname = "xfw_window_get_capabilities")]
- public libxfce4windowing.WindowCapabilities get_capabilities ();
- + [CCode (array_length = false, array_null_terminated = true, cname = "xfw_window_get_class_ids")]
- + [Version (since = "4.19.3")]
- + public unowned string[] get_class_ids ();
- [CCode (cname = "xfw_window_get_geometry")]
- public unowned Gdk.Rectangle? get_geometry ();
- [CCode (cname = "xfw_window_get_gicon")]
- @@ -94,8 +99,6 @@ namespace libxfce4windowing {
- public unowned GLib.Icon get_gicon ();
- [CCode (cname = "xfw_window_get_icon")]
- public unowned Gdk.Pixbuf? get_icon (int size, int scale);
- - [CCode (cname = "xfw_window_get_id")]
- - public uint64 get_id ();
- [CCode (cname = "xfw_window_get_monitors")]
- public unowned GLib.List<Gdk.Monitor>? get_monitors ();
- [CCode (cname = "xfw_window_get_name")]
- @@ -165,14 +168,19 @@ namespace libxfce4windowing {
- public bool start_move () throws GLib.Error;
- [CCode (cname = "xfw_window_start_resize")]
- public bool start_resize () throws GLib.Error;
- + [CCode (cname = "xfw_window_x11_get_xid")]
- + [Version (since = "4.19.3")]
- + public X.Window x11_get_xid ();
- [NoAccessorMethod]
- public libxfce4windowing.Application application { owned get; }
- [NoAccessorMethod]
- public libxfce4windowing.WindowCapabilities capabilities { get; }
- + [CCode (array_length = false, array_null_terminated = true)]
- [NoAccessorMethod]
- - public GLib.Icon gicon { owned get; }
- + [Version (since = "4.19.3")]
- + public string[] class_ids { owned get; }
- [NoAccessorMethod]
- - public uint64 id { get; }
- + public GLib.Icon gicon { owned get; }
- [NoAccessorMethod]
- public void* monitors { get; }
- [NoAccessorMethod]
- @@ -186,6 +194,8 @@ namespace libxfce4windowing {
- [NoAccessorMethod]
- public libxfce4windowing.Workspace workspace { owned get; }
- public signal void capabilities_changed (libxfce4windowing.WindowCapabilities changed_mask, libxfce4windowing.WindowCapabilities new_state);
- + [Version (since = "4.19.3")]
- + public signal void class_changed ();
- public signal void closed ();
- public signal void geometry_changed ();
- public signal void icon_changed ();
- @@ -313,6 +323,8 @@ namespace libxfce4windowing {
- public interface Workspace : GLib.Object {
- [CCode (cname = "xfw_workspace_activate")]
- public bool activate () throws GLib.Error;
- + [CCode (cname = "xfw_workspace_assign_to_workspace_group")]
- + public bool assign_to_workspace_group (libxfce4windowing.WorkspaceGroup group) throws GLib.Error;
- [CCode (cname = "xfw_workspace_get_capabilities")]
- public libxfce4windowing.WorkspaceCapabilities get_capabilities ();
- [CCode (cname = "xfw_workspace_get_geometry")]
- @@ -332,13 +344,13 @@ namespace libxfce4windowing {
- [CCode (cname = "xfw_workspace_get_state")]
- public libxfce4windowing.WorkspaceState get_state ();
- [CCode (cname = "xfw_workspace_get_workspace_group")]
- - public unowned libxfce4windowing.WorkspaceGroup get_workspace_group ();
- + public unowned libxfce4windowing.WorkspaceGroup? get_workspace_group ();
- [CCode (cname = "xfw_workspace_remove")]
- public bool remove () throws GLib.Error;
- [NoAccessorMethod]
- public abstract libxfce4windowing.WorkspaceCapabilities capabilities { get; set construct; }
- [NoAccessorMethod]
- - public abstract libxfce4windowing.WorkspaceGroup group { owned get; construct; }
- + public abstract libxfce4windowing.WorkspaceGroup group { owned get; }
- [NoAccessorMethod]
- public abstract string id { owned get; }
- [NoAccessorMethod]
- @@ -348,6 +360,7 @@ namespace libxfce4windowing {
- [NoAccessorMethod]
- public abstract libxfce4windowing.WorkspaceState state { get; set construct; }
- public signal void capabilities_changed (libxfce4windowing.WorkspaceCapabilities changed_mask, libxfce4windowing.WorkspaceCapabilities new_capabilities);
- + public signal void group_changed (libxfce4windowing.WorkspaceGroup previous_group);
- public signal void name_changed ();
- public signal void state_changed (libxfce4windowing.WorkspaceState changed_mask, libxfce4windowing.WorkspaceState new_state);
- }
- @@ -383,20 +396,32 @@ namespace libxfce4windowing {
- public abstract void* workspaces { get; }
- public signal void active_workspace_changed (libxfce4windowing.Workspace? previously_active_workspace);
- public signal void capabilities_changed (libxfce4windowing.WorkspaceGroupCapabilities changed_mask, libxfce4windowing.WorkspaceGroupCapabilities new_capabilities);
- + public signal void monitor_added (Gdk.Monitor monitor);
- + public signal void monitor_removed (Gdk.Monitor monitor);
- public signal void monitors_changed ();
- public signal void viewports_changed ();
- - public signal void workspace_created (libxfce4windowing.Workspace workspace);
- - public signal void workspace_destroyed (libxfce4windowing.Workspace workspace);
- + public signal void workspace_added (libxfce4windowing.Workspace workspace);
- + public signal void workspace_removed (libxfce4windowing.Workspace workspace);
- }
- [CCode (cheader_filename = "libxfce4windowing/libxfce4windowing.h", cname = "XfwWorkspaceManager", type_id = "xfw_workspace_manager_get_type ()")]
- public interface WorkspaceManager : GLib.Object {
- [CCode (cname = "xfw_workspace_manager_list_workspace_groups")]
- public unowned GLib.List<libxfce4windowing.WorkspaceGroup>? list_workspace_groups ();
- + [CCode (cname = "xfw_workspace_manager_list_workspaces")]
- + public unowned GLib.List<libxfce4windowing.Workspace>? list_workspaces ();
- [NoAccessorMethod]
- public abstract Gdk.Screen screen { owned get; construct; }
- + public signal void workspace_created (libxfce4windowing.Workspace workspace);
- + public signal void workspace_destroyed (libxfce4windowing.Workspace workspace);
- public signal void workspace_group_created (libxfce4windowing.WorkspaceGroup group);
- public signal void workspace_group_destroyed (libxfce4windowing.WorkspaceGroup group);
- }
- + [CCode (cheader_filename = "libxfce4windowing/libxfce4windowing.h", cname = "XfwClientType", cprefix = "XFW_CLIENT_TYPE_", has_type_id = false)]
- + [Version (since = "4.19.3")]
- + public enum ClientType {
- + APPLICATION,
- + PAGER
- + }
- [CCode (cheader_filename = "libxfce4windowing/libxfce4windowing.h", cname = "XfwDirection", cprefix = "XFW_DIRECTION_", type_id = "xfw_direction_get_type ()")]
- public enum Direction {
- UP,
- @@ -507,6 +532,9 @@ namespace libxfce4windowing {
- [CCode (cheader_filename = "libxfce4windowing/libxfce4windowing.h", cname = "xfw_screen_get_default")]
- [Version (replacement = "Screen.get_default")]
- public static libxfce4windowing.Screen screen_get_default ();
- + [CCode (cheader_filename = "libxfce4windowing/libxfce4windowing.h", cname = "xfw_set_client_type")]
- + [Version (since = "4.19.3")]
- + public static void set_client_type (libxfce4windowing.ClientType client_type);
- [CCode (cheader_filename = "libxfce4windowing/libxfce4windowing.h", cname = "xfw_windowing_get")]
- public static libxfce4windowing.Windowing windowing_get ();
- }
|