2 * Copyright 2008 Department of Mathematical Sciences, New Mexico State University
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * DEPARTMENT OF MATHEMATICAL SCIENCES OR NEW MEXICO STATE UNIVERSITY BE
18 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
19 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 #include <gtk/gtkwidget.h>
27 #include <gtk/gtksignal.h>
29 #include "gtkcompat.h"
34 * The macros for accessing various parts of the widget class.
36 #define GLYPHTEST(o) \
37 (G_TYPE_CHECK_INSTANCE_CAST((o), glyphtest_get_type(), Glyphtest))
39 #define GLYPHTEST_CLASS(c) \
40 (G_TYPE_CHECK_CLASS_CAST((c), glyphtest_get_type(), GlyphtestClass))
42 #define IS_GLYPHTEST(o) G_TYPE_CHECK_INSTANCE_TYPE((o), glyphtest_get_type())
44 #define IS_GLYPHTEST_CLASS(c) \
45 (G_TYPE_CHECK_CLASS_TYPE((c), glyphtest_get_type()))
47 #define GLYPHTEST_GET_CLASS(o) \
48 (G_TYPE_INSTANCE_GET_CLASS((o), glyphtest_get_type(), GlyphtestClass))
50 typedef struct _Glyphtest Glyphtest;
51 typedef struct _GlyphtestClass GlyphtestClass;
59 GlyphtestGlyph *glyphs;
75 gboolean show_baseline;
77 /* ENABLE WHEN COLORS ARE WORKING. */
87 * The points used to draw the glyphs.
95 guint16 focus_thickness;
98 struct _GlyphtestClass {
99 GtkWidgetClass parent_class;
101 void (*glyph_added)(GtkWidget *, gpointer);
104 /**************************************************************************
108 **************************************************************************/
110 extern GType glyphtest_get_type(void);
111 extern GtkWidget *glyphtest_new(void);
114 * Direction values for the change_direction call.
116 #define GLYPHTEST_LEFT_TO_RIGHT 0
117 #define GLYPHTEST_RIGHT_TO_LEFT 1
119 extern void glyphtest_add_glyph(Glyphtest *, bdf_font_t *, bdf_glyph_t *);
120 extern void glyphtest_remove_font(Glyphtest *, bdf_font_t *);
121 extern void glyphtest_update_device_width(Glyphtest *, bdf_font_t *);
122 extern void glyphtest_change_direction(Glyphtest *, gint direction);
123 extern void glyphtest_show_baseline(Glyphtest *, gboolean baseline);
124 extern void glyphtest_erase(Glyphtest *);
128 #endif /* _h_glyphtest */