maemo-ui/src/mmyth_epg_grid_widget.h
author melunko
Mon Oct 23 14:41:30 2006 +0100 (2006-10-23)
branchtrunk
changeset 38 d5f5855e7800
child 208 c3c073032757
permissions -rw-r--r--
[svn r39] Added mythtv gnomevfs module based on gmyth
     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_common.h"
    10 
    11 #define MAX_DISPLAY_CHANS 4
    12 
    13 G_BEGIN_DECLS
    14 
    15 #define MMYTH_EPG_GRID_WIDGET_TYPE               (mmyth_epg_grid_widget_get_type ())
    16 #define MMYTH_EPG_GRID_WIDGET(obj)               (GTK_CHECK_CAST ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidget))
    17 #define MMYTH_EPG_GRID_WIDGET_CLASS(klass)       (GTK_CHECK_CLASS_CAST ((klass), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetClass))
    18 #define IS_MMYTH_EPG_GRID_WIDGET(obj)            (GTK_CHECK_TYPE ((obj), MMYTH_EPG_GRID_WIDGET_TYPE))
    19 #define IS_MMYTH_EPG_GRID_WIDGET_CLASS(klass)    (GTK_CHECK_CLASS_TYPE ((klass), MMYTH_EPG_GRID_WIDGET_TYPE))
    20 #define MMYTH_EPG_GRID_WIDGET_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetClass))
    21 #define MMYTH_EPG_GRID_WIDGET_GET_PRIVATE(obj)   (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetPrivate))
    22 
    23 
    24 typedef struct _MMythEpgGridWidget         MMythEpgGridWidget;
    25 typedef struct _MMythEpgGridWidgetClass    MMythEpgGridWidgetClass;
    26 typedef struct _MMythEpgGridWidgetPrivate  MMythEpgGridWidgetPrivate;
    27 
    28 struct _MMythEpgGridWidgetClass
    29 {
    30   GtkEventBoxClass parent_class;
    31 
    32   /* callbacks */
    33   /* no one for now */
    34 };
    35 
    36 struct _MMythEpgGridWidget
    37 {
    38     GtkEventBox event_box;
    39 
    40     /* Selected Widgets Logic*/
    41     /* List os Service Model in the current view
    42      * the data of this list are GList for the programs
    43      * of each service */
    44     GList *epg_view_model;
    45 
    46     /* Selected Schedule Item*/
    47     GList *selected_grid_item;  
    48 };
    49 
    50 
    51 GType          mmyth_epg_grid_widget_get_type        (void);
    52 GtkWidget*     mmyth_epg_grid_widget_new             (void);
    53 /*DVBHScheduleEvent*    mmyth_epg_grid_get_selected_schedule  (MMythEpgGridWidget * object);*/
    54 void           mmyth_epg_grid_widget_update_service  (MMythEpgGridWidget * object, 
    55                                                       GList *epg_grid_item_node);
    56 gboolean       mmyth_epg_grid_widget_key_press       (MMythEpgGridWidget * object, 
    57                                                       GtkWidget * widget, 
    58                                                       GdkEventKey * event);
    59 
    60 typedef struct _EpgGridItem EpgGridItem;
    61 
    62 /* FIXME: auxiliary struct */
    63 struct _EpgGridItem {
    64 
    65     GMythProgramInfo *proginfo;
    66     GtkWidget *event_box;
    67 
    68     /* for callback purposes */
    69     MMythEpgGridWidget *object;
    70 };
    71 
    72 G_END_DECLS
    73 
    74 #endif /* __MMYTH_EPG_GRID_WIDGET_H__ */