1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
#ifndef __SHELL_GLOBAL_H__
3
#define __SHELL_GLOBAL_H__
5
#include <clutter/clutter.h>
6
#include <glib-object.h>
7
#include <gdk-pixbuf/gdk-pixbuf.h>
9
#include <meta/meta-plugin.h>
13
typedef struct _ShellGlobal ShellGlobal;
14
typedef struct _ShellGlobalClass ShellGlobalClass;
16
#define SHELL_TYPE_GLOBAL (shell_global_get_type ())
17
#define SHELL_GLOBAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_GLOBAL, ShellGlobal))
18
#define SHELL_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_GLOBAL, ShellGlobalClass))
19
#define SHELL_IS_GLOBAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_GLOBAL))
20
#define SHELL_IS_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_GLOBAL))
21
#define SHELL_GLOBAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_GLOBAL, ShellGlobalClass))
23
struct _ShellGlobalClass
25
GObjectClass parent_class;
28
GType shell_global_get_type (void) G_GNUC_CONST;
30
ShellGlobal *shell_global_get (void);
32
ClutterStage *shell_global_get_stage (ShellGlobal *global);
33
MetaScreen *shell_global_get_screen (ShellGlobal *global);
34
GdkScreen *shell_global_get_gdk_screen (ShellGlobal *global);
35
MetaDisplay *shell_global_get_display (ShellGlobal *global);
36
GList *shell_global_get_window_actors (ShellGlobal *global);
37
GSettings *shell_global_get_settings (ShellGlobal *global);
38
guint32 shell_global_get_current_time (ShellGlobal *global);
41
/* Input/event handling */
42
gboolean shell_global_begin_modal (ShellGlobal *global,
44
MetaModalOptions options);
45
void shell_global_end_modal (ShellGlobal *global,
47
void shell_global_freeze_keyboard (ShellGlobal *global,
51
SHELL_STAGE_INPUT_MODE_NONREACTIVE,
52
SHELL_STAGE_INPUT_MODE_NORMAL,
53
SHELL_STAGE_INPUT_MODE_FOCUSED,
54
SHELL_STAGE_INPUT_MODE_FULLSCREEN
55
} ShellStageInputMode;
57
void shell_global_set_stage_input_mode (ShellGlobal *global,
58
ShellStageInputMode mode);
59
void shell_global_set_stage_input_region (ShellGlobal *global,
64
SHELL_CURSOR_DND_IN_DRAG,
65
SHELL_CURSOR_DND_UNSUPPORTED_TARGET,
66
SHELL_CURSOR_DND_MOVE,
67
SHELL_CURSOR_DND_COPY,
68
SHELL_CURSOR_POINTING_HAND,
69
SHELL_CURSOR_CROSSHAIR
72
void shell_global_set_cursor (ShellGlobal *global,
74
void shell_global_unset_cursor (ShellGlobal *global);
76
void shell_global_get_pointer (ShellGlobal *global,
79
ClutterModifierType *mods);
91
/* 32 bit to avoid js conversion problems with 64 bit */
92
guint last_gc_seconds_ago;
95
void shell_global_get_memory_info (ShellGlobal *global,
96
ShellMemoryInfo *meminfo);
99
/* Run-at-leisure API */
100
void shell_global_begin_work (ShellGlobal *global);
101
void shell_global_end_work (ShellGlobal *global);
103
typedef void (*ShellLeisureFunction) (gpointer data);
105
void shell_global_run_at_leisure (ShellGlobal *global,
106
ShellLeisureFunction func,
108
GDestroyNotify notify);
111
/* Misc utilities / Shell API */
112
void shell_global_sync_pointer (ShellGlobal *global);
115
shell_global_create_app_launch_context (ShellGlobal *global);
117
void shell_global_play_theme_sound (ShellGlobal *global,
120
const char *description,
121
ClutterEvent *for_event);
122
void shell_global_play_theme_sound_full (ShellGlobal *global,
125
const char *description,
126
ClutterEvent *for_event,
127
const char *application_id,
128
const char *application_name);
129
void shell_global_play_sound_file (ShellGlobal *global,
131
const char *file_name,
132
const char *description,
133
ClutterEvent *for_event);
134
void shell_global_play_sound_file_full (ShellGlobal *global,
136
const char *file_name,
137
const char *description,
138
ClutterEvent *for_event,
139
const char *application_id,
140
const char *application_name);
142
void shell_global_cancel_theme_sound (ShellGlobal *global,
145
void shell_global_notify_error (ShellGlobal *global,
147
const char *details);
149
void shell_global_init_xdnd (ShellGlobal *global);
151
void shell_global_reexec_self (ShellGlobal *global);
153
const char * shell_global_get_session_mode (ShellGlobal *global);
155
void shell_global_set_runtime_state (ShellGlobal *global,
156
const char *property_name,
158
GVariant * shell_global_get_runtime_state (ShellGlobal *global,
159
const char *property_type,
160
const char *property_name);
165
#endif /* __SHELL_GLOBAL_H__ */