void gdk_display_set_cursor_theme (GdkDisplay *display,
const char *theme,
int size);
+ gboolean gdk_running_in_sandbox (void);
+const gchar * gdk_get_startup_notification_id (void);
+
#endif /* __GDK__PRIVATE_H__ */
return display;
}
+/*< private >
+ *
+ * gdk_get_startup_notification_id
+ *
+ * Returns the original value of the DESKTOP_STARTUP_ID environment
+ * variable if it was defined and valid, or %NULL otherwise.
+ *
+ * Returns: (nullable) (transfer none): the original value of the
+ * DESKTOP_STARTUP_ID environment variable, or %NULL.
+ */
+const gchar *
+gdk_get_startup_notification_id (void)
+{
+ return startup_notification_id;
+}
+
+ gboolean
+ gdk_running_in_sandbox (void)
+ {
+ char *path;
+ gboolean ret;
+
+ path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
+ ret = g_file_test (path, G_FILE_TEST_EXISTS);
+ g_free (path);
+
+ return ret;
+ }
+
/**
* SECTION:threads
* @Short_description: Functions for using GDK in multi-threaded programs