Top | Description | Object Hierarchy | ![]() |
![]() |
![]() |
![]() |
struct ShellAppUsageClass; ShellAppUsage * shell_app_usage_get_default (void
); GSList * shell_app_usage_get_most_used (ShellAppUsage *usage
,const char *context
); int shell_app_usage_compare (ShellAppUsage *self
,const char *context
,const char *id_a
,const char *id_b
); ShellAppUsage;
This class maintains some usage and state statistics for applications by keeping track of the approximate time an application's windows are focused, as well as the last workspace it was seen on. This time tracking is implemented by watching for focus notifications, and computing a time delta between them. Also we watch the GNOME Session "StatusChanged" signal which by default is emitted after 5 minutes to signify idle.
ShellAppUsage * shell_app_usage_get_default (void
);
Returns : |
The global ShellAppUsage instance. [transfer none] |
GSList * shell_app_usage_get_most_used (ShellAppUsage *usage
,const char *context
);
Get a list of most popular applications for a given context.
|
the usage instance to request |
|
Activity identifier |
Returns : |
List of applications. [element-type ShellApp][transfer full] |
int shell_app_usage_compare (ShellAppUsage *self
,const char *context
,const char *id_a
,const char *id_b
);
Compare id_a
and id_b
based on frequency of use.
|
the usage instance to request |
|
Activity identifier |
|
ID of first app |
|
ID of second app |
Returns : |
-1 if id_a ranks higher than id_b , 1 if id_b ranks higher
than id_a , and 0 if both rank equally. |