Initial packaging to sync OBS with git/gerrit
[profile/ivi/gtk3.git] / docs / reference / gtk / html / GtkFontChooser.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
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">
13 </head>
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">
16 <tr valign="middle">
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>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GtkFontChooser.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GtkFontChooser.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GtkFontChooser.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GtkFontChooser.prerequisites" class="shortcut">Prerequisites</a>
31                    | 
32                   <a href="#GtkFontChooser.implementations" class="shortcut">Known Implementations</a>
33                    | 
34                   <a href="#GtkFontChooser.properties" class="shortcut">Properties</a>
35                    | 
36                   <a href="#GtkFontChooser.signals" class="shortcut">Signals</a>
37 </td></tr>
38 </table>
39 <div class="refentry">
40 <a name="GtkFontChooser"></a><div class="titlepage"></div>
41 <div class="refnamediv"><table width="100%"><tr>
42 <td valign="top">
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>
45 </td>
46 <td valign="top" align="right"></td>
47 </tr></table></div>
48 <div class="refsynopsisdiv">
49 <a name="GtkFontChooser.synopsis"></a><h2>Synopsis</h2>
50 <pre class="synopsis">
51 #include &lt;gtk/gtk.h&gt;
52
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>);
78 </pre>
79 </div>
80 <div class="refsect1">
81 <a name="GtkFontChooser.object-hierarchy"></a><h2>Object Hierarchy</h2>
82 <pre class="synopsis">
83   GInterface
84    +----GtkFontChooser
85 </pre>
86 </div>
87 <div class="refsect1">
88 <a name="GtkFontChooser.prerequisites"></a><h2>Prerequisites</h2>
89 <p>
90 GtkFontChooser requires
91  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
92 </div>
93 <div class="refsect1">
94 <a name="GtkFontChooser.implementations"></a><h2>Known Implementations</h2>
95 <p>
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>
98 </div>
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
106 </pre>
107 </div>
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>
112 </pre>
113 </div>
114 <div class="refsect1">
115 <a name="GtkFontChooser.description"></a><h2>Description</h2>
116 <p>
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>.
121 </p>
122 </div>
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>
128 </div>
129 <hr>
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>
133 <p>
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.
136 </p>
137 <p>
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>.
139 </p>
140 <div class="variablelist"><table border="0">
141 <col align="left" valign="top">
142 <tbody>
143 <tr>
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>
146 </td>
147 </tr>
148 <tr>
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>
153 </td>
154 </tr>
155 </tbody>
156 </table></div>
157 <p class="since">Since 3.2</p>
158 </div>
159 <hr>
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>
163 <p>
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).
166 </p>
167 <p>
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>.
169 </p>
170 <div class="variablelist"><table border="0">
171 <col align="left" valign="top">
172 <tbody>
173 <tr>
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>
176 </td>
177 </tr>
178 <tr>
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>
183 </td>
184 </tr>
185 </tbody>
186 </table></div>
187 <p class="since">Since 3.2</p>
188 </div>
189 <hr>
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>
193 <p>
194 The selected font size.
195 </p>
196 <div class="variablelist"><table border="0">
197 <col align="left" valign="top">
198 <tbody>
199 <tr>
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>
202 </td>
203 </tr>
204 <tr>
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>
208 </tr>
209 </tbody>
210 </table></div>
211 <p class="since">Since 3.2</p>
212 </div>
213 <hr>
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>
217 <p>
218 Gets the currently-selected font name.
219 </p>
220 <p>
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".
226 </p>
227 <p>
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
229 font descriptions.
230 </p>
231 <div class="variablelist"><table border="0">
232 <col align="left" valign="top">
233 <tbody>
234 <tr>
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>
237 </td>
238 </tr>
239 <tr>
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>
244 </td>
245 </tr>
246 </tbody>
247 </table></div>
248 <p class="since">Since 3.2</p>
249 </div>
250 <hr>
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>
255 <p>
256 Sets the currently-selected font.
257 </p>
258 <div class="variablelist"><table border="0">
259 <col align="left" valign="top">
260 <tbody>
261 <tr>
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>
264 </td>
265 </tr>
266 <tr>
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>
269 </tr>
270 </tbody>
271 </table></div>
272 <p class="since">Since 3.2</p>
273 </div>
274 <hr>
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>
278 <p>
279 Gets the currently-selected font.
280 </p>
281 <p>
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".
287 </p>
288 <p>
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
290 font descriptions.
291 </p>
292 <div class="variablelist"><table border="0">
293 <col align="left" valign="top">
294 <tbody>
295 <tr>
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>
298 </td>
299 </tr>
300 <tr>
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>
304 </td>
305 </tr>
306 </tbody>
307 </table></div>
308 <p class="since">Since 3.2</p>
309 </div>
310 <hr>
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>
315 <p>
316 Sets the currently-selected font from <em class="parameter"><code>font_desc</code></em>.
317 </p>
318 <div class="variablelist"><table border="0">
319 <col align="left" valign="top">
320 <tbody>
321 <tr>
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>
324 </td>
325 </tr>
326 <tr>
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>
329 </td>
330 </tr>
331 </tbody>
332 </table></div>
333 <p class="since">Since 3.2</p>
334 </div>
335 <hr>
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>
339 <p>
340 Gets the text displayed in the preview area.
341 </p>
342 <div class="variablelist"><table border="0">
343 <col align="left" valign="top">
344 <tbody>
345 <tr>
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>
348 </td>
349 </tr>
350 <tr>
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>
354 </td>
355 </tr>
356 </tbody>
357 </table></div>
358 <p class="since">Since 3.2</p>
359 </div>
360 <hr>
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>
365 <p>
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.
368 </p>
369 <div class="variablelist"><table border="0">
370 <col align="left" valign="top">
371 <tbody>
372 <tr>
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>
375 </td>
376 </tr>
377 <tr>
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>
380 </td>
381 </tr>
382 </tbody>
383 </table></div>
384 <p class="since">Since 3.2</p>
385 </div>
386 <hr>
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>
391 <p>
392 Returns whether the preview entry is shown or not.
393 </p>
394 <div class="variablelist"><table border="0">
395 <col align="left" valign="top">
396 <tbody>
397 <tr>
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>
400 </td>
401 </tr>
402 <tr>
403 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
404 <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>
407 </tr>
408 </tbody>
409 </table></div>
410 <p class="since">Since 3.2</p>
411 </div>
412 <hr>
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>
418 <p>
419 Shows or hides the editable preview entry.
420 </p>
421 <div class="variablelist"><table border="0">
422 <col align="left" valign="top">
423 <tbody>
424 <tr>
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>
427 </td>
428 </tr>
429 <tr>
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>
432 </tr>
433 </tbody>
434 </table></div>
435 <p class="since">Since 3.2</p>
436 </div>
437 <hr>
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>
443 <p>
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>.
446 </p>
447 <div class="variablelist"><table border="0">
448 <col align="left" valign="top">
449 <tbody>
450 <tr>
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>
453 </td>
454 </tr>
455 <tr>
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>
458 </td>
459 </tr>
460 <tr>
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>
463 </td>
464 </tr>
465 <tr>
466 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
467 <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>
469 </tr>
470 </tbody>
471 </table></div>
472 </div>
473 <hr>
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>
480 <p>
481 Adds a filter function that decides which fonts to display
482 in the font chooser.
483 </p>
484 <div class="variablelist"><table border="0">
485 <col align="left" valign="top">
486 <tbody>
487 <tr>
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>
490 </td>
491 </tr>
492 <tr>
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>
495 </td>
496 </tr>
497 <tr>
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>
500 </td>
501 </tr>
502 <tr>
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>
505 </tr>
506 </tbody>
507 </table></div>
508 <p class="since">Since 3.2</p>
509 </div>
510 </div>
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>
516 <p>
517 The font description as a string, e.g. "Sans Italic 12".
518 </p>
519 <p>Default value: "Sans 10"</p>
520 </div>
521 <hr>
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>
525 <p>
526 The font description as a <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a>.
527 </p>
528 </div>
529 <hr>
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>
533 <p>
534 The string with which to preview the font.
535 </p>
536 <p>Default value: "The quick brown fox jumps over the lazy dog."</p>
537 </div>
538 <hr>
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>
542 <p>
543 Whether to show an entry to change the preview text.
544 </p>
545 <p>Default value: TRUE</p>
546 </div>
547 </div>
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>
555 </div>
556 </div>
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>
560 </div>
561 </div>
562 <div class="footer">
563 <hr>
564           Generated by GTK-Doc V1.18</div>
565 </body>
566 </html>