1 /* gEDA - GPL Electronic Design Automation
2 * libgedacairo - Rendering gEDA schematics with Cairo
3 * Copyright (C) 2010-2020 gEDA Contributors (see ChangeLog for details)
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 * This file based on GDK's gdkpango.h (LGPL V2+)
20 * Copyright (C) 2000 Red Hat, Inc.
23 #ifndef __EDA_PANGO_RENDERER_H__
24 #define __EDA_PANGO_RENDERER_H__
28 #define EDA_TYPE_PANGO_RENDERER (eda_pango_renderer_get_type ())
29 #define EDA_PANGO_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDA_TYPE_PANGO_RENDERER, EdaPangoRenderer))
30 #define EDA_IS_PANGO_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDA_TYPE_PANGO_RENDERER))
31 #define EDA_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDA_TYPE_PANGO_RENDERER), EdaPangoRendererClass)
32 #define EDA_IS_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDA_TYPE_PANGO_RENDERER))
33 #define EDA_PANGO_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDA_TYPE_PANGO_RENDERER, EdaPangoRendererClass))
35 typedef struct _EdaPangoRendererClass EdaPangoRendererClass
;
36 typedef struct _EdaPangoRenderer EdaPangoRenderer
;
37 typedef struct _EdaPangoRendererPrivate EdaPangoRendererPrivate
;
39 struct _EdaPangoRendererClass
41 PangoRendererClass parent_class
;
44 struct _EdaPangoRenderer
46 PangoRenderer parent_instance
;
49 EdaPangoRendererPrivate
*priv
;
52 GType
eda_pango_renderer_get_type (void) G_GNUC_CONST
;
53 PangoRenderer
*eda_pango_renderer_new (cairo_t
*cr
) G_GNUC_WARN_UNUSED_RESULT
;
54 void eda_pango_renderer_show_layout (EdaPangoRenderer
*renderer
,
55 PangoLayout
*pl
, double x
, double y
);
57 /* ---------------------------------------- */
59 typedef struct _EdaPangoAttrOverbar EdaPangoAttrOverbar
;
60 struct _EdaPangoAttrOverbar
66 PangoAttrClass
*eda_pango_attr_overbar_get_class (void) G_GNUC_CONST
;
67 PangoAttribute
*eda_pango_attr_overbar_new (gboolean overbar
) G_GNUC_WARN_UNUSED_RESULT
;
68 gboolean
eda_is_pango_attr_overbar (PangoAttribute
*attr
);
69 gboolean
eda_pango_parse_overbars (const gchar
*overbar_text
,
71 PangoAttrList
**attr_list
,
76 #endif /* !__EDA_PANGO_RENDERER_H__ */