2009-10-27 15:27:45 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
2008-10-31 04:22:44 +00:00
|
|
|
#ifndef __SHELL_GLOBAL_H__
|
|
|
|
#define __SHELL_GLOBAL_H__
|
|
|
|
|
2010-10-19 18:55:43 +00:00
|
|
|
#include "meta-plugin.h"
|
2008-10-31 04:22:44 +00:00
|
|
|
#include <clutter/clutter.h>
|
|
|
|
#include <glib-object.h>
|
2008-11-21 00:39:14 +00:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2009-01-09 01:09:35 +00:00
|
|
|
#include <gtk/gtk.h>
|
2008-10-31 04:22:44 +00:00
|
|
|
|
2011-02-07 15:21:30 +00:00
|
|
|
#include <telepathy-glib/telepathy-glib.h>
|
|
|
|
|
2008-10-31 04:22:44 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _ShellGlobal ShellGlobal;
|
|
|
|
typedef struct _ShellGlobalClass ShellGlobalClass;
|
|
|
|
|
|
|
|
#define SHELL_TYPE_GLOBAL (shell_global_get_type ())
|
|
|
|
#define SHELL_GLOBAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_GLOBAL, ShellGlobal))
|
|
|
|
#define SHELL_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_GLOBAL, ShellGlobalClass))
|
|
|
|
#define SHELL_IS_GLOBAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_GLOBAL))
|
|
|
|
#define SHELL_IS_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_GLOBAL))
|
|
|
|
#define SHELL_GLOBAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_GLOBAL, ShellGlobalClass))
|
|
|
|
|
2009-04-23 14:46:36 +00:00
|
|
|
#define SHELL_GCONF_DIR "/desktop/gnome/shell"
|
|
|
|
|
2008-11-07 18:42:23 +00:00
|
|
|
struct _ShellGlobalClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
};
|
|
|
|
|
2008-10-31 04:22:44 +00:00
|
|
|
GType shell_global_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2009-01-09 01:09:35 +00:00
|
|
|
gboolean shell_clutter_texture_set_from_pixbuf (ClutterTexture *texture,
|
|
|
|
GdkPixbuf *pixbuf);
|
|
|
|
|
2008-10-31 04:22:44 +00:00
|
|
|
ShellGlobal *shell_global_get (void);
|
|
|
|
|
2010-09-10 01:46:13 +00:00
|
|
|
typedef enum {
|
|
|
|
SHELL_CURSOR_DND_IN_DRAG,
|
|
|
|
SHELL_CURSOR_DND_UNSUPPORTED_TARGET,
|
|
|
|
SHELL_CURSOR_DND_MOVE,
|
2010-11-23 23:27:47 +00:00
|
|
|
SHELL_CURSOR_DND_COPY,
|
|
|
|
SHELL_CURSOR_POINTING_HAND
|
2010-09-10 01:46:13 +00:00
|
|
|
} ShellCursor;
|
|
|
|
|
|
|
|
void shell_global_set_cursor (ShellGlobal *global,
|
|
|
|
ShellCursor type);
|
|
|
|
|
|
|
|
void shell_global_unset_cursor (ShellGlobal *global);
|
|
|
|
|
2009-06-25 21:42:46 +00:00
|
|
|
MetaScreen *shell_global_get_screen (ShellGlobal *global);
|
|
|
|
|
2010-06-03 15:14:58 +00:00
|
|
|
GdkScreen *shell_global_get_gdk_screen (ShellGlobal *global);
|
|
|
|
|
2009-10-25 22:53:10 +00:00
|
|
|
gboolean shell_global_add_extension_importer (ShellGlobal *global,
|
|
|
|
const char *target_object_script,
|
|
|
|
const char *target_property,
|
|
|
|
const char *directory,
|
|
|
|
GError **error);
|
|
|
|
|
2009-01-19 23:21:57 +00:00
|
|
|
void shell_global_grab_dbus_service (ShellGlobal *global);
|
|
|
|
|
2009-04-29 18:01:09 +00:00
|
|
|
typedef enum {
|
|
|
|
SHELL_STAGE_INPUT_MODE_NONREACTIVE,
|
|
|
|
SHELL_STAGE_INPUT_MODE_NORMAL,
|
2010-07-02 17:36:13 +00:00
|
|
|
SHELL_STAGE_INPUT_MODE_FOCUSED,
|
2009-04-29 18:01:09 +00:00
|
|
|
SHELL_STAGE_INPUT_MODE_FULLSCREEN
|
|
|
|
} ShellStageInputMode;
|
|
|
|
|
|
|
|
void shell_global_set_stage_input_mode (ShellGlobal *global,
|
|
|
|
ShellStageInputMode mode);
|
|
|
|
void shell_global_set_stage_input_region (ShellGlobal *global,
|
|
|
|
GSList *rectangles);
|
2008-11-02 04:18:41 +00:00
|
|
|
|
2010-10-19 18:55:43 +00:00
|
|
|
GList *shell_global_get_window_actors (ShellGlobal *global);
|
2008-10-31 18:05:19 +00:00
|
|
|
|
2009-08-12 04:22:46 +00:00
|
|
|
gboolean shell_global_begin_modal (ShellGlobal *global,
|
|
|
|
guint32 timestamp);
|
|
|
|
void shell_global_end_modal (ShellGlobal *global,
|
|
|
|
guint32 timestamp);
|
2008-11-19 19:54:17 +00:00
|
|
|
|
2009-08-28 15:27:39 +00:00
|
|
|
gboolean shell_global_display_is_grabbed (ShellGlobal *global);
|
|
|
|
|
2008-12-18 20:57:37 +00:00
|
|
|
void shell_global_reexec_self (ShellGlobal *global);
|
|
|
|
|
2010-02-23 23:49:02 +00:00
|
|
|
void shell_global_breakpoint (ShellGlobal *global);
|
|
|
|
|
2011-01-17 21:38:47 +00:00
|
|
|
gboolean shell_global_parse_search_provider (ShellGlobal *global,
|
|
|
|
const char *data,
|
|
|
|
char **name,
|
|
|
|
char **url,
|
|
|
|
GList **langs,
|
|
|
|
char **icon_data_uri,
|
|
|
|
GError **error);
|
|
|
|
|
2010-01-25 21:42:11 +00:00
|
|
|
void shell_global_gc (ShellGlobal *global);
|
|
|
|
|
2010-04-03 10:48:18 +00:00
|
|
|
void shell_global_maybe_gc (ShellGlobal *global);
|
|
|
|
|
2010-09-14 00:26:40 +00:00
|
|
|
void shell_global_format_time_relative_pretty (ShellGlobal *global, guint delta, char **text, guint *next_update);
|
2009-07-20 21:56:47 +00:00
|
|
|
|
2009-08-25 19:23:53 +00:00
|
|
|
GSList *shell_global_get_monitors (ShellGlobal *global);
|
2010-07-02 17:17:02 +00:00
|
|
|
MetaRectangle *shell_global_get_primary_monitor (ShellGlobal *global);
|
|
|
|
MetaRectangle *shell_global_get_focus_monitor (ShellGlobal *global);
|
2009-08-25 19:23:53 +00:00
|
|
|
|
2010-04-08 18:41:54 +00:00
|
|
|
void shell_global_get_pointer (ShellGlobal *global,
|
|
|
|
int *x,
|
|
|
|
int *y,
|
|
|
|
ClutterModifierType *mods);
|
2009-10-06 14:53:25 +00:00
|
|
|
|
2010-05-05 21:05:42 +00:00
|
|
|
GSettings *shell_global_get_settings (ShellGlobal *global);
|
|
|
|
|
2009-10-07 21:20:33 +00:00
|
|
|
ClutterModifierType shell_get_event_state (ClutterEvent *event);
|
|
|
|
|
2009-11-10 17:13:58 +00:00
|
|
|
void shell_popup_menu (GtkMenu *menu, int button, guint32 time,
|
|
|
|
int menu_x, int menu_y);
|
|
|
|
|
2010-05-12 21:19:20 +00:00
|
|
|
gboolean shell_write_string_to_stream (GOutputStream *stream,
|
|
|
|
const char *str,
|
|
|
|
GError **error);
|
|
|
|
|
2009-12-03 20:59:52 +00:00
|
|
|
guint32 shell_global_get_current_time (ShellGlobal *global);
|
|
|
|
|
|
|
|
GAppLaunchContext *shell_global_create_app_launch_context (ShellGlobal *global);
|
2009-11-10 17:13:58 +00:00
|
|
|
|
2010-03-26 20:38:03 +00:00
|
|
|
gboolean shell_global_set_property_mutable (ShellGlobal *global,
|
|
|
|
const char *object,
|
|
|
|
const char *property,
|
|
|
|
gboolean mutable);
|
|
|
|
|
2010-05-09 04:34:15 +00:00
|
|
|
void shell_global_begin_work (ShellGlobal *global);
|
|
|
|
void shell_global_end_work (ShellGlobal *global);
|
|
|
|
|
|
|
|
typedef void (*ShellLeisureFunction) (gpointer data);
|
|
|
|
|
|
|
|
void shell_global_run_at_leisure (ShellGlobal *global,
|
|
|
|
ShellLeisureFunction func,
|
|
|
|
gpointer user_data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
|
2010-07-23 00:39:44 +00:00
|
|
|
void shell_global_play_theme_sound (ShellGlobal *global,
|
2011-02-15 18:23:36 +00:00
|
|
|
guint id,
|
2010-07-23 00:39:44 +00:00
|
|
|
const char *name);
|
2011-02-15 18:23:36 +00:00
|
|
|
void shell_global_cancel_theme_sound (ShellGlobal *global,
|
|
|
|
guint id);
|
2010-07-23 00:39:44 +00:00
|
|
|
|
2011-01-05 14:47:27 +00:00
|
|
|
void shell_global_init_xdnd (ShellGlobal *global);
|
|
|
|
|
2011-02-07 15:21:30 +00:00
|
|
|
typedef void (*ShellGetTpContactCb) (TpConnection *connection,
|
|
|
|
GList *contacts,
|
|
|
|
TpHandle *failed);
|
|
|
|
|
|
|
|
void shell_get_tp_contacts (TpConnection *self,
|
|
|
|
guint n_handles,
|
|
|
|
const TpHandle *handles,
|
|
|
|
guint n_features,
|
|
|
|
const TpContactFeature *features,
|
|
|
|
ShellGetTpContactCb callback);
|
|
|
|
|
2008-10-31 04:22:44 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __SHELL_GLOBAL_H__ */
|