Gosh, some little cosmetics here...
[midnight-commander.git] / gnome / gmc-chargrid.h
bloba213da2cef232b1556849e9d1bb940ccbeabc797
1 /* GmcCharGrid Widget - Simple character grid for the gmc viewer
3 * Copyright (C) 1997 The Free Software Foundation
5 * Author: Federico Mena <federico@nuclecu.unam.mx>
6 */
8 #ifndef GMC_CHARGRID_H
9 #define GMC_CHARGRID_H
12 #include <gdk/gdk.h>
13 #include <gtk/gtkwidget.h>
14 #include <libgnome/gnome-defs.h>
17 BEGIN_GNOME_DECLS
20 #define GMC_CHAR_GRID(obj) GTK_CHECK_CAST (obj, gmc_char_grid_get_type (), GmcCharGrid)
21 #define GMC_CHAR_GRID_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gmc_char_grid_get_type (), GmcCharGridClass)
22 #define GMC_IS_CHAR_GRID(obj) GTK_CHECK_TYPE (obj, gmc_char_grid_get_type ())
25 typedef struct _GmcCharGrid GmcCharGrid;
26 typedef struct _GmcCharGridClass GmcCharGridClass;
28 struct _GmcCharGrid {
29 GtkWidget widget;
31 int width;
32 int height;
34 void *chars;
35 void *attrs;
37 int frozen : 1;
39 GdkFont *font;
40 GdkGC *gc;
42 int char_width;
43 int char_height;
44 int char_y;
47 struct _GmcCharGridClass {
48 GtkWidgetClass parent_class;
50 void (* size_changed) (GmcCharGrid *cgrid, guint width, guint height);
54 guint gmc_char_grid_get_type (void);
55 GtkWidget *gmc_char_grid_new (void);
57 void gmc_char_grid_clear (GmcCharGrid *cgrid, int x, int y, int width, int height, GdkColor *bg);
58 void gmc_char_grid_put_char (GmcCharGrid *cgrid, int x, int y, GdkColor *fg, GdkColor *bg, char ch);
59 void gmc_char_grid_put_string (GmcCharGrid *cgrid, int x, int y, GdkColor *fg, GdkColor *bg, char *str);
60 void gmc_char_grid_put_text (GmcCharGrid *cgrid, int x, int y, GdkColor *fg, GdkColor *bg, char *text, int length);
62 void gmc_char_grid_set_font (GmcCharGrid *cgrid, const char *font_name);
63 void gmc_char_grid_set_size (GmcCharGrid *cgrid, guint width, guint height);
64 void gmc_char_grid_get_size (GmcCharGrid *cgrid, guint *width, guint *height);
66 void gmc_char_grid_freeze (GmcCharGrid *cgrid);
67 void gmc_char_grid_thaw (GmcCharGrid *cgrid);
70 END_GNOME_DECLS
72 #endif