Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / nvi / gtk / gtkviscreen.h
blob02af37c62878254480cd7c72edcf1985748f4006
1 /* $NetBSD$ */
3 #ifndef __GTK_VI_SCREEN_H__
4 #define __GTK_VI_SCREEN_H__
6 #include <sys/types.h>
7 #include "config.h"
8 #include "port.h"
9 #include "../common/multibyte.h"
11 #ifdef HAVE_PANGO
12 #include <pango/pango.h>
13 #include <pango/pangox.h>
14 #else
15 #define xthickness klass->xthickness
16 #define ythickness klass->ythickness
17 #define GTK_CLASS_TYPE(class) class->type
18 #endif
20 #define GTK_TYPE_VI_SCREEN (gtk_vi_screen_get_type ())
21 #define GTK_VI_SCREEN(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VI_SCREEN, GtkViScreen))
22 #define GTK_VI_SCREEN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VI_SCREEN, GtkViScreenClass))
23 #define GTK_IS_VI_SCREEN(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VI_SCREEN))
24 #define GTK_IS_VI_SCREEN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VI_SCREEN))
26 typedef struct _GtkViScreen GtkViScreen;
27 typedef struct _GtkViScreenClass GtkViScreenClass;
29 struct _GtkViScreen
31 GtkWidget widget;
33 GdkWindow *text_area;
35 GtkAdjustment *vadj;
37 GdkGC *gc;
38 GdkGC *reverse_gc;
40 CHAR_T *chars;
41 guchar *endcol;
42 guchar *reverse;
43 guchar color;
45 gint cols, rows;
46 gint ch_width, ch_height, ch_ascent;
47 gint curx, cury; /* character position */
48 gint lastx, lasty;
49 gint marked_x, marked_y, marked_maxx, marked_maxy;
51 #ifdef HAVE_PANGO
52 PangoContext *conx;
53 PangoAttrList* alist;
54 #endif
57 struct _GtkViScreenClass
59 GtkWidgetClass parent_class;
61 void (*rename) (GtkViScreen *vi, gchar *name, gint len);
62 void (*resized) (GtkViScreen *vi, gint width, gint height);
65 GtkType gtk_vi_screen_get_type (void);
66 GtkWidget* gtk_vi_screen_new (GtkAdjustment *vadj);
67 void gtk_vi_screen_set_adjustment (GtkViScreen *vi_screen,
68 GtkAdjustment *vadj);
69 void gtk_vi_screen_move (GtkViScreen *vi, gint row, gint col);
70 void gtk_vi_screen_clrtoel (GtkViScreen *vi);
71 void gtk_vi_screen_attribute(GtkViScreen *vi, gint attribute, gint on);
72 void gtk_vi_screen_addstr (GtkViScreen *vi, const char *str, int len);
73 void gtk_vi_screen_deleteln (GtkViScreen *vi);
74 void gtk_vi_screen_insertln (GtkViScreen *vi);
75 void gtk_vi_screen_refresh (GtkViScreen *vi);
76 void gtk_vi_screen_rewrite (GtkViScreen *vi, gint row);
78 #endif /* __GTK_VI_SCREEN_H__ */