readout.h 1.9 KB
Newer Older
Monty Montgomery's avatar
Monty Montgomery committed
1 2 3 4
/*
 *
 *  postfish
 *    
Monty Montgomery's avatar
Monty Montgomery committed
5
 *      Copyright (C) 2002-2005 Monty
Monty Montgomery's avatar
Monty Montgomery committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 *
 *  Postfish is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *   
 *  Postfish is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *   
 *  You should have received a copy of the GNU General Public License
 *  along with Postfish; see the file COPYING.  If not, write to the
 *  Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * 
 */

Monty Montgomery's avatar
Monty Montgomery committed
24 25 26 27 28 29 30 31
#ifndef __READOUT_H__
#define __READOUT_H__

#include <sys/time.h>
#include <time.h>
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtkcontainer.h>
Monty Montgomery's avatar
Monty Montgomery committed
32
#include <gtk/gtkdrawingarea.h>
33
#include <gdk/gdkdrawable.h>
Monty Montgomery's avatar
Monty Montgomery committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47

G_BEGIN_DECLS

#define READOUT_TYPE            (readout_get_type ())
#define READOUT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), READOUT_TYPE, Readout))
#define READOUT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), READOUT_TYPE, ReadoutClass))
#define IS_READOUT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), READOUT_TYPE))
#define IS_READOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), READOUT_TYPE))

typedef struct _Readout       Readout;
typedef struct _ReadoutClass  ReadoutClass;

struct _Readout{

Monty Montgomery's avatar
Monty Montgomery committed
48 49 50
  GtkDrawingArea canvas;  
  GdkPixmap *backing;
  PangoLayout *layout;
Monty Montgomery's avatar
Monty Montgomery committed
51 52 53 54
};

struct _ReadoutClass{

Monty Montgomery's avatar
Monty Montgomery committed
55
  GtkDrawingAreaClass parent_class;
Monty Montgomery's avatar
Monty Montgomery committed
56 57 58 59 60 61 62
  void (* readout) (Readout *m);

};

GType          readout_get_type        (void);
GtkWidget*     readout_new             (char *markup);
void	       readout_set             (Readout *m,char *markup);
Monty Montgomery's avatar
Monty Montgomery committed
63
const gchar*   readout_get             (Readout  *r);
Monty Montgomery's avatar
Monty Montgomery committed
64 65 66 67 68

G_END_DECLS

#endif