gnome-shell/src/shell-app-usage.h
Colin Walters e941e8088b Split ShellAppMonitor into ShellWindowTracker, ShellAppUsage
The two parts were mapping windows to applications, and
recording application usage statistics.  The latter part
(now called ShellAppUsage) is much more naturally built on top of
the former (now called ShellWindowTracker).

ShellWindowTracker retains the startup-notification handling.

ShellWindowTracker also gains a focus-app property, which is
what most things in the shell UI are interested in (instead of
window focus).

ShellAppSystem moves to exporting ShellApp from more of its
public API, rather than ShellAppInfo.  ShellAppSystem also
ensures that ShellApp instances are unique by holding
a hash on the ids.

ShellApp's private API is split off into a shell-app-private.h,
so shell-app.h can be included in shell-app-system.h.

Favorites handling is removed from ShellAppSystem, now inside
appFavorites.js.

Port all of the JavaScript for these changes.

https://bugzilla.gnome.org/show_bug.cgi?id=598646
2009-10-20 12:55:07 -04:00

37 lines
1.4 KiB
C

/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __SHELL_APP_USAGE_H__
#define __SHELL_APP_USAGE_H__
#include "shell-app.h"
#include "shell-window-tracker.h"
G_BEGIN_DECLS
typedef struct _ShellAppUsage ShellAppUsage;
typedef struct _ShellAppUsageClass ShellAppUsageClass;
typedef struct _ShellAppUsagePrivate ShellAppUsagePrivate;
#define SHELL_TYPE_APP_USAGE (shell_app_usage_get_type ())
#define SHELL_APP_USAGE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_APP_USAGE, ShellAppUsage))
#define SHELL_APP_USAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_APP_USAGE, ShellAppUsageClass))
#define SHELL_IS_APP_USAGE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_APP_USAGE))
#define SHELL_IS_APP_USAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_APP_USAGE))
#define SHELL_APP_USAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_APP_USAGE, ShellAppUsageClass))
struct _ShellAppUsageClass
{
GObjectClass parent_class;
};
GType shell_app_usage_get_type (void) G_GNUC_CONST;
ShellAppUsage* shell_app_usage_get_default(void);
GSList *shell_app_usage_get_most_used (ShellAppUsage *monitor,
const char *context,
gint number);
G_END_DECLS
#endif /* __SHELL_APP_USAGE_H__ */