New upstream version 3.22.28

This commit is contained in:
Jeremy Bicha
2018-02-15 04:41:25 -05:00
652 changed files with 498643 additions and 49781 deletions

View File

@ -8,7 +8,7 @@
<link rel="up" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="prev" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="next" href="ch01s02.html" title="Packing">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@ -134,7 +134,7 @@ main (int argc,
is connected to the <code class="function">activate()</code> function above the <code class="function">main()</code> functions.
The <code class="varname">activate</code> signal will be sent
when your application is launched with
<a href="../gio/GApplication.html#g-application-run"><code class="function">g_application_run()</code></a> on the line below.
<code class="function">g_application_run()</code> on the line below.
The <code class="function">gtk_application_run()</code> also takes as arguments the pointers to the command line arguments
counter and string array; this allows GTK+ to parse specific command line
arguments that control the behavior of GTK+ itself. The parsed arguments
@ -166,9 +166,9 @@ main (int argc,
<p>Finally the window size is set using gtk_window_set_default_size and
the window is then shown by GTK via <a class="link" href="GtkWidget.html#gtk-widget-show-all" title="gtk_widget_show_all ()"><code class="function">gtk_widget_show_all()</code></a>.</p>
<p>When you exit the window, by for example pressing the X,
the <a href="../gio/GApplication.html#g-application-run"><code class="function">g_application_run()</code></a> in the main loop returns with a number
the <code class="function">g_application_run()</code> in the main loop returns with a number
which is saved inside an integer named "status". Afterwards, the
<a class="link" href="GtkApplication.html" title="GtkApplication"><span class="type">GtkApplication</span></a> object is freed from memory with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.
<a class="link" href="GtkApplication.html" title="GtkApplication"><span class="type">GtkApplication</span></a> object is freed from memory with <code class="function">g_object_unref()</code>.
Finally the status integer is returned and the GTK application exits.</p>
<p>While the program is running, GTK+ is receiving
<em class="firstterm">events</em>. These are typically input events caused by
@ -262,17 +262,17 @@ main (int argc,
Using g_signal_connect the button is connected to a function in our app called
<code class="function">print_hello()</code>, so that when the button is clicked, GTK will call this function.
As the <code class="function">print_hello()</code> function does not use any data as input, NULL is passed
to it. <code class="function">print_hello()</code> calls <a href="../glib/glib-Warnings-and-Assertions.html#g-print"><code class="function">g_print()</code></a> with the string "Hello World"
to it. <code class="function">print_hello()</code> calls <code class="function">g_print()</code> with the string "Hello World"
which will print Hello World in a terminal if the GTK application was started
from one.</p>
<p>After connecting <code class="function">print_hello()</code>, another signal is connected to the "clicked" state
of the button using <a href="../gobject/gobject-Signals.html#g-signal-connect-swapped"><code class="function">g_signal_connect_swapped()</code></a>. This functions is similar to
a <a href="../gobject/gobject-Signals.html#g-signal-connect"><code class="function">g_signal_connect()</code></a> with the difference lying in how the callback function is
treated. <a href="../gobject/gobject-Signals.html#g-signal-connect-swapped"><code class="function">g_signal_connect_swapped()</code></a> allow you to specify what the callback
of the button using <code class="function">g_signal_connect_swapped()</code>. This functions is similar to
a <code class="function">g_signal_connect()</code> with the difference lying in how the callback function is
treated. <code class="function">g_signal_connect_swapped()</code> allow you to specify what the callback
function should take as parameter by letting you pass it as data. In this case
the function being called back is <a class="link" href="GtkWidget.html#gtk-widget-destroy" title="gtk_widget_destroy ()"><code class="function">gtk_widget_destroy()</code></a> and the <code class="varname">window</code>
pointer is passed to it. This has the effect that when the button is clicked,
the whole GTK window is destroyed. In contrast if a normal <a href="../gobject/gobject-Signals.html#g-signal-connect"><code class="function">g_signal_connect()</code></a> were used
the whole GTK window is destroyed. In contrast if a normal <code class="function">g_signal_connect()</code> were used
to connect the "clicked" signal with <a class="link" href="GtkWidget.html#gtk-widget-destroy" title="gtk_widget_destroy ()"><code class="function">gtk_widget_destroy()</code></a>, then the <code class="varname">button</code>
itself would have been destroyed, not the window.
More information about creating buttons can be found
@ -283,6 +283,6 @@ main (int argc,
application.</p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>