diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-01-03 15:02:49 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-01-07 03:20:56 -0500 |
commit | bdd7e15c849cd641000e0efddaeacfe420b1b3e4 (patch) | |
tree | 2ec0ec68d5c8cc2dc7127e755b45426b955764e6 /gtk/gtkapplication.h | |
parent | 31337913025090266926fd318e872e5d6f8dd101 (diff) | |
download | gtk+-bdd7e15c849cd641000e0efddaeacfe420b1b3e4.tar.gz |
GtkApplication: Add an inhibit api
This lets applications block logout and similar actions ahead
of time. Currently only implemented for D-Bus, but Windows has
very similar API since Vista.
Diffstat (limited to 'gtk/gtkapplication.h')
-rw-r--r-- | gtk/gtkapplication.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/gtkapplication.h b/gtk/gtkapplication.h index aeb4688cbe..298e50d27f 100644 --- a/gtk/gtkapplication.h +++ b/gtk/gtkapplication.h @@ -99,6 +99,23 @@ void gtk_application_quit_response (GtkApplication *application gboolean will_quit, const gchar *reason); +typedef enum +{ + GTK_APPLICATION_INHIBIT_LOGOUT = (1 << 0), + GTK_APPLICATION_INHIBIT_SWITCH = (1 << 1), + GTK_APPLICATION_INHIBIT_SUSPEND = (1 << 2), + GTK_APPLICATION_INHIBIT_IDLE = (1 << 3) +} GtkApplicationInhibitFlags; + +guint gtk_application_inhibit (GtkApplication *application, + GtkWindow *window, + GtkApplicationInhibitFlags flags, + const gchar *reason); +void gtk_application_uninhibit (GtkApplication *application, + guint cookie); +gboolean gtk_application_is_inhibited (GtkApplication *application, + GtkApplicationInhibitFlags flags); + G_END_DECLS #endif /* __GTK_APPLICATION_H__ */ |