@peachy/types 2025.1.18 → 2025.2.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.
@@ -41,21 +41,171 @@ declare module 'gi://GLibUnix?version=2.0' {
41
41
  */
42
42
  WRITE,
43
43
  }
44
+ /**
45
+ * Close every file descriptor equal to or greater than `lowfd`.
46
+ *
47
+ * Typically `lowfd` will be 3, to leave standard input, standard output
48
+ * and standard error open.
49
+ *
50
+ * This is the same as Linux `close_range (lowfd, ~0U, 0)`,
51
+ * but portable to other OSs and to older versions of Linux.
52
+ * Equivalently, it is the same as BSD `closefrom (lowfd)`, but portable,
53
+ * and async-signal-safe on all OSs.
54
+ *
55
+ * This function is async-signal safe, making it safe to call from a
56
+ * signal handler or a [callback`GLib`.SpawnChildSetupFunc], as long as `lowfd` is
57
+ * non-negative.
58
+ * See [`signal(7)`](man:signal(7)) and
59
+ * [`signal-safety(7)`](man:signal-safety(7)) for more details.
60
+ * @param lowfd Minimum fd to close, which must be non-negative
61
+ * @returns 0 on success, -1 with errno set on error
62
+ */
44
63
  function closefrom(lowfd: number): number;
45
64
  function error_quark(): GLib.Quark;
65
+ /**
66
+ * Sets a function to be called when the IO condition, as specified by
67
+ * `condition` becomes true for `fd`.
68
+ *
69
+ * This is the same as g_unix_fd_add(), except that it allows you to
70
+ * specify a non-default priority and a provide a #GDestroyNotify for
71
+ * `user_data`.
72
+ * @param priority the priority of the source
73
+ * @param fd a file descriptor
74
+ * @param condition IO conditions to watch for on @fd
75
+ * @param _function a #GUnixFDSourceFunc
76
+ * @returns the ID (greater than 0) of the event source
77
+ */
46
78
  function fd_add_full(
47
79
  priority: number,
48
80
  fd: number,
49
81
  condition: GLib.IOCondition | null,
50
- _function: GLib.UnixFDSourceFunc,
82
+ _function: FDSourceFunc,
51
83
  ): number;
84
+ /**
85
+ * Queries the file path for the given FD opened by the current process.
86
+ * @param fd The file descriptor to query.
87
+ * @returns The file path, or `NULL` on error
88
+ */
52
89
  function fd_query_path(fd: number): string;
90
+ /**
91
+ * Creates a #GSource to watch for a particular I/O condition on a file
92
+ * descriptor.
93
+ *
94
+ * The source will never close the `fd` — you must do it yourself.
95
+ *
96
+ * Any callback attached to the returned #GSource must have type
97
+ * #GUnixFDSourceFunc.
98
+ * @param fd a file descriptor
99
+ * @param condition I/O conditions to watch for on @fd
100
+ * @returns the newly created #GSource
101
+ */
53
102
  function fd_source_new(fd: number, condition: GLib.IOCondition | null): GLib.Source;
103
+ /**
104
+ * Mark every file descriptor equal to or greater than `lowfd` to be closed
105
+ * at the next `execve()` or similar, as if via the `FD_CLOEXEC` flag.
106
+ *
107
+ * Typically `lowfd` will be 3, to leave standard input, standard output
108
+ * and standard error open after exec.
109
+ *
110
+ * This is the same as Linux `close_range (lowfd, ~0U, CLOSE_RANGE_CLOEXEC)`,
111
+ * but portable to other OSs and to older versions of Linux.
112
+ *
113
+ * This function is async-signal safe, making it safe to call from a
114
+ * signal handler or a [callback`GLib`.SpawnChildSetupFunc], as long as `lowfd` is
115
+ * non-negative.
116
+ * See [`signal(7)`](man:signal(7)) and
117
+ * [`signal-safety(7)`](man:signal-safety(7)) for more details.
118
+ * @param lowfd Minimum fd to act on, which must be non-negative
119
+ * @returns 0 on success, -1 with errno set on error
120
+ */
54
121
  function fdwalk_set_cloexec(lowfd: number): number;
122
+ /**
123
+ * Get the `passwd` file entry for the given `user_name` using `getpwnam_r()`.
124
+ * This can fail if the given `user_name` doesn’t exist.
125
+ *
126
+ * The returned `struct passwd` has been allocated using g_malloc() and should
127
+ * be freed using g_free(). The strings referenced by the returned struct are
128
+ * included in the same allocation, so are valid until the `struct passwd` is
129
+ * freed.
130
+ *
131
+ * This function is safe to call from multiple threads concurrently.
132
+ *
133
+ * You will need to include `pwd.h` to get the definition of `struct passwd`.
134
+ * @param user_name the username to get the passwd file entry for
135
+ * @returns passwd entry, or %NULL on error; free the returned value with g_free()
136
+ */
55
137
  function get_passwd_entry(user_name: string): any | null;
56
- function open_pipe(fds: number, flags: number): boolean;
138
+ /**
139
+ * Similar to the UNIX pipe() call, but on modern systems like Linux
140
+ * uses the pipe2() system call, which atomically creates a pipe with
141
+ * the configured flags.
142
+ *
143
+ * As of GLib 2.78, the supported flags are `O_CLOEXEC`/`FD_CLOEXEC` (see below)
144
+ * and `O_NONBLOCK`. Prior to GLib 2.78, only `FD_CLOEXEC` was supported — if
145
+ * you wanted to configure `O_NONBLOCK` then that had to be done separately with
146
+ * `fcntl()`.
147
+ *
148
+ * Since GLib 2.80, the constants %G_UNIX_PIPE_END_READ and
149
+ * %G_UNIX_PIPE_END_WRITE can be used as mnemonic indexes in `fds`.
150
+ *
151
+ * It is a programmer error to call this function with unsupported flags, and a
152
+ * critical warning will be raised.
153
+ *
154
+ * As of GLib 2.78, it is preferred to pass `O_CLOEXEC` in, rather than
155
+ * `FD_CLOEXEC`, as that matches the underlying `pipe()` API more closely. Prior
156
+ * to 2.78, only `FD_CLOEXEC` was supported. Support for `FD_CLOEXEC` may be
157
+ * deprecated and removed in future.
158
+ * @param fds Array of two integers
159
+ * @param flags Bitfield of file descriptor flags, as for fcntl()
160
+ * @returns %TRUE on success, %FALSE if not (and errno will be set).
161
+ */
162
+ function open_pipe(fds: number[], flags: number): boolean;
163
+ /**
164
+ * Control the non-blocking state of the given file descriptor,
165
+ * according to `nonblock`. On most systems this uses %O_NONBLOCK, but
166
+ * on some older ones may use %O_NDELAY.
167
+ * @param fd A file descriptor
168
+ * @param nonblock If %TRUE, set the descriptor to be non-blocking
169
+ * @returns %TRUE if successful
170
+ */
57
171
  function set_fd_nonblocking(fd: number, nonblock: boolean): boolean;
58
- function signal_add_full(priority: number, signum: number, handler: GLib.SourceFunc): number;
172
+ /**
173
+ * A convenience function for g_unix_signal_source_new(), which
174
+ * attaches to the default #GMainContext. You can remove the watch
175
+ * using g_source_remove().
176
+ * @param priority the priority of the signal source. Typically this will be in the range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH.
177
+ * @param signum Signal number
178
+ * @param handler Callback
179
+ * @returns An ID (greater than 0) for the event source
180
+ */
181
+ function signal_add(priority: number, signum: number, handler: GLib.SourceFunc): number;
182
+ /**
183
+ * Create a #GSource that will be dispatched upon delivery of the UNIX
184
+ * signal `signum`. In GLib versions before 2.36, only `SIGHUP`, `SIGINT`,
185
+ * `SIGTERM` can be monitored. In GLib 2.36, `SIGUSR1` and `SIGUSR2`
186
+ * were added. In GLib 2.54, `SIGWINCH` was added.
187
+ *
188
+ * Note that unlike the UNIX default, all sources which have created a
189
+ * watch will be dispatched, regardless of which underlying thread
190
+ * invoked g_unix_signal_source_new().
191
+ *
192
+ * For example, an effective use of this function is to handle `SIGTERM`
193
+ * cleanly; flushing any outstanding files, and then calling
194
+ * g_main_loop_quit(). It is not safe to do any of this from a regular
195
+ * UNIX signal handler; such a handler may be invoked while malloc() or
196
+ * another library function is running, causing reentrancy issues if the
197
+ * handler attempts to use those functions. None of the GLib/GObject
198
+ * API is safe against this kind of reentrancy.
199
+ *
200
+ * The interaction of this source when combined with native UNIX
201
+ * functions like sigprocmask() is not defined.
202
+ *
203
+ * The source will not initially be associated with any #GMainContext
204
+ * and must be added to one with g_source_attach() before it will be
205
+ * executed.
206
+ * @param signum A signal number
207
+ * @returns A newly created #GSource
208
+ */
59
209
  function signal_source_new(signum: number): GLib.Source;
60
210
  interface FDSourceFunc {
61
211
  (fd: number, condition: GLib.IOCondition): boolean;
package/types/gly-2.d.ts CHANGED
@@ -746,7 +746,7 @@ declare module 'gi://Gly?version=2' {
746
746
  *
747
747
  * ::: warning
748
748
  * Most loaders will ignore this option. Currently, only the SVG
749
- * loader is known to obay it.
749
+ * loader is known to obey it.
750
750
  * @param width Maximum width
751
751
  * @param height Maximum height
752
752
  */
@@ -874,7 +874,7 @@ declare module 'gi://Gly?version=2' {
874
874
  * guaranteed to only return values from 1 to 8.
875
875
  *
876
876
  * If [method`Loader`.set_apply_transformations] is set to `FALSE`,
877
- * the orientation has to be corrected manually to dispaly the image
877
+ * the orientation has to be corrected manually to display the image
878
878
  * correctly.
879
879
  */
880
880
  get_transformation_orientation(): number;
@@ -1614,10 +1614,10 @@ declare module 'gi://Gsk?version=4.0' {
1614
1614
  get_child(): RenderNode;
1615
1615
  /**
1616
1616
  * Gets the component transfer for one of the components.
1617
- * @param component a value between 0 and 3 to indicate the red, green, blue or alpha component
1617
+ * @param component the component to get the transfer for
1618
1618
  * @returns the `GskComponentTransfer`
1619
1619
  */
1620
- get_transfer(component: number): ComponentTransfer;
1620
+ get_transfer(component: Gdk.ColorChannel | null): ComponentTransfer;
1621
1621
  }
1622
1622
 
1623
1623
  namespace CompositeNode {
@@ -3857,39 +3857,6 @@ declare module 'gi://Gtk?version=4.0' {
3857
3857
  */
3858
3858
  HELP,
3859
3859
  }
3860
- /**
3861
- * Enumerates possible reasons for an application to restore saved state.
3862
- *
3863
- * See [signal`Gtk`.Application::restore-state].
3864
- */
3865
-
3866
- /**
3867
- * Enumerates possible reasons for an application to restore saved state.
3868
- *
3869
- * See [signal`Gtk`.Application::restore-state].
3870
- */
3871
- export namespace RestoreReason {
3872
- export const $gtype: GObject.GType<RestoreReason>;
3873
- }
3874
-
3875
- enum RestoreReason {
3876
- /**
3877
- * Don't restore anything
3878
- */
3879
- PRISTINE,
3880
- /**
3881
- * This is normal launch. Restore as little as is reasonable
3882
- */
3883
- LAUNCH,
3884
- /**
3885
- * The application has crashed before. Try to restore the previous state
3886
- */
3887
- RECOVER,
3888
- /**
3889
- * This is a session restore. Restore the previous state as far as possible
3890
- */
3891
- RESTORE,
3892
- }
3893
3860
  /**
3894
3861
  * These enumeration values describe the possible transitions
3895
3862
  * when the child of a `GtkRevealer` widget is shown or hidden.
@@ -4618,6 +4585,11 @@ declare module 'gi://Gtk?version=4.0' {
4618
4585
 
4619
4586
  // Static fields
4620
4587
 
4588
+ /**
4589
+ * The XML syntax is broken
4590
+ * in some way
4591
+ */
4592
+ static INVALID_SYNTAX: number;
4621
4593
  /**
4622
4594
  * An XML element is invalid
4623
4595
  * (either because it is not part of SVG, or because it is
@@ -4625,7 +4597,7 @@ declare module 'gi://Gtk?version=4.0' {
4625
4597
  */
4626
4598
  static INVALID_ELEMENT: number;
4627
4599
  /**
4628
- * An XML attribute is invalid
4600
+ * An attribute is invalid
4629
4601
  * (either because it is not part of SVG, or because it is
4630
4602
  * not implemented in GTK, or its value is problematic)
4631
4603
  */
@@ -24800,17 +24772,12 @@ declare module 'gi://Gtk?version=4.0' {
24800
24772
  // Signal signatures
24801
24773
  interface SignalSignatures extends Gio.Application.SignalSignatures {
24802
24774
  'query-end': () => void;
24803
- 'restore-state': (arg0: RestoreReason, arg1: GLib.Variant) => boolean | void;
24804
- 'restore-window': (arg0: RestoreReason, arg1: GLib.Variant) => void;
24805
- 'save-state': (arg0: GLib.VariantDict) => boolean | void;
24806
24775
  'window-added': (arg0: Window) => void;
24807
24776
  'window-removed': (arg0: Window) => void;
24808
24777
  'notify::active-window': (pspec: GObject.ParamSpec) => void;
24809
- 'notify::autosave-interval': (pspec: GObject.ParamSpec) => void;
24810
24778
  'notify::menubar': (pspec: GObject.ParamSpec) => void;
24811
24779
  'notify::register-session': (pspec: GObject.ParamSpec) => void;
24812
24780
  'notify::screensaver-active': (pspec: GObject.ParamSpec) => void;
24813
- 'notify::support-save': (pspec: GObject.ParamSpec) => void;
24814
24781
  'notify::action-group': (pspec: GObject.ParamSpec) => void;
24815
24782
  'notify::application-id': (pspec: GObject.ParamSpec) => void;
24816
24783
  'notify::flags': (pspec: GObject.ParamSpec) => void;
@@ -24831,15 +24798,11 @@ declare module 'gi://Gtk?version=4.0' {
24831
24798
  Gio.ActionMap.ConstructorProps {
24832
24799
  active_window: Window;
24833
24800
  activeWindow: Window;
24834
- autosave_interval: number;
24835
- autosaveInterval: number;
24836
24801
  menubar: Gio.MenuModel;
24837
24802
  register_session: boolean;
24838
24803
  registerSession: boolean;
24839
24804
  screensaver_active: boolean;
24840
24805
  screensaverActive: boolean;
24841
- support_save: boolean;
24842
- supportSave: boolean;
24843
24806
  }
24844
24807
  }
24845
24808
 
@@ -24917,27 +24880,6 @@ declare module 'gi://Gtk?version=4.0' {
24917
24880
  * default window icon. Use [func`Gtk`.Window.set_default_icon_name] or
24918
24881
  * [property`Gtk`.Window:icon-name] to override that behavior.
24919
24882
  *
24920
- * ## State saving
24921
- *
24922
- * `GtkApplication` registers with a session manager if possible and
24923
- * offers various functionality related to the session life-cycle,
24924
- * such as state saving.
24925
- *
24926
- * State-saving functionality can be enabled by setting the
24927
- * [property`Gtk`.Application:support-save] property to true.
24928
- *
24929
- * In order to save and restore per-window state, applications must
24930
- * connect to the [signal`Gtk`.Application::restore-window] signal and
24931
- * handle the [signal`Gtk`.ApplicationWindow::save-state] signal. There
24932
- * are also [signal`Gtk`.Application::restore-state] and
24933
- * [signal`GtkApplication:`:save-state] signals, which can be used
24934
- * for global state that is not connected to any window.
24935
- *
24936
- * `GtkApplication` automatically saves state before app shutdown, and by
24937
- * default periodically auto-saves app state (as configured by the
24938
- * [property`Gtk`.Application:autosave-interval] property). Applications can
24939
- * also call [method`Gtk`.Application.save] themselves at opportune times.
24940
- *
24941
24883
  * # Inhibiting
24942
24884
  *
24943
24885
  * An application can block various ways to end the session with
@@ -24971,18 +24913,6 @@ declare module 'gi://Gtk?version=4.0' {
24971
24913
  * The currently focused window of the application.
24972
24914
  */
24973
24915
  get activeWindow(): Window;
24974
- /**
24975
- * The number of seconds between automatic state saves. Defaults to 15.
24976
- * A value of 0 will opt out of automatic state saving.
24977
- */
24978
- get autosave_interval(): number;
24979
- set autosave_interval(val: number);
24980
- /**
24981
- * The number of seconds between automatic state saves. Defaults to 15.
24982
- * A value of 0 will opt out of automatic state saving.
24983
- */
24984
- get autosaveInterval(): number;
24985
- set autosaveInterval(val: number);
24986
24916
  /**
24987
24917
  * The menu model to be used for the application's menu bar.
24988
24918
  */
@@ -25020,18 +24950,6 @@ declare module 'gi://Gtk?version=4.0' {
25020
24950
  * Linux.
25021
24951
  */
25022
24952
  get screensaverActive(): boolean;
25023
- /**
25024
- * Set this property to true if the application supports
25025
- * state saving and restoring.
25026
- */
25027
- get support_save(): boolean;
25028
- set support_save(val: boolean);
25029
- /**
25030
- * Set this property to true if the application supports
25031
- * state saving and restoring.
25032
- */
25033
- get supportSave(): boolean;
25034
- set supportSave(val: boolean);
25035
24953
 
25036
24954
  /**
25037
24955
  * Compile-time signal type information.
@@ -25070,23 +24988,6 @@ declare module 'gi://Gtk?version=4.0' {
25070
24988
 
25071
24989
  // Virtual methods
25072
24990
 
25073
- /**
25074
- * Class closure for the [signal`Application:`:restore-state] signal.
25075
- * @param reason the reason for restoring state
25076
- * @param state a dictionary containing the application state to restore
25077
- */
25078
- vfunc_restore_state(reason: RestoreReason, state: GLib.Variant): boolean;
25079
- /**
25080
- * Class closure for the [signal`Application:`:restore-window] signal.
25081
- * @param reason the reason this window is restored
25082
- * @param state the state to restore, as saved by a [signal@Gtk.ApplicationWindow::save-state] handler
25083
- */
25084
- vfunc_restore_window(reason: RestoreReason, state?: GLib.Variant | null): void;
25085
- /**
25086
- * Class closure for the [signal`Application:`:save-state] signal.
25087
- * @param state a dictionary where to store the application's state
25088
- */
25089
- vfunc_save_state(state: GLib.VariantDict): boolean;
25090
24991
  /**
25091
24992
  * Signal emitted when a `GtkWindow` is added to
25092
24993
  * application through gtk_application_add_window().
@@ -25121,14 +25022,6 @@ declare module 'gi://Gtk?version=4.0' {
25121
25022
  * @param window a window
25122
25023
  */
25123
25024
  add_window(window: Window): void;
25124
- /**
25125
- * Forget state that has been previously saved and prevent
25126
- * further automatic state saving.
25127
- *
25128
- * In order to reenable state saving, call
25129
- * [method`Gtk`.Application.save].
25130
- */
25131
- forget(): void;
25132
25025
  /**
25133
25026
  * Gets the accelerators that are currently associated with
25134
25027
  * the given action.
@@ -25257,16 +25150,6 @@ declare module 'gi://Gtk?version=4.0' {
25257
25150
  * @param window a window
25258
25151
  */
25259
25152
  remove_window(window: Window): void;
25260
- /**
25261
- * Saves the state of application.
25262
- *
25263
- * See [method`Gtk`.Application.forget] for a way to forget the state.
25264
- *
25265
- * If [property`Gtk`.Application:register-session] is set, `GtkApplication`
25266
- * calls this function automatically when the application is closed or
25267
- * the session ends.
25268
- */
25269
- save(): void;
25270
25153
  /**
25271
25154
  * Sets zero or more keyboard accelerators that will trigger the
25272
25155
  * given action.
@@ -26279,7 +26162,6 @@ declare module 'gi://Gtk?version=4.0' {
26279
26162
  namespace ApplicationWindow {
26280
26163
  // Signal signatures
26281
26164
  interface SignalSignatures extends Window.SignalSignatures {
26282
- 'save-state': (arg0: GLib.VariantDict) => boolean | void;
26283
26165
  'notify::show-menubar': (pspec: GObject.ParamSpec) => void;
26284
26166
  'notify::application': (pspec: GObject.ParamSpec) => void;
26285
26167
  'notify::child': (pspec: GObject.ParamSpec) => void;
@@ -26512,14 +26394,6 @@ declare module 'gi://Gtk?version=4.0' {
26512
26394
  ): void;
26513
26395
  emit(signal: string, ...args: any[]): void;
26514
26396
 
26515
- // Virtual methods
26516
-
26517
- /**
26518
- * Class closure for the [signal`ApplicationWindow:`:save-state] signal.
26519
- * @param dict a dictionary where to store the window's state
26520
- */
26521
- vfunc_save_state(dict: GLib.VariantDict): boolean;
26522
-
26523
26397
  // Methods
26524
26398
 
26525
26399
  /**
@@ -99721,8 +99595,6 @@ declare module 'gi://Gtk?version=4.0' {
99721
99595
  * the object's property stays synchronized with `self`.
99722
99596
  *
99723
99597
  * If `self`'s evaluation fails, `target`'s `property` is not updated.
99724
- * You can ensure that this doesn't happen by using a fallback
99725
- * expression.
99726
99598
  *
99727
99599
  * Note that this function takes ownership of `self`. If you want
99728
99600
  * to keep it around, you should [method`Gtk`.Expression.ref] it beforehand.
@@ -245060,7 +244932,7 @@ declare module 'gi://Gtk?version=4.0' {
245060
244932
  * or %NULL if none has been set.
245061
244933
  * @returns the menu model
245062
244934
  */
245063
- get_extra_menu(): Gio.MenuModel;
244935
+ get_extra_menu(): Gio.MenuModel | null;
245064
244936
  /**
245065
244937
  * Gets a `GtkWidget` that has previously been set as gutter.
245066
244938
  *
@@ -515,6 +515,53 @@ declare module 'gi://Polkit?version=1.0' {
515
515
  identity: Identity,
516
516
  cancellable?: Gio.Cancellable | null,
517
517
  ): boolean;
518
+ /**
519
+ * Asynchronously provide response that `identity` successfully authenticated
520
+ * for the authentication request identified by `cookie` as requested by `subject`.
521
+ *
522
+ * This function is only used by the socket-activated agent helper, running as uiid
523
+ * 0, and will fail otherwise. The requesting process is identified via `subject`
524
+ * which will contain a PID FD identifying the process.
525
+ *
526
+ * When the operation is finished, `callback` will be invoked in the
527
+ * <link linkend="g-main-context-push-thread-default">thread-default
528
+ * main loop</link> of the thread you are calling this method
529
+ * from. You can then call
530
+ * polkit_authority_authentication_agent_response_finish() to get the
531
+ * result of the operation.
532
+ * @param cookie The cookie passed to the authentication agent from the authority.
533
+ * @param identity The identity that was authenticated.
534
+ * @param subject The subject that requested the authentication.
535
+ * @param cancellable A #GCancellable or %NULL.
536
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied.
537
+ */
538
+ authentication_agent_response_with_subject(
539
+ cookie: string,
540
+ identity: Identity,
541
+ subject: Subject,
542
+ cancellable?: Gio.Cancellable | null,
543
+ callback?: Gio.AsyncReadyCallback<this> | null,
544
+ ): void;
545
+ /**
546
+ * Provide response that `identity` successfully authenticated for the
547
+ * authentication request identified by `cookie`. See polkit_authority_authentication_agent_response_with_subject()
548
+ * for limitations on who is allowed is to call this method.
549
+ *
550
+ * The calling thread is blocked until a reply is received. See
551
+ * polkit_authority_authentication_agent_response_with_subject() for the
552
+ * asynchronous version.
553
+ * @param cookie The cookie passed to the authentication agent from the authority.
554
+ * @param identity The identity that was authenticated.
555
+ * @param subject The subject that requested the authentication.
556
+ * @param cancellable A #GCancellable or %NULL.
557
+ * @returns %TRUE if @authority acknowledged the call, %FALSE if @error is set.
558
+ */
559
+ authentication_agent_response_with_subject_sync(
560
+ cookie: string,
561
+ identity: Identity,
562
+ subject: Subject,
563
+ cancellable?: Gio.Cancellable | null,
564
+ ): boolean;
518
565
  /**
519
566
  * Asynchronously checks if `subject` is authorized to perform the action represented
520
567
  * by `action_id`.
@@ -538,7 +585,7 @@ declare module 'gi://Polkit?version=1.0' {
538
585
  * the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">D-Bus method</link> for more details.
539
586
  *
540
587
  * If `details` is non-empty then the request will fail with
541
- * #POLKIT_ERROR_FAILED unless the process doing the check itsef is
588
+ * #POLKIT_ERROR_FAILED unless the process doing the check itself is
542
589
  * sufficiently authorized (e.g. running as uid 0).
543
590
  * @param subject A #PolkitSubject.
544
591
  * @param action_id The action to check for.
@@ -576,7 +623,7 @@ declare module 'gi://Polkit?version=1.0' {
576
623
  * the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">D-Bus method</link> for more details.
577
624
  *
578
625
  * If `details` is non-empty then the request will fail with
579
- * #POLKIT_ERROR_FAILED unless the process doing the check itsef is
626
+ * #POLKIT_ERROR_FAILED unless the process doing the check itself is
580
627
  * sufficiently authorized (e.g. running as uid 0).
581
628
  * @param subject A #PolkitSubject.
582
629
  * @param action_id The action to check for.
@@ -616,7 +663,7 @@ declare module 'gi://Polkit?version=1.0' {
616
663
  * the <link linkend="eggdbus-method-org.freedesktop.PolicyKit1.Authority.CheckAuthorization">D-Bus method</link> for more details.
617
664
  *
618
665
  * If `details` is non-empty then the request will fail with
619
- * #POLKIT_ERROR_FAILED unless the process doing the check itsef is
666
+ * #POLKIT_ERROR_FAILED unless the process doing the check itself is
620
667
  * sufficiently authorized (e.g. running as uid 0).
621
668
  * @param subject A #PolkitSubject.
622
669
  * @param action_id The action to check for.
@@ -4895,10 +4942,13 @@ declare module 'gi://Polkit?version=1.0' {
4895
4942
  namespace UnixProcess {
4896
4943
  // Signal signatures
4897
4944
  interface SignalSignatures extends GObject.Object.SignalSignatures {
4945
+ 'notify::cgroupid': (pspec: GObject.ParamSpec) => void;
4946
+ 'notify::ctty': (pspec: GObject.ParamSpec) => void;
4898
4947
  'notify::gids': (pspec: GObject.ParamSpec) => void;
4899
4948
  'notify::pid': (pspec: GObject.ParamSpec) => void;
4900
4949
  'notify::pidfd': (pspec: GObject.ParamSpec) => void;
4901
4950
  'notify::pidfd-is-safe': (pspec: GObject.ParamSpec) => void;
4951
+ 'notify::ppidfd': (pspec: GObject.ParamSpec) => void;
4902
4952
  'notify::start-time': (pspec: GObject.ParamSpec) => void;
4903
4953
  'notify::uid': (pspec: GObject.ParamSpec) => void;
4904
4954
  }
@@ -4906,11 +4956,14 @@ declare module 'gi://Polkit?version=1.0' {
4906
4956
  // Constructor properties interface
4907
4957
 
4908
4958
  interface ConstructorProps extends GObject.Object.ConstructorProps, Subject.ConstructorProps {
4959
+ cgroupid: number;
4960
+ ctty: number;
4909
4961
  gids: any[];
4910
4962
  pid: number;
4911
4963
  pidfd: number;
4912
4964
  pidfd_is_safe: boolean;
4913
4965
  pidfdIsSafe: boolean;
4966
+ ppidfd: number;
4914
4967
  start_time: number;
4915
4968
  startTime: number;
4916
4969
  uid: number;
@@ -4946,6 +4999,14 @@ declare module 'gi://Polkit?version=1.0' {
4946
4999
 
4947
5000
  // Properties
4948
5001
 
5002
+ /**
5003
+ * The start time of the process.
5004
+ */
5005
+ get cgroupid(): number;
5006
+ /**
5007
+ * The UNIX process controlling TTY.
5008
+ */
5009
+ get ctty(): number;
4949
5010
  /**
4950
5011
  * The UNIX group ids of the process.
4951
5012
  */
@@ -4963,6 +5024,10 @@ declare module 'gi://Polkit?version=1.0' {
4963
5024
  set pidfd(val: number);
4964
5025
  get pidfd_is_safe(): boolean;
4965
5026
  get pidfdIsSafe(): boolean;
5027
+ /**
5028
+ * The UNIX process' parent id file descriptor.
5029
+ */
5030
+ get ppidfd(): number;
4966
5031
  /**
4967
5032
  * The start time of the process.
4968
5033
  */
@@ -5052,6 +5117,16 @@ declare module 'gi://Polkit?version=1.0' {
5052
5117
 
5053
5118
  // Methods
5054
5119
 
5120
+ /**
5121
+ * Gets the cgroupid of `process`.
5122
+ * @returns The cgroupid of @process.
5123
+ */
5124
+ get_cgroupid(): number;
5125
+ /**
5126
+ * Gets the controlling TTY for `process`.
5127
+ * @returns The dev_t of the controlling TTY of @process.
5128
+ */
5129
+ get_ctty(): number;
5055
5130
  /**
5056
5131
  * Gets the group ids for `process`. Note that this is the real group-ids,
5057
5132
  * not the effective group-ids.
@@ -5078,6 +5153,16 @@ declare module 'gi://Polkit?version=1.0' {
5078
5153
  * @returns TRUE or FALSE.
5079
5154
  */
5080
5155
  get_pidfd_is_safe(): boolean;
5156
+ /**
5157
+ * Gets the process' parent id for `process`.
5158
+ * @returns The process id for the parent of @process.
5159
+ */
5160
+ get_ppid(): number;
5161
+ /**
5162
+ * Gets the process' parent id file descriptor for `process`.
5163
+ * @returns The process id file descriptor for the parent of @process.
5164
+ */
5165
+ get_ppidfd(): number;
5081
5166
  /**
5082
5167
  * Gets the start time of `process`.
5083
5168
  * @returns The start time of @process.