Back to index

bamf  0.2.120
bamf-view.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2010 Canonical Ltd.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of either or both of the following licenses:
00006  *
00007  * 1) the GNU Lesser General Public License version 3, as published by the
00008  * Free Software Foundation; and/or
00009  * 2) the GNU Lesser General Public License version 2.1, as published by
00010  * the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranties of
00014  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00015  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00016  * License for more details.
00017  *
00018  * You should have received a copy of both the GNU Lesser General Public
00019  * License version 3 and version 2.1 along with this program.  If not, see
00020  * <http://www.gnu.org/licenses/>
00021  *
00022  * Authored by: Jason Smith <jason.smith@canonical.com>
00023  *              Neil Jagdish Patel <neil.patel@canonical.com>
00024  *
00025  */
00026 
00027 #ifndef _BAMF_VIEW_H_
00028 #define _BAMF_VIEW_H_
00029 
00030 #include <glib-object.h>
00031 
00032 G_BEGIN_DECLS
00033 
00034 #define BAMF_TYPE_VIEW (bamf_view_get_type ())
00035 
00036 #define BAMF_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
00037         BAMF_TYPE_VIEW, BamfView))
00038 
00039 #define BAMF_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
00040         BAMF_TYPE_VIEW, BamfViewClass))
00041 
00042 #define BAMF_IS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
00043         BAMF_TYPE_VIEW))
00044 
00045 #define BAMF_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
00046         BAMF_TYPE_VIEW))
00047 
00048 #define BAMF_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
00049         BAMF_TYPE_VIEW, BamfViewClass))
00050 
00051 typedef enum
00052 {
00053   BAMF_CLICK_BEHAVIOR_NONE,
00054   BAMF_CLICK_BEHAVIOR_OPEN,
00055   BAMF_CLICK_BEHAVIOR_FOCUS,
00056   BAMF_CLICK_BEHAVIOR_FOCUS_ALL,
00057   BAMF_CLICK_BEHAVIOR_MINIMIZE,
00058   BAMF_CLICK_BEHAVIOR_RESTORE,
00059   BAMF_CLICK_BEHAVIOR_RESTORE_ALL,
00060   BAMF_CLICK_BEHAVIOR_PICKER,
00061 } BamfClickBehavior;
00062 
00063 typedef struct _BamfView        BamfView;
00064 typedef struct _BamfViewClass   BamfViewClass;
00065 typedef struct _BamfViewPrivate BamfViewPrivate;
00066 
00067 struct _BamfView
00068 {
00069   GInitiallyUnowned parent;
00070 
00071   BamfViewPrivate *priv;
00072 };
00073 
00074 struct _BamfViewClass
00075 {
00076   GInitiallyUnownedClass parent_class;
00077   
00078   GList            * (*get_children)        (BamfView *view);
00079   gboolean           (*is_active)           (BamfView *view);
00080   gboolean           (*is_running)          (BamfView *view);
00081   gboolean           (*is_urgent)           (BamfView *view);
00082   gchar            * (*get_name)            (BamfView *view);
00083   gchar            * (*get_icon)            (BamfView *view);
00084   const gchar      * (*view_type)           (BamfView *view);
00085   void               (*set_path)            (BamfView *view, const gchar *path);
00086   BamfClickBehavior  (*click_behavior)      (BamfView *view);
00087   
00088   
00089   /*< signals >*/
00090   void (*active_changed)              (BamfView *view, gboolean active);
00091   void (*closed)                      (BamfView *view);
00092   void (*child_added)                 (BamfView *view, BamfView *child);
00093   void (*child_removed)               (BamfView *view, BamfView *child);
00094   void (*running_changed)             (BamfView *view, gboolean running);
00095   void (*urgent_changed)              (BamfView *view, gboolean urgent);
00096   void (*user_visible_changed)        (BamfView *view, gboolean user_visible);
00097   void (*name_changed)                (BamfView *view, gchar* old_name, gchar* new_name);
00098 
00099   /*< private >*/
00100   void (*_view_padding1) (void);
00101   void (*_view_padding2) (void);
00102   void (*_view_padding3) (void);
00103   void (*_view_padding4) (void);
00104   void (*_view_padding5) (void);
00105 };
00106 
00107 GType      bamf_view_get_type             (void) G_GNUC_CONST;
00108 
00118 GList    * bamf_view_get_children  (BamfView *view);
00119 
00126 gboolean   bamf_view_is_closed     (BamfView *view);
00127 
00134 gboolean   bamf_view_is_active     (BamfView *view);
00135 
00142 gboolean   bamf_view_is_running    (BamfView *view);
00143 
00150 gboolean   bamf_view_is_urgent     (BamfView *view);
00151 
00158 gchar    * bamf_view_get_name      (BamfView *view);
00159 
00166 gchar    * bamf_view_get_icon      (BamfView *view);
00167 
00175 gboolean   bamf_view_user_visible  (BamfView *view);
00176 
00186 const gchar    * bamf_view_get_view_type (BamfView *view);
00187 
00188 void bamf_view_set_sticky (BamfView *view, gboolean value);
00189 
00190 gboolean bamf_view_is_sticky (BamfView *view);
00191 
00192 BamfClickBehavior bamf_view_get_click_suggestion (BamfView *view);
00193 
00194 G_END_DECLS
00195 
00196 #endif