forked from AuroraMiddleware/gtk
Add a paragraph explaining events and signals
This commit is contained in:
parent
0b7496558d
commit
ce1244fdd7
@ -12,6 +12,9 @@
|
|||||||
<link linkend="gtk-compiling">Compiling the GTK+ libraries</link>
|
<link linkend="gtk-compiling">Compiling the GTK+ libraries</link>
|
||||||
section in this reference.</para>
|
section in this reference.</para>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Basics</title>
|
||||||
|
|
||||||
<para>To begin our introduction to GTK, we'll start with the simplest
|
<para>To begin our introduction to GTK, we'll start with the simplest
|
||||||
program possible. This program will create an empty 200x200 pixel
|
program possible. This program will create an empty 200x200 pixel
|
||||||
window:</para>
|
window:</para>
|
||||||
@ -83,8 +86,15 @@
|
|||||||
|
|
||||||
<para>The last line of interest is the call to gtk_main(). This function will
|
<para>The last line of interest is the call to gtk_main(). This function will
|
||||||
start the GTK+ main loop and will block the control flow of the
|
start the GTK+ main loop and will block the control flow of the
|
||||||
<function>main</function>() until the gtk_main_quit() function is
|
main() until the gtk_main_quit() function is called.</para>
|
||||||
called.</para>
|
|
||||||
|
<para>While the program is running, GTK+ is receiving
|
||||||
|
<firstterm>events</firstterm>. These are typically input events caused by
|
||||||
|
the user interacting with your program, but also things like messages from
|
||||||
|
the window manager or other applications. GTK+ processes these and as a
|
||||||
|
result, <firstterm>signals</firstterm> may be emitted on your widgets.
|
||||||
|
Connecting handlers for these signals is how you normally make your
|
||||||
|
program do something in response to user input.</para>
|
||||||
|
|
||||||
<para>The following example is slightly more complex, and tries to
|
<para>The following example is slightly more complex, and tries to
|
||||||
showcase some of the capabilities of GTK+.</para>
|
showcase some of the capabilities of GTK+.</para>
|
||||||
@ -104,5 +114,6 @@
|
|||||||
</xi:include>
|
</xi:include>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
</section>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
Loading…
Reference in New Issue
Block a user