1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 2008-2010 gEDA Contributors (see ChangeLog for details)
4 * Copyright (C) 2000 Red Hat, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
21 * This file based on GDK's gdkpango.h (LGPL V2+)
22 * Copyright (C) 2000 Red Hat, Inc.
25 #ifndef __GSCHEM_PANGO_H__
26 #define __GSCHEM_PANGO_H__
31 /* Pango interaction */
33 typedef struct _GschemPangoRenderer GschemPangoRenderer
;
34 typedef struct _GschemPangoRendererClass GschemPangoRendererClass
;
35 typedef struct _GschemPangoRendererPrivate GschemPangoRendererPrivate
;
37 #define GSCHEM_TYPE_PANGO_RENDERER (gschem_pango_renderer_get_type())
38 #define GSCHEM_PANGO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GSCHEM_TYPE_PANGO_RENDERER, GschemPangoRenderer))
39 #define GSCHEM_IS_PANGO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GSCHEM_TYPE_PANGO_RENDERER))
40 #define GSCHEM_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_PANGO_RENDERER, GschemPangoRendererClass))
41 #define GSCHEM_IS_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSCHEM_TYPE_PANGO_RENDERER))
42 #define GSCHEM_PANGO_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_PANGO_RENDERER, GschemPangoRendererClass))
45 * GschemPangoRenderer:
47 * #GschemPangoRenderer is a subclass of #PangoRenderer used for rendering
48 * text of gschem TEXT objects.
50 * Pango functions like pango_renderer_draw_layout() and
51 * pango_renderer_draw_layout_line() are then used to draw objects with
54 struct _GschemPangoRenderer
57 PangoRenderer parent_instance
;
59 GschemPangoRendererPrivate
*priv
;
63 struct _GschemPangoRendererClass
66 PangoRendererClass parent_class
;
69 GType
gschem_pango_renderer_get_type (void) G_GNUC_CONST
;
71 PangoRenderer
*gschem_pango_renderer_new (cairo_t
*cr
);
73 void gschem_pango_show_layout (cairo_t
*cr
,
76 void gschem_pango_renderer_set_overbar (GschemPangoRenderer
*gdk_renderer
,
79 /************************************************************************/
81 /* Attributes use to render text with overbars */
83 typedef struct _GschemPangoAttrOverbar GschemPangoAttrOverbar
;
85 struct _GschemPangoAttrOverbar
91 PangoAttribute
*gschem_pango_attr_overbar_new (gboolean overbar
);
95 #endif /* __GSCHEM_PANGO_H__ */