Main Page | Directories | File List | File Members

hn-entry-info.h

00001 /* hn-entry-info.h
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2006 Nokia Corporation.
00005  *
00006  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
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 /* HNEntryInfo - opaque wrapper type for watchable applications
00035  *
00036  * This object is used to be passed around between the WM and
00037  * the AS, providing a commodity API for accessing common meta-data
00038  * about the windows without having the AS to know the subtleties
00039  * of the actual window types.
00040  */
00041 
00042 typedef enum {
00043   HN_ENTRY_INVALID,        /* only used for debugging */
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 /* HN_ENTRY_INFO_H */

Generated on Thu Dec 21 11:26:51 2006 for maemo-af-desktop-documentation by  doxygen 1.4.2