00001
00002 #ifndef __EGG_RECENT_MODEL_H__
00003 #define __EGG_RECENT_MODEL_H__
00004
00005 #include "egg-recent-item.h"
00006
00007 G_BEGIN_DECLS
00008
00009 #define EGG_TYPE_RECENT_MODEL (egg_recent_model_get_type ())
00010 #define EGG_RECENT_MODEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, EGG_TYPE_RECENT_MODEL, EggRecentModel)
00011 #define EGG_RECENT_MODEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, EGG_TYPE_RECENT_MODEL, EggRecentModelClass)
00012 #define EGG_IS_RECENT_MODEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, egg_recent_model_get_type ())
00013
00014 typedef struct _EggRecentModel EggRecentModel;
00015 typedef struct _EggRecentModelPrivate EggRecentModelPrivate;
00016 typedef struct _EggRecentModelClass EggRecentModelClass;
00017
00018 struct _EggRecentModel {
00019 GObject parent_instance;
00020
00021 EggRecentModelPrivate *priv;
00022 };
00023
00024 struct _EggRecentModelClass {
00025 GObjectClass parent_class;
00026
00027 void (*changed) (EggRecentModel *model, GList *list);
00028 };
00029
00030 typedef enum {
00031 EGG_RECENT_MODEL_SORT_MRU,
00032 EGG_RECENT_MODEL_SORT_LRU,
00033 EGG_RECENT_MODEL_SORT_NONE
00034 } EggRecentModelSort;
00035
00036
00037
00038 #define EGG_RECENT_GROUP_LAUNCHERS "Launchers"
00039
00040
00041 GType egg_recent_model_get_type (void);
00042
00043
00044 EggRecentModel * egg_recent_model_new (EggRecentModelSort sort);
00045
00046
00047 void egg_recent_model_add_filter_mime_type (EggRecentModel *model,
00048 const gchar *mime_type);
00049 void egg_recent_model_set_filter_mime_types (EggRecentModel *model,
00050 ...);
00051
00052 void egg_recent_model_set_filter_groups (EggRecentModel *model, ...);
00053
00054 void egg_recent_model_set_filter_uri_schemes (EggRecentModel *model,
00055 ...);
00056
00057 void egg_recent_model_set_sort (EggRecentModel *model,
00058 EggRecentModelSort sort);
00059
00060 gboolean egg_recent_model_add_full (EggRecentModel *model,
00061 EggRecentItem *item);
00062
00063 gboolean egg_recent_model_add (EggRecentModel *model,
00064 const gchar *uri);
00065
00066 gboolean egg_recent_model_delete (EggRecentModel *model,
00067 const gchar *uri);
00068
00069 void egg_recent_model_clear (EggRecentModel *model);
00070
00071 GList * egg_recent_model_get_list (EggRecentModel *model);
00072
00073 void egg_recent_model_changed (EggRecentModel *model);
00074
00075 void egg_recent_model_set_limit (EggRecentModel *model, int limit);
00076 int egg_recent_model_get_limit (EggRecentModel *model);
00077
00078 void egg_recent_model_remove_expired (EggRecentModel *model);
00079
00080 G_END_DECLS
00081
00082 #endif