gdk3 3.2.5-x86-mingw32 → 3.2.6-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING.LIB +502 -0
- data/README.md +25 -0
- data/Rakefile +6 -6
- data/gdk3.gemspec +41 -0
- data/lib/gdk3/cursor.rb +13 -0
- data/lib/gdk3/loader.rb +23 -5
- data/test/test-gdk-cursor.rb +17 -1
- data/vendor/local/bin/gtk-builder-tool.exe +0 -0
- data/vendor/local/bin/gtk-encode-symbolic-svg.exe +0 -0
- data/vendor/local/bin/gtk-launch.exe +0 -0
- data/vendor/local/bin/gtk-query-immodules-3.0.exe +0 -0
- data/vendor/local/bin/gtk-query-settings.exe +0 -0
- data/vendor/local/bin/gtk-update-icon-cache.exe +0 -0
- data/vendor/local/bin/gtk3-demo-application.exe +0 -0
- data/vendor/local/bin/gtk3-demo.exe +0 -0
- data/vendor/local/bin/gtk3-icon-browser.exe +0 -0
- data/vendor/local/bin/gtk3-widget-factory.exe +0 -0
- data/vendor/local/bin/libepoxy-0.dll +0 -0
- data/vendor/local/bin/libgailutil-3-0.dll +0 -0
- data/vendor/local/bin/libgdk-3-0.dll +0 -0
- data/vendor/local/bin/libgtk-3-0.dll +0 -0
- data/vendor/local/bin/libgtkreftestprivate-0.dll +0 -0
- data/vendor/local/include/gtk-3.0/gdk/gdkversionmacros.h +1 -1
- data/vendor/local/include/gtk-3.0/gtk/gtklistbox.h +1 -1
- data/vendor/local/include/gtk-3.0/gtk/gtkversion.h +3 -3
- data/vendor/local/lib/girepository-1.0/Gdk-3.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/Gtk-3.0.typelib +0 -0
- data/vendor/local/lib/gtk-3.0/3.0.0/immodules.cache +1 -1
- data/vendor/local/lib/libepoxy.dll.a +0 -0
- data/vendor/local/lib/libgailutil-3.dll.a +0 -0
- data/vendor/local/lib/libgailutil-3.la +1 -1
- data/vendor/local/lib/libgdk-3.dll.a +0 -0
- data/vendor/local/lib/libgdk-3.la +2 -2
- data/vendor/local/lib/libgtk-3.dll.a +0 -0
- data/vendor/local/lib/libgtk-3.la +2 -2
- data/vendor/local/lib/libgtkreftestprivate.dll.a +0 -0
- data/vendor/local/lib/libgtkreftestprivate.la +1 -1
- data/vendor/local/lib/pkgconfig/gail-3.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gdk-3.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gdk-win32-3.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gtk+-3.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gtk+-win32-3.0.pc +1 -1
- data/vendor/local/share/aclocal/gtk-3.0.m4 +6 -13
- data/vendor/local/share/gir-1.0/Gdk-3.0.gir +14 -6
- data/vendor/local/share/gir-1.0/Gtk-3.0.gir +11 -11
- data/vendor/local/share/gtk-doc/html/gail-libgail-util3/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/gdk3/GdkFrameClock.html +6 -6
- data/vendor/local/share/gtk-doc/html/gdk3/gdk3-RGBA-Colors.html +1 -1
- data/vendor/local/share/gtk-doc/html/gdk3/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkAccelLabel.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/GtkBuilder.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/GtkButton.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/GtkCellArea.html +22 -22
- data/vendor/local/share/gtk-doc/html/gtk3/GtkCellEditable.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRenderer.html +19 -19
- data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererAccel.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererText.html +12 -12
- data/vendor/local/share/gtk-doc/html/gtk3/GtkCellView.html +8 -8
- data/vendor/local/share/gtk-doc/html/gtk3/GtkColorButton.html +16 -16
- data/vendor/local/share/gtk-doc/html/gtk3/GtkColorChooser.html +9 -9
- data/vendor/local/share/gtk-doc/html/gtk3/GtkColorSelection.html +27 -27
- data/vendor/local/share/gtk-doc/html/gtk3/GtkComboBox.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/GtkContainer.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkDialog.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/GtkDrawingArea.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/GtkEntry.html +6 -6
- data/vendor/local/share/gtk-doc/html/gtk3/GtkEventBox.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/GtkEventController.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkGLArea.html +22 -23
- data/vendor/local/share/gtk-doc/html/gtk3/GtkGesture.html +48 -48
- data/vendor/local/share/gtk-doc/html/gtk3/GtkGestureMultiPress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/GtkGestureSingle.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkIMContext.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkIconTheme.html +30 -30
- data/vendor/local/share/gtk-doc/html/gtk3/GtkIconView.html +6 -6
- data/vendor/local/share/gtk-doc/html/gtk3/GtkImage.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkImageMenuItem.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkInvisible.html +11 -11
- data/vendor/local/share/gtk-doc/html/gtk3/GtkLayout.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkListBox.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkMenu.html +31 -31
- data/vendor/local/share/gtk-doc/html/gtk3/GtkMenuShell.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkModelButton.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkOverlay.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkPadController.html +8 -8
- data/vendor/local/share/gtk-doc/html/gtk3/GtkPaned.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/GtkPlacesSidebar.html +5 -5
- data/vendor/local/share/gtk-doc/html/gtk3/GtkPlug.html +9 -9
- data/vendor/local/share/gtk-doc/html/gtk3/GtkPopover.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkProgressBar.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkRange.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkScrolledWindow.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkSearchBar.html +5 -5
- data/vendor/local/share/gtk-doc/html/gtk3/GtkSearchEntry.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkSettings.html +10 -10
- data/vendor/local/share/gtk-doc/html/gtk3/GtkSocket.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/GtkStatusIcon.html +18 -18
- data/vendor/local/share/gtk-doc/html/gtk3/GtkStyle.html +28 -28
- data/vendor/local/share/gtk-doc/html/gtk3/GtkStyleContext.html +40 -40
- data/vendor/local/share/gtk-doc/html/gtk3/GtkTextBuffer.html +29 -29
- data/vendor/local/share/gtk-doc/html/gtk3/GtkTextTag.html +30 -30
- data/vendor/local/share/gtk-doc/html/gtk3/GtkTextView.html +15 -15
- data/vendor/local/share/gtk-doc/html/gtk3/GtkThemingEngine.html +8 -8
- data/vendor/local/share/gtk-doc/html/gtk3/GtkToolPalette.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/GtkTooltip.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeView.html +13 -13
- data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeViewColumn.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/GtkViewport.html +6 -6
- data/vendor/local/share/gtk-doc/html/gtk3/GtkWidget.html +275 -275
- data/vendor/local/share/gtk-doc/html/gtk3/GtkWindow.html +53 -53
- data/vendor/local/share/gtk-doc/html/gtk3/GtkWindowGroup.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/ch01s03.html +7 -1
- data/vendor/local/share/gtk-doc/html/gtk3/ch01s04.html +13 -13
- data/vendor/local/share/gtk-doc/html/gtk3/ch26s02.html +35 -35
- data/vendor/local/share/gtk-doc/html/gtk3/ch32s05.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/chap-drawing-model.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/chap-input-handling.html +37 -37
- data/vendor/local/share/gtk-doc/html/gtk3/gtk-compiling.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-2-to-3.html +13 -13
- data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext-css.html +2 -2
- data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext-parser-extensions.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/gtk-question-index.html +9 -9
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Accelerator-Maps.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Bindings.html +12 -12
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Clipboards.html +33 -33
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Drag-and-Drop.html +40 -40
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Feature-Test-Macros.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Filesystem-utilities.html +9 -9
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-General.html +24 -24
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkSymbolicColor.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Keyboard-Accelerators.html +34 -34
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Resource-Files.html +9 -9
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Selections.html +36 -36
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Stock-Items.html +1 -1
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Testing.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Themeable-Stock-Images.html +3 -3
- data/vendor/local/share/gtk-doc/html/gtk3/index.html +1 -1
- data/vendor/local/share/locale/ca/LC_MESSAGES/gtk30.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gtk30.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gtk30.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gtk30.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gtk30.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gtk30.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gtk30-properties.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gtk30.mo +0 -0
- data/vendor/local/share/man/man1/broadwayd.1 +1 -1
- data/vendor/local/share/man/man1/gtk-builder-tool.1 +1 -1
- data/vendor/local/share/man/man1/gtk-encode-symbolic-svg.1 +1 -1
- data/vendor/local/share/man/man1/gtk-launch.1 +1 -1
- data/vendor/local/share/man/man1/gtk-query-immodules-3.0.1 +1 -1
- data/vendor/local/share/man/man1/gtk-query-settings.1 +1 -1
- data/vendor/local/share/man/man1/gtk-update-icon-cache.1 +1 -1
- data/vendor/local/share/man/man1/gtk3-demo-application.1 +1 -1
- data/vendor/local/share/man/man1/gtk3-demo.1 +1 -1
- data/vendor/local/share/man/man1/gtk3-icon-browser.1 +1 -1
- data/vendor/local/share/man/man1/gtk3-widget-factory.1 +1 -1
- metadata +7 -60
@@ -418,15 +418,15 @@
|
|
418
418
|
<td><span class="type">cairo_region_t</span></td>
|
419
419
|
</tr>
|
420
420
|
<tr>
|
421
|
-
<td><
|
421
|
+
<td><span class="type">GdkRectangle</span></td>
|
422
422
|
<td><span class="type">cairo_rectangle_int_t</span></td>
|
423
423
|
</tr>
|
424
424
|
<tr>
|
425
|
-
<td><
|
425
|
+
<td><code class="function">gdk_rectangle_intersect()</code></td>
|
426
426
|
<td>this function is still there</td>
|
427
427
|
</tr>
|
428
428
|
<tr>
|
429
|
-
<td><
|
429
|
+
<td><code class="function">gdk_rectangle_union()</code></td>
|
430
430
|
<td>this function is still there</td>
|
431
431
|
</tr>
|
432
432
|
<tr>
|
@@ -551,7 +551,7 @@
|
|
551
551
|
|
552
552
|
<span class="normal">pixmap </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gdk_pixmap_new</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">NULL</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">);</span>
|
553
553
|
|
554
|
-
<span class="normal">cr </span><span class="symbol">=</span><span class="normal"> </span><span class="function"
|
554
|
+
<span class="normal">cr </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gdk_cairo_create</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixmap</span><span class="symbol">);</span>
|
555
555
|
<span class="function">cairo_rectangle</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">);</span>
|
556
556
|
<span class="function">cairo_fill</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
557
557
|
<span class="function">cairo_destroy</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
@@ -603,13 +603,13 @@
|
|
603
603
|
<span class="function">cairo_fill</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
604
604
|
<span class="function">cairo_destroy</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
605
605
|
|
606
|
-
<span class="normal">pixbuf </span><span class="symbol">=</span><span class="normal"> </span><span class="function"
|
606
|
+
<span class="normal">pixbuf </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gdk_pixbuf_get_from_surface</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">s</span><span class="symbol">,</span>
|
607
607
|
<span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span>
|
608
608
|
<span class="normal"> </span><span class="number">3</span><span class="symbol">,</span><span class="normal"> </span><span class="number">3</span><span class="symbol">);</span>
|
609
609
|
|
610
610
|
<span class="function">cairo_surface_destroy</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">s</span><span class="symbol">);</span>
|
611
611
|
|
612
|
-
<span class="normal">cursor </span><span class="symbol">=</span><span class="normal"> </span><span class="function"
|
612
|
+
<span class="normal">cursor </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gdk_cursor_new_from_pixbuf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">display</span><span class="symbol">,</span><span class="normal"> pixbuf</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
|
613
613
|
|
614
614
|
<span class="function">g_object_unref</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">);</span></pre></td>
|
615
615
|
</tr>
|
@@ -628,7 +628,7 @@
|
|
628
628
|
<a name="id-1.6.3.4.6"></a>Replace GdkColormap by GdkVisual</h3></div></div></div>
|
629
629
|
<p>
|
630
630
|
For drawing with cairo, it is not necessary to allocate colors, and
|
631
|
-
a <
|
631
|
+
a <span class="type">GdkVisual</span> provides enough information for cairo to handle colors
|
632
632
|
in 'native' surfaces. Therefore, <span class="type">GdkColormap</span> and related functions
|
633
633
|
have been removed in GTK+ 3, and visuals are used instead. The
|
634
634
|
colormap-handling functions of <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> (<code class="function">gtk_widget_set_colormap()</code>,
|
@@ -701,10 +701,10 @@
|
|
701
701
|
<span class="normal"> </span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">label</span><span class="symbol">)</span>
|
702
702
|
<span class="cbracket">{</span>
|
703
703
|
<span class="normal"> </span><span class="usertype">GdkScreen</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">screen </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-get-screen">gtk_widget_get_screen</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WIDGET</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">));</span>
|
704
|
-
<span class="normal"> </span><span class="usertype">GdkVisual</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">visual </span><span class="symbol">=</span><span class="normal"> </span><span class="function"
|
704
|
+
<span class="normal"> </span><span class="usertype">GdkVisual</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">visual </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gdk_screen_get_rgba_visual</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">screen</span><span class="symbol">);</span>
|
705
705
|
|
706
706
|
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">visual </span><span class="symbol">==</span><span class="normal"> NULL</span><span class="symbol">)</span>
|
707
|
-
<span class="normal"> visual </span><span class="symbol">=</span><span class="normal"> </span><span class="function"
|
707
|
+
<span class="normal"> visual </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gdk_screen_get_system_visual</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">screen</span><span class="symbol">);</span>
|
708
708
|
|
709
709
|
<span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-set-visual">gtk_widget_set_visual</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> visual</span><span class="symbol">);</span>
|
710
710
|
<span class="cbracket">}</span></pre></td>
|
@@ -722,7 +722,7 @@
|
|
722
722
|
<a name="id-1.6.3.4.7"></a>GdkDrawable is gone</h3></div></div></div>
|
723
723
|
<p>
|
724
724
|
<span class="type">GdkDrawable</span> has been removed in GTK+ 3, together with <span class="type">GdkPixmap</span>
|
725
|
-
and <span class="type">GdkImage</span>. The only remaining drawable class is <
|
725
|
+
and <span class="type">GdkImage</span>. The only remaining drawable class is <span class="type">GdkWindow</span>.
|
726
726
|
For dealing with image data, you should use a <span class="type">cairo_surface_t</span> or
|
727
727
|
a <span class="type">GdkPixbuf</span>.
|
728
728
|
</p>
|
@@ -744,26 +744,26 @@
|
|
744
744
|
<tbody>
|
745
745
|
<tr>
|
746
746
|
<td><code class="function">gdk_drawable_get_visual()</code></td>
|
747
|
-
<td><
|
747
|
+
<td><code class="function">gdk_window_get_visual()</code></td>
|
748
748
|
</tr>
|
749
749
|
<tr>
|
750
750
|
<td><code class="function">gdk_drawable_get_size()</code></td>
|
751
751
|
<td>
|
752
|
-
<
|
753
|
-
<
|
752
|
+
<code class="function">gdk_window_get_width()</code>
|
753
|
+
<code class="function">gdk_window_get_height()</code>
|
754
754
|
</td>
|
755
755
|
</tr>
|
756
756
|
<tr>
|
757
757
|
<td><code class="function">gdk_pixbuf_get_from_drawable()</code></td>
|
758
|
-
<td><
|
758
|
+
<td><code class="function">gdk_pixbuf_get_from_window()</code></td>
|
759
759
|
</tr>
|
760
760
|
<tr>
|
761
761
|
<td><code class="function">gdk_drawable_get_clip_region()</code></td>
|
762
|
-
<td><
|
762
|
+
<td><code class="function">gdk_window_get_clip_region()</code></td>
|
763
763
|
</tr>
|
764
764
|
<tr>
|
765
765
|
<td><code class="function">gdk_drawable_get_visible_region()</code></td>
|
766
|
-
<td><
|
766
|
+
<td><code class="function">gdk_window_get_visible_region()</code></td>
|
767
767
|
</tr>
|
768
768
|
</tbody>
|
769
769
|
</table></div>
|
@@ -781,7 +781,7 @@
|
|
781
781
|
<p>
|
782
782
|
The special-purpose GdkEventClient events and the <code class="function">gdk_add_client_message_filter()</code> and <code class="function">gdk_display_add_client_message_filter()</code> functions have been
|
783
783
|
removed. Receiving X11 ClientMessage events is still possible, using
|
784
|
-
the general <
|
784
|
+
the general <code class="function">gdk_window_add_filter()</code> API. A client message filter like
|
785
785
|
</p>
|
786
786
|
<div class="informalexample">
|
787
787
|
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
@@ -799,7 +799,7 @@
|
|
799
799
|
10
|
800
800
|
11
|
801
801
|
12</pre></td>
|
802
|
-
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal">
|
802
|
+
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> GdkFilterReturn</span>
|
803
803
|
<span class="function">message_filter</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GdkXEvent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">xevent</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">GdkEvent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
|
804
804
|
<span class="cbracket">{</span>
|
805
805
|
<span class="normal"> </span><span class="usertype">XClientMessageEvent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">evt </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">XClientMessageEvent </span><span class="symbol">*)</span><span class="normal">xevent</span><span class="symbol">;</span>
|
@@ -809,7 +809,7 @@
|
|
809
809
|
|
810
810
|
<span class="normal"> </span><span class="symbol">...</span>
|
811
811
|
|
812
|
-
<span class="normal">message_type </span><span class="symbol">=</span><span class="normal"> </span><span class="function"
|
812
|
+
<span class="normal">message_type </span><span class="symbol">=</span><span class="normal"> </span><span class="function">gdk_atom_intern</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"MANAGER"</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">);</span>
|
813
813
|
<span class="function">gdk_display_add_client_message_filter</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">display</span><span class="symbol">,</span><span class="normal"> message_type</span><span class="symbol">,</span><span class="normal"> message_filter</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span></pre></td>
|
814
814
|
</tr>
|
815
815
|
</tbody>
|
@@ -844,27 +844,27 @@
|
|
844
844
|
19
|
845
845
|
20
|
846
846
|
21</pre></td>
|
847
|
-
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal">
|
847
|
+
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> GdkFilterReturn</span>
|
848
848
|
<span class="function">event_filter</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GdkXEvent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">xevent</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">GdkEvent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
|
849
849
|
<span class="cbracket">{</span>
|
850
850
|
<span class="normal"> </span><span class="usertype">XClientMessageEvent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">evt</span><span class="symbol">;</span>
|
851
851
|
<span class="normal"> </span><span class="usertype">GdkAtom</span><span class="normal"> message_type</span><span class="symbol">;</span>
|
852
852
|
|
853
853
|
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(((</span><span class="normal">XEvent </span><span class="symbol">*)</span><span class="normal">xevent</span><span class="symbol">)-></span><span class="normal">type </span><span class="symbol">!=</span><span class="normal"> ClientMessage</span><span class="symbol">)</span>
|
854
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal">
|
854
|
+
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> GDK_FILTER_CONTINUE</span><span class="symbol">;</span>
|
855
855
|
|
856
856
|
<span class="normal"> evt </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">XClientMessageEvent </span><span class="symbol">*)</span><span class="normal">xevent</span><span class="symbol">;</span>
|
857
857
|
<span class="normal"> message_type </span><span class="symbol">=</span><span class="normal"> </span><span class="function">XInternAtom</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">evt</span><span class="symbol">-></span><span class="normal">display</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"MANAGER"</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">);</span>
|
858
858
|
|
859
859
|
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">evt</span><span class="symbol">-></span><span class="normal">message_type </span><span class="symbol">!=</span><span class="normal"> message_type</span><span class="symbol">)</span>
|
860
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal">
|
860
|
+
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> GDK_FILTER_CONTINUE</span><span class="symbol">;</span>
|
861
861
|
|
862
862
|
<span class="normal"> </span><span class="comment">/* do something with evt ... */</span>
|
863
863
|
<span class="cbracket">}</span>
|
864
864
|
|
865
865
|
<span class="normal"> </span><span class="symbol">...</span>
|
866
866
|
|
867
|
-
<span class="function"
|
867
|
+
<span class="function">gdk_window_add_filter</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">NULL</span><span class="symbol">,</span><span class="normal"> message_filter</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span></pre></td>
|
868
868
|
</tr>
|
869
869
|
</tbody>
|
870
870
|
</table>
|
@@ -873,7 +873,7 @@
|
|
873
873
|
<p>
|
874
874
|
One advantage of using an event filter is that you can actually
|
875
875
|
remove the filter when you don't need it anymore, using
|
876
|
-
<
|
876
|
+
<code class="function">gdk_window_remove_filter()</code>.
|
877
877
|
</p>
|
878
878
|
<p>
|
879
879
|
The other difference to be aware of when working with event filters
|
@@ -881,7 +881,7 @@
|
|
881
881
|
means that your application does not receive core X11 key or button
|
882
882
|
events. Instead, all input events are delivered as XIDeviceEvents.
|
883
883
|
As a short-term workaround for this, you can force your application
|
884
|
-
to not use XI2, with <
|
884
|
+
to not use XI2, with <code class="function">gdk_disable_multidevice()</code>. In the long term,
|
885
885
|
you probably want to rewrite your event filter to deal with
|
886
886
|
XIDeviceEvents.
|
887
887
|
</p>
|
@@ -891,7 +891,7 @@
|
|
891
891
|
<a name="id-1.6.3.4.9"></a>Backend-specific code</h3></div></div></div>
|
892
892
|
<p>
|
893
893
|
In GTK+ 2.x, GDK could only be compiled for one backend at a time,
|
894
|
-
and the <
|
894
|
+
and the <code class="literal">GDK_WINDOWING_X11</code> or <code class="literal">GDK_WINDOWING_WIN32</code> macros could
|
895
895
|
be used to find out which one you are dealing with:
|
896
896
|
</p>
|
897
897
|
<div class="informalexample">
|
@@ -905,11 +905,11 @@
|
|
905
905
|
5
|
906
906
|
6
|
907
907
|
7</pre></td>
|
908
|
-
<td class="listing_code"><pre class="programlisting"><span class="preproc">#ifdef</span><span class="normal">
|
909
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">timestamp </span><span class="symbol">!=</span><span class="normal">
|
910
|
-
<span class="normal"> </span><span class="function"
|
908
|
+
<td class="listing_code"><pre class="programlisting"><span class="preproc">#ifdef</span><span class="normal"> GDK_WINDOWING_X11</span>
|
909
|
+
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">timestamp </span><span class="symbol">!=</span><span class="normal"> GDK_CURRENT_TIME</span><span class="symbol">)</span>
|
910
|
+
<span class="normal"> </span><span class="function">gdk_x11_window_set_user_time</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">gdk_window</span><span class="symbol">,</span><span class="normal"> timestamp</span><span class="symbol">);</span>
|
911
911
|
<span class="preproc">#endif</span>
|
912
|
-
<span class="preproc">#ifdef</span><span class="normal">
|
912
|
+
<span class="preproc">#ifdef</span><span class="normal"> GDK_WINDOWING_WIN32</span>
|
913
913
|
<span class="normal"> </span><span class="comment">/* ... win32 specific code ... */</span>
|
914
914
|
<span class="preproc">#endif</span></pre></td>
|
915
915
|
</tr>
|
@@ -920,7 +920,7 @@
|
|
920
920
|
<p>
|
921
921
|
In GTK+ 3, GDK can be built with multiple backends, and currently
|
922
922
|
used backend has to be determined at runtime, typically using
|
923
|
-
type-check macros on a <
|
923
|
+
type-check macros on a <span class="type">GdkDisplay</span> or <span class="type">GdkWindow</span>. You still need
|
924
924
|
to use the GDK_WINDOWING macros to only compile code referring
|
925
925
|
to supported backends:
|
926
926
|
</p>
|
@@ -946,15 +946,15 @@
|
|
946
946
|
16
|
947
947
|
17
|
948
948
|
18</pre></td>
|
949
|
-
<td class="listing_code"><pre class="programlisting"><span class="preproc">#ifdef</span><span class="normal">
|
949
|
+
<td class="listing_code"><pre class="programlisting"><span class="preproc">#ifdef</span><span class="normal"> GDK_WINDOWING_X11</span>
|
950
950
|
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GDK_IS_X11_DISPLAY</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">display</span><span class="symbol">))</span>
|
951
951
|
<span class="normal"> </span><span class="cbracket">{</span>
|
952
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">timestamp </span><span class="symbol">!=</span><span class="normal">
|
953
|
-
<span class="normal"> </span><span class="function"
|
952
|
+
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">timestamp </span><span class="symbol">!=</span><span class="normal"> GDK_CURRENT_TIME</span><span class="symbol">)</span>
|
953
|
+
<span class="normal"> </span><span class="function">gdk_x11_window_set_user_time</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">gdk_window</span><span class="symbol">,</span><span class="normal"> timestamp</span><span class="symbol">);</span>
|
954
954
|
<span class="normal"> </span><span class="cbracket">}</span>
|
955
955
|
<span class="normal"> </span><span class="keyword">else</span>
|
956
956
|
<span class="preproc">#endif</span>
|
957
|
-
<span class="preproc">#ifdef</span><span class="normal">
|
957
|
+
<span class="preproc">#ifdef</span><span class="normal"> GDK_WINDOWING_WIN32</span>
|
958
958
|
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GDK_IS_WIN32_DISPLAY</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">display</span><span class="symbol">))</span>
|
959
959
|
<span class="normal"> </span><span class="cbracket">{</span>
|
960
960
|
<span class="normal"> </span><span class="comment">/* ... win32 specific code ... */</span>
|
@@ -60,8 +60,8 @@
|
|
60
60
|
behavior than before.
|
61
61
|
</p>
|
62
62
|
<p>
|
63
|
-
The Gtk+ scrolling implementation has changed. <
|
64
|
-
and <
|
63
|
+
The Gtk+ scrolling implementation has changed. <code class="function">gdk_window_scroll()</code>
|
64
|
+
and <code class="function">gdk_window_move_region()</code> no longer copy the region on the
|
65
65
|
window, but rather invalidate the entire scrolled region. This is
|
66
66
|
slightly slower, but allowed us to implement a offscreen surface
|
67
67
|
scrolling method which better fits modern hardware. Most scrolling
|
@@ -92,7 +92,7 @@
|
|
92
92
|
<p>
|
93
93
|
The windowing system generates events for native windows. The GDK
|
94
94
|
interface to the windowing system translates such native events into
|
95
|
-
<
|
95
|
+
<span class="structname">GdkEvent</span>
|
96
96
|
structures and sends them on to the GTK layer. In turn, the GTK layer
|
97
97
|
finds the widget that corresponds to a particular
|
98
98
|
<code class="classname">GdkWindow</code> and emits the corresponding event
|
@@ -44,7 +44,7 @@
|
|
44
44
|
The most basic input devices that every computer user has interacted with are
|
45
45
|
keyboards and mice; beyond these, GTK+ supports touchpads, touchscreens and
|
46
46
|
more exotic input devices such as graphics tablets. Inside GTK+, every such
|
47
|
-
input device is represented by a <
|
47
|
+
input device is represented by a <span class="type">GdkDevice</span> object.
|
48
48
|
</p>
|
49
49
|
<p>
|
50
50
|
To simplify dealing with the variability between these input devices, GTK+
|
@@ -67,16 +67,16 @@
|
|
67
67
|
the window with the keyboard focus.
|
68
68
|
</p>
|
69
69
|
<p>
|
70
|
-
GDK translates these raw windowing system events into <
|
70
|
+
GDK translates these raw windowing system events into <span class="type">GdkEvents</span>.
|
71
71
|
Typical input events are:
|
72
72
|
</p>
|
73
73
|
<table border="0" summary="Simple list" class="simplelist">
|
74
|
-
<tr><td><
|
75
|
-
<tr><td><
|
76
|
-
<tr><td><
|
77
|
-
<tr><td><
|
78
|
-
<tr><td><
|
79
|
-
<tr><td><
|
74
|
+
<tr><td><span class="type">GdkEventButton</span></td></tr>
|
75
|
+
<tr><td><span class="type">GdkEventMotion</span></td></tr>
|
76
|
+
<tr><td><span class="type">GdkEventCrossing</span></td></tr>
|
77
|
+
<tr><td><span class="type">GdkEventKey</span></td></tr>
|
78
|
+
<tr><td><span class="type">GdkEventFocus</span></td></tr>
|
79
|
+
<tr><td><span class="type">GdkEventTouch</span></td></tr>
|
80
80
|
</table>
|
81
81
|
<p>
|
82
82
|
</p>
|
@@ -85,14 +85,14 @@
|
|
85
85
|
grabs (system-wide or in-app) are taking input away:
|
86
86
|
</p>
|
87
87
|
<table border="0" summary="Simple list" class="simplelist">
|
88
|
-
<tr><td><
|
88
|
+
<tr><td><span class="type">GdkEventGrabBroken</span></td></tr>
|
89
89
|
<tr><td><a class="link" href="GtkWidget.html#GtkWidget-grab-notify" title="The “grab-notify” signal"><span class="type">“grab-notify”</span></a></td></tr>
|
90
90
|
</table>
|
91
91
|
<p>
|
92
92
|
</p>
|
93
93
|
<p>
|
94
94
|
When GTK+ is initialized, it sets up an event handler function with
|
95
|
-
<
|
95
|
+
<code class="function">gdk_event_handler_set()</code>, which receives all of these input events
|
96
96
|
(as well as others, for instance window management related events).
|
97
97
|
</p>
|
98
98
|
</div>
|
@@ -100,7 +100,7 @@
|
|
100
100
|
<div class="refsect2">
|
101
101
|
<a name="event-propagation"></a><h3>Event propagation</h3>
|
102
102
|
<p>
|
103
|
-
For widgets which have a <
|
103
|
+
For widgets which have a <span class="type">GdkWindow</span> set, events are received from the
|
104
104
|
windowing system and passed to <a class="link" href="gtk3-General.html#gtk-main-do-event" title="gtk_main_do_event ()"><code class="function">gtk_main_do_event()</code></a>. See its documentation
|
105
105
|
for details of what it does: compression of enter/leave events,
|
106
106
|
identification of the widget receiving the event, pushing the event onto a
|
@@ -108,26 +108,26 @@
|
|
108
108
|
widget.
|
109
109
|
</p>
|
110
110
|
<p>
|
111
|
-
When a GDK backend produces an input event, it is tied to a <
|
112
|
-
a <
|
111
|
+
When a GDK backend produces an input event, it is tied to a <span class="type">GdkDevice</span> and
|
112
|
+
a <span class="type">GdkWindow</span>, which in turn represents a windowing system surface in the
|
113
113
|
backend. If a widget has grabbed the current input device, or all input
|
114
114
|
devices, the event is propagated to that <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>. Otherwise, it is
|
115
115
|
propagated to the the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> which called <a class="link" href="GtkWidget.html#gtk-widget-register-window" title="gtk_widget_register_window ()"><code class="function">gtk_widget_register_window()</code></a>
|
116
|
-
on the <
|
116
|
+
on the <span class="type">GdkWindow</span> receiving the event.
|
117
117
|
</p>
|
118
118
|
<p>
|
119
119
|
Grabs are implemented for each input device, and globally. A grab for a
|
120
120
|
specific input device (<a class="link" href="gtk3-General.html#gtk-device-grab-add" title="gtk_device_grab_add ()"><code class="function">gtk_device_grab_add()</code></a>), is sent events in
|
121
121
|
preference to a global grab (<a class="link" href="gtk3-General.html#gtk-grab-add" title="gtk_grab_add ()"><code class="function">gtk_grab_add()</code></a>). Input grabs only have effect
|
122
122
|
within the <a class="link" href="GtkWindowGroup.html" title="GtkWindowGroup"><span class="type">GtkWindowGroup</span></a> containing the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> which registered the
|
123
|
-
event’s <
|
123
|
+
event’s <span class="type">GdkWindow</span>. If this <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> is a child of the grab widget, the
|
124
124
|
event is propagated to the child — this is the basis for propagating
|
125
125
|
events within modal dialogs.
|
126
126
|
</p>
|
127
127
|
<p>
|
128
128
|
An event is propagated to a widget using <a class="link" href="gtk3-General.html#gtk-propagate-event" title="gtk_propagate_event ()"><code class="function">gtk_propagate_event()</code></a>.
|
129
|
-
Propagation differs between event types: key events (<
|
130
|
-
<
|
129
|
+
Propagation differs between event types: key events (<code class="literal">GDK_KEY_PRESS</code>,
|
130
|
+
<code class="literal">GDK_KEY_RELEASE</code>) are delivered to the top-level <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>; other events
|
131
131
|
are propagated down and up the widget hierarchy in three phases (see
|
132
132
|
<a class="link" href="GtkEventController.html#GtkPropagationPhase" title="enum GtkPropagationPhase"><span class="type">GtkPropagationPhase</span></a>).
|
133
133
|
</p>
|
@@ -173,7 +173,7 @@
|
|
173
173
|
<p>
|
174
174
|
Any time during the propagation phase, a widget may indicate that a
|
175
175
|
received event was consumed and propagation should therefore be stopped.
|
176
|
-
In traditional event handlers, this is hinted by returning <
|
176
|
+
In traditional event handlers, this is hinted by returning <code class="literal">GDK_EVENT_STOP</code>.
|
177
177
|
If gestures are used, this may happen when the widget tells the gesture
|
178
178
|
to claim the event touch sequence (or the pointer events) for its own. See the
|
179
179
|
"gesture states" section below to know more of the latter.
|
@@ -186,21 +186,21 @@
|
|
186
186
|
Each widget instance has a basic event mask and another per input device,
|
187
187
|
which determine the types of input event it receives. Each event mask set
|
188
188
|
on a widget is added to the corresponding (basic or per-device) event mask
|
189
|
-
for the widget’s <
|
189
|
+
for the widget’s <span class="type">GdkWindow</span>, and all child <span class="type">GdkWindows</span>.
|
190
190
|
</p>
|
191
191
|
<p>
|
192
192
|
If a widget is windowless (<a class="link" href="GtkWidget.html#gtk-widget-get-has-window" title="gtk_widget_get_has_window ()"><code class="function">gtk_widget_get_has_window()</code></a> returns <code class="literal">FALSE</code>) and
|
193
193
|
an application wants to receive custom events on it, it must be placed
|
194
194
|
inside a <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> to receive the events, and an appropriate event mask
|
195
|
-
must be set on the box. When implementing a widget, use a <
|
196
|
-
<
|
195
|
+
must be set on the box. When implementing a widget, use a <code class="literal">GDK_INPUT_ONLY</code>
|
196
|
+
<span class="type">GdkWindow</span> to receive the events instead.
|
197
197
|
</p>
|
198
198
|
<p>
|
199
|
-
Filtering events against event masks happens inside <
|
199
|
+
Filtering events against event masks happens inside <span class="type">GdkWindow</span>, which
|
200
200
|
exposes event masks to the windowing system to reduce the number of events
|
201
201
|
GDK receives from it. On receiving an event, it is filtered against the
|
202
|
-
<
|
203
|
-
against the <
|
202
|
+
<span class="type">GdkWindow</span>’s mask for the input device, if set. Otherwise, it is filtered
|
203
|
+
against the <span class="type">GdkWindow</span>’s basic event mask.
|
204
204
|
</p>
|
205
205
|
<p>
|
206
206
|
This means that widgets must add to the event mask for each event type
|
@@ -208,7 +208,7 @@
|
|
208
208
|
<a class="link" href="GtkWidget.html#gtk-widget-add-events" title="gtk_widget_add_events ()"><code class="function">gtk_widget_add_events()</code></a> to preserve the existing mask. Widgets which are
|
209
209
|
aware of floating devices should use <a class="link" href="GtkWidget.html#gtk-widget-set-device-events" title="gtk_widget_set_device_events ()"><code class="function">gtk_widget_set_device_events()</code></a> or
|
210
210
|
<a class="link" href="GtkWidget.html#gtk-widget-add-device-events" title="gtk_widget_add_device_events ()"><code class="function">gtk_widget_add_device_events()</code></a>, and must explicitly enable the device
|
211
|
-
using <a class="link" href="GtkWidget.html#gtk-widget-set-device-enabled" title="gtk_widget_set_device_enabled ()"><code class="function">gtk_widget_set_device_enabled()</code></a>. See the <
|
211
|
+
using <a class="link" href="GtkWidget.html#gtk-widget-set-device-enabled" title="gtk_widget_set_device_enabled ()"><code class="function">gtk_widget_set_device_enabled()</code></a>. See the <span class="type">GdkDeviceManager</span>
|
212
212
|
documentation for more information.
|
213
213
|
</p>
|
214
214
|
<p>
|
@@ -221,23 +221,23 @@
|
|
221
221
|
<div class="refsect2">
|
222
222
|
<a name="id-1.2.7.3.6"></a><h3>Touch events</h3>
|
223
223
|
<p>
|
224
|
-
Touch events are emitted as events of type <
|
225
|
-
<
|
224
|
+
Touch events are emitted as events of type <code class="literal">GDK_TOUCH_BEGIN</code>, <code class="literal">GDK_TOUCH_UPDATE</code> or
|
225
|
+
<code class="literal">GDK_TOUCH_END</code>, those events contain an “event sequence” that univocally identifies
|
226
226
|
the physical touch until it is lifted from the device.
|
227
227
|
</p>
|
228
228
|
<p>
|
229
229
|
On some windowing platforms, multitouch devices perform pointer emulation, this works
|
230
230
|
by granting a “pointer emulating” hint to one of the currently interacting touch
|
231
|
-
sequences, which will be reported on every <
|
232
|
-
default, if a widget didn't request touch events by setting <
|
231
|
+
sequences, which will be reported on every <span class="type">GdkEventTouch</span> event from that sequence. By
|
232
|
+
default, if a widget didn't request touch events by setting <code class="literal">GDK_TOUCH_MASK</code> on its
|
233
233
|
event mask and didn't override <a class="link" href="GtkWidget.html#GtkWidget-touch-event" title="The “touch-event” signal"><span class="type">“touch-event”</span></a>, GTK+ will transform these
|
234
|
-
“pointer emulating” events into semantically similar <
|
235
|
-
events. Depending on <
|
234
|
+
“pointer emulating” events into semantically similar <span class="type">GdkEventButton</span> and <span class="type">GdkEventMotion</span>
|
235
|
+
events. Depending on <code class="literal">GDK_TOUCH_MASK</code> being in the event mask or not, non-pointer-emulating
|
236
236
|
sequences could still trigger gestures or just get filtered out, regardless of the widget
|
237
237
|
not handling those directly.
|
238
238
|
</p>
|
239
239
|
<p>
|
240
|
-
If the widget sets <
|
240
|
+
If the widget sets <code class="literal">GDK_TOUCH_MASK</code> on its event mask and doesn't chain up on
|
241
241
|
<a class="link" href="GtkWidget.html#GtkWidget-touch-event" title="The “touch-event” signal"><span class="type">“touch-event”</span></a>, only touch events will be received, and no pointer emulation
|
242
242
|
will be performed.
|
243
243
|
</p>
|
@@ -251,8 +251,8 @@
|
|
251
251
|
happen on user interaction, when a <span class="type">GdkEventButtonPress</span> happens, all events from
|
252
252
|
then on, until after the corresponding <span class="type">GdkEventButtonRelease</span>, will be reported
|
253
253
|
to the widget that got the first event. Likewise, on touch events, every
|
254
|
-
<
|
255
|
-
<
|
254
|
+
<span class="type">GdkEventSequence</span> will deliver only events to the widget that received its
|
255
|
+
<code class="literal">GDK_TOUCH_BEGIN</code> event.
|
256
256
|
</p>
|
257
257
|
<p>
|
258
258
|
Explicit grabs happen programatically (both activation and deactivation),
|
@@ -268,7 +268,7 @@
|
|
268
268
|
This makes it necessary for widgets to handle the cancellation of any ongoing
|
269
269
|
interaction. Depending on whether a GTK or GDK grab is causing this, the
|
270
270
|
widget will respectively receive a <a class="link" href="GtkWidget.html#GtkWidget-grab-notify" title="The “grab-notify” signal"><span class="type">“grab-notify”</span></a> signal, or a
|
271
|
-
<
|
271
|
+
<span class="type">GdkEventGrabBroken</span> event.
|
272
272
|
</p>
|
273
273
|
<p>
|
274
274
|
On gestures, these signals are handled automatically, causing the gesture
|
@@ -284,7 +284,7 @@
|
|
284
284
|
<a name="event-controllers-and-gestures"></a><h3>Event controllers and gestures</h3>
|
285
285
|
<p>
|
286
286
|
Event controllers are standalone objects that can perform specific actions
|
287
|
-
upon received <
|
287
|
+
upon received <span class="type">GdkEvents</span>. These are tied to a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>, and can be told of
|
288
288
|
the event propagation phase at which they will manage the events.
|
289
289
|
</p>
|
290
290
|
<p>
|
@@ -338,7 +338,7 @@
|
|
338
338
|
Alternatively, or at a later point in time, the widget may choose to deny the touch
|
339
339
|
sequences, thus letting those go through again in event propagation. When this happens
|
340
340
|
in the capture phase, and if there are no other claiming gestures in the widget,
|
341
|
-
a <
|
341
|
+
a <code class="literal">GDK_TOUCH_BEGIN</code>/<code class="literal">GDK_BUTTON_PRESS</code> event will be emulated and
|
342
342
|
propagated downwards, in order to preserve consistency.
|
343
343
|
</p>
|
344
344
|
<p>
|