00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef HN_ENTRY_INFO_H
00025 #define HN_ENTRY_INFO_H
00026
00027 #include <glib-object.h>
00028 #include <gdk/gdkpixbuf.h>
00029
00030 #include "hn-wm-types.h"
00031
00032 G_BEGIN_DECLS
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 typedef enum {
00043 HN_ENTRY_INVALID,
00044
00045 HN_ENTRY_DESKTOP,
00046
00047 HN_ENTRY_WATCHED_APP,
00048 HN_ENTRY_WATCHED_WINDOW,
00049 HN_ENTRY_WATCHED_VIEW
00050 } HNEntryInfoType;
00051
00052 #define HN_ENTRY_INFO_IS_VALID_TYPE(x) (((x) > HN_ENTRY_INVALID) && ((x) <= HN_ENTRY_WATCHED_VIEW))
00053
00054 struct _HNEntryInfo
00055 {
00056 HNEntryInfoType type;
00057 };
00058
00059 HNEntryInfo *hn_entry_info_new (HNEntryInfoType type);
00060 HNEntryInfo *hn_entry_info_new_from_app (HNWMWatchableApp *app);
00061 HNEntryInfo *hn_entry_info_new_from_window (HNWMWatchedWindow *window);
00062 HNEntryInfo *hn_entry_info_new_from_view (HNWMWatchedWindowView *view);
00063 void hn_entry_info_free (HNEntryInfo *info);
00064
00065 void hn_entry_info_set_app (HNEntryInfo *info,
00066 HNWMWatchableApp *app);
00067 HNWMWatchableApp * hn_entry_info_get_app (HNEntryInfo *info);
00068 void hn_entry_info_set_window (HNEntryInfo *info,
00069 HNWMWatchedWindow *window);
00070 HNWMWatchedWindow * hn_entry_info_get_window (HNEntryInfo *info);
00071 void hn_entry_info_set_view (HNEntryInfo *info,
00072 HNWMWatchedWindowView *view);
00073 HNWMWatchedWindowView *hn_entry_info_get_view (HNEntryInfo *info);
00074
00075 HNEntryInfo *hn_entry_info_get_parent (HNEntryInfo *info);
00076
00077 void hn_entry_info_add_child (HNEntryInfo *info,
00078 HNEntryInfo *child);
00079 gboolean hn_entry_info_remove_child (HNEntryInfo *info,
00080 HNEntryInfo *child);
00081 const GList* hn_entry_info_get_children (HNEntryInfo *info);
00082 gint hn_entry_info_get_n_children (HNEntryInfo *info);
00083
00084 const gchar *hn_entry_info_peek_app_name (HNEntryInfo *info);
00085 const gchar *hn_entry_info_peek_title (HNEntryInfo *info);
00086 gchar * hn_entry_info_get_title (HNEntryInfo *info);
00087 void hn_entry_info_set_title (HNEntryInfo *info,
00088 const gchar *title);
00089 gchar * hn_entry_info_get_app_name (HNEntryInfo *info);
00090 gchar * hn_entry_info_get_window_name (HNEntryInfo *info);
00091 GdkPixbuf * hn_entry_info_get_icon (HNEntryInfo *info);
00092 void hn_entry_info_set_icon (HNEntryInfo *info,
00093 GdkPixbuf *icon);
00094
00095 const gchar *hn_entry_info_get_app_icon_name (HNEntryInfo *info);
00096 GdkPixbuf * hn_entry_info_get_app_icon (HNEntryInfo *info,
00097 gint size,
00098 GError **error);
00099
00100 void hn_entry_info_close (HNEntryInfo *info);
00101
00102 gboolean hn_entry_info_is_urgent (HNEntryInfo *info);
00103 gboolean hn_entry_info_get_ignore_urgent (HNEntryInfo *info);
00104 void hn_entry_info_set_ignore_urgent (HNEntryInfo *info,
00105 gboolean ignore);
00106
00107 gboolean hn_entry_info_is_active (HNEntryInfo *info);
00108
00109 gboolean hn_entry_info_is_hibernating (HNEntryInfo *info);
00110
00111 gboolean hn_entry_info_has_extra_icon (HNEntryInfo *info);
00112 const gchar *hn_entry_info_get_extra_icon (HNEntryInfo *info);
00113
00114 G_END_DECLS
00115
00116 #endif