Add a GApplication::quit signal

This commit is contained in:
Emmanuele Bassi 2015-10-04 00:54:55 +01:00
parent c068d91f3f
commit 82fcb51078

View File

@ -276,6 +276,7 @@ enum
SIGNAL_ACTION, SIGNAL_ACTION,
SIGNAL_COMMAND_LINE, SIGNAL_COMMAND_LINE,
SIGNAL_HANDLE_LOCAL_OPTIONS, SIGNAL_HANDLE_LOCAL_OPTIONS,
SIGNAL_QUIT,
NR_SIGNALS NR_SIGNALS
}; };
@ -1408,7 +1409,6 @@ g_application_class_init (GApplicationClass *class)
G_STRUCT_OFFSET (GApplicationClass, activate), G_STRUCT_OFFSET (GApplicationClass, activate),
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
/** /**
* GApplication::open: * GApplication::open:
* @application: the application * @application: the application
@ -1425,6 +1425,20 @@ g_application_class_init (GApplicationClass *class)
NULL, NULL, NULL, NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_STRING); G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_STRING);
/**
* GApplication:quit:
* @application: the application
*
* The ::quit signal is emitted on the primary instance when the application
* is requested to terminate. See g_application_quit().
*
* Since: 2.48
*/
g_application_signals[SIGNAL_QUIT] =
g_signal_new (I_("quit"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GApplicationClass, quit),
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
/** /**
* GApplication::command-line: * GApplication::command-line:
* @application: the application * @application: the application