Top |
GrxApplication extends GApplication for applications using the Grx graphics library.
If there is a chance that your application will be run using the "linuxfb"
video driver, you need to monitor the "is-active" property. If you draw on
the screen when "is-active" FALSE
, it interfere with the application on the
active virtual terminal when switching consoles (e.g. ALT+CTRL+F1).
GrxApplication *
grx_application_new (GError **error
);
Create a new instance of GrxApplication. The console will be
set to graphics mode or there will be an error
if setting graphics mode
failed.
GrxApplication * grx_application_new_full (const gchar *id
,GApplicationFlags flags
,GError **error
);
Create a new instance of GrxApplication. The console will be
set to graphics mode or there will be an error
if setting graphics mode
failed.
gboolean
grx_application_is_active (GrxApplication *application
);
Gets the status of the “is-active” property
gboolean
grx_application_get_quit_on_signal (GrxApplication *application
);
Gets the "quit-on-signal" property value.
void grx_application_set_quit_on_signal (GrxApplication *application
,gboolean value
);
Sets the "quit-on-signal" property value.
application |
||
value |
|
struct GrxApplicationClass { GApplicationClass parent_class; gboolean (*event) (GrxApplication *application, GrxEvent *event); gpointer reserved[6]; };
The default “event” signal handler. This handles all
GRX_EVENT_TYPE_APP_* events and suppresses other events with the
application is not active (“is-active” property is |
||
gpointer |
for future use |
“is-active”
property“is-active” gboolean
Gets if the application is active. Applications should not draw to the screen
when this property is FALSE
.
Flags: Read
Default value: FALSE
“quit-on-signal”
property“quit-on-signal” gboolean
Gets or sets if the application should queue a GRX_EVENT_TYPE_APP_QUIT
event when SIGHUP, SIGINT or SIGTERM is received.
The default behavior is for an application to quit when any of these signals are received.
Flags: Read / Write / Construct
Default value: TRUE
“event”
signalgboolean user_function (GrxApplication *application, GrxEvent *event, gpointer user_data)
This signal is emitted when an event occurs. Handlers can return TRUE
to
prevent any further handlers from running.
application |
the object that received the signal |
|
event |
the event that triggered the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last