/usr/share/gtk-doc/html/libgwyapp/libgwyapp-app.html is in libgwyddion20-doc 2.50-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>app: Gwyddion Application Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Gwyddion Application Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Application Library Reference Manual">
<link rel="prev" href="index.html" title="Gwyddion Application Library Reference Manual">
<link rel="next" href="libgwyapp-data-browser.html" title="data-browser">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libgwyapp-app.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="index.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgwyapp-data-browser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgwyapp-app"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwyapp-app.top_of_page"></a>app</span></h2>
<p>app — Core application interface, window management</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgwyapp-app.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-switch-tool" title="gwy_app_switch_tool ()">gwy_app_switch_tool</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-current-tool-name" title="gwy_app_current_tool_name ()">gwy_app_current_tool_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-add-main-accel-group" title="gwy_app_add_main_accel_group ()">gwy_app_add_main_accel_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-save-window-position" title="gwy_app_save_window_position ()">gwy_app_save_window_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-restore-window-position" title="gwy_app_restore_window_position ()">gwy_app_restore_window_position</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk3GtkWidget.html#GtkWidget-struct"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-main-window-get" title="gwy_app_main_window_get ()">gwy_app_main_window_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-data-view-change-mask-color" title="gwy_app_data_view_change_mask_color ()">gwy_app_data_view_change_mask_color</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-quit" title="gwy_app_quit ()">gwy_app_quit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-init-widget-styles" title="gwy_app_init_widget_styles ()">gwy_app_init_widget_styles</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-init-i18n" title="gwy_app_init_i18n ()">gwy_app_init_i18n</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyapp-app.html#gwy-app-init-common" title="gwy_app_init_common ()">gwy_app_init_common</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgwyapp-app.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <app/gwyapp.h>
</pre>
</div>
<div class="refsect1">
<a name="libgwyapp-app.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libgwyapp-app.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gwy-app-switch-tool"></a><h3>gwy_app_switch_tool ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_app_switch_tool (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *toolname</code></em>);</pre>
<p>Switches the current tool to given tool.</p>
<p>If the tool is already active it is shown when hidden and hidden when
visible.</p>
<div class="refsect3">
<a name="gwy-app-switch-tool.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>toolname</p></td>
<td class="parameter_description"><p>Tool name, that is type name of the tool object in the GLib
type system. This can be for instance "GwyToolGrainMeasure".</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-current-tool-name"></a><h3>gwy_app_current_tool_name ()</h3>
<pre class="programlisting">const <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_app_current_tool_name (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Obtains the name of currently active tool.</p>
<p>See <a class="link" href="libgwyapp-app.html#gwy-app-switch-tool" title="gwy_app_switch_tool ()"><code class="function">gwy_app_switch_tool()</code></a> for the name description.</p>
<p>In some rare circumstances, this function can return <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> because no tool
is active. This includes program startup and shutdown and during the
construction of a new <a class="link" href="GwyTool.html" title="GwyTool"><span class="type">GwyTool</span></a> object while switching tools. Also, <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
is typically returned outside Gwyddion in program just using the libraries.</p>
<div class="refsect3">
<a name="gwy-app-current-tool-name.returns"></a><h4>Returns</h4>
<p> The tool name.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-38.html#api-index-2.38">2.38</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-add-main-accel-group"></a><h3>gwy_app_add_main_accel_group ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_app_add_main_accel_group (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk3GtkWindow.html#GtkWindow-struct"><span class="type">GtkWindow</span></a> *window</code></em>);</pre>
<p>Adds main (global) application accelerator group to a window.</p>
<p>This includes accelerators for terminating Gwyddion, opening files, etc.</p>
<div class="refsect3">
<a name="gwy-app-add-main-accel-group.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>A window.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-save-window-position"></a><h3>gwy_app_save_window_position ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_app_save_window_position (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk3GtkWindow.html#GtkWindow-struct"><span class="type">GtkWindow</span></a> *window</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> position</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> size</code></em>);</pre>
<p>Saves position and/or size of a window to settings.</p>
<p>Some sanity checks are included, therefore if window position and/or size
is too suspicious, it is not saved.</p>
<div class="refsect3">
<a name="gwy-app-save-window-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>A window to save position of.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>Unique prefix in settings to store the information under.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to save position information.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p><a href="http://developer.gnome.org/doc/API/2.0/gtk/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to save size information.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-restore-window-position"></a><h3>gwy_app_restore_window_position ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_app_restore_window_position (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk3GtkWindow.html#GtkWindow-struct"><span class="type">GtkWindow</span></a> *window</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> grow_only</code></em>);</pre>
<p>Restores a window position and/or size from settings.</p>
<p>Unlike <a class="link" href="libgwyapp-app.html#gwy-app-save-window-position" title="gwy_app_save_window_position ()"><code class="function">gwy_app_save_window_position()</code></a>, this function has no <em class="parameter"><code>position</code></em>
and
<em class="parameter"><code>size</code></em>
arguments, it simply restores all attributes that were saved.</p>
<p>Note to restore position (not size) it should be called twice for each
window to accommodate sloppy window managers: once before the window is
shown, second time immediately after showing the window.</p>
<p>Some sanity checks are included, therefore if saved window position and/or
size is too suspicious, it is not restored.</p>
<div class="refsect3">
<a name="gwy-app-restore-window-position.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>A window to restore position of.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>Unique prefix in settings to get the information from (the same as
in <a class="link" href="libgwyapp-app.html#gwy-app-save-window-position" title="gwy_app_save_window_position ()"><code class="function">gwy_app_save_window_position()</code></a>).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>grow_only</p></td>
<td class="parameter_description"><p><a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to only attempt set the window default size bigger than it
requests, never smaller.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-main-window-get"></a><h3>gwy_app_main_window_get ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gtk3GtkWidget.html#GtkWidget-struct"><span class="returnvalue">GtkWidget</span></a> *
gwy_app_main_window_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns Gwyddion main application window (toolbox).</p>
<div class="refsect3">
<a name="gwy-app-main-window-get.returns"></a><h4>Returns</h4>
<p> The Gwyddion toolbox.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-data-view-change-mask-color"></a><h3>gwy_app_data_view_change_mask_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_app_data_view_change_mask_color (<em class="parameter"><code><a href="../GwyDataView.html#GwyDataView-struct"><span class="type">GwyDataView</span></a> *data_view</code></em>);</pre>
<p>Runs mask color selector on a data view.</p>
<p>This is a convenience function to run <a href="../libgwydgets-gwydgetutils.html#gwy-color-selector-for-mask"><code class="function">gwy_color_selector_for_mask()</code></a>,
possibly taking the initial color from settings.</p>
<div class="refsect3">
<a name="gwy-app-data-view-change-mask-color.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>data_view</p></td>
<td class="parameter_description"><p>A data view (of application's data window). It must have a
mask.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-quit"></a><h3>gwy_app_quit ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_app_quit (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Quits the application.</p>
<p>This function may present a confirmation dialog to the user and it may
let the application to continue running. If it quits the application,
it performs some shutdown actions and then quits the Gtk+ main loop with
<a href="/usr/share/gtk-doc/html/gtk3gtk3-General.html#gtk-main-quit"><code class="function">gtk_main_quit()</code></a>.</p>
<div class="refsect3">
<a name="gwy-app-quit.returns"></a><h4>Returns</h4>
<p> Always <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to be usable as an event handler. However, if the
application is actually terminated, this function does not return.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-init-widget-styles"></a><h3>gwy_app_init_widget_styles ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_app_init_widget_styles (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Sets up style properties for special Gwyddion widgets.</p>
<p>Normally not needed to call explicitly.</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-init-i18n"></a><h3>gwy_app_init_i18n ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_app_init_i18n (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Initializes internationalization.</p>
<p>Normally not needed to call explicitly.</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-app-init-common"></a><h3>gwy_app_init_common ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_app_init_common (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Performs common application initialization.</p>
<p>This function can be useful in Gwyddion-based programs and includes:
widget class initialisation,
internationalisation initialisation,
stock item and resource class loading,
settings loading, and
module registration.</p>
<div class="refsect3">
<a name="gwy-app-init-common.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Error location for settings loading error.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>List of module types to load, terminated with <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Possible types
are "file", "graph", "layer", "process", "tool", "volume" and "xyz",
plus two special values "" and "all" for untyped modules (like pygwy
or plug-in proxy) and all modules, respectively.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-app-init-common.returns"></a><h4>Returns</h4>
<p> Settings loading status.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libgwyapp-app.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.19</div>
</body>
</html>
|