maemo-ui-old/src/mmyth_epg_grid_widget.h
author renatofilho
Thu Aug 16 14:45:22 2007 +0100 (2007-08-16)
branchtrunk
changeset 806 d35b50f4d77e
parent 754 cb885ee44618
permissions -rw-r--r--
[svn r812] fixed request to no valid channel
     1 #ifndef __MMYTH_EPG_GRID_WIDGET_H__
     2 #define __MMYTH_EPG_GRID_WIDGET_H__
     3 
     4 #include <glib-object.h>
     5 #include <gdk/gdk.h>
     6 #include <gtk/gtkvbox.h>
     7 #include <gtk/gtkeventbox.h>
     8 
     9 #include <gmyth/gmyth_common.h>
    10 #include <gmyth/gmyth_backendinfo.h>
    11 #define MAX_DISPLAY_CHANS 4
    12 
    13 G_BEGIN_DECLS
    14 #define MMYTH_EPG_GRID_WIDGET_TYPE               (mmyth_epg_grid_widget_get_type ())
    15 #define MMYTH_EPG_GRID_WIDGET(obj)               (GTK_CHECK_CAST ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidget))
    16 #define MMYTH_EPG_GRID_WIDGET_CLASS(klass)       (GTK_CHECK_CLASS_CAST ((klass), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetClass))
    17 #define IS_MMYTH_EPG_GRID_WIDGET(obj)            (GTK_CHECK_TYPE ((obj), MMYTH_EPG_GRID_WIDGET_TYPE))
    18 #define IS_MMYTH_EPG_GRID_WIDGET_CLASS(klass)    (GTK_CHECK_CLASS_TYPE ((klass), MMYTH_EPG_GRID_WIDGET_TYPE))
    19 #define MMYTH_EPG_GRID_WIDGET_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetClass))
    20 #define MMYTH_EPG_GRID_WIDGET_GET_PRIVATE(obj)   (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetPrivate))
    21 typedef struct _MMythEpgGridWidget MMythEpgGridWidget;
    22 typedef struct _MMythEpgGridWidgetClass MMythEpgGridWidgetClass;
    23 typedef struct _MMythEpgGridWidgetPrivate MMythEpgGridWidgetPrivate;
    24 
    25 struct _MMythEpgGridWidgetClass {
    26     GtkEventBoxClass parent_class;
    27 
    28     /*
    29      * callbacks 
    30      */
    31     /*
    32      * no one for now 
    33      */
    34 };
    35 
    36 struct _MMythEpgGridWidget {
    37     GtkEventBox     event_box;
    38 
    39     /*
    40      * Selected Widgets Logic
    41      */
    42     /*
    43      * List os Service Model in the current view the data of this list are 
    44      * GList for the programs of each service 
    45      */
    46     GList          *epg_view_model;
    47 
    48     /*
    49      * Selected Schedule Item
    50      */
    51     GList          *selected_grid_item;
    52 
    53 };
    54 
    55 
    56 GType           mmyth_epg_grid_widget_get_type(void);
    57 GtkWidget      *mmyth_epg_grid_widget_new(void);
    58 /*
    59  * DVBHScheduleEvent* mmyth_epg_grid_get_selected_schedule
    60  * (MMythEpgGridWidget * object);
    61  */
    62 void            mmyth_epg_grid_widget_update_service(MMythEpgGridWidget *
    63                                                      object,
    64                                                      GList *
    65                                                      epg_grid_item_node);
    66 gboolean        mmyth_epg_grid_widget_key_press(MMythEpgGridWidget *
    67                                                 object, GtkWidget * widget,
    68                                                 GdkEventKey * event);
    69 
    70 typedef struct _EpgGridItem EpgGridItem;
    71 
    72 /*
    73  * FIXME: auxiliary struct 
    74  */
    75 struct _EpgGridItem {
    76 
    77     GMythProgramInfo *proginfo;
    78     GtkWidget      *event_box;
    79 
    80     /*
    81      * for callback purposes 
    82      */
    83     MMythEpgGridWidget *object;
    84 };
    85 
    86 G_END_DECLS
    87 #endif                          /* __MMYTH_EPG_GRID_WIDGET_H__ */