1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GtkFontChooser</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
8 <link rel="up" href="SelectorWidgets.html" title="Selectors (Color/File/Font)">
9 <link rel="prev" href="GtkFileFilter.html" title="GtkFileFilter">
10 <link rel="next" href="GtkFontButton.html" title="GtkFontButton">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="GtkFileFilter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="SelectorWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GTK+ 3 Reference Manual</th>
21 <td><a accesskey="n" href="GtkFontButton.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GtkFontChooser.synopsis" class="shortcut">Top</a>
26 <a href="#GtkFontChooser.description" class="shortcut">Description</a>
28 <a href="#GtkFontChooser.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#GtkFontChooser.prerequisites" class="shortcut">Prerequisites</a>
32 <a href="#GtkFontChooser.implementations" class="shortcut">Known Implementations</a>
34 <a href="#GtkFontChooser.properties" class="shortcut">Properties</a>
36 <a href="#GtkFontChooser.signals" class="shortcut">Signals</a>
39 <div class="refentry">
40 <a name="GtkFontChooser"></a><div class="titlepage"></div>
41 <div class="refnamediv"><table width="100%"><tr>
43 <h2><span class="refentrytitle"><a name="GtkFontChooser.top_of_page"></a>GtkFontChooser</span></h2>
44 <p>GtkFontChooser — Interface implemented by widgets displaying fonts</p>
46 <td valign="top" align="right"></td>
48 <div class="refsynopsisdiv">
49 <a name="GtkFontChooser.synopsis"></a><h2>Synopsis</h2>
50 <pre class="synopsis">
51 #include <gtk/gtk.h>
53 <a class="link" href="GtkFontChooser.html#GtkFontChooser-struct" title="GtkFontChooser">GtkFontChooser</a>;
54 <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="returnvalue">PangoFontFamily</span></a> * <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-family" title="gtk_font_chooser_get_font_family ()">gtk_font_chooser_get_font_family</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);
55 <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="returnvalue">PangoFontFace</span></a> * <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-face" title="gtk_font_chooser_get_font_face ()">gtk_font_chooser_get_font_face</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);
56 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-size" title="gtk_font_chooser_get_font_size ()">gtk_font_chooser_get_font_size</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);
57 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font" title="gtk_font_chooser_get_font ()">gtk_font_chooser_get_font</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);
58 <span class="returnvalue">void</span> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font" title="gtk_font_chooser_set_font ()">gtk_font_chooser_set_font</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
59 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname</code></em>);
60 <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="returnvalue">PangoFontDescription</span></a> * <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-font-desc" title="gtk_font_chooser_get_font_desc ()">gtk_font_chooser_get_font_desc</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);
61 <span class="returnvalue">void</span> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font-desc" title="gtk_font_chooser_set_font_desc ()">gtk_font_chooser_set_font_desc</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
62 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> *font_desc</code></em>);
63 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-preview-text" title="gtk_font_chooser_get_preview_text ()">gtk_font_chooser_get_preview_text</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);
64 <span class="returnvalue">void</span> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-preview-text" title="gtk_font_chooser_set_preview_text ()">gtk_font_chooser_set_preview_text</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
65 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>);
66 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-get-show-preview-entry" title="gtk_font_chooser_get_show_preview_entry ()">gtk_font_chooser_get_show_preview_entry</a>
67 (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);
68 <span class="returnvalue">void</span> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-show-preview-entry" title="gtk_font_chooser_set_show_preview_entry ()">gtk_font_chooser_set_show_preview_entry</a>
69 (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
70 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_preview_entry</code></em>);
71 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="GtkFontChooser.html#GtkFontFilterFunc" title="GtkFontFilterFunc ()">*GtkFontFilterFunc</a>) (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> *family</code></em>,
72 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> *face</code></em>,
73 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
74 <span class="returnvalue">void</span> <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-filter-func" title="gtk_font_chooser_set_filter_func ()">gtk_font_chooser_set_filter_func</a> (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
75 <em class="parameter"><code><a class="link" href="GtkFontChooser.html#GtkFontFilterFunc" title="GtkFontFilterFunc ()"><span class="type">GtkFontFilterFunc</span></a> filter</code></em>,
76 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
77 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
80 <div class="refsect1">
81 <a name="GtkFontChooser.object-hierarchy"></a><h2>Object Hierarchy</h2>
82 <pre class="synopsis">
87 <div class="refsect1">
88 <a name="GtkFontChooser.prerequisites"></a><h2>Prerequisites</h2>
90 GtkFontChooser requires
91 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
93 <div class="refsect1">
94 <a name="GtkFontChooser.implementations"></a><h2>Known Implementations</h2>
96 GtkFontChooser is implemented by
97 <a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a>, <a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog">GtkFontChooserDialog</a> and <a class="link" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget">GtkFontChooserWidget</a>.</p>
99 <div class="refsect1">
100 <a name="GtkFontChooser.properties"></a><h2>Properties</h2>
101 <pre class="synopsis">
102 "<a class="link" href="GtkFontChooser.html#GtkFontChooser--font" title='The "font" property'>font</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
103 "<a class="link" href="GtkFontChooser.html#GtkFontChooser--font-desc" title='The "font-desc" property'>font-desc</a>" <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>* : Read / Write
104 "<a class="link" href="GtkFontChooser.html#GtkFontChooser--preview-text" title='The "preview-text" property'>preview-text</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
105 "<a class="link" href="GtkFontChooser.html#GtkFontChooser--show-preview-entry" title='The "show-preview-entry" property'>show-preview-entry</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
108 <div class="refsect1">
109 <a name="GtkFontChooser.signals"></a><h2>Signals</h2>
110 <pre class="synopsis">
111 "<a class="link" href="GtkFontChooser.html#GtkFontChooser-font-activated" title='The "font-activated" signal'>font-activated</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
114 <div class="refsect1">
115 <a name="GtkFontChooser.description"></a><h2>Description</h2>
117 <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> is an interface that can be implemented by widgets
118 displaying the list of fonts. In GTK+, the main objects
119 that implement this interface are <a class="link" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget"><span class="type">GtkFontChooserWidget</span></a>,
120 <a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog"><span class="type">GtkFontChooserDialog</span></a> and <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a>.
123 <div class="refsect1">
124 <a name="GtkFontChooser.details"></a><h2>Details</h2>
125 <div class="refsect2">
126 <a name="GtkFontChooser-struct"></a><h3>GtkFontChooser</h3>
127 <pre class="programlisting">typedef struct _GtkFontChooser GtkFontChooser;</pre>
130 <div class="refsect2">
131 <a name="gtk-font-chooser-get-font-family"></a><h3>gtk_font_chooser_get_font_family ()</h3>
132 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="returnvalue">PangoFontFamily</span></a> * gtk_font_chooser_get_font_family (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre>
134 Gets the <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> representing the selected font family.
135 Font families are a collection of font faces.
138 If the selected font is not installed, returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
140 <div class="variablelist"><table border="0">
141 <col align="left" valign="top">
144 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
145 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
149 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
150 <td>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> representing the
151 selected font family, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned object is owned by <em class="parameter"><code>fontchooser</code></em>
152 and must not be modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
157 <p class="since">Since 3.2</p>
160 <div class="refsect2">
161 <a name="gtk-font-chooser-get-font-face"></a><h3>gtk_font_chooser_get_font_face ()</h3>
162 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="returnvalue">PangoFontFace</span></a> * gtk_font_chooser_get_font_face (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre>
164 Gets the <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> representing the selected font group
165 details (i.e. family, slant, weight, width, etc).
168 If the selected font is not installed, returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
170 <div class="variablelist"><table border="0">
171 <col align="left" valign="top">
174 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
175 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
179 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
180 <td>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> representing the
181 selected font group details, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned object is owned by
182 <em class="parameter"><code>fontchooser</code></em> and must not be modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
187 <p class="since">Since 3.2</p>
190 <div class="refsect2">
191 <a name="gtk-font-chooser-get-font-size"></a><h3>gtk_font_chooser_get_font_size ()</h3>
192 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gtk_font_chooser_get_font_size (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre>
194 The selected font size.
196 <div class="variablelist"><table border="0">
197 <col align="left" valign="top">
200 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
201 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
205 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
206 <td>A n integer representing the selected font size,
207 or -1 if no font size is selected.</td>
211 <p class="since">Since 3.2</p>
214 <div class="refsect2">
215 <a name="gtk-font-chooser-get-font"></a><h3>gtk_font_chooser_get_font ()</h3>
216 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gtk_font_chooser_get_font (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre>
218 Gets the currently-selected font name.
221 Note that this can be a different string than what you set with
222 <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font" title="gtk_font_chooser_set_font ()"><code class="function">gtk_font_chooser_set_font()</code></a>, as the font chooser widget may
223 normalize font names and thus return a string with a different
224 structure. For example, "Helvetica Italic Bold 12" could be
225 normalized to "Helvetica Bold Italic 12".
228 Use <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#pango-font-description-equal"><code class="function">pango_font_description_equal()</code></a> if you want to compare two
231 <div class="variablelist"><table border="0">
232 <col align="left" valign="top">
235 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
236 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
240 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
241 <td>A string with the name
242 of the current font, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no font is selected. You must
243 free this string with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
248 <p class="since">Since 3.2</p>
251 <div class="refsect2">
252 <a name="gtk-font-chooser-set-font"></a><h3>gtk_font_chooser_set_font ()</h3>
253 <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_font (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
254 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname</code></em>);</pre>
256 Sets the currently-selected font.
258 <div class="variablelist"><table border="0">
259 <col align="left" valign="top">
262 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
263 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
267 <td><p><span class="term"><em class="parameter"><code>fontname</code></em> :</span></p></td>
268 <td>a font name like "Helvetica 12" or "Times Bold 18"</td>
272 <p class="since">Since 3.2</p>
275 <div class="refsect2">
276 <a name="gtk-font-chooser-get-font-desc"></a><h3>gtk_font_chooser_get_font_desc ()</h3>
277 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="returnvalue">PangoFontDescription</span></a> * gtk_font_chooser_get_font_desc (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre>
279 Gets the currently-selected font.
282 Note that this can be a different string than what you set with
283 <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-font" title="gtk_font_chooser_set_font ()"><code class="function">gtk_font_chooser_set_font()</code></a>, as the font chooser widget may
284 normalize font names and thus return a string with a different
285 structure. For example, "Helvetica Italic Bold 12" could be
286 normalized to "Helvetica Bold Italic 12".
289 Use <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#pango-font-description-equal"><code class="function">pango_font_description_equal()</code></a> if you want to compare two
292 <div class="variablelist"><table border="0">
293 <col align="left" valign="top">
296 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
297 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
301 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
302 <td>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> for the
303 current font, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no font is selected. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
308 <p class="since">Since 3.2</p>
311 <div class="refsect2">
312 <a name="gtk-font-chooser-set-font-desc"></a><h3>gtk_font_chooser_set_font_desc ()</h3>
313 <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_font_desc (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
314 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> *font_desc</code></em>);</pre>
316 Sets the currently-selected font from <em class="parameter"><code>font_desc</code></em>.
318 <div class="variablelist"><table border="0">
319 <col align="left" valign="top">
322 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
323 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
327 <td><p><span class="term"><em class="parameter"><code>font_desc</code></em> :</span></p></td>
328 <td>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>
333 <p class="since">Since 3.2</p>
336 <div class="refsect2">
337 <a name="gtk-font-chooser-get-preview-text"></a><h3>gtk_font_chooser_get_preview_text ()</h3>
338 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gtk_font_chooser_get_preview_text (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre>
340 Gets the text displayed in the preview area.
342 <div class="variablelist"><table border="0">
343 <col align="left" valign="top">
346 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
347 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
351 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
352 <td>the text displayed in the
353 preview area. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
358 <p class="since">Since 3.2</p>
361 <div class="refsect2">
362 <a name="gtk-font-chooser-set-preview-text"></a><h3>gtk_font_chooser_set_preview_text ()</h3>
363 <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_preview_text (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
364 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>);</pre>
366 Sets the text displayed in the preview area.
367 The <em class="parameter"><code>text</code></em> is used to show how the selected font looks.
369 <div class="variablelist"><table border="0">
370 <col align="left" valign="top">
373 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
374 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
378 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
379 <td>the text to display in the preview area. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
384 <p class="since">Since 3.2</p>
387 <div class="refsect2">
388 <a name="gtk-font-chooser-get-show-preview-entry"></a><h3>gtk_font_chooser_get_show_preview_entry ()</h3>
389 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_font_chooser_get_show_preview_entry
390 (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>);</pre>
392 Returns whether the preview entry is shown or not.
394 <div class="variablelist"><table border="0">
395 <col align="left" valign="top">
398 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
399 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
403 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
405 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the preview entry is shown
406 or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is hidden.</td>
410 <p class="since">Since 3.2</p>
413 <div class="refsect2">
414 <a name="gtk-font-chooser-set-show-preview-entry"></a><h3>gtk_font_chooser_set_show_preview_entry ()</h3>
415 <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_show_preview_entry
416 (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
417 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_preview_entry</code></em>);</pre>
419 Shows or hides the editable preview entry.
421 <div class="variablelist"><table border="0">
422 <col align="left" valign="top">
425 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
426 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
430 <td><p><span class="term"><em class="parameter"><code>show_preview_entry</code></em> :</span></p></td>
431 <td>whether to show the editable preview entry or not</td>
435 <p class="since">Since 3.2</p>
438 <div class="refsect2">
439 <a name="GtkFontFilterFunc"></a><h3>GtkFontFilterFunc ()</h3>
440 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*GtkFontFilterFunc) (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> *family</code></em>,
441 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> *face</code></em>,
442 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
444 The type of function that is used for deciding what fonts get
445 shown in a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>. See <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-filter-func" title="gtk_font_chooser_set_filter_func ()"><code class="function">gtk_font_chooser_set_filter_func()</code></a>.
447 <div class="variablelist"><table border="0">
448 <col align="left" valign="top">
451 <td><p><span class="term"><em class="parameter"><code>family</code></em> :</span></p></td>
452 <td>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a>
456 <td><p><span class="term"><em class="parameter"><code>face</code></em> :</span></p></td>
457 <td>a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> belonging to <em class="parameter"><code>family</code></em>
461 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
462 <td>user data passed to <a class="link" href="GtkFontChooser.html#gtk-font-chooser-set-filter-func" title="gtk_font_chooser_set_filter_func ()"><code class="function">gtk_font_chooser_set_filter_func()</code></a>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
466 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
468 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the font should be displayed</td>
474 <div class="refsect2">
475 <a name="gtk-font-chooser-set-filter-func"></a><h3>gtk_font_chooser_set_filter_func ()</h3>
476 <pre class="programlisting"><span class="returnvalue">void</span> gtk_font_chooser_set_filter_func (<em class="parameter"><code><a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser</code></em>,
477 <em class="parameter"><code><a class="link" href="GtkFontChooser.html#GtkFontFilterFunc" title="GtkFontFilterFunc ()"><span class="type">GtkFontFilterFunc</span></a> filter</code></em>,
478 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
479 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
481 Adds a filter function that decides which fonts to display
484 <div class="variablelist"><table border="0">
485 <col align="left" valign="top">
488 <td><p><span class="term"><em class="parameter"><code>fontchooser</code></em> :</span></p></td>
489 <td>a <a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a>
493 <td><p><span class="term"><em class="parameter"><code>filter</code></em> :</span></p></td>
494 <td>a <a class="link" href="GtkFontChooser.html#GtkFontFilterFunc" title="GtkFontFilterFunc ()"><span class="type">GtkFontFilterFunc</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
498 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
499 <td>data to pass to <em class="parameter"><code>filter</code></em>
503 <td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
504 <td>function to call to free <em class="parameter"><code>data</code></em> when it is no longer needed</td>
508 <p class="since">Since 3.2</p>
511 <div class="refsect1">
512 <a name="GtkFontChooser.property-details"></a><h2>Property Details</h2>
513 <div class="refsect2">
514 <a name="GtkFontChooser--font"></a><h3>The <code class="literal">"font"</code> property</h3>
515 <pre class="programlisting"> "font" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
517 The font description as a string, e.g. "Sans Italic 12".
519 <p>Default value: "Sans 10"</p>
522 <div class="refsect2">
523 <a name="GtkFontChooser--font-desc"></a><h3>The <code class="literal">"font-desc"</code> property</h3>
524 <pre class="programlisting"> "font-desc" <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>* : Read / Write</pre>
526 The font description as a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>.
530 <div class="refsect2">
531 <a name="GtkFontChooser--preview-text"></a><h3>The <code class="literal">"preview-text"</code> property</h3>
532 <pre class="programlisting"> "preview-text" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
534 The string with which to preview the font.
536 <p>Default value: "The quick brown fox jumps over the lazy dog."</p>
539 <div class="refsect2">
540 <a name="GtkFontChooser--show-preview-entry"></a><h3>The <code class="literal">"show-preview-entry"</code> property</h3>
541 <pre class="programlisting"> "show-preview-entry" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
543 Whether to show an entry to change the preview text.
545 <p>Default value: TRUE</p>
548 <div class="refsect1">
549 <a name="GtkFontChooser.signal-details"></a><h2>Signal Details</h2>
550 <div class="refsect2">
551 <a name="GtkFontChooser-font-activated"></a><h3>The <code class="literal">"font-activated"</code> signal</h3>
552 <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkFontChooser.html" title="GtkFontChooser"><span class="type">GtkFontChooser</span></a> *fontchooser,
553 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *arg1,
554 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
557 <div class="refsect1">
558 <a name="GtkFontChooser.see-also"></a><h2>See Also</h2>
559 <a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog"><span class="type">GtkFontChooserDialog</span></a>, <a class="link" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget"><span class="type">GtkFontChooserWidget</span></a>, <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a>
564 Generated by GTK-Doc V1.18</div>