2009-10-27 11:27:45 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
2008-10-31 00:22:44 -04:00
|
|
|
#ifndef __SHELL_GLOBAL_H__
|
|
|
|
#define __SHELL_GLOBAL_H__
|
|
|
|
|
|
|
|
#include <clutter/clutter.h>
|
|
|
|
#include <glib-object.h>
|
2008-11-20 19:39:14 -05:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2009-01-08 20:09:35 -05:00
|
|
|
#include <gtk/gtk.h>
|
2011-03-05 10:49:24 -05:00
|
|
|
#include <meta/meta-plugin.h>
|
2011-02-07 10:21:30 -05:00
|
|
|
|
2008-10-31 00:22:44 -04:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2015-09-24 14:07:44 -04:00
|
|
|
#define SHELL_TYPE_GLOBAL (shell_global_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (ShellGlobal, shell_global, SHELL, GLOBAL, GObject)
|
2008-10-31 00:22:44 -04:00
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
ShellGlobal *shell_global_get (void);
|
2008-10-31 00:22:44 -04:00
|
|
|
|
2012-02-14 14:33:56 -05:00
|
|
|
ClutterStage *shell_global_get_stage (ShellGlobal *global);
|
2011-03-24 10:54:46 -04:00
|
|
|
MetaScreen *shell_global_get_screen (ShellGlobal *global);
|
|
|
|
GdkScreen *shell_global_get_gdk_screen (ShellGlobal *global);
|
2011-07-13 12:34:31 -04:00
|
|
|
MetaDisplay *shell_global_get_display (ShellGlobal *global);
|
2011-03-24 10:54:46 -04:00
|
|
|
GList *shell_global_get_window_actors (ShellGlobal *global);
|
|
|
|
GSettings *shell_global_get_settings (ShellGlobal *global);
|
2014-06-05 12:09:47 -04:00
|
|
|
GSettings *shell_global_get_overrides_settings (ShellGlobal *global);
|
2011-03-24 10:54:46 -04:00
|
|
|
guint32 shell_global_get_current_time (ShellGlobal *global);
|
2010-09-09 21:46:13 -04:00
|
|
|
|
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
/* Input/event handling */
|
|
|
|
gboolean shell_global_begin_modal (ShellGlobal *global,
|
2011-10-21 03:12:17 -04:00
|
|
|
guint32 timestamp,
|
|
|
|
MetaModalOptions options);
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_end_modal (ShellGlobal *global,
|
|
|
|
guint32 timestamp);
|
2009-10-25 18:53:10 -04:00
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_set_stage_input_region (ShellGlobal *global,
|
|
|
|
GSList *rectangles);
|
2010-01-25 16:42:11 -05:00
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_get_pointer (ShellGlobal *global,
|
|
|
|
int *x,
|
|
|
|
int *y,
|
|
|
|
ClutterModifierType *mods);
|
2010-05-05 17:05:42 -04:00
|
|
|
|
2011-05-20 15:50:54 -04:00
|
|
|
typedef struct {
|
|
|
|
guint glibc_uordblks;
|
|
|
|
|
|
|
|
guint js_bytes;
|
|
|
|
|
|
|
|
guint gjs_boxed;
|
|
|
|
guint gjs_gobject;
|
|
|
|
guint gjs_function;
|
|
|
|
guint gjs_closure;
|
2011-09-15 19:36:07 -04:00
|
|
|
|
|
|
|
/* 32 bit to avoid js conversion problems with 64 bit */
|
|
|
|
guint last_gc_seconds_ago;
|
2011-05-20 15:50:54 -04:00
|
|
|
} ShellMemoryInfo;
|
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
/* Run-at-leisure API */
|
|
|
|
void shell_global_begin_work (ShellGlobal *global);
|
|
|
|
void shell_global_end_work (ShellGlobal *global);
|
2010-05-09 00:34:15 -04:00
|
|
|
|
|
|
|
typedef void (*ShellLeisureFunction) (gpointer data);
|
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_run_at_leisure (ShellGlobal *global,
|
|
|
|
ShellLeisureFunction func,
|
|
|
|
gpointer user_data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
|
|
|
|
|
|
|
|
/* Misc utilities / Shell API */
|
|
|
|
void shell_global_sync_pointer (ShellGlobal *global);
|
|
|
|
|
|
|
|
GAppLaunchContext *
|
2014-01-19 12:34:32 -05:00
|
|
|
shell_global_create_app_launch_context (ShellGlobal *global,
|
|
|
|
int timestamp,
|
|
|
|
int workspace);
|
2010-05-09 00:34:15 -04:00
|
|
|
|
2012-11-04 13:53:49 -05:00
|
|
|
void shell_global_play_theme_sound (ShellGlobal *global,
|
|
|
|
guint id,
|
|
|
|
const char *name,
|
|
|
|
const char *description,
|
|
|
|
ClutterEvent *for_event);
|
|
|
|
void shell_global_play_theme_sound_full (ShellGlobal *global,
|
2011-03-24 10:54:46 -04:00
|
|
|
guint id,
|
2012-11-04 13:53:49 -05:00
|
|
|
const char *name,
|
|
|
|
const char *description,
|
|
|
|
ClutterEvent *for_event,
|
|
|
|
const char *application_id,
|
|
|
|
const char *application_name);
|
2012-11-05 12:10:24 -05:00
|
|
|
void shell_global_play_sound_file (ShellGlobal *global,
|
|
|
|
guint id,
|
|
|
|
const char *file_name,
|
|
|
|
const char *description,
|
|
|
|
ClutterEvent *for_event);
|
|
|
|
void shell_global_play_sound_file_full (ShellGlobal *global,
|
|
|
|
guint id,
|
|
|
|
const char *file_name,
|
|
|
|
const char *description,
|
|
|
|
ClutterEvent *for_event,
|
|
|
|
const char *application_id,
|
|
|
|
const char *application_name);
|
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_cancel_theme_sound (ShellGlobal *global,
|
|
|
|
guint id);
|
2010-07-22 20:39:44 -04:00
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_notify_error (ShellGlobal *global,
|
|
|
|
const char *msg,
|
|
|
|
const char *details);
|
2011-03-15 18:31:16 -04:00
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_init_xdnd (ShellGlobal *global);
|
2011-03-15 18:31:16 -04:00
|
|
|
|
2011-03-24 10:54:46 -04:00
|
|
|
void shell_global_reexec_self (ShellGlobal *global);
|
2015-02-13 04:27:27 -05:00
|
|
|
|
|
|
|
void shell_global_log_structured (const char *message,
|
|
|
|
const char *const *keys);
|
2011-01-05 09:47:27 -05:00
|
|
|
|
2012-05-16 17:11:57 -04:00
|
|
|
const char * shell_global_get_session_mode (ShellGlobal *global);
|
2011-08-24 10:06:13 -04:00
|
|
|
|
2013-10-13 18:46:50 -04:00
|
|
|
void shell_global_set_runtime_state (ShellGlobal *global,
|
|
|
|
const char *property_name,
|
|
|
|
GVariant *variant);
|
2013-01-17 14:39:54 -05:00
|
|
|
GVariant * shell_global_get_runtime_state (ShellGlobal *global,
|
|
|
|
const char *property_type,
|
|
|
|
const char *property_name);
|
|
|
|
|
2013-10-13 18:46:50 -04:00
|
|
|
void shell_global_set_persistent_state (ShellGlobal *global,
|
|
|
|
const char *property_name,
|
|
|
|
GVariant *variant);
|
|
|
|
GVariant * shell_global_get_persistent_state (ShellGlobal *global,
|
|
|
|
const char *property_type,
|
|
|
|
const char *property_name);
|
2013-01-17 14:39:54 -05:00
|
|
|
|
2008-10-31 00:22:44 -04:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __SHELL_GLOBAL_H__ */
|