[gtk-web: 1/2] In Controlling Event Handling the word normal is highlighted as if it's a command
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-web: 1/2] In Controlling Event Handling the word normal is highlighted as if it's a command
- Date: Wed, 15 Apr 2020 10:02:47 +0000 (UTC)
commit b4a659374d13a2f978dc4ca8780afa55efc28eef
Author: WiL Hofstader <wfabian ardila gmail com>
Date: Wed Apr 15 02:21:12 2020 +0000
In Controlling Event Handling the word normal is highlighted as if it's a command
collections/_docs/hello-world.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/collections/_docs/hello-world.md b/collections/_docs/hello-world.md
index 4e86cf2..a1f2a74 100644
--- a/collections/_docs/hello-world.md
+++ b/collections/_docs/hello-world.md
@@ -105,6 +105,6 @@ Next the button variable is initialized in similar manner. `gtk_button_new_with_
### Controlling Event Handling
-After connecting `print_hello()`, another signal is connected to the "clicked" state of the button using
`g_signal_connect_swapped()`. This functions is similar to a `g_signal_connect()` with the difference lying
in how the callback function is treated. `g_signal_connect_swapped()` 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 `gtk_widget_destroy()` and the window 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 g_signal_connect()` were used to connect
the "clicked" signal with `gtk_widget_destroy()`, then the button itself would have been destroyed, not the
window. More information about creating buttons can be found here.
+After connecting `print_hello()`, another signal is connected to the "clicked" state of the button using
`g_signal_connect_swapped()`. This functions is similar to a `g_signal_connect()` with the difference lying
in how the callback function is treated. `g_signal_connect_swapped()` 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 `gtk_widget_destroy()` and the window 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 `g_signal_connect()` were used to connect
the "clicked" signal with `gtk_widget_destroy()`, then the button itself would have been destroyed, not the
window. More information about creating buttons can be found here.
-Next section will elaborate further on how to add several GtkWidgets to your GTK application.
\ No newline at end of file
+Next section will elaborate further on how to add several GtkWidgets to your GTK application.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]