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