shell-app.h 2.37 KB
Newer Older
1 2 3 4
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __SHELL_APP_H__
#define __SHELL_APP_H__

5
#include <clutter/clutter.h>
Colin Walters's avatar
Colin Walters committed
6
#include <gio/gio.h>
7
#include <gio/gdesktopappinfo.h>
8
#include <meta/window.h>
9 10 11

G_BEGIN_DECLS

12 13
#define SHELL_TYPE_APP (shell_app_get_type ())
G_DECLARE_FINAL_TYPE (ShellApp, shell_app, SHELL, APP, GObject)
14

15 16 17
typedef enum {
  SHELL_APP_STATE_STOPPED,
  SHELL_APP_STATE_STARTING,
Phillip Wood's avatar
Phillip Wood committed
18
  SHELL_APP_STATE_RUNNING
19 20
} ShellAppState;

21
const char *shell_app_get_id (ShellApp *app);
22

23
GDesktopAppInfo *shell_app_get_app_info (ShellApp *app);
24

25
ClutterActor *shell_app_create_icon_texture (ShellApp *app, int size);
26 27 28
const char *shell_app_get_name (ShellApp *app);
const char *shell_app_get_description (ShellApp *app);
gboolean shell_app_is_window_backed (ShellApp *app);
29

30 31
void shell_app_activate_window (ShellApp *app, MetaWindow *window, guint32 timestamp);

32 33 34 35 36
void shell_app_activate (ShellApp      *app);

void shell_app_activate_full (ShellApp      *app,
                              int            workspace,
                              guint32        timestamp);
37

38 39
void shell_app_open_new_window (ShellApp *app,
                                int       workspace);
40
gboolean shell_app_can_open_new_window (ShellApp *app);
41 42

ShellAppState shell_app_get_state (ShellApp *app);
43

Colin Walters's avatar
Colin Walters committed
44 45
gboolean shell_app_request_quit (ShellApp *app);

46
guint shell_app_get_n_windows (ShellApp *app);
47 48 49

GSList *shell_app_get_windows (ShellApp *app);

50 51
GSList *shell_app_get_pids (ShellApp *app);

52 53
gboolean shell_app_is_on_workspace (ShellApp *app, MetaWorkspace *workspace);

54 55 56
gboolean shell_app_launch (ShellApp     *app,
                           guint         timestamp,
                           int           workspace,
57
                           gboolean      discrete_gpu,
58 59
                           GError      **error);

60 61 62 63 64
void shell_app_launch_action (ShellApp        *app,
                              const char      *action_name,
                              guint            timestamp,
                              int              workspace);

65 66
int shell_app_compare_by_name (ShellApp *app, ShellApp *other);

67 68
int shell_app_compare (ShellApp *app, ShellApp *other);

Matthias Clasen's avatar
Matthias Clasen committed
69
void shell_app_update_window_actions (ShellApp *app, MetaWindow *window);
70
void shell_app_update_app_menu       (ShellApp *app, MetaWindow *window);
Matthias Clasen's avatar
Matthias Clasen committed
71

Phillip Wood's avatar
Phillip Wood committed
72 73
gboolean shell_app_get_busy          (ShellApp *app);

74 75 76
G_END_DECLS

#endif /* __SHELL_APP_H__ */