2009-10-27 11:27:45 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
2009-04-22 15:21:35 -04:00
|
|
|
#ifndef __SHELL_APP_SYSTEM_H__
|
|
|
|
#define __SHELL_APP_SYSTEM_H__
|
|
|
|
|
2009-07-07 16:08:41 -04:00
|
|
|
#include <gio/gio.h>
|
|
|
|
#include <clutter/clutter.h>
|
2009-04-22 15:21:35 -04:00
|
|
|
|
2009-10-15 19:28:29 -04:00
|
|
|
#include "shell-app.h"
|
2009-08-14 04:34:28 -04:00
|
|
|
#include "window.h"
|
|
|
|
|
2009-04-22 15:21:35 -04:00
|
|
|
#define SHELL_TYPE_APP_SYSTEM (shell_app_system_get_type ())
|
|
|
|
#define SHELL_APP_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_APP_SYSTEM, ShellAppSystem))
|
|
|
|
#define SHELL_APP_SYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_APP_SYSTEM, ShellAppSystemClass))
|
|
|
|
#define SHELL_IS_APP_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_APP_SYSTEM))
|
|
|
|
#define SHELL_IS_APP_SYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_APP_SYSTEM))
|
|
|
|
#define SHELL_APP_SYSTEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_APP_SYSTEM, ShellAppSystemClass))
|
|
|
|
|
|
|
|
typedef struct _ShellAppSystem ShellAppSystem;
|
|
|
|
typedef struct _ShellAppSystemClass ShellAppSystemClass;
|
|
|
|
typedef struct _ShellAppSystemPrivate ShellAppSystemPrivate;
|
|
|
|
|
|
|
|
struct _ShellAppSystem
|
|
|
|
{
|
|
|
|
GObject parent;
|
|
|
|
|
|
|
|
ShellAppSystemPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _ShellAppSystemClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
2009-06-25 17:43:54 -04:00
|
|
|
void (*installed_changed)(ShellAppSystem *appsys, gpointer user_data);
|
|
|
|
void (*favorites_changed)(ShellAppSystem *appsys, gpointer user_data);
|
2009-04-22 15:21:35 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
GType shell_app_system_get_type (void) G_GNUC_CONST;
|
2009-06-18 12:27:19 -04:00
|
|
|
ShellAppSystem* shell_app_system_get_default(void);
|
2009-04-22 15:21:35 -04:00
|
|
|
|
2009-07-07 16:08:41 -04:00
|
|
|
typedef struct _ShellAppInfo ShellAppInfo;
|
|
|
|
|
2009-08-05 11:27:06 -04:00
|
|
|
#define SHELL_TYPE_APP_INFO (shell_app_info_get_type ())
|
2009-07-07 16:08:41 -04:00
|
|
|
GType shell_app_info_get_type (void);
|
|
|
|
|
|
|
|
ShellAppInfo* shell_app_info_ref (ShellAppInfo *info);
|
|
|
|
void shell_app_info_unref (ShellAppInfo *info);
|
|
|
|
|
|
|
|
const char *shell_app_info_get_id (ShellAppInfo *info);
|
2009-08-05 11:27:06 -04:00
|
|
|
char *shell_app_info_get_name (ShellAppInfo *info);
|
|
|
|
char *shell_app_info_get_description (ShellAppInfo *info);
|
|
|
|
char *shell_app_info_get_executable (ShellAppInfo *info);
|
|
|
|
char *shell_app_info_get_desktop_file_path (ShellAppInfo *info);
|
2010-03-12 15:57:01 -05:00
|
|
|
GIcon *shell_app_info_get_icon (ShellAppInfo *info);
|
2009-07-07 16:08:41 -04:00
|
|
|
ClutterActor *shell_app_info_create_icon_texture (ShellAppInfo *info, float size);
|
|
|
|
GSList *shell_app_info_get_categories (ShellAppInfo *info);
|
|
|
|
gboolean shell_app_info_get_is_nodisplay (ShellAppInfo *info);
|
2009-08-14 04:34:28 -04:00
|
|
|
gboolean shell_app_info_is_transient (ShellAppInfo *info);
|
2010-03-12 15:57:01 -05:00
|
|
|
|
|
|
|
MetaWindow *shell_app_info_get_source_window (ShellAppInfo *info);
|
|
|
|
|
2009-07-07 16:08:41 -04:00
|
|
|
gboolean shell_app_info_launch_full (ShellAppInfo *info,
|
|
|
|
guint timestamp,
|
|
|
|
GList *uris,
|
|
|
|
int workspace,
|
|
|
|
char **startup_id,
|
|
|
|
GError **error);
|
|
|
|
gboolean shell_app_info_launch (ShellAppInfo *info,
|
|
|
|
GError **error);
|
|
|
|
|
2009-08-05 11:27:06 -04:00
|
|
|
ShellAppInfo *shell_app_system_load_from_desktop_file (ShellAppSystem *system, const char *filename, GError **error);
|
|
|
|
|
2009-10-15 19:28:29 -04:00
|
|
|
ShellApp *shell_app_system_get_app (ShellAppSystem *system, const char *id);
|
2010-03-25 17:45:28 -04:00
|
|
|
ShellApp *shell_app_system_get_app_for_path (ShellAppSystem *system, const char *desktop_path);
|
2010-02-20 19:16:30 -05:00
|
|
|
ShellApp *shell_app_system_get_app_for_window (ShellAppSystem *self, MetaWindow *window);
|
2009-07-07 16:08:41 -04:00
|
|
|
|
2009-10-15 19:28:29 -04:00
|
|
|
void _shell_app_system_register_app (ShellAppSystem *self, ShellApp *app);
|
|
|
|
|
|
|
|
ShellApp *shell_app_system_lookup_heuristic_basename (ShellAppSystem *system, const char *id);
|
2009-06-25 17:43:54 -04:00
|
|
|
|
2009-08-14 04:34:28 -04:00
|
|
|
ShellAppInfo *shell_app_system_create_from_window (ShellAppSystem *system, MetaWindow *window);
|
|
|
|
|
2009-11-29 17:45:30 -05:00
|
|
|
GSList *shell_app_system_get_flattened_apps (ShellAppSystem *system);
|
2009-05-14 14:14:18 -04:00
|
|
|
|
|
|
|
GSList *shell_app_system_get_all_settings (ShellAppSystem *system);
|
2009-04-22 15:21:35 -04:00
|
|
|
|
2009-11-29 17:45:30 -05:00
|
|
|
GSList *shell_app_system_initial_search (ShellAppSystem *system,
|
|
|
|
gboolean prefs,
|
|
|
|
GSList *terms);
|
|
|
|
|
|
|
|
GSList *shell_app_system_subsearch (ShellAppSystem *system,
|
|
|
|
gboolean prefs,
|
|
|
|
GSList *previous_results,
|
|
|
|
GSList *terms);
|
|
|
|
|
2009-04-22 15:21:35 -04:00
|
|
|
#endif /* __SHELL_APP_SYSTEM_H__ */
|