Main Page | File List | File Members

cp-grid-item.h

00001 /*
00002  * This file is part of hildon-control-panel
00003  *
00004  * Copyright (C) 2005 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 /*
00025  * @file cp-grid-item.h
00026  *
00027  * This file is a header file for he implementation of CPGridItem.
00028  * CPGridItem is an item mainly used in CPGrid. It has an icon,
00029  * emblem and a label.
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 /* ifndef CP_GRID_ITEM_H_ */

Generated on Thu Dec 21 18:18:50 2006 by  doxygen 1.4.2