Ardour  9.0-pre0-384-ga76afae0e9
gdkpango.h
Go to the documentation of this file.
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 2000 Red Hat, Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 #ifndef __GDK_PANGO_H__
21 #define __GDK_PANGO_H__
22 
23 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
24 #error "Only <gdk/gdk.h> can be included directly."
25 #endif
26 
27 #include <gdk/gdktypes.h>
28 
29 G_BEGIN_DECLS
30 
31 /* Pango interaction */
32 
33 typedef struct _GdkPangoRenderer GdkPangoRenderer;
35 typedef struct _GdkPangoRendererPrivate GdkPangoRendererPrivate;
36 
37 #define GDK_TYPE_PANGO_RENDERER (gdk_pango_renderer_get_type())
38 #define GDK_PANGO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PANGO_RENDERER, GdkPangoRenderer))
39 #define GDK_IS_PANGO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PANGO_RENDERER))
40 #define GDK_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PANGO_RENDERER, GdkPangoRendererClass))
41 #define GDK_IS_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PANGO_RENDERER))
42 #define GDK_PANGO_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PANGO_RENDERER, GdkPangoRendererClass))
43 
69 {
70  /*< private >*/
71  PangoRenderer parent_instance;
72 
74 };
75 
84 {
85  /*< private >*/
86  PangoRendererClass parent_class;
87 };
88 
89 GType gdk_pango_renderer_get_type (void) G_GNUC_CONST;
90 
91 PangoRenderer *gdk_pango_renderer_new (GdkScreen *screen);
92 PangoRenderer *gdk_pango_renderer_get_default (GdkScreen *screen);
93 
95  GdkDrawable *drawable);
97  GdkGC *gc);
99  PangoRenderPart part,
100  GdkBitmap *stipple);
102  PangoRenderPart part,
103  const GdkColor *color);
104 
105 /************************************************************************/
106 
108 #ifndef GDK_MULTIHEAD_SAFE
109 PangoContext *gdk_pango_context_get (void);
110 #endif
111 #ifndef GDK_DISABLE_DEPRECATED
112 void gdk_pango_context_set_colormap (PangoContext *context,
113  GdkColormap *colormap);
114 #endif
115 
116 
117 /* Get a clip region to draw only part of a layout or
118  * line. index_ranges contains alternating range starts/stops. The
119  * region is the region which contains the given ranges, i.e. if you
120  * draw with the region as clip, only the given ranges are drawn.
121  */
122 
124  gint x_origin,
125  gint y_origin,
126  const gint *index_ranges,
127  gint n_ranges);
129  gint x_origin,
130  gint y_origin,
131  const gint *index_ranges,
132  gint n_ranges);
133 
134 
135 
136 /* Attributes use to render insensitive text in GTK+. */
137 
141 
143 {
144  PangoAttribute attr;
146 };
147 
149 {
150  PangoAttribute attr;
151  gboolean embossed;
152 };
153 
155 {
156  PangoAttribute attr;
157  PangoColor color;
158 };
159 
160 PangoAttribute *gdk_pango_attr_stipple_new (GdkBitmap *stipple);
161 PangoAttribute *gdk_pango_attr_embossed_new (gboolean embossed);
163 
164 G_END_DECLS
165 
166 #endif /* __GDK_FONT_H__ */
GType gdk_pango_renderer_get_type(void) G_GNUC_CONST
typedefG_BEGIN_DECLS struct _GdkPangoRenderer GdkPangoRenderer
Definition: gdkpango.h:33
PangoRenderer * gdk_pango_renderer_new(GdkScreen *screen)
void gdk_pango_renderer_set_stipple(GdkPangoRenderer *gdk_renderer, PangoRenderPart part, GdkBitmap *stipple)
PangoContext * gdk_pango_context_get_for_screen(GdkScreen *screen)
GdkRegion * gdk_pango_layout_line_get_clip_region(PangoLayoutLine *line, gint x_origin, gint y_origin, const gint *index_ranges, gint n_ranges)
void gdk_pango_renderer_set_gc(GdkPangoRenderer *gdk_renderer, GdkGC *gc)
void gdk_pango_renderer_set_drawable(GdkPangoRenderer *gdk_renderer, GdkDrawable *drawable)
PangoRenderer * gdk_pango_renderer_get_default(GdkScreen *screen)
void gdk_pango_context_set_colormap(PangoContext *context, GdkColormap *colormap)
PangoAttribute * gdk_pango_attr_stipple_new(GdkBitmap *stipple)
struct _GdkPangoRendererPrivate GdkPangoRendererPrivate
Definition: gdkpango.h:35
GdkRegion * gdk_pango_layout_get_clip_region(PangoLayout *layout, gint x_origin, gint y_origin, const gint *index_ranges, gint n_ranges)
PangoAttribute * gdk_pango_attr_embossed_new(gboolean embossed)
PangoAttribute * gdk_pango_attr_emboss_color_new(const GdkColor *color)
PangoContext * gdk_pango_context_get(void)
void gdk_pango_renderer_set_override_color(GdkPangoRenderer *gdk_renderer, PangoRenderPart part, const GdkColor *color)
PBD::PropertyDescriptor< uint32_t > color
Definition: gdkgc.h:190
PangoAttribute attr
Definition: gdkpango.h:156
PangoAttribute attr
Definition: gdkpango.h:150
GdkBitmap * stipple
Definition: gdkpango.h:145
PangoAttribute attr
Definition: gdkpango.h:144
PangoRendererClass parent_class
Definition: gdkpango.h:86
PangoRenderer parent_instance
Definition: gdkpango.h:71
GdkPangoRendererPrivate * priv
Definition: gdkpango.h:73