00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef CP_GRID_ITEM_H_
00033 #define CP_GRID_ITEM_H_
00034
00035 #include <gtk/gtkcontainer.h>
00036
00037 G_BEGIN_DECLS
00038
00039 #define CP_TYPE_GRID_ITEM (cp_grid_item_get_type ())
00040 #define CP_GRID_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
00041 CP_TYPE_GRID_ITEM, \
00042 CPGridItem))
00043 #define CP_GRID_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
00044 CP_TYPE_GRID_ITEM, \
00045 CPGridItemClass))
00046 #define CP_OBJECT_IS_GRID_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
00047 CP_TYPE_GRID_ITEM))
00048 #define CP_OBJECT_IS_GRID_ITEM_CLASS(klass) \
00049 (G_TYPE_CHECK_CLASS_TYPE ((klass), CP_TYPE_GRID_ITEM))
00050 #define CP_GRID_ITEM_GET_CLASS(obj) \
00051 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
00052 CP_TYPE_GRID_ITEM, CPGridItemClass))
00053
00054 typedef enum {
00055 CP_GRID_ITEM_LABEL_POS_BOTTOM = 1,
00056 CP_GRID_ITEM_LABEL_POS_RIGHT
00057 } CPGridPositionType;
00058
00059 typedef enum {
00060 CP_GRID_ITEM_ICON_27x27 = 1,
00061 CP_GRID_ITEM_ICON_128x128
00062 } CPGridItemIconSizeType;
00063
00064
00065 typedef struct _CPGridItem CPGridItem;
00066 typedef struct _CPGridItemClass CPGridItemClass;
00067
00068
00069 struct _CPGridItem {
00070 GtkContainer parent;
00071 };
00072
00073 struct _CPGridItemClass {
00074 GtkContainerClass parent_class;
00075
00076 void (*activate) (CPGridItem *item);
00077 };
00078
00079
00080
00081 GType cp_grid_item_get_type(void) G_GNUC_CONST;
00082 GtkWidget *cp_grid_item_new(const gchar * icon_basename);
00083 GtkWidget *cp_grid_item_new_with_label(const gchar * icon_basename,
00084 const gchar * label);
00085
00086 void cp_grid_item_set_emblem_type(CPGridItem * item,
00087 const gchar * emblem_basename);
00088 const gchar *cp_grid_item_get_emblem_type(CPGridItem * item);
00089
00090
00091 G_END_DECLS
00092 #endif