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