gschem

gschem_pango.h

Go to the documentation of this file.
00001 /* gEDA - GPL Electronic Design Automation
00002  * gschem - gEDA Schematic Capture
00003  * Copyright (C) 2008-2010 gEDA Contributors (see ChangeLog for details)
00004  * Copyright (C) 2000 Red Hat, Inc.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the
00018  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301 USA
00020  *
00021  * This file based on GDK's gdkpango.h (LGPL V2+)
00022  * Copyright (C) 2000 Red Hat, Inc.
00023  */
00024 
00025 #ifndef __GSCHEM_PANGO_H__
00026 #define __GSCHEM_PANGO_H__
00027 
00028 
00029 G_BEGIN_DECLS
00030 
00031 /* Pango interaction */
00032 
00033 typedef struct _GschemPangoRenderer        GschemPangoRenderer;
00034 typedef struct _GschemPangoRendererClass   GschemPangoRendererClass;
00035 typedef struct _GschemPangoRendererPrivate GschemPangoRendererPrivate;
00036 
00037 #define GSCHEM_TYPE_PANGO_RENDERER            (gschem_pango_renderer_get_type())
00038 #define GSCHEM_PANGO_RENDERER(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), GSCHEM_TYPE_PANGO_RENDERER, GschemPangoRenderer))
00039 #define GSCHEM_IS_PANGO_RENDERER(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), GSCHEM_TYPE_PANGO_RENDERER))
00040 #define GSCHEM_PANGO_RENDERER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_PANGO_RENDERER, GschemPangoRendererClass))
00041 #define GSCHEM_IS_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSCHEM_TYPE_PANGO_RENDERER))
00042 #define GSCHEM_PANGO_RENDERER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_PANGO_RENDERER, GschemPangoRendererClass))
00043 
00054 struct _GschemPangoRenderer
00055 {
00056   /*< private >*/
00057   PangoRenderer parent_instance;
00058 
00059   GschemPangoRendererPrivate *priv;
00060 };
00061 
00062 
00063 struct _GschemPangoRendererClass
00064 {
00065   /*< private >*/
00066   PangoRendererClass parent_class;
00067 };
00068 
00069 GType gschem_pango_renderer_get_type (void) G_GNUC_CONST;
00070 
00071 PangoRenderer *gschem_pango_renderer_new      (cairo_t *cr);
00072 
00073 void gschem_pango_show_layout                 (cairo_t     *cr,
00074                                                PangoLayout *pl);
00075 
00076 void gschem_pango_renderer_set_overbar        (GschemPangoRenderer *gdk_renderer,
00077                                                gboolean             overbar);
00078 
00079 /************************************************************************/
00080 
00081 /* Attributes use to render text with overbars */
00082 
00083 typedef struct _GschemPangoAttrOverbar GschemPangoAttrOverbar;
00084 
00085 struct _GschemPangoAttrOverbar
00086 {
00087   PangoAttribute attr;
00088   gboolean overbar;
00089 };
00090 
00091 PangoAttribute *gschem_pango_attr_overbar_new (gboolean overbar);
00092 
00093 G_END_DECLS
00094 
00095 #endif /* __GSCHEM_PANGO_H__ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines