diff -r 000000000000 -r 081274382473 maemo-ui/src/mmyth_epg_grid_widget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/maemo-ui/src/mmyth_epg_grid_widget.h Wed Oct 11 22:46:27 2006 +0100 @@ -0,0 +1,74 @@ +#ifndef __MMYTH_EPG_GRID_WIDGET_H__ +#define __MMYTH_EPG_GRID_WIDGET_H__ + +#include +#include +#include +#include + +#include "gmyth_common.h" + +#define MAX_DISPLAY_CHANS 4 + +G_BEGIN_DECLS + +#define MMYTH_EPG_GRID_WIDGET_TYPE (mmyth_epg_grid_widget_get_type ()) +#define MMYTH_EPG_GRID_WIDGET(obj) (GTK_CHECK_CAST ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidget)) +#define MMYTH_EPG_GRID_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetClass)) +#define IS_MMYTH_EPG_GRID_WIDGET(obj) (GTK_CHECK_TYPE ((obj), MMYTH_EPG_GRID_WIDGET_TYPE)) +#define IS_MMYTH_EPG_GRID_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), MMYTH_EPG_GRID_WIDGET_TYPE)) +#define MMYTH_EPG_GRID_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetClass)) +#define MMYTH_EPG_GRID_WIDGET_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MMYTH_EPG_GRID_WIDGET_TYPE, MMythEpgGridWidgetPrivate)) + + +typedef struct _MMythEpgGridWidget MMythEpgGridWidget; +typedef struct _MMythEpgGridWidgetClass MMythEpgGridWidgetClass; +typedef struct _MMythEpgGridWidgetPrivate MMythEpgGridWidgetPrivate; + +struct _MMythEpgGridWidgetClass +{ + GtkEventBoxClass parent_class; + + /* callbacks */ + /* no one for now */ +}; + +struct _MMythEpgGridWidget +{ + GtkEventBox event_box; + + /* Selected Widgets Logic*/ + /* List os Service Model in the current view + * the data of this list are GList for the programs + * of each service */ + GList *epg_view_model; + + /* Selected Schedule Item*/ + GList *selected_grid_item; +}; + + +GType mmyth_epg_grid_widget_get_type (void); +GtkWidget* mmyth_epg_grid_widget_new (void); +/*DVBHScheduleEvent* mmyth_epg_grid_get_selected_schedule (MMythEpgGridWidget * object);*/ +void mmyth_epg_grid_widget_update_service (MMythEpgGridWidget * object, + GList *epg_grid_item_node); +gboolean mmyth_epg_grid_widget_key_press (MMythEpgGridWidget * object, + GtkWidget * widget, + GdkEventKey * event); + +typedef struct _EpgGridItem EpgGridItem; + +/* FIXME: auxiliary struct */ +struct _EpgGridItem { + + GMythProgramInfo *proginfo; + GtkWidget *event_box; + + /* for callback purposes */ + MMythEpgGridWidget *object; +}; + +G_END_DECLS + +#endif /* __MMYTH_EPG_GRID_WIDGET_H__ */