@gtkx/ffi 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/codegen/ffi-generator.d.ts +2 -0
  2. package/dist/codegen/ffi-generator.js +76 -2
  3. package/dist/generated/gdk/display-manager.d.ts +1 -0
  4. package/dist/generated/gdk/display-manager.js +9 -0
  5. package/dist/generated/gdk/display.d.ts +2 -0
  6. package/dist/generated/gdk/display.js +20 -0
  7. package/dist/generated/gdk/drag.d.ts +1 -0
  8. package/dist/generated/gdk/drag.js +31 -0
  9. package/dist/generated/gdk/glcontext.d.ts +2 -0
  10. package/dist/generated/gdk/glcontext.js +14 -0
  11. package/dist/generated/gdk/scroll-event.d.ts +2 -1
  12. package/dist/generated/gdk/scroll-event.js +8 -0
  13. package/dist/generated/gdkpixbuf/pixbuf-animation.d.ts +1 -0
  14. package/dist/generated/gdkpixbuf/pixbuf-animation.js +20 -0
  15. package/dist/generated/gdkpixbuf/pixbuf.d.ts +9 -0
  16. package/dist/generated/gdkpixbuf/pixbuf.js +195 -0
  17. package/dist/generated/gio/app-info-monitor.d.ts +1 -0
  18. package/dist/generated/gio/app-info-monitor.js +9 -0
  19. package/dist/generated/gio/application.d.ts +2 -0
  20. package/dist/generated/gio/application.js +17 -0
  21. package/dist/generated/gio/cancellable.d.ts +1 -0
  22. package/dist/generated/gio/cancellable.js +9 -0
  23. package/dist/generated/gio/dbus-action-group.d.ts +1 -0
  24. package/dist/generated/gio/dbus-action-group.js +20 -0
  25. package/dist/generated/gio/dbus-connection.d.ts +2 -0
  26. package/dist/generated/gio/dbus-connection.js +60 -0
  27. package/dist/generated/gio/dbus-menu-model.d.ts +1 -0
  28. package/dist/generated/gio/dbus-menu-model.js +20 -0
  29. package/dist/generated/gio/dbus-message.d.ts +1 -0
  30. package/dist/generated/gio/dbus-message.js +26 -0
  31. package/dist/generated/gio/dbus-object-manager-client.d.ts +2 -0
  32. package/dist/generated/gio/dbus-object-manager-client.js +88 -0
  33. package/dist/generated/gio/dbus-proxy.d.ts +2 -0
  34. package/dist/generated/gio/dbus-proxy.js +80 -0
  35. package/dist/generated/gio/iomodule.d.ts +1 -0
  36. package/dist/generated/gio/iomodule.js +6 -0
  37. package/dist/generated/gio/iostream.d.ts +1 -0
  38. package/dist/generated/gio/iostream.js +19 -0
  39. package/dist/generated/gio/network-address.d.ts +2 -0
  40. package/dist/generated/gio/network-address.js +50 -0
  41. package/dist/generated/gio/resolver.d.ts +3 -0
  42. package/dist/generated/gio/resolver.js +25 -0
  43. package/dist/generated/gio/settings-backend.d.ts +3 -0
  44. package/dist/generated/gio/settings-backend.js +35 -0
  45. package/dist/generated/gio/settings.d.ts +4 -0
  46. package/dist/generated/gio/settings.js +27 -0
  47. package/dist/generated/gio/simple-async-result.d.ts +1 -0
  48. package/dist/generated/gio/simple-async-result.js +16 -0
  49. package/dist/generated/gio/simple-proxy-resolver.d.ts +1 -0
  50. package/dist/generated/gio/simple-proxy-resolver.js +12 -0
  51. package/dist/generated/gio/socket-connection.d.ts +3 -0
  52. package/dist/generated/gio/socket-connection.js +36 -0
  53. package/dist/generated/gio/socket-control-message.d.ts +1 -0
  54. package/dist/generated/gio/socket-control-message.js +26 -0
  55. package/dist/generated/gio/task.d.ts +3 -0
  56. package/dist/generated/gio/task.js +68 -0
  57. package/dist/generated/gio/test-dbus.d.ts +1 -0
  58. package/dist/generated/gio/test-dbus.js +3 -0
  59. package/dist/generated/gio/tls-certificate.d.ts +1 -0
  60. package/dist/generated/gio/tls-certificate.js +19 -0
  61. package/dist/generated/gio/unix-credentials-message.d.ts +1 -0
  62. package/dist/generated/gio/unix-credentials-message.js +3 -0
  63. package/dist/generated/gio/unix-socket-address.d.ts +1 -0
  64. package/dist/generated/gio/unix-socket-address.js +3 -0
  65. package/dist/generated/gio/vfs.d.ts +2 -0
  66. package/dist/generated/gio/vfs.js +18 -0
  67. package/dist/generated/gio/volume-monitor.d.ts +2 -0
  68. package/dist/generated/gio/volume-monitor.js +17 -0
  69. package/dist/generated/gobject/object.d.ts +4 -0
  70. package/dist/generated/gobject/object.js +51 -0
  71. package/dist/generated/gobject/param-spec.d.ts +3 -0
  72. package/dist/generated/gobject/param-spec.js +35 -0
  73. package/dist/generated/gsk/render-node.d.ts +1 -0
  74. package/dist/generated/gsk/render-node.js +19 -0
  75. package/dist/generated/gsk/subsurface-node.d.ts +1 -0
  76. package/dist/generated/gsk/subsurface-node.js +8 -0
  77. package/dist/generated/gtk/activate-action.d.ts +1 -0
  78. package/dist/generated/gtk/activate-action.js +10 -0
  79. package/dist/generated/gtk/drag-icon.d.ts +2 -0
  80. package/dist/generated/gtk/drag-icon.js +28 -0
  81. package/dist/generated/gtk/icon-theme.d.ts +1 -0
  82. package/dist/generated/gtk/icon-theme.js +11 -0
  83. package/dist/generated/gtk/mnemonic-action.d.ts +1 -0
  84. package/dist/generated/gtk/mnemonic-action.js +10 -0
  85. package/dist/generated/gtk/never-trigger.d.ts +1 -0
  86. package/dist/generated/gtk/never-trigger.js +10 -0
  87. package/dist/generated/gtk/nothing-action.d.ts +1 -0
  88. package/dist/generated/gtk/nothing-action.js +10 -0
  89. package/dist/generated/gtk/recent-manager.d.ts +1 -0
  90. package/dist/generated/gtk/recent-manager.js +9 -0
  91. package/dist/generated/gtk/settings.d.ts +2 -0
  92. package/dist/generated/gtk/settings.js +20 -0
  93. package/dist/generated/gtk/style-context.d.ts +2 -0
  94. package/dist/generated/gtk/style-context.js +28 -0
  95. package/dist/generated/gtk/widget.d.ts +2 -0
  96. package/dist/generated/gtk/widget.js +15 -0
  97. package/dist/generated/gtk/window.d.ts +6 -0
  98. package/dist/generated/gtk/window.js +41 -0
  99. package/dist/generated/pango/coverage.d.ts +1 -0
  100. package/dist/generated/pango/coverage.js +18 -0
  101. package/dist/generated/pango/font.d.ts +2 -0
  102. package/dist/generated/pango/font.js +37 -0
  103. package/dist/generated/pango/layout.d.ts +2 -1
  104. package/dist/generated/pango/layout.js +29 -0
  105. package/dist/native.d.ts +3 -0
  106. package/dist/native.js +13 -0
  107. package/package.json +3 -3
@@ -7,6 +7,18 @@ export class SimpleProxyResolver {
7
7
  createPtr(_args) {
8
8
  return null;
9
9
  }
10
+ static _new(defaultProxy, ignoreHosts) {
11
+ return call("libgio-2.0.so.0", "g_simple_proxy_resolver_new", [
12
+ {
13
+ type: { type: "string" },
14
+ value: defaultProxy,
15
+ },
16
+ {
17
+ type: { type: "array", itemType: { type: "string" } },
18
+ value: ignoreHosts,
19
+ },
20
+ ], { type: "gobject", borrowed: true });
21
+ }
10
22
  setDefaultProxy(defaultProxy) {
11
23
  call("libgio-2.0.so.0", "g_simple_proxy_resolver_set_default_proxy", [
12
24
  {
@@ -1,7 +1,10 @@
1
+ import { SocketFamily, SocketType } from "./enums.js";
1
2
  import { IOStream } from "./iostream.js";
2
3
  export declare class SocketConnection extends IOStream {
3
4
  constructor(_args?: unknown[]);
4
5
  protected createPtr(_args: unknown[]): unknown;
6
+ static factoryLookupType(family: SocketFamily, type: SocketType, protocolId: number): number;
7
+ static factoryRegisterType(gType: number, family: SocketFamily, type: SocketType, protocol: number): void;
5
8
  connect(address: unknown, cancellable?: unknown): boolean;
6
9
  connectAsync(address: unknown, cancellable?: unknown, callback?: unknown, userData?: unknown): void;
7
10
  connectFinish(result: unknown): boolean;
@@ -7,6 +7,42 @@ export class SocketConnection extends IOStream {
7
7
  createPtr(_args) {
8
8
  return null;
9
9
  }
10
+ static factoryLookupType(family, type, protocolId) {
11
+ return call("libgio-2.0.so.0", "g_socket_connection_factory_lookup_type", [
12
+ {
13
+ type: { type: "int", size: 32, unsigned: false },
14
+ value: family,
15
+ },
16
+ {
17
+ type: { type: "int", size: 32, unsigned: false },
18
+ value: type,
19
+ },
20
+ {
21
+ type: { type: "int", size: 32, unsigned: false },
22
+ value: protocolId,
23
+ },
24
+ ], { type: "int", size: 64, unsigned: true });
25
+ }
26
+ static factoryRegisterType(gType, family, type, protocol) {
27
+ call("libgio-2.0.so.0", "g_socket_connection_factory_register_type", [
28
+ {
29
+ type: { type: "int", size: 64, unsigned: true },
30
+ value: gType,
31
+ },
32
+ {
33
+ type: { type: "int", size: 32, unsigned: false },
34
+ value: family,
35
+ },
36
+ {
37
+ type: { type: "int", size: 32, unsigned: false },
38
+ value: type,
39
+ },
40
+ {
41
+ type: { type: "int", size: 32, unsigned: false },
42
+ value: protocol,
43
+ },
44
+ ], { type: "undefined" });
45
+ }
10
46
  connect(address, cancellable) {
11
47
  const error = { value: null };
12
48
  const result = call("libgio-2.0.so.0", "g_socket_connection_connect", [
@@ -2,6 +2,7 @@ export declare class SocketControlMessage {
2
2
  ptr: unknown;
3
3
  constructor(_args?: unknown[]);
4
4
  protected createPtr(_args: unknown[]): unknown;
5
+ static deserialize(level: number, type: number, size: unknown, data: number[]): SocketControlMessage;
5
6
  getLevel(): number;
6
7
  getMsgType(): number;
7
8
  getSize(): unknown;
@@ -7,6 +7,32 @@ export class SocketControlMessage {
7
7
  createPtr(_args) {
8
8
  return null;
9
9
  }
10
+ static deserialize(level, type, size, data) {
11
+ const ptr = call("libgio-2.0.so.0", "g_socket_control_message_deserialize", [
12
+ {
13
+ type: { type: "int", size: 32, unsigned: false },
14
+ value: level,
15
+ },
16
+ {
17
+ type: { type: "int", size: 32, unsigned: false },
18
+ value: type,
19
+ },
20
+ {
21
+ type: { type: "gobject" },
22
+ value: size,
23
+ },
24
+ {
25
+ type: {
26
+ type: "array",
27
+ itemType: { type: "int", size: 8, unsigned: true },
28
+ },
29
+ value: data,
30
+ },
31
+ ], { type: "gobject", borrowed: true });
32
+ const instance = Object.create(SocketControlMessage.prototype);
33
+ instance.ptr = ptr;
34
+ return instance;
35
+ }
10
36
  getLevel() {
11
37
  return call("libgio-2.0.so.0", "g_socket_control_message_get_level", [
12
38
  {
@@ -4,6 +4,9 @@ export declare class Task {
4
4
  constructor(sourceObject?: unknown, cancellable?: unknown, callback?: unknown, callbackData?: unknown);
5
5
  constructor(_args: unknown[]);
6
6
  protected createPtr(_args: unknown[]): unknown;
7
+ static isValid(result: unknown, sourceObject?: unknown): boolean;
8
+ static reportError(error: unknown, sourceObject?: unknown, callback?: unknown, callbackData?: unknown, sourceTag?: unknown): void;
9
+ static reportNewError(domain: unknown, code: number, format: string, sourceObject?: unknown, callback?: unknown, callbackData?: unknown, sourceTag?: unknown): void;
7
10
  attachSource(source: unknown, callback: (...args: unknown[]) => unknown): void;
8
11
  getCancellable(): unknown;
9
12
  getCheckCancellable(): boolean;
@@ -26,6 +26,74 @@ export class Task {
26
26
  },
27
27
  ], { type: "gobject", borrowed: true });
28
28
  }
29
+ static isValid(result, sourceObject) {
30
+ return call("libgio-2.0.so.0", "g_task_is_valid", [
31
+ {
32
+ type: { type: "gobject" },
33
+ value: result,
34
+ },
35
+ {
36
+ type: { type: "gobject" },
37
+ value: sourceObject,
38
+ },
39
+ ], { type: "boolean" });
40
+ }
41
+ static reportError(error, sourceObject, callback, callbackData, sourceTag) {
42
+ call("libgio-2.0.so.0", "g_task_report_error", [
43
+ {
44
+ type: { type: "gobject" },
45
+ value: sourceObject,
46
+ },
47
+ {
48
+ type: { type: "gobject" },
49
+ value: callback,
50
+ },
51
+ {
52
+ type: { type: "gobject" },
53
+ value: callbackData,
54
+ },
55
+ {
56
+ type: { type: "gobject" },
57
+ value: sourceTag,
58
+ },
59
+ {
60
+ type: { type: "gobject" },
61
+ value: error,
62
+ },
63
+ ], { type: "undefined" });
64
+ }
65
+ static reportNewError(domain, code, format, sourceObject, callback, callbackData, sourceTag) {
66
+ call("libgio-2.0.so.0", "g_task_report_new_error", [
67
+ {
68
+ type: { type: "gobject" },
69
+ value: sourceObject,
70
+ },
71
+ {
72
+ type: { type: "gobject" },
73
+ value: callback,
74
+ },
75
+ {
76
+ type: { type: "gobject" },
77
+ value: callbackData,
78
+ },
79
+ {
80
+ type: { type: "gobject" },
81
+ value: sourceTag,
82
+ },
83
+ {
84
+ type: { type: "gobject" },
85
+ value: domain,
86
+ },
87
+ {
88
+ type: { type: "int", size: 32, unsigned: false },
89
+ value: code,
90
+ },
91
+ {
92
+ type: { type: "string" },
93
+ value: format,
94
+ },
95
+ ], { type: "undefined" });
96
+ }
29
97
  attachSource(source, callback) {
30
98
  call("libgio-2.0.so.0", "g_task_attach_source", [
31
99
  {
@@ -4,6 +4,7 @@ export declare class TestDBus {
4
4
  constructor(flags: TestDBusFlags);
5
5
  constructor(_args: unknown[]);
6
6
  protected createPtr(_args: unknown[]): unknown;
7
+ static unset(): void;
7
8
  addServiceDir(path: string): void;
8
9
  down(): void;
9
10
  getBusAddress(): string;
@@ -14,6 +14,9 @@ export class TestDBus {
14
14
  },
15
15
  ], { type: "gobject", borrowed: true });
16
16
  }
17
+ static unset() {
18
+ call("libgio-2.0.so.0", "g_test_dbus_unset", [], { type: "undefined" });
19
+ }
17
20
  addServiceDir(path) {
18
21
  call("libgio-2.0.so.0", "g_test_dbus_add_service_dir", [
19
22
  {
@@ -9,6 +9,7 @@ export declare class TlsCertificate {
9
9
  static certificateNewFromPkcs11Uris(pkcs11Uri: string, privateKeyPkcs11Uri?: string): TlsCertificate;
10
10
  static certificateNewFromPkcs12(data: number[], length: unknown, password?: string): TlsCertificate;
11
11
  protected createPtr(_args: unknown[]): unknown;
12
+ static listNewFromFile(file: string): unknown;
12
13
  getDnsNames(): unknown;
13
14
  getIpAddresses(): unknown;
14
15
  getIssuer(): unknown;
@@ -96,6 +96,25 @@ export class TlsCertificate {
96
96
  },
97
97
  ], { type: "gobject", borrowed: true });
98
98
  }
99
+ static listNewFromFile(file) {
100
+ const error = { value: null };
101
+ const result = call("libgio-2.0.so.0", "g_tls_certificate_list_new_from_file", [
102
+ {
103
+ type: { type: "string" },
104
+ value: file,
105
+ },
106
+ {
107
+ type: { type: "ref", innerType: { type: "gobject" } },
108
+ value: error,
109
+ },
110
+ ], { type: "gobject", borrowed: true });
111
+ if (error.value !== null) {
112
+ const jsError = new Error("GLib Error occurred");
113
+ jsError.gError = error.value;
114
+ throw jsError;
115
+ }
116
+ return result;
117
+ }
99
118
  getDnsNames() {
100
119
  return call("libgio-2.0.so.0", "g_tls_certificate_get_dns_names", [
101
120
  {
@@ -3,6 +3,7 @@ export declare class UnixCredentialsMessage extends SocketControlMessage {
3
3
  constructor(_args?: unknown[]);
4
4
  static credentialsMessageNewWithCredentials(credentials: unknown): UnixCredentialsMessage;
5
5
  protected createPtr(_args: unknown[]): unknown;
6
+ static isSupported(): boolean;
6
7
  getCredentials(): unknown;
7
8
  get credentials(): unknown;
8
9
  }
@@ -21,6 +21,9 @@ export class UnixCredentialsMessage extends SocketControlMessage {
21
21
  borrowed: true,
22
22
  });
23
23
  }
24
+ static isSupported() {
25
+ return call("libgio-2.0.so.0", "g_unix_credentials_message_is_supported", [], { type: "boolean" });
26
+ }
24
27
  getCredentials() {
25
28
  return call("libgio-2.0.so.0", "g_unix_credentials_message_get_credentials", [
26
29
  {
@@ -6,6 +6,7 @@ export declare class UnixSocketAddress extends SocketAddress {
6
6
  static socketAddressNewAbstract(path: number[], pathLen: number): UnixSocketAddress;
7
7
  static socketAddressNewWithType(path: number[], pathLen: number, type: UnixSocketAddressType): UnixSocketAddress;
8
8
  protected createPtr(_args: unknown[]): unknown;
9
+ static abstractNamesSupported(): boolean;
9
10
  getAddressType(): UnixSocketAddressType;
10
11
  getIsAbstract(): boolean;
11
12
  getPath(): string;
@@ -54,6 +54,9 @@ export class UnixSocketAddress extends SocketAddress {
54
54
  },
55
55
  ], { type: "gobject", borrowed: true });
56
56
  }
57
+ static abstractNamesSupported() {
58
+ return call("libgio-2.0.so.0", "g_unix_socket_address_abstract_names_supported", [], { type: "boolean" });
59
+ }
57
60
  getAddressType() {
58
61
  return call("libgio-2.0.so.0", "g_unix_socket_address_get_address_type", [
59
62
  {
@@ -2,6 +2,8 @@ export declare class Vfs {
2
2
  ptr: unknown;
3
3
  constructor(_args?: unknown[]);
4
4
  protected createPtr(_args: unknown[]): unknown;
5
+ static getDefault(): Vfs;
6
+ static getLocal(): Vfs;
5
7
  getFileForPath(path: string): unknown;
6
8
  getFileForUri(uri: string): unknown;
7
9
  getSupportedUriSchemes(): string[];
@@ -7,6 +7,24 @@ export class Vfs {
7
7
  createPtr(_args) {
8
8
  return null;
9
9
  }
10
+ static getDefault() {
11
+ const ptr = call("libgio-2.0.so.0", "g_vfs_get_default", [], {
12
+ type: "gobject",
13
+ borrowed: true,
14
+ });
15
+ const instance = Object.create(Vfs.prototype);
16
+ instance.ptr = ptr;
17
+ return instance;
18
+ }
19
+ static getLocal() {
20
+ const ptr = call("libgio-2.0.so.0", "g_vfs_get_local", [], {
21
+ type: "gobject",
22
+ borrowed: true,
23
+ });
24
+ const instance = Object.create(Vfs.prototype);
25
+ instance.ptr = ptr;
26
+ return instance;
27
+ }
10
28
  getFileForPath(path) {
11
29
  return call("libgio-2.0.so.0", "g_vfs_get_file_for_path", [
12
30
  {
@@ -2,6 +2,8 @@ export declare class VolumeMonitor {
2
2
  ptr: unknown;
3
3
  constructor(_args?: unknown[]);
4
4
  protected createPtr(_args: unknown[]): unknown;
5
+ static adoptOrphanMount(mount: unknown): unknown;
6
+ static get(): VolumeMonitor;
5
7
  getConnectedDrives(): unknown;
6
8
  getMountForUuid(uuid: string): unknown;
7
9
  getMounts(): unknown;
@@ -7,6 +7,23 @@ export class VolumeMonitor {
7
7
  createPtr(_args) {
8
8
  return null;
9
9
  }
10
+ static adoptOrphanMount(mount) {
11
+ return call("libgio-2.0.so.0", "g_volume_monitor_adopt_orphan_mount", [
12
+ {
13
+ type: { type: "gobject" },
14
+ value: mount,
15
+ },
16
+ ], { type: "gobject", borrowed: true });
17
+ }
18
+ static get() {
19
+ const ptr = call("libgio-2.0.so.0", "g_volume_monitor_get", [], {
20
+ type: "gobject",
21
+ borrowed: true,
22
+ });
23
+ const instance = Object.create(VolumeMonitor.prototype);
24
+ instance.ptr = ptr;
25
+ return instance;
26
+ }
10
27
  getConnectedDrives() {
11
28
  return call("libgio-2.0.so.0", "g_volume_monitor_get_connected_drives", [
12
29
  {
@@ -8,6 +8,10 @@ export declare class GObject {
8
8
  static newWithProperties(objectType: number, nProperties: number, names: string[], values: unknown[]): Object;
9
9
  static newv(objectType: number, nParameters: number, parameters: unknown[]): Object;
10
10
  protected createPtr(_args: unknown[]): unknown;
11
+ static compatControl(what: unknown, data?: unknown): unknown;
12
+ static interfaceFindProperty(gIface: unknown, propertyName: string): unknown;
13
+ static interfaceInstallProperty(gIface: unknown, pspec: unknown): void;
14
+ static interfaceListProperties(gIface: unknown, nPropertiesP: Ref<number>): unknown[];
11
15
  addToggleRef(notify: unknown, data?: unknown): void;
12
16
  addWeakPointer(weakPointerLocation: Ref<unknown>): void;
13
17
  bindProperty(sourceProperty: string, target: unknown, targetProperty: string, flags: BindingFlags): unknown;
@@ -80,6 +80,57 @@ export class GObject {
80
80
  },
81
81
  ], { type: "gobject", borrowed: true });
82
82
  }
83
+ static compatControl(what, data) {
84
+ return call("libgobject-2.0.so.0", "g_object_compat_control", [
85
+ {
86
+ type: { type: "gobject" },
87
+ value: what,
88
+ },
89
+ {
90
+ type: { type: "gobject" },
91
+ value: data,
92
+ },
93
+ ], { type: "gobject", borrowed: true });
94
+ }
95
+ static interfaceFindProperty(gIface, propertyName) {
96
+ return call("libgobject-2.0.so.0", "g_object_interface_find_property", [
97
+ {
98
+ type: { type: "gobject" },
99
+ value: gIface,
100
+ },
101
+ {
102
+ type: { type: "string" },
103
+ value: propertyName,
104
+ },
105
+ ], { type: "gobject", borrowed: true });
106
+ }
107
+ static interfaceInstallProperty(gIface, pspec) {
108
+ call("libgobject-2.0.so.0", "g_object_interface_install_property", [
109
+ {
110
+ type: { type: "gobject" },
111
+ value: gIface,
112
+ },
113
+ {
114
+ type: { type: "gobject" },
115
+ value: pspec,
116
+ },
117
+ ], { type: "undefined" });
118
+ }
119
+ static interfaceListProperties(gIface, nPropertiesP) {
120
+ return call("libgobject-2.0.so.0", "g_object_interface_list_properties", [
121
+ {
122
+ type: { type: "gobject" },
123
+ value: gIface,
124
+ },
125
+ {
126
+ type: {
127
+ type: "ref",
128
+ innerType: { type: "int", size: 32, unsigned: true },
129
+ },
130
+ value: nPropertiesP,
131
+ },
132
+ ], { type: "array", itemType: { type: "gobject" } });
133
+ }
83
134
  addToggleRef(notify, data) {
84
135
  call("libgobject-2.0.so.0", "g_object_add_toggle_ref", [
85
136
  {
@@ -1,7 +1,10 @@
1
+ import { ParamFlags } from "./enums.js";
1
2
  export declare class ParamSpec {
2
3
  ptr: unknown;
3
4
  constructor(_args?: unknown[]);
4
5
  protected createPtr(_args: unknown[]): unknown;
6
+ static internal(paramType: number, name: string, flags: ParamFlags, nick?: string, blurb?: string): ParamSpec;
7
+ static isValidName(name: string): boolean;
5
8
  getBlurb(): string;
6
9
  getDefaultValue(): unknown;
7
10
  getName(): string;
@@ -7,6 +7,41 @@ export class ParamSpec {
7
7
  createPtr(_args) {
8
8
  return null;
9
9
  }
10
+ static internal(paramType, name, flags, nick, blurb) {
11
+ const ptr = call("libgobject-2.0.so.0", "g_param_spec_internal", [
12
+ {
13
+ type: { type: "int", size: 64, unsigned: true },
14
+ value: paramType,
15
+ },
16
+ {
17
+ type: { type: "string" },
18
+ value: name,
19
+ },
20
+ {
21
+ type: { type: "string" },
22
+ value: nick,
23
+ },
24
+ {
25
+ type: { type: "string" },
26
+ value: blurb,
27
+ },
28
+ {
29
+ type: { type: "int", size: 32, unsigned: false },
30
+ value: flags,
31
+ },
32
+ ], { type: "gobject", borrowed: true });
33
+ const instance = Object.create(ParamSpec.prototype);
34
+ instance.ptr = ptr;
35
+ return instance;
36
+ }
37
+ static isValidName(name) {
38
+ return call("libgobject-2.0.so.0", "g_param_spec_is_valid_name", [
39
+ {
40
+ type: { type: "string" },
41
+ value: name,
42
+ },
43
+ ], { type: "boolean" });
44
+ }
10
45
  getBlurb() {
11
46
  return call("libgobject-2.0.so.0", "g_param_spec_get_blurb", [
12
47
  {
@@ -4,6 +4,7 @@ export declare class RenderNode {
4
4
  ptr: unknown;
5
5
  constructor(_args?: unknown[]);
6
6
  protected createPtr(_args: unknown[]): unknown;
7
+ static deserialize(bytes: unknown, errorFunc?: (...args: unknown[]) => unknown, userData?: unknown): RenderNode;
7
8
  draw(cr: unknown): void;
8
9
  getBounds(bounds: Ref<unknown>): void;
9
10
  getNodeType(): RenderNodeType;
@@ -7,6 +7,25 @@ export class RenderNode {
7
7
  createPtr(_args) {
8
8
  return null;
9
9
  }
10
+ static deserialize(bytes, errorFunc, userData) {
11
+ const ptr = call("libgtk-4.so.1", "gsk_render_node_deserialize", [
12
+ {
13
+ type: { type: "gobject" },
14
+ value: bytes,
15
+ },
16
+ {
17
+ type: { type: "callback" },
18
+ value: errorFunc,
19
+ },
20
+ {
21
+ type: { type: "gobject" },
22
+ value: userData,
23
+ },
24
+ ], { type: "gobject", borrowed: true });
25
+ const instance = Object.create(RenderNode.prototype);
26
+ instance.ptr = ptr;
27
+ return instance;
28
+ }
10
29
  draw(cr) {
11
30
  call("libgtk-4.so.1", "gsk_render_node_draw", [
12
31
  {
@@ -3,5 +3,6 @@ export declare class SubsurfaceNode extends RenderNode {
3
3
  constructor(child: unknown, subsurface?: unknown);
4
4
  constructor(_args: unknown[]);
5
5
  protected createPtr(_args: unknown[]): unknown;
6
+ static getSubsurface(node: unknown): unknown;
6
7
  getChild(): unknown;
7
8
  }
@@ -18,6 +18,14 @@ export class SubsurfaceNode extends RenderNode {
18
18
  },
19
19
  ], { type: "gobject", borrowed: true });
20
20
  }
21
+ static getSubsurface(node) {
22
+ return call("libgtk-4.so.1", "gsk_subsurface_node_get_subsurface", [
23
+ {
24
+ type: { type: "gobject" },
25
+ value: node,
26
+ },
27
+ ], { type: "gobject" });
28
+ }
21
29
  getChild() {
22
30
  return call("libgtk-4.so.1", "gsk_subsurface_node_get_child", [
23
31
  {
@@ -2,4 +2,5 @@ import { ShortcutAction } from "./shortcut-action.js";
2
2
  export declare class ActivateAction extends ShortcutAction {
3
3
  constructor(_args?: unknown[]);
4
4
  protected createPtr(_args: unknown[]): unknown;
5
+ static get(): ActivateAction;
5
6
  }
@@ -1,3 +1,4 @@
1
+ import { call } from "@gtkx/native";
1
2
  import { ShortcutAction } from "./shortcut-action.js";
2
3
  export class ActivateAction extends ShortcutAction {
3
4
  constructor(_args = []) {
@@ -6,4 +7,13 @@ export class ActivateAction extends ShortcutAction {
6
7
  createPtr(_args) {
7
8
  return null;
8
9
  }
10
+ static get() {
11
+ const ptr = call("libgtk-4.so.1", "gtk_activate_action_get", [], {
12
+ type: "gobject",
13
+ borrowed: true,
14
+ });
15
+ const instance = Object.create(ActivateAction.prototype);
16
+ instance.ptr = ptr;
17
+ return instance;
18
+ }
9
19
  }
@@ -3,6 +3,8 @@ export declare class DragIcon extends Widget {
3
3
  constructor(drag: unknown);
4
4
  constructor(_args: unknown[]);
5
5
  protected createPtr(_args: unknown[]): unknown;
6
+ static createWidgetForValue(value: unknown): unknown;
7
+ static setFromPaintable(drag: unknown, paintable: unknown, hotX: number, hotY: number): void;
6
8
  getChild(): unknown;
7
9
  setChild(child?: unknown): void;
8
10
  get child(): unknown;
@@ -14,6 +14,34 @@ export class DragIcon extends Widget {
14
14
  },
15
15
  ], { type: "gobject", borrowed: true });
16
16
  }
17
+ static createWidgetForValue(value) {
18
+ return call("libgtk-4.so.1", "gtk_drag_icon_create_widget_for_value", [
19
+ {
20
+ type: { type: "gobject" },
21
+ value: value,
22
+ },
23
+ ], { type: "gobject", borrowed: true });
24
+ }
25
+ static setFromPaintable(drag, paintable, hotX, hotY) {
26
+ call("libgtk-4.so.1", "gtk_drag_icon_set_from_paintable", [
27
+ {
28
+ type: { type: "gobject" },
29
+ value: drag,
30
+ },
31
+ {
32
+ type: { type: "gobject" },
33
+ value: paintable,
34
+ },
35
+ {
36
+ type: { type: "int", size: 32, unsigned: false },
37
+ value: hotX,
38
+ },
39
+ {
40
+ type: { type: "int", size: 32, unsigned: false },
41
+ value: hotY,
42
+ },
43
+ ], { type: "undefined" });
44
+ }
17
45
  getChild() {
18
46
  return call("libgtk-4.so.1", "gtk_drag_icon_get_child", [
19
47
  {
@@ -3,6 +3,7 @@ export declare class IconTheme {
3
3
  ptr: unknown;
4
4
  constructor(_args?: unknown[]);
5
5
  protected createPtr(_args: unknown[]): unknown;
6
+ static getForDisplay(display: unknown): IconTheme;
6
7
  addResourcePath(path: string): void;
7
8
  addSearchPath(path: string): void;
8
9
  getDisplay(): unknown;
@@ -10,6 +10,17 @@ export class IconTheme {
10
10
  borrowed: true,
11
11
  });
12
12
  }
13
+ static getForDisplay(display) {
14
+ const ptr = call("libgtk-4.so.1", "gtk_icon_theme_get_for_display", [
15
+ {
16
+ type: { type: "gobject" },
17
+ value: display,
18
+ },
19
+ ], { type: "gobject", borrowed: true });
20
+ const instance = Object.create(IconTheme.prototype);
21
+ instance.ptr = ptr;
22
+ return instance;
23
+ }
13
24
  addResourcePath(path) {
14
25
  call("libgtk-4.so.1", "gtk_icon_theme_add_resource_path", [
15
26
  {
@@ -2,4 +2,5 @@ import { ShortcutAction } from "./shortcut-action.js";
2
2
  export declare class MnemonicAction extends ShortcutAction {
3
3
  constructor(_args?: unknown[]);
4
4
  protected createPtr(_args: unknown[]): unknown;
5
+ static get(): MnemonicAction;
5
6
  }