Package: gio

CStruct gio:application-class

Declaration

(cffi:defcstruct application-class
  ;; Parent class
  (:parent-class (:struct gobject:object-class))
  ;; Signals
  (startup :pointer)
  (activate :pointer)
  (open :pointer)
  (command-line :pointer)
  ;; Virtual functions
  (local-command-line :pointer)
  (before-emit :pointer)
  (after-emit :pointer)
  (add-platform-data :pointer)
  (quit-main-loop :pointer)
  (run-main-loop :pointer)
  (shutdown :pointer)
  (dbus-register :pointer)
  (dbus-unregister :pointer)
  (handle-local-options :pointer)
  (name-lost :pointer)
  ;; Private
  (padding :pointer :count 7))  

Values

startup
Invoked on the primary instance immediately after registration.
activate
Invoked on the primary instance when an activation occurs.
open
Invoked on the primary instance when there are files to open.
command-line
Invoked on the primary instance when a command line is not handled locally.
local-comman-line
Invoked (locally). The virtual function has the chance to inspect (and possibly replace) command line arguments. See the g:application-run function for more information. Also see the "handle-local-options" signal, which is a simpler alternative to handling some commandline options locally.
before-emit
Invoked on the primary instance before ‘activate’, ‘open’, ‘command-line’ or any action invocation, gets the ‘platform data’ from the calling instance. Must chain up.
after-emit
Invoked on the primary instance after ‘activate’, ‘open’, ‘command-line’ or any action invocation, gets the ‘platform data’ from the calling instance. Must chain up.
add-platform-data
Invoked (locally) to add ‘platform data’ to be sent to the primary instance when activating, opening or invoking actions. Must chain up.
quit-main-loop
Used to be invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested). Not used anymore since 2.32.
run-main-loop
Used to be invoked on the primary instance from the g:application-run function if the use-count is non-zero. Since 2.32, GApplication is iterating the main context directly and is not using run_mainloop anymore.
shutdown
Invoked only on the registered primary instance immediately after the main loop terminates.
dbus-register
Invoked locally during registration, if the application is using its D-Bus backend. You can use this to export extra objects on the bus, that need to exist before the application tries to own the bus name. The function is passed the GDBusConnection to to session bus, and the object path that GApplication will use to export its D-Bus API. If this function returns TRUE, registration will proceed; otherwise registration will abort. Since 2.34.
dbus-unregister
Invoked locally during unregistration, if the application is using its D-Bus backend. Use this to undo anything done by the dbus_register vfunc. Since 2.34.
handle-local-options
Invoked locally after the parsing of the commandline options has occurred. Since 2.40.
name-lost
Invoked when another instance is taking over the name. Since 2.60.

Details

The class structure for the g:application class.
 

See also

g:application
g:application-vtable
g:define-vtable
2025-12-15