BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
gxklistwrapper.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __GXK_LIST_WRAPPER_H__
00003 #define __GXK_LIST_WRAPPER_H__
00004 
00005 #include <gtk/gtktreemodel.h>
00006 
00007 G_BEGIN_DECLS
00008 
00009 /* --- type macros --- */
00010 #define GXK_TYPE_LIST_WRAPPER              (gxk_list_wrapper_get_type ())
00011 #define GXK_LIST_WRAPPER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GXK_TYPE_LIST_WRAPPER, GxkListWrapper))
00012 #define GXK_LIST_WRAPPER_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GXK_TYPE_LIST_WRAPPER, GxkListWrapperClass))
00013 #define GXK_IS_LIST_WRAPPER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GXK_TYPE_LIST_WRAPPER))
00014 #define GXK_IS_LIST_WRAPPER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GXK_TYPE_LIST_WRAPPER))
00015 #define GXK_LIST_WRAPPER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GXK_TYPE_LIST_WRAPPER, GxkListWrapperClass))
00016 
00017 
00018 /* --- structures & typedefs --- */
00019 typedef struct _GxkListWrapper      GxkListWrapper;
00020 typedef struct _GxkListWrapperClass GxkListWrapperClass;
00021 struct _GxkListWrapper
00022 {
00023   GObject parent_instance;
00024 
00025   guint  n_rows;
00026   guint  n_cols;
00027   GType *column_types;
00028 
00029   /*< private >*/
00030   guint  stamp;
00031 };
00032 struct _GxkListWrapperClass
00033 {
00034   GObjectClass parent_class;
00035 
00036   void  (*fill_value)   (GxkListWrapper *self,
00037                          guint           column,
00038                          guint           row,
00039                          GValue         *value);
00040   void  (*row_change)   (GxkListWrapper *self,
00041                          gint            row);
00042 };
00043 
00044 
00045 /* --- prototypes --- */
00046 GType           gxk_list_wrapper_get_type       (void);
00047 GxkListWrapper* gxk_list_wrapper_new            (guint           n_cols,
00048                                                  GType           first_column_type,
00049                                                  ...);
00050 GxkListWrapper* gxk_list_wrapper_newv           (guint           n_cols,
00051                                                  GType          *column_types);
00052 void            gxk_list_wrapper_notify_insert  (GxkListWrapper *self,
00053                                                  guint           nth_row);
00054 void            gxk_list_wrapper_notify_change  (GxkListWrapper *self,
00055                                                  guint           nth_row);
00056 void            gxk_list_wrapper_notify_delete  (GxkListWrapper *self,
00057                                                  guint           nth_row);
00058 void            gxk_list_wrapper_notify_prepend (GxkListWrapper *self,
00059                                                  guint           n_rows);
00060 void            gxk_list_wrapper_notify_append  (GxkListWrapper *self,
00061                                                  guint           n_rows);
00062 void            gxk_list_wrapper_notify_clear   (GxkListWrapper *self);
00063 guint           gxk_list_wrapper_get_index      (GxkListWrapper *self,
00064                                                  GtkTreeIter    *iter);
00065 void            gxk_list_wrapper_get_iter_at    (GxkListWrapper *self,
00066                                                  GtkTreeIter    *iter,
00067                                                  guint           index);
00068 
00069 G_END_DECLS
00070 
00071 #endif /* __GXK_LIST_WRAPPER_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines