Compare commits

..

77 Commits

Author SHA1 Message Date
Matthias Clasen
234fec14f3 3.12.2 2014-05-12 08:53:17 -04:00
Matthias Clasen
c6c2408a8d GtkIconFactory: Remove outdated information from the docs
The stock browser was removed from gtk3-demo.
2014-05-12 07:54:24 -04:00
Matthias Clasen
67b2f0c9b4 Bloatpad: port to new accel api 2014-05-12 07:41:50 -04:00
Matthias Clasen
e8cccbb55c a11y: Avoid a warning
The listbox row accessible code was giving warnings when
parent is NULL, at destruction time.
2014-05-12 07:41:33 -04:00
Benjamin Otte
492b732872 applicationwindow: Properly unmap the menubar widget 2014-05-12 07:41:03 -04:00
Matthias Clasen
392c9a46ad GtkApplication: Clarify docs a bit
Explicitly mention how gtk_application_set_accels_for_action can
be used to remove all accelerators for an action.

https://bugzilla.gnome.org/show_bug.cgi?id=729451
2014-05-12 07:40:44 -04:00
Matthias Clasen
58a740b29a GtkSearchBar: fix the template
There was a mismatch between GtkSearchBar being derived from GtkBin
and the template claiming the parent to be GtkBox.
2014-05-12 07:39:04 -04:00
Matthias Clasen
a1a6ef613e Raleigh: fix a typo 2014-05-12 07:37:34 -04:00
Matthias Clasen
123b424fb7 Add Adwaita to the list of default icon themes
Hardcode the fallback to Adwaita. I'm leaving gnome in here for
now, since we're in the middle of the transition. It will be
removed before 3.14.
2014-05-12 07:36:42 -04:00
Antoine Jacoutot
d3c096e0cc broadway backend: allow building on OpenBSD
On OpenBSD shm_open(3) is part of libc and there is not librt, so add an
according check.
Check if we have posix_fallocate before using it.

https://bugzilla.gnome.org/show_bug.cgi?id=728272
2014-05-12 07:30:22 -04:00
Matthias Clasen
da55db257c example: Update screenshots 2014-05-12 07:30:09 -04:00
Matthias Clasen
27387a0944 example: Use popover for gears menu 2014-05-12 07:30:03 -04:00
Matthias Clasen
274a8d3774 example: Make gears button square
Another application of image-button.
2014-05-12 07:29:55 -04:00
Matthias Clasen
ce1938651a example: Make search button square
The image-button style class takes care of it.
2014-05-12 07:29:49 -04:00
Matthias Clasen
063aa29f4b example: Modernize the prefs dialog
We should show the current best practice for this kind of
dialog, and use a headerbar with a window close button.
2014-05-12 07:29:42 -04:00
Matthias Clasen
c80892c3f2 example: Port to gtk_application_set_accels_for_action
Instead of hardcoding an accelerator in the ui file, use
gtk_application_set_accels_for_action.
2014-05-12 07:29:33 -04:00
Matthias Clasen
2a0167f82c example: Fix indentation 2014-05-12 07:29:24 -04:00
Matthias Clasen
9d44ec92e5 example: Fix up margins
This makes the code match what we show in the screenshots. This
broke when headerbars were changed to allow titles to extend into
the margin.
2014-05-12 07:27:15 -04:00
Matthias Clasen
1cb15abce9 example: Don't set a nonexisting property
The GtkHeaderBar::show-fallback-app-menu property does not exist,
and isn't needed anyway.
2014-05-12 07:27:08 -04:00
Marcus Karlsson
eb67f0208b GtkColorChooserWidget: Redraw swatches when selection changes
When selecting a swatch in a GtkColorChooserWidget the previously
selected swatch and the currently selected swatch are not redrawn. This
can leave the old swatch still marked with a checkbox even though a new
swatch has been selected.

Redraw the swatches after changing the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=727487
2014-05-12 07:18:56 -04:00
Marcus Karlsson
45e65f2d49 docs: Add missing transfer annotation to GtkBox
The gtk_box_get_center_widget function is missing a transfer annotation
for the returned widget. No transfer is done, so set transfer to none.

https://bugzilla.gnome.org/show_bug.cgi?id=728093
2014-05-12 07:16:49 -04:00
Matthias Clasen
605a8fc158 gtk-demo: Fix images demo
The incremental loading was broken by GtkIconHelper - queuing a
redraw is no longer sufficient to cause GtkImage to redraw with
the new pixbuf contents.
Pointed out by Jasper St. Pierre.
2014-05-12 07:16:35 -04:00
Matthias Clasen
c435ca8913 gtk-demo: Fix the links example
The keynav dialog is transient to the example window; since the
example window is now modal, we need to make the keynav dialog
modal as well, so it can receive input.
Problem pointed out by Jasper St. Pierre.
2014-05-12 07:16:29 -04:00
Jiro Matsuzawa
26a1a824eb l10n: Update Japanese translation 2014-05-12 08:32:56 +09:00
David Mansfield
7451b48708 GdkCursor: Don't leak a cairo surface
The function gdk_cursor_new_from_pixbuf creates a cairo surface
to pass to its backend implementation, but doesn't destroy it
afterwards.
https://bugzilla.gnome.org/show_bug.cgi?id=729670
2014-05-07 19:38:47 -04:00
Ihar Hrachyshka
5b651d0dae Updated Belarusian translation 2014-05-04 22:05:50 +00:00
Paolo Borelli
7ff1142ee9 listbox: check gsequence end iter in get_row_at_index 2014-05-04 19:59:16 +02:00
Руслан Ижбулатов
affd7c1d9d W32: Add a theme for .app-notification
This is copied from Adwaita. Looks sufficiently ok.

https://bugzilla.gnome.org/show_bug.cgi?id=729346
2014-05-01 17:56:33 +00:00
Piotr Drąg
3a0b78fd98 Updated POTFILES.skip 2014-04-30 22:14:24 +02:00
Benjamin Otte
5eb6f4d2ab reftests: Add test for latest commit
Check that the label gets linebroken properly.
2014-04-29 19:48:35 +02:00
Benjamin Otte
35aec354d7 window: Subtract shadow from passed in width for height
... and height for width in size requests. Fixes mislayout in
control-center universal access panel.
2014-04-29 19:48:29 +02:00
Alexander Larsson
281ca4905a treeview: Fix prelight redraw when adjustment changes
When the adjustment changes (due to e.g. a mouse wheel scroll) we update
the prelight. The part that un-prelights the previous prelight was
broken by the the pixel cache, as it called update_prelight in the
middle of the scrolling operation, where the windows were moved
but the tree_view->priv->dy was not changed to the new value. This
caused the updates to the pixel cache to go to the wrong place.

We fix this by fully doing the scroll before we update_prelight().

https://bugzilla.gnome.org/show_bug.cgi?id=728284
2014-04-29 09:36:00 +02:00
Juan Pablo Ugarte
e9ba546203 GtkRecentChooserMenu: Set current uri before activating an item.
When activating an item using mnemonics GtkRecentChooserMenu does not select a
item before calling the item-activated signal thus
gtk_recent_chooser_get_current_uri() always return the last selected item
instead of the activated one.

Fixes Bug 495105 "Open recent file keyboard shortcuts do not work correctly"
2014-04-28 17:19:08 -03:00
Matej Urbančič
40926214c7 Updated Slovenian translation 2014-04-28 21:10:48 +02:00
Matej Urbančič
69b8aa8fcf Updated Slovenian translation 2014-04-28 21:07:27 +02:00
Руслан Ижбулатов
b99b0257c9 W32: Update the css to match the .modelbutton->.button.menuitem transition 2014-04-28 16:04:02 +00:00
Matthias Clasen
ee9454ce55 Rename the modelbutton style class
This is not a great name to use in themes; instead, add the
menuitem class, so themes can use .button.menuitem for styles
that are specific to menuitem-like buttons.
2014-04-27 18:51:03 -04:00
Juan Pablo Ugarte
539f18f998 Fixed crash in GtkLockButton if a button with permission set to NULL is clicked.
https://bugzilla.gnome.org/show_bug.cgi?id=728992
2014-04-25 22:20:39 -04:00
Matthias Clasen
01dac000a6 GtkWindow: Avoid a critical in F10 handling
The focus widget might be NULL, and we were forgetting to take
that possibility into account in one place.
2014-04-25 22:20:31 -04:00
Antoine Jacoutot
c478e31448 openbsd: properly set len for gtkmountoperation-x11
sysctl(3) is the correct way to get the lenght for len in this case.
Also drop unused headers and change style to match the rest of the file.
2014-04-25 22:20:10 -04:00
Marc-André Lureau
313714c1e1 gdk/win32: VK_SNAPSHOT maps to GDK_Print
Also, I am not sure the above VK_PRINT -> GDK_Print mapping is
correct, but it doesn't hurt yet.

https://bugzilla.gnome.org/show_bug.cgi?id=686170
2014-04-25 22:19:58 -04:00
Marc-André Lureau
208b9f0bbe win32: add more clipboard data checks to avoid crash
It may happen that the received clipboard data is empty, but
if it's of type image/bmp, gtk+ will crash:

gdk_property_change: 00030AD4 GDK_SELECTION image/bmp REPLACE 8*0 bits:
... delayed rendering
gdk_selection_send_notify_for_display: 00030AD4 CLIPBOARD image/bmp
GDK_SELECTION (no-op)
_gdk_win32_selection_convert_to_dib: 1252003C image/bmp

Program received signal SIGSEGV, Segmentation fault.
0x749a9f40 in msvcrt!memmove () from C:\Windows\syswow64\msvcrt.dll

Thread 1 (Thread 2248.0x1b34):
target=0xc07b) at gdkselection-win32.c:1292
at gdkevents-win32.c:3498
wparam=8, lparam=0) at gdkevents-win32.c:232
message=773, wparam=8, lparam=0)
    at gdkevents-win32.c:263
C:\Windows\syswow64\user32.dll
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll
wparam=0, lparam=-1687549457)
    at gdkevents-win32.c:248
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll

https://bugzilla.gnome.org/show_bug.cgi?id=728745
2014-04-25 22:19:49 -04:00
Matthias Clasen
fc34b4a2e3 DND: go back to a timeout for cancel animation
Using a tick callback does not really make sense here, since we
are not drawing in a window, but moving a toplevel around.
https://bugzilla.gnome.org/show_bug.cgi?id=728183
2014-04-25 22:19:26 -04:00
Jasper St. Pierre
3b0f7eb23e gtk-demo: Make sure to clear the timeout when we stop it 2014-04-25 22:18:52 -04:00
Matthias Clasen
4ccc2494b3 csd: Fix drag hightlight drawing
When making the entire window a drop target, as file-roller does,
we don't want to draw the drag highlight around the CSD window
decorations.
https://bugzilla.gnome.org/show_bug.cgi?id=728526
2014-04-25 22:17:53 -04:00
Руслан Ижбулатов
cb727c88dc W32: Add modelbutton styles
According to what i've been told, modelbuttons are supposed to look
flat, like menu items.

This is basically an improved copy of the menuitem styles.

https://bugzilla.gnome.org/show_bug.cgi?id=728810
2014-04-24 03:46:29 +00:00
Руслан Ижбулатов
f9375b1f6f W32: Add a set of "focused" styles to checkmarks
This prevents checkmarks in modelbuttons from being styled as buttons
(apparently, modelbuttons apply "focused" to their children, unlike
normal buttons).

https://bugzilla.gnome.org/show_bug.cgi?id=728808
2014-04-24 03:46:29 +00:00
Руслан Ижбулатов
a5ac6bb48a W32: Fix dummy prelight style for check/radio buttons
Use a dummy transparent gradient instead of actual color (which screws up
focus rectangle on prelight), and apply to non-prelight state as well.

https://bugzilla.gnome.org/show_bug.cgi?id=728807
2014-04-24 03:46:28 +00:00
Руслан Ижбулатов
fff108dd0a W32: remove the blue "selected" rectangle when activating a checkbutton
https://bugzilla.gnome.org/show_bug.cgi?id=728806
2014-04-24 03:46:28 +00:00
Matthias Clasen
37799e1b97 GtkScaleButton: Don't specify a icon size of zero
This only works for scalable icons, but breaks if we fall
back to pngs.
2014-04-22 18:34:35 -04:00
Matthias Clasen
f8aab7f341 Add a style class to model buttons
This will let us stop using the class name in Adwaita, and will
help with some future additions.
2014-04-22 11:10:38 -04:00
Dirgita
7a2f347678 Updated Indonesian translation 2014-04-22 14:31:34 +00:00
Volker Sobek
8fc1a1e52a docs: Fix parameter names for two functions
Don't use two different parameter names.
2014-04-21 23:18:39 +02:00
Yuri Myasoedov
0263a9712a Fixed Russian translation 2014-04-20 15:19:10 +04:00
Christian Kirbach
8da7f6861e Updated German translation 2014-04-19 12:01:04 +00:00
Bastien Nocera
391573ad2c gtkapplication: Fix incorrect value passed to g_variant_new()
The code expected to format @u, not u.

https://bugzilla.gnome.org/show_bug.cgi?id=728140
2014-04-18 10:44:52 +02:00
Руслан Ижбулатов
6015befd96 W32: correctly guess max window size from the size of the workarea of the screen it's on
Get monitor on which the most of the window is located (nearest monitor if
window is not on screen), get its work area (area not occupied by taskbar or
any other bars) and use that for maxsize.

Previous default of 30000 meant that windows maximized onto full screen,
even covering the area where taskbar is.

https://bugzilla.gnome.org/show_bug.cgi?id=726592
2014-04-16 22:44:15 +00:00
Daniel Mustieles
bf742b1e67 Updated Spanish translation 2014-04-15 14:27:22 +02:00
Daniel Mustieles
4823516339 Updated Spanish translation 2014-04-15 14:27:09 +02:00
Dirgita
03dd609544 Updated Indonesian translation 2014-04-15 06:56:20 +00:00
Matthias Clasen
074ce8958d 3.12.1 2014-04-12 08:20:01 -07:00
Matthias Clasen
0b911c3f41 Update expected output of messagedialog a11y test 2014-04-12 08:20:00 -07:00
Matthias Clasen
edcea7e60b window: Be more careful when propagating key events
We are keeping references on the widget we are handling as we
are iterating up, but that doesn't protect us against the entire
tree being axed from inside gtk_widget_handle_event.
https://bugzilla.gnome.org/show_bug.cgi?id=727644
2014-04-11 22:04:53 -07:00
Cosimo Cecchi
0ffc8a1eec entry: consider ascent and descent when requesting height
Commit d05191a010 change the height
requisition to be completely dependent on the PangoLayout, but that
breaks when the font has special characters with different metrics.
Use the maximum between the two instead.

https://bugzilla.gnome.org/show_bug.cgi?id=728054
2014-04-11 19:06:38 -07:00
Bastien Nocera
51aeb39bb0 gtkapplication: Fix passing NULL as the window to inhibit
gtk_application_inhibit() supports passing NULL, so don't
blindly pass the NULL window to
gtk_application_impl_dbus_get_window_system_id().

https://bugzilla.gnome.org/show_bug.cgi?id=728023
2014-04-11 18:52:09 -07:00
Matthias Clasen
750d7a2fe9 Update expected output for assistant a11y test
The headerbar and its content now shows up, as it should.
2014-04-10 15:54:48 -07:00
Matthias Clasen
365819be8e GtkAssistant: don't hide headerbar from a11y
GtkAssistant has its own accessible implementation, and we forgot
to update it when we added a headerbar.
2014-04-10 14:22:46 -07:00
Matthias Clasen
7d2f3530e8 GtkMessageDialog: Allow action-area-border theming again
This border does not interfere with headerbar-vs-content placement,
and we can allow themes to change it without breaking dialogs.
2014-04-10 13:57:48 -07:00
Matthias Clasen
1f1cd64028 GtkDialog: fix up handling of style properties
The use of border-width-set here was an attempt to differentiate
between explicitly set (from code / ui files) border width from
theme changes. But when we are calling gtk_window_set_border_width
to apply the theme value, the -set property gets set, and all
further theme changes are ignored. This has the effect of only
letting the default value of these properties get applied.

Fix this by unsetting border-width-set after applying theme values.
2014-04-10 13:57:47 -07:00
Руслан Ижбулатов
e41999cf98 W32: remove border on default buttons
https://bugzilla.gnome.org/show_bug.cgi?id=727973
2014-04-10 18:09:17 +00:00
Benjamin Otte
714c38c8b1 textview: Call map/unmap functions on pixel cache
https://bugzilla.gnome.org/show_bug.cgi?id=726475
2014-04-10 01:57:43 +02:00
Benjamin Otte
06010eead1 treeview: Call map/unmap functions on pixel cache
https://bugzilla.gnome.org/show_bug.cgi?id=726475
2014-04-10 01:57:43 +02:00
Benjamin Otte
0ede4d53cf viewport: Call map/unmap functions on pixel cache
https://bugzilla.gnome.org/show_bug.cgi?id=726475
2014-04-10 01:57:43 +02:00
Benjamin Otte
23dfc25583 pixelcache: Add map/unmap functions
Because GTK does not invalidate windows that aren't mapped, we cannot
update the pixel cache when the window it handles isn't mapped. So we
add API to call when GDK windows get mapped/unmapped.

https://bugzilla.gnome.org/show_bug.cgi?id=726475
2014-04-10 01:57:43 +02:00
Benjamin Otte
651f1c566a pixelcache: Split out a function
https://bugzilla.gnome.org/show_bug.cgi?id=726475
2014-04-10 01:57:36 +02:00
Chun-wei Fan
b7d55bfe14 Visual C++ Builds: Fix Header Installation
Make sure that gtk/a11y/gtkpopoveraccessible.h is copied, so that programs
using GTK+'s a11y will compile correctly.
2014-04-09 14:03:45 +08:00
Yuri Myasoedov
85ba100f23 Fixed Russian translation 2014-04-09 00:22:57 +04:00
801 changed files with 25895 additions and 65540 deletions

View File

@@ -1,7 +1,7 @@
## Makefile.am for GTK+
include $(top_srcdir)/Makefile.decl
SRC_SUBDIRS = util gdk gtk libgail-util modules demos tests testsuite examples
SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

203
NEWS
View File

@@ -1,164 +1,50 @@
Overview of Changes in GTK+ 3.13.1 to 3.13.2
Overview of Changes in GTK+ 3.12.1 to 3.12.2
============================================
* Interactive debugging support. The GtkInspector
window can be triggered with the Ctrl-Shift-I
or Ctrl-Shift-D keyboard shortcuts, or via the
GTK_DEBUG environment variable.
* Gesture support has landed. New classes include
GtkGestureLongPress, GtkGestureMultiPress, GtkGestureSwipe,
GtkGesturePan, GtkGestureRotate, GtkGestureZoom. Many GTK+
widgets already use gestures internally. Gestures also
show up in GtkInspector.
The gesture-related APIs are still subject to change.
* GTK+ widgets can now draw outside their allocation,
by setting a clip with gtk_widget_set_clip().
The clip-related APIs are still subject to change.
* GtkStack has added a few more transition types
* GtkProgressBar is now narrower
* CSS
- Support outline-radius in CSS
- Implement 'unset' and 'all'
- Support -gtk-icontheme
- Support -gtk-icon-source
- Add -gtk-icon-transform, supporting the 2D
parts of CSS transforms
- Support -gtk-icon-style
* Theme
- Use outlines to render focus rings
- Use icons to render spinners, expanders and arrows
- GtkIconTheme can force symbolic or regular
icon variants
- GtkIconTheme will automatically load rtl
icon variants
* Win32:
- Theme improvements
* Wayland:
- Update to the latest xdg-shell protocol
* Deprecations:
GdkColor
GtkMisc
GtkArrow
focus-line-width style property
GtkNumerableIcon
GtkButton::x/yalign
gtk_widget_reparent
gtk_widget_region_intersect
gtk_container_set_reallocate_redraws
* Bugs fixed:
525206 Remove superfluous non-NULL tests for the GtkScrolledWindow scrollbars
614717 gtk_text_buffer_create_tag fails to return error on duplicate tag
636695 GdkColor should be deprecated
645966 gtk-demo leaks a GtkSizeGroup
698396 GtkTreeStore crashes when reordering 0 elements
708037 Allow live updates on widgets implementing GtkColorChooser
720330 Gtk-CRITICAL **: gtk_entry_completion_set_model: assertion 'GTK_IS_E...
721069 gtk_win32_embed_widget_show infinite recursion
726676 More GtkStack transition counterparts of OVER_UP_DOWN
727147 Search bar is too narrow
727994 Gtk Popover closes on click
728135 gtk_widget_set_visible's nothing-changed-check
728284 [treeview] Graphics artifact when scrolling with hover-selection
* Bug fixes:
495105 Open recent file keyboard shortcuts do not work correctly
686170 gdk/win32: VK_SNAPSHOT maps to GDK_Print
726592 W32: problems with CSDed windows
727487 Color picker check marks not cleared properly
728093 Add missing transfer annotation to gtk_box_get_center_widget
728140 Illegal parameter passed to g_variant_new in gtk_application...
728183 Drag and drop (GdkFrameClock) does not work for hidden widgets
728272 make broadway backend build on OpenBSD
728284 Graphics artifact when scrolling with hover-selection
728526 weird black border appear when dragging file
728745 win32: add more clipboard data checks to avoid crash
728806 W32: Check- and radio-buttons have a selection rectangle on ac...
728807 W32: Checkbutton focus rectangle becomes almost white on prelight
728808 W32: Checkboxes on modelbuttons are drawn like buttons themselves
728810 W32: Modelbuttons look like buttons
728992 GtkLockButton crash if clicked and permission is NULL
729346 W32: App-notification has no theme, shows up transparent
729353 W32: horizontal-buttons get "selected" background when focused
729451 Removing accels with application_set_accels_for_action
729461 Introspection issue with GtkApplication
729473 FileChooser: typos in gtk_file_chooser_set_local_only ()
729475 FileChooser: typo in gtk_set_create_folders()
729496 Crash with latest gtk+ from master in gtk_combo_box_get_preferred_width
729564 Deprecate GtkArrow
729594 Don't stretch switches in Widget Factory
729598 Populate page 2 of the Widget Factory
729607 GtkAboutDialog: gtk aborts when trying to show an about dialog
729670 cairo surface leaked for each cursor created from pixmap
729817 GtkCellLayout: allow finding attributes at runtime
729834 gdk: missing (nullable) annotations on return values
729915 Popopver does not follow relative widget to find action groups
729983 gdk: assorted introspection and documentation syntax fixes
730007 GtkInspector: add a setting to disable C-S-i
730008 make gtk_set_interactive_debugging available for apps
730035 GtkFileFilter contains refs to GtkRecentFilter which are probably typos
730043 Add an alternative to Ctrl-Shift-I
730095 Add a private call API to export internals to modules
730142 placessidebar: use proper canonicalization when checking if home
730183 RFC: silence harmless critical
730306 Gtk+ >= 3.0 fails to load modules from settings.ini files
730526 Fix the edit-clear icons in RTL
730353 Horizontal and vertical scrolling
700030 GdkEventSequence not accessible from introspected bindings
641836 Capture/bubble event handling
119906 Add event when Double Click timeout expires
729670 cairo surface leaked for each cursor created from pixmap
* Translation updates:
Belarusian
Hebrew
German
Indonesian
Japanese
Russian
Spanish
Slovenian
Spanish
Overview of Changes in GTK+ 3.12.0 to 3.13.1
Overview of Changes in GTK+ 3.12.0 to 3.12.1
============================================
* GtkListBox can now do multi-selection
* GtkSwitch has a way to delay state changes
* GtkMenuButton is using a popover for menu models by default
* GtkPopover can have horizontal sections
* GtkFileChooser received some design improvements
* GtkBuilder
- Supports property binding
- Supports dialog actions
* Client-side decorations
- The requirement for _GTK_FRAME_EXTENTS has been dropped
to avoid 'double headers' with most window managers
- Drawing of DND highlights around the entire window works
* Windows backend:
- *Many* theme improvements
- Add popover theming
- Enable introspection
* Wayland backend
- Updates for xdg_shell protocol changes
- Touch support
* Broadway backend
- Now builds on OpenBSD
* Bugs fixed:
495105 Open recent file keyboard shortcuts do not work correctly
654417 Add <binding> element to GtkBuilder syntax
686170 gdk/win32: VK_SNAPSHOT maps to GDK_Print
* Bug fixes:
712752 GtkClipboard: add _get_default and _get_primary
722058 GtkTreeModelFilter bug
722211 improve the file chooser design
722817 Add gobject-introspection for GdkWin32
723963 Use popover for the fallback app menu in the headerbar
725648 Switches should always indicate the current state
726179 Trivial Fix: size-allocate signal has missing documentation
726271 Items not highlighted while mouse-hovered
726298 gtk-font-name isn't correctly handled on Windows
726475 After looking at Aisleriot solitare, I get rendering glitches...
726592 W32: problems with CSDed windows
726475 After looking at Asielriot solitare, I get rendering glitches...
726859 Assertion/crash if gtk_radio_menu_item_set_group() is called twice
726870 all: Name more idles and timeouts
726871 treeview: Lower the duration of validation iterations
726996 Label-for/Labelled-by AtkRelations missing for containers in t...
726996 Label-for/Labelled-by AtkRelations missing for containers in ...
727009 redefinition of GtkPrinterCloudprint: cloudprint fails to build
727022 W32: Both inc- and dec-buttons on GtkSpinbutton are "inc"
727035 W32: Combobox button is drawn with two arrows
@@ -170,47 +56,24 @@ Overview of Changes in GTK+ 3.12.0 to 3.13.1
727210 W32: Prelight doesn't apply to check/radio marks
727211 W32: Selection background color applies to check/radio marks
727213 W32: Notebook widget is not styled correctly
727244 W32: Items selected in listbox have correct background color, ...
727244 W32: Items selected in listbox have correct background color,...
727245 W32: No .dim-label style
727313 a11y: do not use deprecated a11y functions.
727322 docs: Remove '\' escape character from literals
727391 W32: scrollbar sliders have no "active" and "insensitive" styles
727410 W32: tooltips are not themed
727414 Redundant text in titlebar
727487 Color picker check marks not cleared properly
727643 Segfault in gtk-3.12.0
727644 SEGV in gtk_window_propagate_key_event()
727662 GtkVolumeButton displays "missing image" icons
727908 Various GtkTextView improvements (doc, unit tests)
727973 W32: focused button is visibly smaller
727662 [PATCH] GtkVolumeButton displays "missing image" icons
727973 W32: focused button is visibly smaller
728023 Warning when passing NULL window to inhibit
728054 entry: consider ascent and descent when requesting height
728073 Allow defining an invisible resize area for GtkPaned's handle
728140 Illegal parameter passed to g_variant_new in gtk_application_im...
728165 gtk_target_list_new argument should be (allow-none)
728183 Drag and drop (GdkFrameClock) does not work for hidden widgets
728272 make broadway backend build on OpenBSD
728426 Implement the wl_touch interface
728745 win32: add more clipboard data checks to avoid crash
728806 W32: Check- and radio-buttons have a selection rectangle on act...
728807 W32: Checkbutton focus rectangle becomes almost white on prelight
728808 W32: Checkboxes on modelbuttons are drawn like buttons themselves
728810 W32: Modelbuttons look like buttons
728846 GtkDialog: Support adding action widgets in ui files
728992 GtkLockButton crash if clicked and permission is NULL
729013 Use OUTPUT_SCALE instead of xft-dpi on wayland
729095 redraw problems when resizing popovers
729097 size allocation problem in popovers
727644 SEGV in gtk_window_propagate_key_event()
* Translation updates:
Basque
Catalan
German
Greek
Hebrew
Russian
Slovenian
Overview of Changes in GTK+ 3.11.9 to 3.12.0
============================================

View File

@@ -14,7 +14,7 @@ def gen_gdk_filelist(srcroot, subdir, dest):
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
vars = {},
conds = {},
filters = ['gdk_h_sources', 'gdk_c_sources'])
filters = ['gdk_public_h_sources', 'gdk_c_sources'])
vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
@@ -49,7 +49,6 @@ def gen_gtk_filelist(srcroot, subdir, dest):
'USE_X11': False,
'USE_EXTERNAL_ICON_CACHE': False},
filters = ['gtkinclude_HEADERS',
'a11yinclude_HEADERS',
'deprecatedinclude_HEADERS',
'gtk_base_c_sources',
'gtk_clipboard_dnd_c_sources'])
@@ -57,7 +56,6 @@ def gen_gtk_filelist(srcroot, subdir, dest):
vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
files = vars['gtkinclude_HEADERS'].split() + \
vars['a11yinclude_HEADERS'].split() + \
vars['deprecatedinclude_HEADERS'].split() + \
vars['gtk_base_c_sources'].split() + \
vars['gtk_clipboard_dnd_c_sources'].split() + \

View File

@@ -18,10 +18,10 @@ EXTRA_DIST += \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
gtk3-demo-application.vcxproj.filters \
gtk-inspector.vcxproj \
gtk-inspector.vcxprojin \
gtk-inspector.vcxproj.filters \
gtk-inspector.vcxproj.filtersin \
gtka11y.vcxproj \
gtka11y.vcxproj.filters \
gtka11y.vcxprojin \
gtka11y.vcxproj.filtersin \
gailutil.vcxproj \
gailutil.vcxproj.filters \
install.vcxproj \

View File

@@ -10,7 +10,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "broadwayd", "broadwayd.vcxp
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-inspector", "gtk-inspector.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtka11y", "gtka11y.vcxproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
EndProject
@@ -106,22 +106,22 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.ActiveCfg = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.Build.0 = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.ActiveCfg = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.Build.0 = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.Build.0 = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.Build.0 = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|x64.ActiveCfg = Debug|x64

View File

@@ -4,10 +4,6 @@
<Import Project="gtk-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<InstalledDlls>$(BinDir)\$(GtkDllPrefix)gdk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gtk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gailutil(GtkDllSuffix).dll</InstalledDlls>
<InstalledBins>$(BinDir)\gtk3-demo.exe;$(BinDir)\gtk3-demo-application.exe</InstalledBins>
<InstalledBroadwayBins>$(BinDir)\broadwayd.exe</InstalledBroadwayBins>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
@@ -19,22 +15,22 @@ if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
copy $(BinDir)\*.dll $(CopyDir)\bin
copy $(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
copy $(BinDir)\*-$(ApiVersion).lib $(CopyDir)\lib
copy $(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
copy $(BinDir)\*.exe $(CopyDir)\bin
copy $(Configuration)\$(Platform)\bin\*.exe $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
copy $(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin
copy $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin
copy $(BinDir)\gdk-$(ApiVersion).lib $(CopyDir)\lib
copy $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib
copy $(BinDir)\broadwayd.exe $(CopyDir)\bin
copy $(Configuration)\$(Platform)\bin\broadwayd.exe $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
@@ -68,8 +64,6 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
@@ -160,8 +154,6 @@ copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy ..\..\..\gdk\deprecated\gdkcolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
@@ -284,6 +276,8 @@ copy ..\..\..\gtk\gtkactionbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -296,6 +290,8 @@ copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -394,8 +390,6 @@ copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkeventcontroller.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -422,24 +416,6 @@ copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gt
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesture.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturedrag.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturelongpress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturemultipress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturepan.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturerotate.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturesingle.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgestureswipe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturezoom.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkheaderbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -494,12 +470,16 @@ copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -674,8 +654,6 @@ copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -688,10 +666,6 @@ copy ..\..\..\gtk\deprecated\gtkaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gt
copy ..\..\..\gtk\deprecated\gtkactiongroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
@@ -720,10 +694,6 @@ copy ..\..\..\gtk\deprecated\gtkiconfactory.h $(CopyDir)\include\gtk-$(ApiVersio
copy ..\..\..\gtk\deprecated\gtkimagemenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkradioaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
@@ -802,8 +772,6 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
@@ -830,18 +798,6 @@ copy ..\..\..\gdk\broadway\gdkbroadwayvisual.h $(CopyDir)\include\gtk-$(ApiVersi
<_PropertySheetDisplayName>gtkinstallsprops</_PropertySheetDisplayName>
</PropertyGroup>
<ItemGroup>
<BuildMacro Include="BinDir">
<Value>$(BinDir)</Value>
</BuildMacro>
<BuildMacro Include="InstalledDlls">
<Value>$(InstalledDlls)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBins">
<Value>$(InstalledBins)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBroadwayBins">
<Value>$(InstalledBroadwayBins)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBin">
<Value>$(GtkDoInstallBin)</Value>
</BuildMacro>

View File

@@ -204,10 +204,6 @@
<Project>{f756b0db-40a1-4e9f-be1f-8f02cb86ea46}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-inspector.vcxproj">
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073fd}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -189,7 +189,6 @@
<ClCompile Include="..\..\..\demos\gtk-demo\entry_completion.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\event_axes.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\expander.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\gestures.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\headerbar.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\hypertext.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\iconview.c" />

View File

@@ -31,7 +31,6 @@
<ClCompile Include="..\..\..\demos\gtk-demo\entry_completion.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\event_axes.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\expander.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\gestures.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\headerbar.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\hypertext.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\iconview.c"><Filter>Source Files</Filter></ClCompile>

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
#include "libgtk-inspector.vs10.sourcefiles.filters"
#include "gtka11y.vs10.sourcefiles.filters"
</ItemGroup>
</Project>

View File

@@ -19,8 +19,8 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}</ProjectGuid>
<RootNamespace>gtkinspector</RootNamespace>
<ProjectGuid>{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}</ProjectGuid>
<RootNamespace>gtka11y</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -69,8 +69,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -80,22 +80,11 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -105,10 +94,24 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
@@ -117,7 +120,7 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
#include "libgtk-inspector.vs10.sourcefiles"
#include "gtka11y.vs10.sourcefiles"
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gtk-prebuild.vcxproj">

View File

@@ -139,49 +139,45 @@
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk.vcxproj">
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>

View File

@@ -11,8 +11,8 @@ EXTRA_DIST += \
gtk.vcprojin \
gtk3-demo.vcproj \
gtk3-demo-application.vcproj \
gtk-inspector.vcproj \
gtk-inspector.vcprojin \
gtka11y.vcproj \
gtka11y.vcprojin \
gailutil.vcproj \
install.vcproj \
broadwayd.vcproj \

View File

@@ -23,7 +23,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcproj", "{FC5AA
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FE} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-inspector", "gtk-inspector.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtka11y", "gtka11y.vcproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF}
EndProjectSection
@@ -31,7 +31,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46} = {F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo", "gtk3-demo.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
@@ -138,22 +138,6 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.ActiveCfg = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.Build.0 = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.ActiveCfg = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.Build.0 = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|x64.ActiveCfg = Debug|x64
@@ -170,6 +154,22 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.Build.0 = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.Build.0 = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.ActiveCfg = Debug|x64

View File

@@ -45,7 +45,6 @@ echo off&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
@@ -62,6 +61,7 @@ copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-$(ApiVersion)\gd
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevice.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevicemanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
@@ -91,7 +91,6 @@ copy ..\..\..\gdk\gdkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0
copy ..\..\..\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\deprecated\gdkcolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
@@ -153,12 +152,14 @@ copy ..\..\..\gtk\gtkaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;
copy ..\..\..\gtk\gtkactionable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactionbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -208,7 +209,6 @@ copy ..\..\..\gtk\gtkentrybuffer.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D
copy ..\..\..\gtk\gtkentrycompletion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeventcontroller.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -222,15 +222,6 @@ copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesture.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturedrag.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturelongpress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturemultipress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturepan.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturerotate.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturesingle.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgestureswipe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturezoom.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkheaderbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkicontheme.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -258,9 +249,11 @@ copy ..\..\..\gtk\gtkmenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#
copy ..\..\..\gtk\gtkmenushell.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoverlay.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -348,15 +341,12 @@ copy ..\..\..\gtk\gtkvolumebutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0
copy ..\..\..\gtk\gtkwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkactivatable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkactiongroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkfontsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
@@ -371,8 +361,6 @@ copy ..\..\..\gtk\deprecated\gtkhseparator.h $(CopyDir)\include\gtk-$(ApiVersion
copy ..\..\..\gtk\deprecated\gtkhsv.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkiconfactory.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkimagemenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkradioaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkrecentaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
@@ -416,7 +404,6 @@ copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\h
mkdir $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
echo &quot;Compiling gsettings XML Files...&quot;&#x0D;&#x0A;

View File

@@ -180,7 +180,6 @@
<File RelativePath="..\..\..\demos\gtk-demo\entry_completion.c" />
<File RelativePath="..\..\..\demos\gtk-demo\event_axes.c" />
<File RelativePath="..\..\..\demos\gtk-demo\expander.c" />
<File RelativePath="..\..\..\demos\gtk-demo\gestures.c" />
<File RelativePath="..\..\..\demos\gtk-demo\headerbar.c" />
<File RelativePath="..\..\..\demos\gtk-demo\hypertext.c" />
<File RelativePath="..\..\..\demos\gtk-demo\iconview.c" />

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="big5"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk-inspector"
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
RootNamespace="gtkinspector"
Name="gtka11y"
ProjectGUID="{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
RootNamespace="gtka11y"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
@@ -31,8 +31,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GtkDefines)"
AdditionalIncludeDirectories="..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -41,26 +41,6 @@
DebugInformationFormat="4"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk-build-defines.vsprops"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
PreprocessorDefinitions="$(GtkDefines)"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk-build-defines.vsprops"
@@ -73,8 +53,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GtkDefines)"
AdditionalIncludeDirectories="..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -83,6 +63,29 @@
DebugInformationFormat="3"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk-build-defines.vsprops"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="$(GtkDefines)"
AdditionalIncludeDirectories="..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk-build-defines.vsprops"
@@ -95,8 +98,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
PreprocessorDefinitions="$(GtkDefines)"
AdditionalIncludeDirectories="..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
@@ -108,23 +111,25 @@
</References>
<Files>
<Filter
Name="Header Files"
Name="Sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
#include "gtka11y.sourcefiles"
</Filter>
<Filter
Name="Headers"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
#include "libgtk-inspector.sourcefiles"
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -9,9 +9,9 @@
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [13])
m4_define([gtk_micro_version], [3])
m4_define([gtk_interface_age], [0])
m4_define([gtk_minor_version], [12])
m4_define([gtk_micro_version], [2])
m4_define([gtk_interface_age], [2])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -41,9 +41,9 @@ AC_CANONICAL_HOST
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.41.0])
m4_define([glib_required_version], [2.39.5])
m4_define([pango_required_version], [1.32.4])
m4_define([atk_required_version], [2.12.0])
m4_define([atk_required_version], [2.7.5])
m4_define([cairo_required_version], [1.12.0])
m4_define([gdk_pixbuf_required_version], [2.27.1])
m4_define([introspection_required_version], [1.39.0])
@@ -1886,11 +1886,12 @@ gtk/Makefile
gtk/makefile.msc
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/inspector/Makefile
gtk/a11y/Makefile
gtk/native/Makefile
util/Makefile
libgail-util/Makefile
modules/Makefile
modules/engines/Makefile
modules/engines/pixbuf/Makefile
modules/input/Makefile
modules/printbackends/Makefile
modules/printbackends/cups/Makefile

View File

@@ -24,7 +24,6 @@ demos = \
entry_completion.c \
event_axes.c \
expander.c \
gestures.c \
headerbar.c \
hypertext.c \
iconview.c \

View File

@@ -42,7 +42,7 @@ response_cb (GtkDialog *dialog,
gtk_widget_override_background_color (da, 0, &color);
}
gtk_widget_destroy (GTK_WIDGET (dialog));
gtk_widget_hide (GTK_WIDGET (dialog));
}
static void

View File

@@ -94,7 +94,6 @@
<file>event_axes.c</file>
<file>expander.c</file>
<file>flowbox.c</file>
<file>gestures.c</file>
<file>headerbar.c</file>
<file>hypertext.c</file>
<file>iconview.c</file>

View File

@@ -1,199 +0,0 @@
/* Gestures
*
* Perform gestures on touchscreens and other input devices. This
* demo reacts to long presses and swipes from all devices, plus
* multi-touch rotate and zoom gestures.
*/
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
static GtkGesture *rotate = NULL;
static GtkGesture *zoom = NULL;
static gdouble swipe_x = 0;
static gdouble swipe_y = 0;
static gboolean long_pressed = FALSE;
static void
swipe_gesture_swept (GtkGestureSwipe *gesture,
gdouble velocity_x,
gdouble velocity_y,
GtkWidget *widget)
{
swipe_x = velocity_x / 10;
swipe_y = velocity_y / 10;
gtk_widget_queue_draw (widget);
}
static void
long_press_gesture_pressed (GtkGestureLongPress *gesture,
gdouble x,
gdouble y,
GtkWidget *widget)
{
long_pressed = TRUE;
gtk_widget_queue_draw (widget);
}
static void
long_press_gesture_end (GtkGesture *gesture,
GdkEventSequence *sequence,
GtkWidget *widget)
{
long_pressed = FALSE;
gtk_widget_queue_draw (widget);
}
static void
rotation_angle_changed (GtkGestureRotate *gesture,
gdouble angle,
gdouble delta,
GtkWidget *widget)
{
gtk_widget_queue_draw (widget);
}
static void
zoom_scale_changed (GtkGestureZoom *gesture,
gdouble scale,
GtkWidget *widget)
{
gtk_widget_queue_draw (widget);
}
static gboolean
drawing_area_draw (GtkWidget *widget,
cairo_t *cr)
{
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
if (swipe_x != 0 || swipe_y != 0)
{
cairo_save (cr);
cairo_set_line_width (cr, 6);
cairo_move_to (cr, allocation.width / 2,
allocation.height / 2);
cairo_rel_line_to (cr, swipe_x, swipe_y);
cairo_set_source_rgba (cr, 1, 0, 0, 0.5);
cairo_stroke (cr);
cairo_restore (cr);
}
if (gtk_gesture_is_recognized (rotate) || gtk_gesture_is_recognized (zoom))
{
cairo_pattern_t *pat;
cairo_matrix_t matrix;
gdouble angle, scale;
cairo_matrix_init_translate (&matrix,
allocation.width / 2,
allocation.height / 2);
cairo_save (cr);
angle = gtk_gesture_rotate_get_angle_delta (GTK_GESTURE_ROTATE (rotate));
cairo_matrix_rotate (&matrix, angle);
scale = gtk_gesture_zoom_get_scale_delta (GTK_GESTURE_ZOOM (zoom));
cairo_matrix_scale (&matrix, scale, scale);
cairo_set_matrix (cr, &matrix);
cairo_rectangle (cr, -100, -100, 200, 200);
pat = cairo_pattern_create_linear (-100, 0, 200, 0);
cairo_pattern_add_color_stop_rgb (pat, 0, 0, 0, 1);
cairo_pattern_add_color_stop_rgb (pat, 1, 1, 0, 0);
cairo_set_source (cr, pat);
cairo_fill (cr);
cairo_restore (cr);
cairo_pattern_destroy (pat);
}
if (long_pressed)
{
cairo_save (cr);
cairo_arc (cr, allocation.width / 2,
allocation.height / 2,
50, 0, 2 * G_PI);
cairo_set_source_rgba (cr, 0, 1, 0, 0.5);
cairo_stroke (cr);
cairo_restore (cr);
}
return TRUE;
}
GtkWidget *
do_gestures (GtkWidget *do_widget)
{
GtkWidget *drawing_area;
GtkGesture *gesture;
if (!window)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
gtk_window_set_title (GTK_WINDOW (window), "Gestures demo");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
drawing_area = gtk_drawing_area_new ();
gtk_container_add (GTK_CONTAINER (window), drawing_area);
gtk_widget_add_events (drawing_area,
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK | GDK_TOUCH_MASK);
g_signal_connect (drawing_area, "draw",
G_CALLBACK (drawing_area_draw), NULL);
/* Swipe */
gesture = gtk_gesture_swipe_new (drawing_area);
g_signal_connect (gesture, "swipe",
G_CALLBACK (swipe_gesture_swept), drawing_area);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Long press */
gesture = gtk_gesture_long_press_new (drawing_area);
g_signal_connect (gesture, "pressed",
G_CALLBACK (long_press_gesture_pressed), drawing_area);
g_signal_connect (gesture, "end",
G_CALLBACK (long_press_gesture_end), drawing_area);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Rotate */
rotate = gesture = gtk_gesture_rotate_new (drawing_area);
g_signal_connect (gesture, "angle-changed",
G_CALLBACK (rotation_angle_changed), drawing_area);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Zoom */
zoom = gesture = gtk_gesture_zoom_new (drawing_area);
g_signal_connect (gesture, "scale-changed",
G_CALLBACK (zoom_scale_changed), drawing_area);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
gtk_widget_destroy (window);
window = NULL;
}
return window;
}

View File

@@ -44,10 +44,10 @@ do_headerbar (GtkWidget *do_widget)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_style_context_add_class (gtk_widget_get_style_context (box), "linked");
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("pan-start-symbolic", GTK_ICON_SIZE_BUTTON));
gtk_container_add (GTK_CONTAINER (button), gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE));
gtk_container_add (GTK_CONTAINER (box), button);
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("pan-end-symbolic", GTK_ICON_SIZE_BUTTON));
gtk_container_add (GTK_CONTAINER (button), gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE));
gtk_container_add (GTK_CONTAINER (box), button);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), box);

View File

@@ -52,24 +52,20 @@ set_cell_color (GtkCellLayout *cell_layout,
gpointer data)
{
gchar *text;
GdkRGBA color;
GdkColor color;
guint32 pixel = 0;
GdkPixbuf *pixbuf;
gtk_tree_model_get (tree_model, iter, COL_TEXT, &text, -1);
if (!text)
return;
if (gdk_rgba_parse (&color, text))
if (gdk_color_parse (text, &color))
pixel =
((gint)(color.red * 255)) << 24 |
((gint)(color.green * 255)) << 16 |
((gint)(color.blue * 255)) << 8 |
((gint)(color.alpha * 255));
(color.red >> 8) << 24 |
(color.green >> 8) << 16 |
(color.blue >> 8) << 8;
g_free (text);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 24, 24);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 24, 24);
gdk_pixbuf_fill (pixbuf, pixel);
g_object_set (cell, "pixbuf", pixbuf, NULL);

View File

@@ -471,9 +471,6 @@ fontify (GtkTextBuffer *source_buffer)
gchar *start_ptr, *end_ptr;
gchar *tag;
gtk_text_buffer_get_bounds (source_buffer, &start_iter, &tmp_iter);
gtk_text_buffer_apply_tag_by_name (source_buffer, "source", &start_iter, &tmp_iter);
state = STATE_NORMAL;
gtk_text_buffer_get_iter_at_offset (source_buffer, &start_iter, 0);
@@ -629,9 +626,6 @@ load_file (const gchar *demoname,
NULL);
source_buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_create_tag (source_buffer, "source",
"font", "monospace",
NULL);
gtk_text_buffer_create_tag (source_buffer, "comment",
"foreground", "DodgerBlue",
NULL);
@@ -1021,6 +1015,8 @@ main (int argc, char **argv)
}
/* -- End of hack -- */
gtk_init (&argc, &argv);
app = gtk_application_new ("org.gtk.Demo", 0);
g_action_map_add_action_entries (G_ACTION_MAP (app),

View File

@@ -128,8 +128,8 @@
<object class="GtkTextView" id="info-textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_start">20</property>
<property name="margin_end">20</property>
<property name="margin_left">20</property>
<property name="margin_right">20</property>
<property name="margin_top">20</property>
<property name="margin_bottom">20</property>
<property name="pixels_above_lines">2</property>
@@ -165,8 +165,9 @@
<object class="GtkTextView" id="source-textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_start">20</property>
<property name="margin_left">20</property>
<property name="margin_end">20</property>
<property name="margin_right">20</property>
<property name="margin_top">20</property>
<property name="margin_bottom">20</property>
<property name="editable">False</property>

View File

@@ -120,7 +120,6 @@ do_sizegroup (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
g_object_set_data_full (G_OBJECT (window), "size-group", size_group, g_object_unref);
/* Create one frame holding color options */
frame = gtk_frame_new ("Color Options");

View File

@@ -656,9 +656,6 @@ load_icon_items (GtkToolPalette *palette)
GtkWidget *group = gtk_tool_item_group_new (context);
gtk_container_add (GTK_CONTAINER (palette), group);
if (g_strcmp0 (context, "Animations") == 0)
continue;
g_message ("Got context '%s'", context);
icon_names = gtk_icon_theme_list_icons (icon_theme, context);
icon_names = g_list_sort (icon_names, (GCompareFunc) strcmp);
@@ -668,9 +665,6 @@ load_icon_items (GtkToolPalette *palette)
GtkToolItem *item;
gchar *id = ll->data;
if (g_strcmp0 (id, "emblem-desktop") == 0)
continue;
g_message ("Got id '%s'", id);
item = gtk_tool_button_new (NULL, NULL);

View File

@@ -189,10 +189,9 @@ do_transparent (GtkWidget *do_widget)
GtkWidget *view;
GtkWidget *sw;
GtkWidget *overlay;
GtkWidget *align;
GtkWidget *entry;
GdkRGBA transparent = {0, 0, 0, 0};
GtkCssProvider *provider;
gchar *css;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
@@ -220,20 +219,17 @@ do_transparent (GtkWidget *do_widget)
gtk_widget_override_background_color (overlay, 0, &transparent);
entry = gtk_entry_new ();
provider = gtk_css_provider_new ();
css = g_strdup_printf ("* { border-width: 0px %dpx %dpx 0px; }",
SHADOW_OFFSET_X, SHADOW_OFFSET_Y);
gtk_css_provider_load_from_data (provider, css, -1, NULL);
g_free (css);
gtk_style_context_add_provider (gtk_widget_get_style_context (entry),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_signal_connect (entry, "draw", G_CALLBACK (draw_callback), NULL);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), entry);
gtk_widget_set_halign (entry, GTK_ALIGN_CENTER);
gtk_widget_set_valign (entry, GTK_ALIGN_START);
align = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
gtk_alignment_set_padding (GTK_ALIGNMENT (align),
0, SHADOW_OFFSET_Y, 0, SHADOW_OFFSET_X);
g_signal_connect (align, "draw", G_CALLBACK (draw_callback), NULL);
entry = gtk_entry_new ();
gtk_container_add (GTK_CONTAINER (align), entry);
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), align);
gtk_widget_set_halign (align, GTK_ALIGN_CENTER);
gtk_widget_set_valign (align, GTK_ALIGN_START);
gtk_widget_show_all (overlay);
}

View File

@@ -23,6 +23,18 @@
#include "config.h"
#include <gtk/gtk.h>
static void
activate_toggle (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GVariant *state;
state = g_action_get_state (G_ACTION (action));
g_action_change_state (G_ACTION (action), g_variant_new_boolean (!g_variant_get_boolean (state)));
g_variant_unref (state);
}
static void
change_theme_state (GSimpleAction *action,
GVariant *state,
@@ -38,44 +50,6 @@ change_theme_state (GSimpleAction *action,
g_simple_action_set_state (action, state);
}
static void
change_toolbar_state (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *toolbar;
toolbar = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "toolbar"));
gtk_widget_set_visible (toolbar, g_variant_get_boolean (state));
g_simple_action_set_state (action, state);
}
static void
activate_search (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *searchbar;
searchbar = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "searchbar"));
gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (searchbar), TRUE);
}
static void
activate_delete (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *infobar;
infobar = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "infobar"));
gtk_widget_show (infobar);
}
static void
activate_about (GSimpleAction *action,
GVariant *parameter,
@@ -246,61 +220,19 @@ startup (GApplication *app)
g_object_unref (builder);
}
static void
update_header (GtkListBoxRow *row,
GtkListBoxRow *before,
gpointer data)
{
if (before != NULL &&
gtk_list_box_row_get_header (row) == NULL)
{
GtkWidget *separator;
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_show (separator);
gtk_list_box_row_set_header (row, separator);
}
}
static void
info_bar_response (GtkWidget *infobar, gint response_id)
{
if (response_id == GTK_RESPONSE_CLOSE)
gtk_widget_hide (infobar);
}
static void
show_dialog (GtkWidget *button, GtkWidget *dialog)
{
gtk_widget_show (dialog);
}
static void
close_dialog (GtkWidget *dialog)
{
gtk_widget_hide (dialog);
}
static void
activate (GApplication *app)
{
GtkBuilder *builder;
GtkWindow *window;
GtkWidget *widget;
GtkWidget *dialog;
GtkAdjustment *adj;
static GActionEntry win_entries[] = {
{ "dark", NULL, NULL, "false", change_theme_state },
{ "toolbar", NULL, NULL, "true", change_toolbar_state },
{ "search", activate_search, NULL, NULL, NULL },
{ "delete", activate_delete, NULL, NULL, NULL }
{ "dark", activate_toggle, NULL, "false", change_theme_state }
};
GError *error = NULL;
builder = gtk_builder_new ();
gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", &error);
if (error)
g_print ("error: %s\n", error->message);
gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", NULL);
gtk_builder_add_callback_symbol (builder, "on_entry_icon_release", (GCallback)on_entry_icon_release);
gtk_builder_connect_signals (builder, NULL);
@@ -323,34 +255,6 @@ activate (GApplication *app)
adj = (GtkAdjustment *) gtk_builder_get_object (builder, "adjustment2");
g_signal_connect (adj, "value-changed", G_CALLBACK (spin_value_changed), widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "listbox");
gtk_list_box_set_header_func (GTK_LIST_BOX (widget), update_header, NULL, NULL);
widget = (GtkWidget *)gtk_builder_get_object (builder, "toolbar");
g_object_set_data (G_OBJECT (window), "toolbar", widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "searchbar");
g_object_set_data (G_OBJECT (window), "searchbar", widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "infobar");
g_signal_connect (widget, "response", G_CALLBACK (info_bar_response), NULL);
g_object_set_data (G_OBJECT (window), "infobar", widget);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "info_dialog");
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
widget = (GtkWidget *)gtk_builder_get_object (builder, "info_dialog_button");
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "action_dialog");
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
widget = (GtkWidget *)gtk_builder_get_object (builder, "action_dialog_button");
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "preference_dialog");
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
widget = (GtkWidget *)gtk_builder_get_object (builder, "preference_dialog_button");
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
gtk_widget_show_all (GTK_WIDGET (window));
g_object_unref (builder);
@@ -363,16 +267,9 @@ main (int argc, char *argv[])
static GActionEntry app_entries[] = {
{ "about", activate_about, NULL, NULL, NULL },
{ "quit", activate_quit, NULL, NULL, NULL },
{ "main", NULL, "s", "'steak'", NULL },
{ "wine", NULL, NULL, "false", NULL },
{ "beer", NULL, NULL, "false", NULL },
{ "water", NULL, NULL, "true", NULL },
{ "dessert", NULL, "s", "'bars'", NULL },
{ "pay", NULL, "s", NULL, NULL }
};
gint status;
gtk_init (&argc, &argv);
app = gtk_application_new ("org.gtk.WidgetFactory", 0);
@@ -383,8 +280,7 @@ main (int argc, char *argv[])
g_signal_connect (app, "startup", G_CALLBACK (startup), NULL);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
g_application_run (G_APPLICATION (app), argc, argv);
return status;
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -26,6 +26,7 @@
<xi:include href="xml/gdkdevice.xml" />
<xi:include href="xml/regions.xml" />
<xi:include href="xml/pixbufs.xml" />
<xi:include href="xml/colors.xml" />
<xi:include href="xml/rgba_colors.xml" />
<xi:include href="xml/visuals.xml" />
<xi:include href="xml/cursors.xml" />
@@ -47,11 +48,6 @@
<xi:include href="xml/gdktestutils.xml" />
</reference>
<reference>
<title>Deprecated</title>
<xi:include href="xml/colors.xml" />
</reference>
<index id="api-index-full">
<title>Index of all symbols</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
@@ -88,10 +84,6 @@
<title>Index of new symbols in 3.12</title>
<xi:include href="xml/api-index-3.12.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-14" role="3.14">
<title>Index of new symbols in 3.14</title>
<xi:include href="xml/api-index-3.14.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>

View File

@@ -58,11 +58,6 @@ GDK_WINDOWING_WAYLAND
GDK_VERSION_3_0
GDK_VERSION_3_2
GDK_VERSION_3_4
GDK_VERSION_3_6
GDK_VERSION_3_8
GDK_VERSION_3_10
GDK_VERSION_3_12
GDK_VERSION_3_14
GDK_VERSION_MIN_REQUIRED
GDK_VERSION_MAX_ALLOWED
GDK_DISABLE_DEPRECATION_WARNINGS
@@ -389,7 +384,6 @@ gdk_window_begin_resize_drag
gdk_window_begin_resize_drag_for_device
gdk_window_begin_move_drag
gdk_window_begin_move_drag_for_device
gdk_window_show_window_menu
gdk_window_constrain_size
gdk_window_beep
gdk_window_get_scale_factor

View File

@@ -151,13 +151,10 @@ content_files = \
tree_widget.sgml \
windows.sgml \
x11.sgml \
gtk3-demo.xml \
gtk3-widget-factory.xml \
gtk-query-immodules-3.0.xml \
gtk-update-icon-cache.xml \
gtk-launch.xml \
broadwayd.xml \
input-handling.xml \
visual_index.xml \
getting_started.xml \
overview.xml
@@ -300,7 +297,6 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/action-bar.png \
$(srcdir)/images/appchooserbutton.png \
$(srcdir)/images/appchooserdialog.png \
$(srcdir)/images/assistant.png \
@@ -349,7 +345,6 @@ HTML_IMAGES = \
$(srcdir)/images/scales.png \
$(srcdir)/images/scrollbar.png \
$(srcdir)/images/scrolledwindow.png \
$(srcdir)/images/search-bar.png \
$(srcdir)/images/search-entry.png \
$(srcdir)/images/separator.png \
$(srcdir)/images/spinbutton.png \
@@ -429,8 +424,7 @@ HTML_IMAGES = \
$(srcdir)/images/getting-started-app9.png \
$(srcdir)/images/getting-started-app10.png \
$(srcdir)/images/exampleapp.png \
$(srcdir)/images/flow-box.png \
$(srcdir)/images/inspector.png
$(srcdir)/images/flow-box.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
@@ -452,8 +446,6 @@ man_MANS = \
gtk-query-immodules-3.0.1 \
gtk-update-icon-cache.1 \
gtk-launch.1 \
gtk3-demo.1 \
gtk3-widget-factory.1 \
broadwayd.1
if ENABLE_MAN

View File

@@ -90,6 +90,13 @@ GDK_PIXBUF_DISABLE_DEPRECATED and G_DISABLE_DEPRECATED for GDK, GdkPixbuf and
GLib.
</para>
<para>
If you want to make sure that your program doesn't use any functions which
may be problematic in a multihead setting, you can define the preprocessor
symbol GDK_MULTIHEAD_SAFE by using the command line option
<literal>-DGTK_MULTIHEAD_SAFE=1</literal>.
</para>
<para>
Similarly, if you want to make sure that your program doesn't use any
functions which may be problematic in a multidevice setting, you can

View File

@@ -25,7 +25,6 @@
<xi:include href="resources.sgml" />
<xi:include href="xml/question_index.sgml" />
<xi:include href="drawing-model.xml" />
<xi:include href="input-handling.xml" />
</part>
@@ -241,6 +240,7 @@
<chapter id="MiscObjects">
<title>Miscellaneous</title>
<xi:include href="xml/gtkadjustment.xml" />
<xi:include href="xml/gtkarrow.xml" />
<xi:include href="xml/gtkcalendar.xml" />
<xi:include href="xml/gtkdrawingarea.xml" />
<xi:include href="xml/gtkeventbox.xml" />
@@ -259,6 +259,7 @@
<xi:include href="xml/gtkcontainer.xml" />
<xi:include href="xml/gtkbin.xml" />
<xi:include href="xml/gtkmenushell.xml" />
<xi:include href="xml/gtkmisc.xml" />
<xi:include href="xml/gtkrange.xml" />
<xi:include href="xml/gtkimcontext.xml" />
</chapter>
@@ -287,20 +288,6 @@
<xi:include href="xml/gtkappchooserwidget.xml" />
</chapter>
<chapter id="Gestures">
<title>Gestures</title>
<xi:include href="xml/gtkeventcontroller.xml" />
<xi:include href="xml/gtkgesture.xml" />
<xi:include href="xml/gtkgesturesingle.xml" />
<xi:include href="xml/gtkgesturedrag.xml" />
<xi:include href="xml/gtkgesturelongpress.xml" />
<xi:include href="xml/gtkgesturemultipress.xml" />
<xi:include href="xml/gtkgesturepan.xml" />
<xi:include href="xml/gtkgestureswipe.xml" />
<xi:include href="xml/gtkgesturerotate.xml" />
<xi:include href="xml/gtkgesturezoom.xml" />
</chapter>
<chapter id="DeprecatedObjects">
<title>Deprecated</title>
<xi:include href="xml/gtksymboliccolor.xml" />
@@ -334,11 +321,7 @@
<xi:include href="xml/gtkrecentaction.xml" />
<xi:include href="xml/gtkactivatable.xml" />
<xi:include href="xml/gtkimagemenuitem.xml" />
<xi:include href="xml/gtkmisc.xml" />
<xi:include href="xml/gtkstock.xml" />
<xi:include href="xml/gtkiconfactory.xml" />
<xi:include href="xml/gtknumerableicon.xml" />
<xi:include href="xml/gtkarrow.xml" />
</chapter>
</part>
@@ -368,6 +351,8 @@
<xi:include href="xml/gtkthemingengine.xml" />
<xi:include href="xml/gtkwidgetpath.xml" />
<xi:include href="xml/gtkicontheme.xml" />
<xi:include href="xml/gtkiconfactory.xml" />
<xi:include href="xml/gtknumerableicon.xml" />
</part>
<part id="migrating">
@@ -393,8 +378,6 @@
<part>
<title>GTK+ Tools</title>
<xi:include href="gtk3-demo.xml" />
<xi:include href="gtk3-widget-factory.xml" />
<xi:include href="gtk-query-immodules-3.0.xml" />
<xi:include href="gtk-update-icon-cache.xml" />
<xi:include href="gtk-launch.xml" />
@@ -451,10 +434,6 @@
<title>Index of new symbols in 3.12</title>
<xi:include href="xml/api-index-3.12.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-14" role="3.14">
<title>Index of new symbols in 3.14</title>
<xi:include href="xml/api-index-3.14.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>

View File

@@ -1,59 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gtk3-demo">
<refentryinfo>
<title>gtk3-demo</title>
<productname>GTK+</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Matthias</firstname>
<surname>Clasen</surname>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>gtk3-demo</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gtk3-demo</refname>
<refpurpose>Demonstrate GTK+ widgets</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>gtk3-demo</command>
<arg choice="opt">--help</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para>
<command>gtk3-demo</command> is a collection of examples.
Its purpose is to demonstrate many GTK+ widgets in a form
that is useful to application developers.
</para>
<para>
The application shows the source code for each example, as well as
other used resources, such as ui files and icons.
</para>
</refsect1>
<refsect1><title>Options</title>
<para>The following options are understood:</para>
<variablelist>
<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem><para>Show help options</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

View File

@@ -57,7 +57,6 @@ gtk_about_dialog_get_type
GtkAccelGroup
GtkAccelGroupClass
gtk_accel_group_new
GtkAccelFlags
gtk_accel_group_connect
gtk_accel_group_connect_by_path
GtkAccelGroupActivate
@@ -445,7 +444,6 @@ gtk_button_box_new
gtk_button_box_get_layout
gtk_button_box_get_child_secondary
gtk_button_box_get_child_non_homogeneous
GtkButtonBoxStyle
gtk_button_box_set_layout
gtk_button_box_set_child_secondary
gtk_button_box_set_child_non_homogeneous
@@ -525,13 +523,7 @@ gtk_list_box_new
gtk_list_box_prepend
gtk_list_box_insert
gtk_list_box_select_row
gtk_list_box_unselect_row
gtk_list_box_select_all
gtk_list_box_unselect_all
gtk_list_box_get_selected_row
GtkListBoxForeachFunc
gtk_list_box_selected_foreach
gtk_list_box_get_selected_rows
gtk_list_box_set_selection_mode
gtk_list_box_get_selection_mode
@@ -553,7 +545,6 @@ gtk_list_box_drag_unhighlight_row
gtk_list_box_row_new
gtk_list_box_row_changed
gtk_list_box_row_is_selected
gtk_list_box_row_get_header
gtk_list_box_row_get_type
gtk_list_box_row_set_header
@@ -983,7 +974,6 @@ GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID
gtk_container_add
gtk_container_remove
gtk_container_add_with_properties
GtkResizeMode
gtk_container_get_resize_mode
gtk_container_set_resize_mode
gtk_container_check_resize
@@ -2185,7 +2175,6 @@ gtk_link_button_get_type
<FILE>gtkmenu</FILE>
<TITLE>GtkMenu</TITLE>
GtkMenu
GtkArrowPlacement
gtk_menu_new
gtk_menu_new_from_model
gtk_menu_set_screen
@@ -2263,7 +2252,6 @@ gtk_menu_button_set_menu_model
gtk_menu_button_get_menu_model
gtk_menu_button_set_use_popover
gtk_menu_button_get_use_popover
GtkArrowType
gtk_menu_button_set_direction
gtk_menu_button_get_direction
gtk_menu_button_set_align_widget
@@ -2615,8 +2603,6 @@ gtk_places_sidebar_get_show_connect_to_server
gtk_places_sidebar_set_show_connect_to_server
gtk_places_sidebar_get_local_only
gtk_places_sidebar_set_local_only
gtk_places_sidebar_get_show_enter_location
gtk_places_sidebar_set_show_enter_location
<SUBSECTION Standard>
GTK_PLACES_SIDEBAR
GTK_IS_PLACES_SIDEBAR
@@ -3122,10 +3108,8 @@ gtk_scrolled_window_get_hadjustment
gtk_scrolled_window_get_vadjustment
gtk_scrolled_window_get_hscrollbar
gtk_scrolled_window_get_vscrollbar
GtkPolicyType
gtk_scrolled_window_set_policy
gtk_scrolled_window_add_with_viewport
GtkCornerType
gtk_scrolled_window_set_placement
gtk_scrolled_window_unset_placement
gtk_scrolled_window_set_shadow_type
@@ -3246,8 +3230,6 @@ gtk_settings_set_property_value
gtk_settings_set_string_property
gtk_settings_set_long_property
gtk_settings_set_double_property
GtkIMPreeditStyle
GtkIMStatusStyle
<SUBSECTION Standard>
GtkSettingsClass
GTK_IS_SETTINGS
@@ -3484,7 +3466,6 @@ GtkTable
gtk_table_new
gtk_table_resize
gtk_table_get_size
GtkAttachOptions
gtk_table_attach
gtk_table_attach_defaults
gtk_table_set_row_spacing
@@ -5479,8 +5460,6 @@ gtk_widget_get_allocated_height
gtk_widget_get_allocation
gtk_widget_set_allocation
gtk_widget_get_allocated_baseline
gtk_widget_get_clip
gtk_widget_set_clip
gtk_widget_get_app_paintable
gtk_widget_get_can_default
gtk_widget_set_can_default
@@ -5491,7 +5470,6 @@ gtk_widget_get_has_window
gtk_widget_set_has_window
gtk_widget_get_sensitive
gtk_widget_is_sensitive
GtkStateType
gtk_widget_get_state
gtk_widget_get_visible
gtk_widget_is_visible
@@ -5609,7 +5587,6 @@ gtk_requisition_get_type
<TITLE>GtkWindow</TITLE>
GtkWindow
GtkWindowClass
GtkWindowType
gtk_window_new
gtk_window_set_title
gtk_window_set_wmclass
@@ -5625,7 +5602,6 @@ gtk_window_set_default_geometry
gtk_window_set_geometry_hints
gtk_window_set_gravity
gtk_window_get_gravity
GtkWindowPosition
gtk_window_set_position
gtk_window_set_transient_for
gtk_window_set_attached_to
@@ -5727,7 +5703,6 @@ gtk_window_get_application
gtk_window_set_application
gtk_window_set_has_user_ref_count
gtk_window_set_titlebar
gtk_window_set_interactive_debugging
<SUBSECTION Standard>
GTK_WINDOW
@@ -5955,78 +5930,66 @@ GTK_STYLE_PROPERTY_BORDER_RADIUS
GTK_STYLE_PROPERTY_BORDER_STYLE
GTK_STYLE_PROPERTY_BORDER_COLOR
GTK_STYLE_PROPERTY_BACKGROUND_IMAGE
GtkBorderStyle
<SUBSECTION>
GTK_STYLE_CLASS_ACCELERATOR
GTK_STYLE_CLASS_ARROW
GTK_STYLE_CLASS_BACKGROUND
GTK_STYLE_CLASS_BOTTOM
GTK_STYLE_CLASS_BUTTON
GTK_STYLE_CLASS_CALENDAR
GTK_STYLE_CLASS_CELL
GTK_STYLE_CLASS_COMBOBOX_ENTRY
GTK_STYLE_CLASS_CHECK
GTK_STYLE_CLASS_CSD
GTK_STYLE_CLASS_CURSOR_HANDLE
GTK_STYLE_CLASS_DEFAULT
GTK_STYLE_CLASS_DESTRUCTIVE_ACTION
GTK_STYLE_CLASS_DIM_LABEL
GTK_STYLE_CLASS_DND
GTK_STYLE_CLASS_DOCK
GTK_STYLE_CLASS_ENTRY
GTK_STYLE_CLASS_HEADER
GTK_STYLE_CLASS_MENU
GTK_STYLE_CLASS_RADIO
GTK_STYLE_CLASS_RUBBERBAND
GTK_STYLE_CLASS_SCROLLBAR
GTK_STYLE_CLASS_SCROLLBARS_JUNCTION
GTK_STYLE_CLASS_SLIDER
GTK_STYLE_CLASS_TOOLTIP
GTK_STYLE_CLASS_TROUGH
GTK_STYLE_CLASS_ACCELERATOR
GTK_STYLE_CLASS_DOCK
GTK_STYLE_CLASS_GRIP
GTK_STYLE_CLASS_MENUBAR
GTK_STYLE_CLASS_MENUITEM
GTK_STYLE_CLASS_PROGRESSBAR
GTK_STYLE_CLASS_SPINNER
GTK_STYLE_CLASS_TOOLBAR
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
GTK_STYLE_CLASS_INLINE_TOOLBAR
GTK_STYLE_CLASS_PANE_SEPARATOR
GTK_STYLE_CLASS_SEPARATOR
GTK_STYLE_CLASS_SIDEBAR
GTK_STYLE_CLASS_DND
GTK_STYLE_CLASS_ERROR
GTK_STYLE_CLASS_EXPANDER
GTK_STYLE_CLASS_FRAME
GTK_STYLE_CLASS_GRIP
GTK_STYLE_CLASS_HEADER
GTK_STYLE_CLASS_HIGHLIGHT
GTK_STYLE_CLASS_HORIZONTAL
GTK_STYLE_CLASS_IMAGE
GTK_STYLE_CLASS_INFO
GTK_STYLE_CLASS_INLINE_TOOLBAR
GTK_STYLE_CLASS_INSERTION_CURSOR
GTK_STYLE_CLASS_LEFT
GTK_STYLE_CLASS_LEVEL_BAR
GTK_STYLE_CLASS_LINKED
GTK_STYLE_CLASS_LIST
GTK_STYLE_CLASS_LIST_ROW
GTK_STYLE_CLASS_MARK
GTK_STYLE_CLASS_MENU
GTK_STYLE_CLASS_MENUBAR
GTK_STYLE_CLASS_MENUITEM
GTK_STYLE_CLASS_MESSAGE_DIALOG
GTK_STYLE_CLASS_NEEDS_ATTENTION
GTK_STYLE_CLASS_NOTEBOOK
GTK_STYLE_CLASS_OSD
GTK_STYLE_CLASS_PANE_SEPARATOR
GTK_STYLE_CLASS_POPUP
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
GTK_STYLE_CLASS_PROGRESSBAR
GTK_STYLE_CLASS_PULSE
GTK_STYLE_CLASS_QUESTION
GTK_STYLE_CLASS_RADIO
GTK_STYLE_CLASS_RAISED
GTK_STYLE_CLASS_RIGHT
GTK_STYLE_CLASS_RUBBERBAND
GTK_STYLE_CLASS_SCALE
GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE
GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW
GTK_STYLE_CLASS_SCROLLBAR
GTK_STYLE_CLASS_SCROLLBARS_JUNCTION
GTK_STYLE_CLASS_SEPARATOR
GTK_STYLE_CLASS_SIDEBAR
GTK_STYLE_CLASS_SLIDER
GTK_STYLE_CLASS_SPINBUTTON
GTK_STYLE_CLASS_SPINNER
GTK_STYLE_CLASS_SUGGESTED_ACTION
GTK_STYLE_CLASS_TITLEBAR
GTK_STYLE_CLASS_TOOLBAR
GTK_STYLE_CLASS_TOOLTIP
GTK_STYLE_CLASS_TOP
GTK_STYLE_CLASS_TROUGH
GTK_STYLE_CLASS_VERTICAL
GTK_STYLE_CLASS_VIEW
GTK_STYLE_CLASS_WARNING
GTK_STYLE_CLASS_HORIZONTAL
GTK_STYLE_CLASS_VERTICAL
GTK_STYLE_CLASS_TOP
GTK_STYLE_CLASS_BOTTOM
GTK_STYLE_CLASS_LEFT
GTK_STYLE_CLASS_RIGHT
GTK_STYLE_CLASS_LINKED
GTK_STYLE_CLASS_ARROW
GTK_STYLE_CLASS_OSD
GTK_STYLE_CLASS_LEVEL_BAR
GTK_STYLE_CLASS_CURSOR_HANDLE
GTK_STYLE_CLASS_INSERTION_CURSOR
GTK_STYLE_CLASS_TITLEBAR
GTK_STYLE_REGION_COLUMN
GTK_STYLE_REGION_COLUMN_HEADER
GTK_STYLE_REGION_ROW
@@ -6038,7 +6001,6 @@ gtk_style_context_add_provider
gtk_style_context_add_provider_for_screen
gtk_style_context_get
gtk_style_context_get_direction
GtkJunctionSides
gtk_style_context_get_junction_sides
gtk_style_context_get_parent
gtk_style_context_get_path
@@ -6081,7 +6043,6 @@ gtk_style_context_add_class
gtk_style_context_remove_class
gtk_style_context_has_class
gtk_style_context_list_classes
GtkRegionFlags
gtk_style_context_add_region
gtk_style_context_remove_region
gtk_style_context_has_region
@@ -6258,7 +6219,6 @@ gtk_gradient_get_type
GTK_STYLE_ATTACHED
GtkStyle
GtkStyleClass
GtkExpanderStyle
gtk_style_new
gtk_style_copy
gtk_style_attach
@@ -6317,8 +6277,6 @@ GtkRcStyle
GtkRcStyleClass
GtkRcFlags
GtkRcTokenType
GtkPathPriorityType
GtkPathType
gtk_rc_scanner_new
gtk_rc_get_style
gtk_rc_get_style_by_paths
@@ -6353,7 +6311,6 @@ GTK_RC_STYLE_GET_CLASS
<SUBSECTION Private>
gtk_rc_style_get_type
GtkRcContext
GTK_PATH_PRIO_MASK
</SECTION>
<SECTION>
@@ -6474,7 +6431,6 @@ gtk_clipboard_get_type
<TITLE>Drag and Drop</TITLE>
GtkDestDefaults
GtkTargetFlags
GtkDragResult
<SUBSECTION Destination Side>
gtk_drag_dest_set
gtk_drag_dest_set_proxy
@@ -6540,23 +6496,45 @@ gtk_binding_set_add_path
<SECTION>
<FILE>gtkenums</FILE>
<TITLE>Standard Enumerations</TITLE>
GtkAccelFlags
GtkArrowPlacement
GtkArrowType
GtkAttachOptions
GtkBaselinePosition
GtkButtonBoxStyle
GtkCornerType
GtkDeleteType
GtkDirectionType
GtkExpanderStyle
GtkIMPreeditStyle
GtkIMStatusStyle
GtkJustification
GtkMovementStep
GtkOrientation
GtkPackType
GtkPathPriorityType
GtkPathType
GtkPolicyType
GtkPositionType
GtkReliefStyle
GtkResizeMode
GtkScrollStep
GtkScrollType
GtkSelectionMode
GtkShadowType
GtkStateType
GtkStateFlags
GtkToolbarStyle
GtkWindowPosition
GtkWindowType
GtkSortType
GtkDragResult
GtkJunctionSides
GtkBorderStyle
GtkRegionFlags
<SUBSECTION Private>
GTK_PATH_PRIO_MASK
</SECTION>
<SECTION>
@@ -7509,8 +7487,6 @@ GtkSwitchClass
gtk_switch_new
gtk_switch_set_active
gtk_switch_get_active
gtk_switch_set_state
gtk_switch_get_state
<SUBSECTION Standard>
GTK_TYPE_SWITCH
@@ -7814,8 +7790,6 @@ GtkStackTransitionType
gtk_stack_set_transition_type
gtk_stack_get_transition_type
gtk_stack_get_transition_running
<SUBSECTION Private>
gtk_stack_get_type
</SECTION>
<SECTION>
@@ -7825,8 +7799,6 @@ GtkStackSwitcher
gtk_stack_switcher_new
gtk_stack_switcher_set_stack
gtk_stack_switcher_get_stack
<SUBSECTION Private>
gtk_stack_switcher_get_type
</SECTION>
<SECTION>
@@ -7843,8 +7815,6 @@ gtk_revealer_set_transition_duration
GtkRevealerTransitionType
gtk_revealer_get_transition_type
gtk_revealer_set_transition_type
<SUBSECTION Private>
gtk_revealer_get_type
</SECTION>
<SECTION>
@@ -7912,228 +7882,3 @@ gtk_popover_get_position
gtk_popover_set_modal
gtk_popover_get_modal
</SECTION>
<SECTION>
<FILE>gtkeventcontroller</FILE>
<TITLE>GtkEventController</TITLE>
GtkEventController
GtkPropagationPhase
gtk_event_controller_get_propagation_phase
gtk_event_controller_set_propagation_phase
gtk_event_controller_handle_event
gtk_event_controller_get_widget
gtk_event_controller_reset
<SUBSECTION Standard>
GTK_TYPE_EVENT_CONTROLLER
GTK_EVENT_CONTROLLER
GTK_EVENT_CONTROLLER_CLASS
GTK_IS_EVENT_CONTROLLER
GTK_EVENT_CONTROLLER_GET_CLASS
<SUBSECTION Private>
GtkEventControllerPriv
gtk_event_controller_get_type
</SECTION>
<SECTION>
<FILE>gtkgesture</FILE>
<TITLE>GtkGesture</TITLE>
GtkGesture
gtk_gesture_get_device
gtk_gesture_get_window
gtk_gesture_set_window
gtk_gesture_is_active
gtk_gesture_is_recognized
GtkEventSequenceState
gtk_gesture_get_sequence_state
gtk_gesture_set_sequence_state
gtk_gesture_set_state
gtk_gesture_get_sequences
gtk_gesture_handles_sequence
<SUBSECTION>
gtk_gesture_get_last_updated_sequence
gtk_gesture_get_last_event
gtk_gesture_get_point
gtk_gesture_get_bounding_box
gtk_gesture_get_bounding_box_center
<SUBSECTION>
gtk_gesture_group
gtk_gesture_ungroup
gtk_gesture_get_group
gtk_gesture_is_grouped_with
<SUBSECTION Standard>
GTK_TYPE_GESTURE
GTK_GESTURE
GTK_GESTURE_CLASS
GTK_IS_GESTURE
GTK_IS_GESTURE_CLASS
GTK_GESTURE_GET_CLASS
<SUBSECTION Private>
gtk_gesture_get_type
</SECTION>
<SECTION>
<FILE>gtkgesturesingle</FILE>
<TITLE>GtkGestureSingle</TITLE>
GtkGestureSingle
gtk_gesture_single_get_exclusive
gtk_gesture_single_set_exclusive
gtk_gesture_single_get_touch_only
gtk_gesture_single_set_touch_only
gtk_gesture_single_get_button
gtk_gesture_single_set_button
gtk_gesture_single_get_current_button
gtk_gesture_single_get_current_sequence
<SUBSECTION Standard>
GTK_TYPE_GESTURE_SINGLE
GTK_GESTURE_SINGLE
GTK_GESTURE_SINGLE_CLASS
GTK_IS_GESTURE_SINGLE
GTK_IS_GESTURE_SINGLE_CLASS
GTK_GESTURE_SINGLE_GET_CLASS
<SUBSECTION Private>
gtk_gesture_single_get_type
</SECTION>
<SECTION>
<FILE>gtkgesturedrag</FILE>
<TITLE>GtkGestureDrag</TITLE>
GtkGestureDrag
gtk_gesture_drag_new
gtk_gesture_drag_get_start_point
gtk_gesture_drag_get_offset
<SUBSECTION Standard>
GTK_TYPE_GESTURE_DRAG
GTK_GESTURE_DRAG
GTK_GESTURE_DRAG_CLASS
GTK_IS_GESTURE_DRAG
GTK_IS_GESTURE_DRAG_CLASS
GTK_GESTURE_DRAG_GET_CLASS
<SUBSECTION Private>
gtk_gesture_drag_get_type
</SECTION>
<SECTION>
<FILE>gtkgesturelongpress</FILE>
<TITLE>GtkGestureLongPress</TITLE>
GtkGestureLongPress
gtk_gesture_long_press_new
<SUBSECTION Standard>
GTK_TYPE_GESTURE_LONG_PRESS
GTK_GESTURE_LONG_PRESS
GTK_GESTURE_LONG_PRESS_CLASS
GTK_IS_GESTURE_LONG_PRESS
GTK_IS_GESTURE_LONG_PRESS_CLASS
GTK_GESTURE_LONG_PRESS_GET_CLASS
<SUBSECTION Private>
gtk_gesture_long_press_get_type
</SECTION>
<SECTION>
<FILE>gtkgesturemultipress</FILE>
<TITLE>GtkGestureMultiPress</TITLE>
GtkGestureMultiPress
gtk_gesture_multi_press_new
gtk_gesture_multi_press_set_area
gtk_gesture_multi_press_get_area
<SUBSECTION Standard>
GTK_TYPE_GESTURE_MULTI_PRESS
GTK_GESTURE_MULTI_PRESS
GTK_GESTURE_MULTI_PRESS_CLASS
GTK_IS_GESTURE_MULTI_PRESS
GTK_IS_GESTURE_MULTI_PRESS_CLASS
GTK_GESTURE_MULTI_PRESS_GET_CLASS
<SUBSECTION Private>
gtk_gesture_multi_press_get_type
</SECTION>
<SECTION>
<FILE>gtkgesturepan</FILE>
<TITLE>GtkGesturePan</TITLE>
GtkGesturePan
GtkPanDirection
gtk_gesture_pan_new
gtk_gesture_pan_get_orientation
gtk_gesture_pan_set_orientation
<SUBSECTION Standard>
GTK_TYPE_GESTURE_PAN
GTK_GESTURE_PAN
GTK_GESTURE_PAN_CLASS
GTK_IS_GESTURE_PAN
GTK_IS_GESTURE_PAN_CLASS
GTK_GESTURE_PAN_GET_CLASS
<SUBSECTION Private>
gtk_gesture_pan_get_type
</SECTION>
<SECTION>
<FILE>gtkgestureswipe</FILE>
<TITLE>GtkGestureSwipe</TITLE>
GtkGestureSwipe
gtk_gesture_swipe_new
gtk_gesture_swipe_get_velocity
<SUBSECTION Standard>
GTK_TYPE_GESTURE_SWIPE
GTK_GESTURE_SWIPE
GTK_GESTURE_SWIPE_CLASS
GTK_IS_GESTURE_SWIPE
GTK_IS_GESTURE_SWIPE_CLASS
GTK_GESTURE_SWIPE_GET_CLASS
<SUBSECTION Private>
gtk_gesture_swipe_get_type
</SECTION>
<SECTION>
<FILE>gtkgesturerotate</FILE>
<TITLE>GtkGestureRotate</TITLE>
GtkGestureRotate
gtk_gesture_rotate_new
gtk_gesture_rotate_get_angle_delta
<SUBSECTION Standard>
GTK_TYPE_GESTURE_ROTATE
GTK_GESTURE_ROTATE
GTK_GESTURE_ROTATE_CLASS
GTK_IS_GESTURE_ROTATE
GTK_IS_GESTURE_ROTATE_CLASS
GTK_GESTURE_ROTATE_GET_CLASS
<SUBSECTION Private>
gtk_gesture_rotate_get_type
</SECTION>
<SECTION>
<FILE>gtkgesturezoom</FILE>
<TITLE>GtkGestureZoom</TITLE>
GtkGestureZoom
gtk_gesture_zoom_new
gtk_gesture_zoom_get_scale_delta
<SUBSECTION Standard>
GTK_TYPE_GESTURE_ZOOM
GTK_GESTURE_ZOOM
GTK_GESTURE_ZOOM_CLASS
GTK_IS_GESTURE_ZOOM
GTK_IS_GESTURE_ZOOM_CLASS
GTK_GESTURE_ZOOM_GET_CLASS
<SUBSECTION Private>
gtk_gesture_zoom_get_type
</SECTION>

View File

@@ -1,59 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gtk3-widget-factory">
<refentryinfo>
<title>gtk3-widget-factory</title>
<productname>GTK+</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Matthias</firstname>
<surname>Clasen</surname>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>gtk3-widget-factory</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gtk3-widget-factory</refname>
<refpurpose>Demonstrate GTK+ widgets</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>gtk3-widget-factory</command>
<arg choice="opt">--help</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para>
<command>gtk3-widget-factory</command> is a collection of examples.
Its purpose is to demonstrate many GTK+ widgets in a form
that is useful to GTK+ theme developers.
</para>
<para>
The application shows widgets in different, typical combinations
and states.
</para>
</refsect1>
<refsect1><title>Options</title>
<para>The following options are understood:</para>
<variablelist>
<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem><para>Show help options</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

View File

@@ -7,7 +7,6 @@ gtk_accel_label_get_type
gtk_accel_map_get_type
gtk_accessible_get_type
gtk_actionable_get_type
gtk_action_bar_get_type
gtk_action_get_type
gtk_action_group_get_type
gtk_activatable_get_type
@@ -64,7 +63,6 @@ gtk_entry_buffer_get_type
gtk_entry_completion_get_type
gtk_entry_get_type
gtk_event_box_get_type
gtk_event_controller_get_type
gtk_expander_get_type
gtk_file_chooser_button_get_type
gtk_file_chooser_dialog_get_type
@@ -81,15 +79,6 @@ gtk_font_chooser_widget_get_type
gtk_font_selection_dialog_get_type
gtk_font_selection_get_type
gtk_frame_get_type
gtk_gesture_get_type
gtk_gesture_drag_get_type
gtk_gesture_long_press_get_type
gtk_gesture_multi_press_get_type
gtk_gesture_pan_get_type
gtk_gesture_rotate_get_type
gtk_gesture_single_get_type
gtk_gesture_swipe_get_type
gtk_gesture_zoom_get_type
gtk_grid_get_type
gtk_handle_box_get_type
gtk_hbox_get_type

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,287 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="chap-input-handling">
<refmeta>
<refentrytitle>The GTK+ Input Handling Model</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>The GTK+ Input Handling Model</refname>
<refpurpose>
GTK+ input handling in detail
</refpurpose>
</refnamediv>
<refsect1 id="input-overview">
<title>Overview of GTK+ input handling</title>
<para>
This chapter describes in detail how GTK+ handles input. If you are interested
in what happens to translate a key press or mouse motion of the users into a
change of a GTK+ widget, you should read this chapter. This knowledge will also
be useful if you decide to implement your own widgets.
</para>
<refsect2>
<title>Devices and events</title>
<!-- input devices: master/slave, keyboard/pointer/touch -->
<para>
The most basic input devices that every computer user has interacted with are
keyboards and mice; beyond these, GTK+ supports touchpads, touchscreens and
more exotic input devices such as graphics tablets. Inside GTK+, every such
input device is represented by a #GdkDevice object.
</para>
<para>
To simplify dealing with the variability between these input devices, GTK+
has a concept of master and slave devices. The concrete physical devices that
have many different characteristics (mice may have 2 or 3 or 8 buttons,
keyboards have different layouts and may or may not have a separate number
block, etc) are represented as slave devices. Each slave device is
associated with a virtual master device. Master devices always come in
pointer/keyboard pairs - you can think of such a pair as a 'seat'.
</para>
<para>
GTK+ widgets generally deal with the master devices, and thus can be used
with any pointing device or keyboard.
</para>
<!-- input events: button, touch, key, motion, etc -->
<para>
When a user interacts with an input device (e.g. moves a mouse or presses
a key on the keyboard), GTK+ receives events from the windowing system.
These are typically directed at a specific window - for pointer events,
the window under the pointer (grabs complicate this), for keyboard events,
the window with the keyboard focus.
</para>
<para>
GDK translates these raw windowing system events into #GdkEvents.
Typical input events are:
<simplelist>
<member>GdkEventButton</member>
<member>GdkEventMotion</member>
<member>GdkEventCrossing</member>
<member>GdkEventKey</member>
<member>GdkEventFocus</member>
<member>GdkEventTouch</member>
</simplelist>
</para>
<para>
Additionally, GDK/GTK synthesizes other signals to let know whether
grabs (system-wide or in-app) are taking input away:
<simplelist>
<member>GdkEventGrabBroken</member>
<member>GtkWidget::grab-notify</member>
</simplelist>
</para>
<para>
When GTK+ is initialized, it sets up an event handler function with
gdk_event_handler_set(), which receives all of these input events
(as well as others, for instance window management related events).
</para>
</refsect2>
<refsect2>
<title>Event propagation</title>
<para>
When GTK+ receives an event, it determines the target widget that
it is directed to. Unless grabs are involved, this is done by finding
the widget to which the window of the event belongs.
</para>
<para>
The event is then propagated from the toplevel window down to the
target widget. In this phase, which is known as the “capture” phase,
gestures that are attached with GTK_PHASE_CAPTURE get a chance
to react to the event.
</para>
<para>
After the “capture” phase, the widget that was intended to be the
destination of the event will let run gestures attached to it with
GTK_PHASE_TARGET. This is known as the “target” phase, and does only
happen on that widget.
</para>
<para>
Next, the appropriate event signal is emitted for the event in question,
e.g. “motion-notify-event”. Handling these signals was the primary
way to handle input in GTK+ widgets before gestures were introduced.
The signals are emitted from the target widget up to the toplevel,
until a signal handler indicates that it has handled the event, by
returning GDK_EVENT_STOP.
</para>
<para>
The default handlers for the event signals send the event
to gestures that are attached with GTK_PHASE_BUBBLE. Therefore,
gestures in the “bubble” phase are only used if the widget does
not have its own event handlers, or takes care to chain up to the
default GtkWidget handlers.
</para>
<para>
Anytime during the propagation phase, a widget may indicate that a
received event was consumed and propagation should therefore be stopped.
In traditional event handlers, this is hinted by returning GDK_EVENT_STOP,
if gestures are used, this may happen when the widget tells the gesture
to claim the event touch sequence (or the pointer events) for its own. See the
"gesture states" section below to know more of the latter.
</para>
</refsect2>
<refsect2>
<title>Touch events</title>
<para>
Touch events are emitted as events of type GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE or
GDK_TOUCH_END, those events contain an “event sequence” that univocally identifies
the physical touch until it is lifted from the device.
</para>
<para>
On some windowing platforms, multitouch devices perform pointer emulation, this works
by granting a “pointer emulating” hint to one of the currently interacting touch
sequences, which will be reported on every GdkEventTouch event from that sequence. By
default, if a widget didn't request touch events by setting GDK_TOUCH_MASK on its
event mask and didn't override GtkWidget::touch-event, GTK+ will transform these
“pointer emulating” events into semantically similar GdkEventButton and GdkEventMotion
events. Depending on GDK_TOUCH_MASK being in the event mask or not, non-pointer-emulating
sequences could still trigger gestures or just get filtered out, regardless of the widget
not handling those directly.
</para>
<para>
If the widget sets GDK_TOUCH_MASK on its event mask and doesn't chain up on
GtkWidget::touch-event, only touch events will be received, and no pointer emulation
will be performed.
</para>
</refsect2>
<refsect2>
<title>Grabs</title>
<para>
Grabs are a method to claim all input events from a device, they happen
either implicitly on pointer and touch devices, or explicitly. Implicit grabs
happen on user interaction, when a GdkEventButtonPress happens, all events from
then on, until after the corresponding GdkEventButtonRelease, will be reported
to the widget that got the first event. Likewise, on touch events, every
GdkEventSequence will deliver only events to the widget that received its
GDK_TOUCH_BEGIN event.
</para>
<para>
Explicit grabs happen programatically (both activation and deactivation),
and can be either system-wide (GDK grabs) or application-wide (GTK grabs).
On the windowing platforms that support it, GDK grabs will prevent any
interaction with any other application/window/widget than the grabbing one,
whereas GTK grabs will be effective only within the application (across all
its windows), still allowing for interaction with other applications.
</para>
<para>
But one important aspect of grabs is that they may potentially happen at any
point somewhere else, even while the pointer/touch device is already grabbed.
This makes it necessary for widgets to handle the cancellation of any ongoing
interaction. Depending on whether a GTK or GDK grab is causing this, the
widget will respectively receive a GtkWidget::grab-notify signal, or a
GdkEventGrabBroken event.
</para>
<para>
On gestures, these signals are handled automatically, causing the gesture
to cancel all tracked pointer/touch events, and signal the end of recognition.
</para>
</refsect2>
<refsect2>
<title>Keyboard input</title>
<!-- focus, tab, directional navigation -->
<!-- mnemonics, accelerators, bindings -->
</refsect2>
<refsect2>
<title>Event controllers and gestures</title>
<para>
Event controllers are standalone objects that can perform specific actions
upon received GdkEvents. These are tied to a GtkWidget, and can be told of
the event propagation phase at which they will manage the events.
</para>
<para>
Gestures are a set of specific controllers that are prepared to handle pointer
and/or touch events, each gestures implementation attempts to recognize specific
actions out the received events, notifying of the state/progress accordingly to
let the widget react to those. On multi-touch gestures, every interacting touch
sequence will be tracked independently.
</para>
<para>
Being gestures “simple” units, it is not uncommon to tie several together to
perform higher level actions, grouped gestures handle the same event sequences
simultaneously, and those sequences share a same state across all grouped
gestures. Some examples of grouping may be:
<simplelist>
<member>
A “drag” and a “swipe” gestures may want grouping. The former will report
events as the dragging happens, the latter will tell the swipe X/Y velocities
only after gesture has finished.
</member>
<member>
Grouping a “drag” gesture with a “pan” gesture will only effectively allow
dragging in the panning orientation, as both gestures share state.
</member>
<member>
If “press” and “long press” are wanted simultaneously, those would need grouping.
</member>
</simplelist>
</para>
</refsect2>
<refsect2>
<title>Gesture states</title>
<para>
Gestures have a notion of “state” for each individual touch sequence. When events
from a touch sequence are first received, the touch sequence will have “none” state,
this means the touch sequence is being handled by the gesture to possibly trigger
actions, but the event propagation will not be stopped.
</para>
<para>
When the gesture enters recognition, or at a later point in time, the widget may
choose to claim the touch sequences (individually or as a group), hence stopping
event propagation after the event is run through every gesture in that widget and
propagation phase. Anytime this happens, the touch sequences are cancelled downwards
the propagation chain, to let these know that no further events will be sent.
</para>
<para>
Alternatively, or at a later point in time, the widget may choose to deny the touch
sequences, thus letting those go through again in event propagation. When this happens
in the capture phase, and if there are no other claiming gestures in the widget,
a GDK_TOUCH_BEGIN/GDK_BUTTON_PRESS event will be emulated and
propagated downwards, in order to preserve consistency.
</para>
<para>
Grouped gestures always share the same state for a given touch sequence, so setting
the state on one does transfer the state to the others. They also are mutually exclusive,
within a widget there may be only one gesture group claiming a given sequence. If
another gesture group claims later that same sequence, the first group will deny the
sequence.
</para>
</refsect2>
</refsect1>
</refentry>

View File

@@ -415,7 +415,7 @@ How do I use GTK+ with other non-C languages?
<answer>
<para>
See the <ulink url="http://www.gtk.org/language-bindings.php">list of language
See the <ulink url="http://www.gtk.org/bindings.html">list of language
bindings</ulink> on <ulink
url="http://www.gtk.org">http://www.gtk.org</ulink>.
</para>

View File

@@ -162,6 +162,10 @@ additional environment variables.
<term>keybindings</term>
<listitem><para>Keybindings</para></listitem>
</varlistentry>
<varlistentry>
<term>multihead</term>
<listitem><para>Working on multiple displays</para></listitem>
</varlistentry>
<varlistentry>
<term>modules</term>
<listitem><para>Loading of modules</para></listitem>
@@ -190,27 +194,10 @@ additional environment variables.
<term>no-css-cache</term>
<listitem><para>Bypass caching for CSS style properties.</para></listitem>
</varlistentry>
<varlistentry>
<term>baselines</term>
<listitem><para>Baselines.</para></listitem>
</varlistentry>
<varlistentry>
<term>pixel-cache</term>
<listitem><para>Pixel cache.</para></listitem>
</varlistentry>
<varlistentry>
<term>no-pixel-cache</term>
<listitem><para>Disable the pixel cache.</para></listitem>
</varlistentry>
<varlistentry>
<term>interactive</term>
<listitem><para>Open the <link linkend="interactive-debugging">interactive debugger</link>.</para></listitem>
</varlistentry>
</variablelist>
The special value <literal>all</literal> can be used to turn on all
debug options. The special value <literal>help</literal> can be used
to obtain a list of all supported debug options.
debug options.
</para>
</formalpara>
@@ -391,6 +378,10 @@ nevertheless.
<term>nograbs</term>
<listitem><para>Turn off all pointer and keyboard grabs</para></listitem>
</varlistentry>
<varlistentry>
<term>multihead</term>
<listitem><para>Information related to multiple screens</para></listitem>
</varlistentry>
<varlistentry>
<term>xinerama</term>
<listitem><para>Simulate a multi-monitor setup</para></listitem>
@@ -518,38 +509,6 @@ nevertheless.
</refsect2>
<refsect2 id="interactive-debugging">
<title>Interactive debugging</title>
<inlinegraphic fileref="inspector.png" format="PNG"></inlinegraphic>
<para>
GTK+ includes an interactive debugger, called the GTK+ Inspector, which
lets you explore the widget tree of any GTK+ application at runtime, as
well as tweak the theme and trigger visual debugging aids. You can
easily try out changes at runtime before putting them into the code.
</para>
<para>
Note that the GTK+ inspector can only show GTK+ internals. It can not
understand the application-specific logic of a GTK+ application. Also,
the fact that the GTK+ inspector is running in the application process
limits what it can do. It is meant as a complement to full-blown debuggers
and system tracing facilities such as DTrace, not as a replacement.
</para>
<para>
To enable the GTK+ inspector, you can use the Control-Shift-I or
Control-Shift-D keyboard shortcuts, or set the
<envar>GTK_DEBUG=interactive</envar> environment variable.
</para>
<para>
In some situations, it may be inappropriate to give users access to the
GTK+ inspector. The keyboard shortcuts can be disabled with the
`enable-inspector-keybinding` key in the `org.gtk.Settings.Debug`
GSettings schema.
</para>
</refsect2>
</refsect1>
</refentry>

View File

@@ -123,12 +123,6 @@
<link linkend="GtkHeaderBar">
<inlinegraphic fileref="headerbar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkSearchBar">
<inlinegraphic fileref="search-bar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkActionBar">
<inlinegraphic fileref="action-bar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkListBox">
<inlinegraphic fileref="list-box.png" format="PNG"></inlinegraphic>
</link>

View File

@@ -395,73 +395,6 @@ create_info_bar (void)
return info;
}
static WidgetInfo *
create_search_bar (void)
{
GtkWidget *widget;
GtkWidget *entry;
WidgetInfo *info;
GtkWidget *view;
GtkWidget *box;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
widget = gtk_search_bar_new ();
entry = gtk_search_entry_new ();
gtk_entry_set_text (GTK_ENTRY (entry), "Search Bar");
gtk_container_add (GTK_CONTAINER (widget), entry);
gtk_widget_show (entry);
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (widget), TRUE);
gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (widget), TRUE);
gtk_container_add (GTK_CONTAINER (box), widget);
view = gtk_text_view_new ();
gtk_widget_show (view);
gtk_box_pack_start (GTK_BOX (box), view, TRUE, TRUE, 0);
info = new_widget_info ("search-bar", box, SMALL);
gtk_container_set_border_width (GTK_CONTAINER (info->window), 0);
return info;
}
static WidgetInfo *
create_action_bar (void)
{
GtkWidget *widget;
GtkWidget *button;
WidgetInfo *info;
GtkWidget *view;
GtkWidget *box;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
view = gtk_text_view_new ();
gtk_widget_show (view);
gtk_box_pack_start (GTK_BOX (box), view, TRUE, TRUE, 0);
widget = gtk_action_bar_new ();
button = gtk_button_new_from_icon_name ("object-select-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (widget), button);
button = gtk_button_new_from_icon_name ("call-start-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (widget), button);
g_object_set (gtk_widget_get_parent (button), "margin", 6, "spacing", 6, NULL);
gtk_widget_show (widget);
gtk_container_add (GTK_CONTAINER (box), widget);
info = new_widget_info ("action-bar", box, SMALL);
gtk_container_set_border_width (GTK_CONTAINER (info->window), 0);
return info;
}
static WidgetInfo *
create_recent_chooser_dialog (void)
{
@@ -1476,8 +1409,6 @@ get_all_widgets (void)
{
GList *retval = NULL;
retval = g_list_prepend (retval, create_search_bar ());
retval = g_list_prepend (retval, create_action_bar ());
retval = g_list_prepend (retval, create_list_box());
retval = g_list_prepend (retval, create_flow_box());
retval = g_list_prepend (retval, create_headerbar ());

View File

@@ -476,11 +476,10 @@ main (int argc, char **argv)
{
PlugMan *plug_man;
int status;
const gchar *accels[] = { "F11", NULL };
plug_man = plug_man_new ();
gtk_application_set_accels_for_action (GTK_APPLICATION (plug_man),
"win.fullscreen", accels);
gtk_application_add_accelerator (GTK_APPLICATION (plug_man),
"F11", "win.fullscreen", NULL);
status = g_application_run (G_APPLICATION (plug_man), argc, argv);
g_object_unref (plug_man);

View File

@@ -62,11 +62,11 @@ LDADD = \
#
# GDK header files for public installation (non-generated)
#
#
gdk_public_h_sources = \
gdk.h \
gdkapplaunchcontext.h \
gdkcairo.h \
gdkcolor.h \
gdkcursor.h \
gdkdevice.h \
gdkdevicemanager.h \
@@ -94,13 +94,6 @@ gdk_public_h_sources = \
gdkvisual.h \
gdkwindow.h
deprecated_h_sources = \
deprecated/gdkcolor.h
gdk_h_sources = \
$(gdk_public_h_sources) \
$(deprecated_h_sources)
gdk_private_headers = \
gdkapplaunchcontextprivate.h \
gdkcursorprivate.h \
@@ -118,14 +111,11 @@ gdk_private_headers = \
gdkvisualprivate.h \
gdkx.h
deprecated_c_sources = \
deprecated/gdkcolor.c
gdk_c_sources = \
$(deprecated_c_sources) \
gdk.c \
gdkapplaunchcontext.c \
gdkcairo.c \
gdkcolor.c \
gdkcursor.c \
gdkdeprecated.c \
gdkdevice.c \
@@ -167,9 +157,6 @@ gdkincludedir = $(includedir)/gtk-3.0/gdk
gdkinclude_HEADERS = $(gdk_public_h_sources) gdkenumtypes.h gdkversionmacros.h
nodist_gdkinclude_HEADERS = gdkconfig.h
deprecatedincludedir = $(includedir)/gtk-3.0/gdk/deprecated
deprecatedinclude_HEADERS = $(deprecated_h_sources)
common_sources = \
$(gdk_private_headers) \
$(gdk_c_sources) \
@@ -209,7 +196,7 @@ endif
if HAVE_INTROSPECTION
introspection_files = \
$(filter-out gdkkeysyms-compat.h, $(gdk_h_sources)) \
$(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources)) \
$(gdk_c_sources) \
gdkenumtypes.c \
gdkenumtypes.h
@@ -391,15 +378,15 @@ BUILT_SOURCES = \
gdkenumtypes.h: stamp-gdkenumtypes.h
@true
stamp-gdkenumtypes.h: $(gdk_h_sources) gdkenumtypes.h.template
stamp-gdkenumtypes.h: $(gdk_public_h_sources) gdkenumtypes.h.template
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
$(gdk_h_sources) ) >> xgen-geth \
$(gdk_public_h_sources) ) >> xgen-geth \
&& (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
&& rm -f xgen-geth \
&& echo timestamp > $(@F)
gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template
gdkenumtypes.c: $(gdk_public_h_sources) gdkenumtypes.c.template
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
$(gdk_h_sources) ) > xgen-getc \
$(gdk_public_h_sources) ) > xgen-getc \
&& cp xgen-getc gdkenumtypes.c \
&& rm -f xgen-getc
@@ -426,7 +413,7 @@ stamp-gc-h: $(top_builddir)/config.status
dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../build/win32/vs10/gdk.vcxproj.filters
../build/win32/vs9/gdk.vcproj: ../build/win32/vs9/gdk.vcprojin
for F in `echo $(libgdk_3_la_SOURCES) | tr '/' '\\'`; do \
for F in $(libgdk_3_la_SOURCES); do \
case $$F in \
*.c) echo ' <File RelativePath="..\..\..\gdk\'$$F'" />' \
;; \
@@ -436,7 +423,7 @@ dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../buil
rm libgdk.sourcefiles
../build/win32/vs10/gdk.vcxproj: ../build/win32/vs10/gdk.vcxprojin
for F in `echo $(libgdk_3_la_SOURCES) | tr '/' '\\'`; do \
for F in $(libgdk_3_la_SOURCES); do \
case $$F in \
*.c) echo ' <ClCompile Include="..\..\..\gdk\'$$F'" />' \
;; \
@@ -446,7 +433,7 @@ dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../buil
rm libgdk.vs10.sourcefiles
../build/win32/vs10/gdk.vcxproj.filters: ../build/win32/vs10/gdk.vcxproj.filtersin
for F in `echo $(libgdk_3_la_SOURCES) | tr '/' '\\'`; do \
for F in $(libgdk_3_la_SOURCES); do \
case $$F in \
*.c) echo ' <ClCompile Include="..\..\..\gdk\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
;; \

View File

@@ -24,6 +24,8 @@
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#include "gdkversionmacros.h"
#include "gdkmain.h"
@@ -357,9 +359,8 @@ gdk_get_display (void)
* Gets the display name specified in the command line arguments passed
* to gdk_init() or gdk_parse_args(), if any.
*
* Returns: (nullable): the display name, if specified explicitly,
* otherwise %NULL this string is owned by GTK+ and must not be
* modified or freed.
* Returns: the display name, if specified explicitly, otherwise %NULL
* this string is owned by GTK+ and must not be modified or freed.
*
* Since: 2.2
*/
@@ -381,8 +382,8 @@ gdk_get_display_arg_name (void)
* display has previously been set, simply returns that. An internal
* function that should not be used by applications.
*
* Returns: (nullable) (transfer none): the default display, if it
* could be opened, otherwise %NULL.
* Returns: (transfer none): the default display, if it could be
* opened, otherwise %NULL.
**/
GdkDisplay *
gdk_display_open_default_libgtk_only (void)

View File

@@ -31,6 +31,7 @@
#include <gdk/gdkversionmacros.h>
#include <gdk/gdkapplaunchcontext.h>
#include <gdk/gdkcairo.h>
#include <gdk/gdkcolor.h>
#include <gdk/gdkcursor.h>
#include <gdk/gdkdevice.h>
#include <gdk/gdkdevicemanager.h>
@@ -57,10 +58,6 @@
#include <gdk/gdkvisual.h>
#include <gdk/gdkwindow.h>
#ifndef GDK_DISABLE_DEPRECATED
#include <gdk/deprecated/gdkcolor.h>
#endif
#undef __GDK_H_INSIDE__
#endif /* __GDK_H__ */

View File

@@ -23,7 +23,7 @@
#endif
#include <gdk/gdkversionmacros.h>
#include <gdk/deprecated/gdkcolor.h>
#include <gdk/gdkcolor.h>
#include <gdk/gdkrgba.h>
#include <gdk/gdkpixbuf.h>
#include <pango/pangocairo.h>

View File

@@ -31,8 +31,6 @@
#include <time.h>
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/**
* SECTION:colors
* @Short_description: Manipulation of colors
@@ -41,8 +39,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* A #GdkColor represents a color.
*
* When working with cairo, it is often more convenient
* to use a #GdkRGBA instead, and #GdkColor has been
* deprecated in favor of #GdkRGBA.
* to use a #GdkRGBA instead.
*/
@@ -55,8 +52,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* The result must be freed using gdk_color_free().
*
* Returns: a copy of @color
*
* Deprecated: 3.14: Use #GdkRGBA
*/
GdkColor*
gdk_color_copy (const GdkColor *color)
@@ -75,8 +70,6 @@ gdk_color_copy (const GdkColor *color)
* @color: a #GdkColor
*
* Frees a #GdkColor created with gdk_color_copy().
*
* Deprecated: 3.14: Use #GdkRGBA
*/
void
gdk_color_free (GdkColor *color)
@@ -94,8 +87,6 @@ gdk_color_free (GdkColor *color)
* table that stores #GdkColors.
*
* Returns: The hash function applied to @color
*
* Deprecated: 3.14: Use #GdkRGBA
*/
guint
gdk_color_hash (const GdkColor *color)
@@ -114,8 +105,6 @@ gdk_color_hash (const GdkColor *color)
* Compares two colors.
*
* Returns: %TRUE if the two colors compare equal
*
* Deprecated: 3.14: Use #GdkRGBA
*/
gboolean
gdk_color_equal (const GdkColor *colora,
@@ -150,8 +139,6 @@ G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
* and \#ffffffffffff).
*
* Returns: %TRUE if the parsing succeeded
*
* Deprecated: 3.14: Use #GdkRGBA
*/
gboolean
gdk_color_parse (const gchar *spec,
@@ -184,8 +171,6 @@ gdk_color_parse (const gchar *spec,
* Returns: a newly-allocated text string
*
* Since: 2.12
*
* Deprecated: 3.14: Use #GdkRGBA
*/
gchar *
gdk_color_to_string (const GdkColor *color)

View File

@@ -59,24 +59,24 @@ struct _GdkColor
#define GDK_TYPE_COLOR (gdk_color_get_type ())
GDK_DEPRECATED_IN_3_14
GDK_AVAILABLE_IN_ALL
GType gdk_color_get_type (void) G_GNUC_CONST;
GDK_DEPRECATED_IN_3_14
GDK_AVAILABLE_IN_ALL
GdkColor *gdk_color_copy (const GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_AVAILABLE_IN_ALL
void gdk_color_free (GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_AVAILABLE_IN_ALL
guint gdk_color_hash (const GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_AVAILABLE_IN_ALL
gboolean gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
GDK_DEPRECATED_IN_3_14
GDK_AVAILABLE_IN_ALL
gboolean gdk_color_parse (const gchar *spec,
GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_AVAILABLE_IN_ALL
gchar * gdk_color_to_string (const GdkColor *color);

View File

@@ -264,8 +264,8 @@ gdk_cursor_new_for_display (GdkDisplay *display,
* Creates a new cursor by looking up @name in the current cursor
* theme.
*
* Returns: (nullable): a new #GdkCursor, or %NULL if there is no
* cursor with the given name
* Returns: a new #GdkCursor, or %NULL if there is no cursor with
* the given name
*
* Since: 2.8
*/
@@ -423,8 +423,7 @@ gdk_cursor_get_display (GdkCursor *cursor)
* on the cursor, GDK may not be able to obtain the image data. In this
* case, %NULL is returned.
*
* Returns: (nullable) (transfer full): a #GdkPixbuf representing
* @cursor, or %NULL
* Returns: (transfer full): a #GdkPixbuf representing @cursor, or %NULL
*
* Since: 2.8
*/
@@ -479,10 +478,8 @@ gdk_cursor_get_image (GdkCursor *cursor)
/**
* gdk_cursor_get_surface:
* @cursor: a #GdkCursor
* @x_hot: (optional) (out): Location to store the hotspot x position,
* or %NULL
* @y_hot: (optional) (out): Location to store the hotspot y position,
* or %NULL
* @x_hot: Location to store the hotspot x position, or %NULL
* @y_hot: Location to store the hotspot y position, or %NULL
*
* Returns a cairo image surface with the image used to display the cursor.
*
@@ -490,8 +487,7 @@ gdk_cursor_get_image (GdkCursor *cursor)
* on the cursor, GDK may not be able to obtain the image data. In this
* case, %NULL is returned.
*
* Returns: (nullable) (transfer full): a #cairo_surface_t
* representing @cursor, or %NULL
* Returns: (transfer full): a #cairo_surface_t representing @cursor, or %NULL
*
* Since: 3.10
*/

View File

@@ -219,8 +219,10 @@ GType gdk_cursor_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display,
GdkCursorType cursor_type);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
#endif
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
GdkPixbuf *pixbuf,

View File

@@ -190,7 +190,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
GDK_TYPE_INPUT_SOURCE,
GDK_SOURCE_MOUSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_STATIC_STRINGS));
/**
* GdkDevice:input-mode:
*
@@ -205,7 +205,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
P_("Input mode for the device"),
GDK_TYPE_INPUT_MODE,
GDK_MODE_DISABLED,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GdkDevice:has-cursor:
*
@@ -383,9 +383,9 @@ gdk_device_get_property (GObject *object,
* gdk_device_get_state: (skip)
* @device: a #GdkDevice.
* @window: a #GdkWindow.
* @axes: (nullable) (array): an array of doubles to store the values of
* the axes of @device in, or %NULL.
* @mask: (optional) (out): location to store the modifiers, or %NULL.
* @axes: an array of doubles to store the values of the axes of @device in,
* or %NULL.
* @mask: location to store the modifiers, or %NULL.
*
* Gets the current state of a pointer device relative to @window. As a slave
* devices coordinates are those of its master pointer, this
@@ -505,8 +505,7 @@ gdk_device_get_position (GdkDevice *device,
* function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE,
* unless there is an ongoing grab on them, see gdk_device_grab().
*
* Returns: (nullable) (transfer none): the #GdkWindow under the
* device position, or %NULL.
* Returns: (transfer none): the #GdkWindow under the device position, or %NULL.
*
* Since: 3.0
**/
@@ -555,8 +554,7 @@ gdk_device_get_window_at_position_double (GdkDevice *device,
* function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE,
* unless there is an ongoing grab on them, see gdk_device_grab().
*
* Returns: (nullable) (transfer none): the #GdkWindow under the
* device position, or %NULL.
* Returns: (transfer none): the #GdkWindow under the device position, or %NULL.
*
* Since: 3.0
**/
@@ -585,11 +583,8 @@ gdk_device_get_window_at_position (GdkDevice *device,
* @window: the window with respect to which which the event coordinates will be reported
* @start: starting timestamp for range of events to return
* @stop: ending timestamp for the range of events to return
* @events: (array length=n_events) (out) (transfer full) (optional):
* location to store a newly-allocated array of #GdkTimeCoord, or
* %NULL
* @n_events: (out) (optional): location to store the length of
* @events, or %NULL
* @events: (array length=n_events) (out) (transfer full): location to store a newly-allocated array of #GdkTimeCoord, or %NULL
* @n_events: location to store the length of @events, or %NULL
*
* Obtains the motion history for a pointer device; given a starting and
* ending timestamp, return all events in the motion history for
@@ -649,7 +644,7 @@ _gdk_device_allocate_history (GdkDevice *device,
/**
* gdk_device_free_history: (skip)
* @events: (array length=n_events): an array of #GdkTimeCoord.
* @events: an array of #GdkTimeCoord.
* @n_events: the length of the array.
*
* Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
@@ -946,8 +941,7 @@ gdk_device_get_display (GdkDevice *device)
* If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be
* returned, as there is no associated device.
*
* Returns: (nullable) (transfer none): The associated device, or
* %NULL
* Returns: (transfer none): The associated device, or %NULL
*
* Since: 3.0
**/
@@ -1007,10 +1001,10 @@ _gdk_device_set_associated_device (GdkDevice *device,
* the list of slave devices attached to it, otherwise it will return
* %NULL
*
* Returns: (nullable) (transfer container) (element-type GdkDevice):
* the list of slave devices, or %NULL. The list must be
* freed with g_list_free(), the contents of the list are
* owned by GTK+ and should not be freed.
* Returns: (transfer container) (element-type GdkDevice): the list of
* slave devices, or %NULL. The list must be freed with
* g_list_free(), the contents of the list are owned by GTK+
* and should not be freed.
**/
GList *
gdk_device_list_slave_devices (GdkDevice *device)
@@ -1123,7 +1117,7 @@ gdk_device_list_axes (GdkDevice *device)
* @device: a pointer #GdkDevice.
* @axes: (array): pointer to an array of axes
* @axis_label: #GdkAtom with the axis label.
* @value: (out): location to store the found value.
* @value: location to store the found value.
*
* Interprets an array of double as axis values for a given device,
* and locates the value in the array for a given axis label, as returned

View File

@@ -284,9 +284,9 @@ gdk_device_manager_get_property (GObject *object,
*
* Gets the #GdkDisplay associated to @device_manager.
*
* Returns: (nullable) (transfer none): the #GdkDisplay to which
* @device_manager is associated to, or #NULL. This memory is
* owned by GDK and must not be freed or unreferenced.
* Returns: (transfer none): the #GdkDisplay to which @device_manager is
* associated to, or #NULL. This memory is owned by GDK and
* must not be freed or unreferenced.
*
* Since: 3.0
**/

View File

@@ -306,9 +306,8 @@ gdk_display_is_closed (GdkDisplay *display)
* Gets the next #GdkEvent to be processed for @display, fetching events from the
* windowing system if necessary.
*
* Returns: (nullable): the next #GdkEvent to be processed, or %NULL
* if no events are pending. The returned #GdkEvent should be freed
* with gdk_event_free().
* Returns: the next #GdkEvent to be processed, or %NULL if no events
* are pending. The returned #GdkEvent should be freed with gdk_event_free().
*
* Since: 2.2
**/
@@ -332,9 +331,9 @@ gdk_display_get_event (GdkDisplay *display)
* not get more events from the windowing system. It only checks the events
* that have already been moved to the GDK event queue.)
*
* Returns: (nullable): a copy of the first #GdkEvent on the event
* queue, or %NULL if no events are in the queue. The returned
* #GdkEvent should be freed with gdk_event_free().
* Returns: a copy of the first #GdkEvent on the event queue, or %NULL
* if no events are in the queue. The returned #GdkEvent should be freed with
* gdk_event_free().
*
* Since: 2.2
**/
@@ -586,8 +585,7 @@ gdk_display_get_pointer (GdkDisplay *display,
* if the window under the mouse pointer is not known to GDK (for example,
* belongs to another application).
*
* Returns: (nullable) (transfer none): the window under the mouse
* pointer, or %NULL
* Returns: (transfer none): the window under the mouse pointer, or %NULL
*
* Since: 2.2
*
@@ -1392,9 +1390,8 @@ gdk_display_device_is_grabbed (GdkDisplay *display,
*
* Returns the #GdkDeviceManager associated to @display.
*
* Returns: (nullable) (transfer none): A #GdkDeviceManager, or
* %NULL. This memory is owned by GDK and must not be freed
* or unreferenced.
* Returns: (transfer none): A #GdkDeviceManager, or %NULL. This memory is
* owned by GDK and must not be freed or unreferenced.
*
* Since: 3.0
**/
@@ -1783,8 +1780,8 @@ gdk_display_get_app_launch_context (GdkDisplay *display)
*
* Opens a display.
*
* Returns: (nullable) (transfer none): a #GdkDisplay, or %NULL if the
* display could not be opened
* Returns: (transfer none): a #GdkDisplay, or %NULL
* if the display could not be opened
*
* Since: 2.2
*/

View File

@@ -69,13 +69,13 @@
* notification when displays appear or disappear or the default display
* changes.
*
* You can use gdk_display_manager_get() to obtain the #GdkDisplayManager
* You can use gdk_display_manager_get() to obtain the GdkDisplayManager
* singleton, but that should be rarely necessary. Typically, initializing
* GTK+ opens a display that you can work with without ever accessing the
* #GdkDisplayManager.
* GdkDisplayManager.
*
* The GDK library can be built with support for multiple backends.
* The #GdkDisplayManager object determines which backend is used
* The GdkDisplayManager object determines which backend is used
* at runtime.
*
* When writing backend-specific code that is supposed to work with
@@ -313,8 +313,8 @@ gdk_display_manager_get (void)
*
* Gets the default #GdkDisplay.
*
* Returns: (nullable) (transfer none): a #GdkDisplay, or %NULL if
* there is no default display.
* Returns: (transfer none): a #GdkDisplay, or %NULL
* if there is no default display.
*
* Since: 2.2
*/
@@ -331,8 +331,8 @@ gdk_display_manager_get_default_display (GdkDisplayManager *manager)
* function for:
* `gdk_display_manager_get_default_display (gdk_display_manager_get ())`.
*
* Returns: (nullable) (transfer none): a #GdkDisplay, or %NULL if
* there is no default display.
* Returns: (transfer none): a #GdkDisplay, or %NULL if there is no default
* display.
*
* Since: 2.2
*/
@@ -348,8 +348,7 @@ gdk_display_get_default (void)
* Gets the default screen for the default display. (See
* gdk_display_get_default ()).
*
* Returns: (nullable) (transfer none): a #GdkScreen, or %NULL if
* there is no default display.
* Returns: (transfer none): a #GdkScreen, or %NULL if there is no default display.
*
* Since: 2.2
*/
@@ -412,8 +411,8 @@ gdk_display_manager_list_displays (GdkDisplayManager *manager)
*
* Opens a display.
*
* Returns: (nullable) (transfer none): a #GdkDisplay, or %NULL if the
* display could not be opened
* Returns: (transfer none): a #GdkDisplay, or %NULL
* if the display could not be opened
*
* Since: 3.0
*/

View File

@@ -31,7 +31,17 @@ G_BEGIN_DECLS
typedef struct _GdkDisplayClass GdkDisplayClass;
/* Tracks information about the device grab on this display */
/* Tracks information about the keyboard grab on this display */
typedef struct
{
GdkWindow *window;
GdkWindow *native_window;
gulong serial;
gboolean owner_events;
guint32 time;
} GdkKeyboardGrabInfo;
/* Tracks information about the pointer grab on this display */
typedef struct
{
GdkWindow *window;

View File

@@ -68,7 +68,7 @@ gdk_drag_context_list_targets (GdkDragContext *context)
* @context: a #GdkDragContext
*
* Determines the bitmask of actions proposed by the source if
* gdk_drag_context_get_suggested_action() returns %GDK_ACTION_ASK.
* gdk_drag_context_get_suggested_action() returns GDK_ACTION_ASK.
*
* Returns: the #GdkDragAction flags
*

View File

@@ -80,8 +80,7 @@ _gdk_event_emit (GdkEvent *event)
* Find the first event on the queue that is not still
* being filled in.
*
* Returns: (nullable): Pointer to the list node for that event, or
* %NULL.
* Returns: Pointer to the list node for that event, or NULL.
**/
GList*
_gdk_event_queue_find_first (GdkDisplay *display)
@@ -242,7 +241,7 @@ _gdk_event_queue_remove_link (GdkDisplay *display,
* Removes and returns the first event from the event
* queue that is not still being filled in.
*
* Returns: (nullable): the event, or %NULL. Ownership is transferred
* Returns: the event, or %NULL. Ownership is transferred
* to the caller.
**/
GdkEvent*
@@ -407,9 +406,8 @@ gdk_events_pending (void)
* on, fetching events from the windowing system if necessary.
* See gdk_display_get_event().
*
* Returns: (nullable): the next #GdkEvent to be processed, or %NULL
* if no events are pending. The returned #GdkEvent should be freed
* with gdk_event_free().
* Returns: the next #GdkEvent to be processed, or %NULL if no events
* are pending. The returned #GdkEvent should be freed with gdk_event_free().
**/
GdkEvent*
gdk_event_get (void)
@@ -437,9 +435,9 @@ gdk_event_get (void)
* If there is an event waiting in the event queue of some open
* display, returns a copy of it. See gdk_display_peek_event().
*
* Returns: (nullable): a copy of the first #GdkEvent on some event
* queue, or %NULL if no events are in any queues. The returned
* #GdkEvent should be freed with gdk_event_free().
* Returns: a copy of the first #GdkEvent on some event queue, or %NULL if no
* events are in any queues. The returned #GdkEvent should be freed with
* gdk_event_free().
**/
GdkEvent*
gdk_event_peek (void)
@@ -479,7 +477,11 @@ gdk_event_put (const GdkEvent *event)
if (event->any.window)
display = gdk_window_get_display (event->any.window);
else
display = gdk_display_get_default ();
{
GDK_NOTE (MULTIHEAD,
g_message ("Falling back to default display for gdk_event_put()"));
display = gdk_display_get_default ();
}
gdk_display_put_event (display, event);
}
@@ -906,7 +908,7 @@ gdk_event_get_time (const GdkEvent *event)
/**
* gdk_event_get_state:
* @event: (allow-none): a #GdkEvent or %NULL
* @event: a #GdkEvent or NULL
* @state: (out): return location for state
*
* If the event contains a “state” field, puts that field in @state. Otherwise
@@ -1507,7 +1509,7 @@ gdk_event_set_device (GdkEvent *event,
* If the event contains a “device” field, this function will return
* it, else it will return %NULL.
*
* Returns: (nullable) (transfer none): a #GdkDevice, or %NULL.
* Returns: (transfer none): a #GdkDevice, or %NULL.
*
* Since: 3.0
**/
@@ -1639,7 +1641,7 @@ gdk_event_set_source_device (GdkEvent *event,
* If the event does not contain a device field, this function will
* return %NULL.
*
* Returns: (nullable) (transfer none): a #GdkDevice, or %NULL.
* Returns: (transfer none): a #GdkDevice, or %NULL.
*
* Since: 3.0
**/
@@ -1948,7 +1950,7 @@ gdk_event_get_screen (const GdkEvent *event)
* %GDK_TOUCH_END or %GDK_TOUCH_CANCEL, returns the #GdkEventSequence
* to which the event belongs. Otherwise, return %NULL.
*
* Returns: (transfer none): the event sequence that the event belongs to
* Returns: the event sequence that the event belongs to
*
* Since: 3.4
*/
@@ -2088,32 +2090,35 @@ _gdk_event_button_generate (GdkDisplay *display,
}
void
_gdk_set_window_state (GdkWindow *window,
GdkWindowState new_state)
gdk_synthesize_window_state (GdkWindow *window,
GdkWindowState unset_flags,
GdkWindowState set_flags)
{
GdkEvent temp_event;
GdkWindowState old;
g_return_if_fail (window != NULL);
temp_event.window_state.window = window;
temp_event.window_state.type = GDK_WINDOW_STATE;
temp_event.window_state.send_event = FALSE;
temp_event.window_state.new_window_state = new_state;
old = window->state;
old = temp_event.window_state.window->state;
temp_event.window_state.new_window_state = old;
temp_event.window_state.new_window_state |= set_flags;
temp_event.window_state.new_window_state &= ~unset_flags;
temp_event.window_state.changed_mask = temp_event.window_state.new_window_state ^ old;
if (temp_event.window_state.new_window_state == old)
return; /* No actual work to do, nothing changed. */
temp_event.window_state.changed_mask = new_state ^ old;
/* Actually update the field in GdkWindow, this is sort of an odd
* place to do it, but seems like the safest since it ensures we expose no
* inconsistent state to the user.
*/
window->state = new_state;
window->state = temp_event.window_state.new_window_state;
if (temp_event.window_state.changed_mask & GDK_WINDOW_STATE_WITHDRAWN)
_gdk_window_update_viewable (window);
@@ -2129,6 +2134,7 @@ _gdk_set_window_state (GdkWindow *window,
case GDK_WINDOW_TEMP: /* ? */
gdk_display_put_event (gdk_window_get_display (window), &temp_event);
break;
case GDK_WINDOW_FOREIGN:
case GDK_WINDOW_ROOT:
case GDK_WINDOW_CHILD:
@@ -2136,16 +2142,6 @@ _gdk_set_window_state (GdkWindow *window,
}
}
void
gdk_synthesize_window_state (GdkWindow *window,
GdkWindowState unset_flags,
GdkWindowState set_flags)
{
g_return_if_fail (window != NULL);
_gdk_set_window_state (window, (window->state | set_flags) & ~unset_flags);
}
/**
* gdk_display_set_double_click_time:
* @display: a #GdkDisplay
@@ -2205,22 +2201,6 @@ G_DEFINE_BOXED_TYPE (GdkEvent, gdk_event,
gdk_event_copy,
gdk_event_free)
static GdkEventSequence *
gdk_event_sequence_copy (GdkEventSequence *sequence)
{
return sequence;
}
static void
gdk_event_sequence_free (GdkEventSequence *sequence)
{
/* Nothing to free here */
}
G_DEFINE_BOXED_TYPE (GdkEventSequence, gdk_event_sequence,
gdk_event_sequence_copy,
gdk_event_sequence_free)
/**
* gdk_setting_get:
* @name: the name of the setting.

View File

@@ -30,6 +30,7 @@
#endif
#include <gdk/gdkversionmacros.h>
#include <gdk/gdkcolor.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkdnd.h>
#include <gdk/gdkdevice.h>
@@ -50,7 +51,6 @@ G_BEGIN_DECLS
#define GDK_TYPE_EVENT (gdk_event_get_type ())
#define GDK_TYPE_EVENT_SEQUENCE (gdk_event_sequence_get_type ())
/**
* GDK_PRIORITY_EVENTS:
@@ -189,7 +189,7 @@ typedef enum {
* GdkFilterFunc:
* @xevent: the native event to filter.
* @event: the GDK event to which the X event will be translated.
* @data: (closure): user data set when the filter was installed.
* @data: user data set when the filter was installed.
*
* Specifies the type of function used to filter native events before they are
* converted to GDK events.
@@ -1194,9 +1194,6 @@ union _GdkEvent
GDK_AVAILABLE_IN_ALL
GType gdk_event_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_3_14
GType gdk_event_sequence_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
gboolean gdk_events_pending (void);
GDK_AVAILABLE_IN_ALL
@@ -1305,10 +1302,14 @@ void gdk_set_show_events (gboolean show_events);
GDK_AVAILABLE_IN_ALL
gboolean gdk_get_show_events (void);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gboolean gdk_setting_get (const gchar *name,
GValue *value);
#endif /* GDK_MULTIHEAD_SAFE */
G_END_DECLS
#endif /* __GDK_EVENTS_H__ */

View File

@@ -436,7 +436,7 @@ _gdk_frame_clock_begin_frame (GdkFrameClock *frame_clock)
* for the current frame or a recent frame. The #GdkFrameTimings
* object may not yet be complete: see gdk_frame_timings_get_complete().
*
* Returns: (nullable): the #GdkFrameTimings object for the specified
* Returns: the #GdkFrameTimings object for the specified
* frame, or %NULL if it is not available. See
* gdk_frame_clock_get_history_start().
* Since: 3.8
@@ -469,10 +469,10 @@ gdk_frame_clock_get_timings (GdkFrameClock *frame_clock,
*
* Gets the frame timings for the current frame.
*
* Returns: (nullable): the #GdkFrameTimings for the frame currently
* being processed, or even no frame is being processed, for the
* previous frame. Before any frames have been procesed, returns
* %NULL.
* Returns: the #GdkFrameTimings for the frame currently being
* processed, or even no frame is being processed, for the
* previous frame. Before any frames have been procesed,
* returns %NULL.
* Since: 3.8
*/
GdkFrameTimings *

View File

@@ -321,8 +321,9 @@ void _gdk_windowing_event_data_copy (const GdkEvent *src,
GdkEvent *dst);
void _gdk_windowing_event_data_free (GdkEvent *event);
void _gdk_set_window_state (GdkWindow *window,
GdkWindowState new_state);
void gdk_synthesize_window_state (GdkWindow *window,
GdkWindowState unset_flags,
GdkWindowState set_flags);
gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
GdkRectangle *extents);

View File

@@ -680,9 +680,9 @@ gdk_keymap_get_modifier_mask (GdkKeymap *keymap,
* `gdk/gdkkeysyms.h` header file
* but without the leading “GDK_KEY_”.
*
* Returns: (nullable) (transfer none): a string containing the name
* of the key, or %NULL if @keyval is not a valid key. The string
* should not be modified.
* Returns: (transfer none): a string containing the name of the key,
* or %NULL if @keyval is not a valid key. The string should not be
* modified.
*/
gchar *
gdk_keyval_name (guint keyval)

View File

@@ -80,8 +80,10 @@ struct _GdkKeymapKey
GDK_AVAILABLE_IN_ALL
GType gdk_keymap_get_type (void) G_GNUC_CONST;
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
GdkKeymap* gdk_keymap_get_default (void);
#endif
GDK_AVAILABLE_IN_ALL
GdkKeymap* gdk_keymap_get_for_display (GdkDisplay *display);

View File

@@ -95,6 +95,8 @@ GdkGrabStatus gdk_keyboard_grab (GdkWindow *window,
guint32 time_);
#endif /* GDK_MULTIDEVICE_SAFE */
#ifndef GDK_MULTIHEAD_SAFE
#ifndef GDK_MULTIDEVICE_SAFE
GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
void gdk_pointer_ungrab (guint32 time_);
@@ -120,6 +122,8 @@ void gdk_set_double_click_time (guint msec);
GDK_AVAILABLE_IN_ALL
void gdk_beep (void);
#endif /* GDK_MULTIHEAD_SAFE */
GDK_AVAILABLE_IN_ALL
void gdk_flush (void);

View File

@@ -321,8 +321,7 @@ gdk_offscreen_window_get_device_state (GdkWindow *window,
* If you need to keep this around over window resizes, you need to
* add a reference to it.
*
* Returns: (nullable) (transfer none): The offscreen surface, or
* %NULL if not offscreen
* Returns: (transfer none): The offscreen surface, or %NULL if not offscreen
*/
cairo_surface_t *
gdk_offscreen_window_get_surface (GdkWindow *window)
@@ -609,8 +608,8 @@ gdk_offscreen_window_set_embedder (GdkWindow *window,
*
* Gets the window that @window is embedded in.
*
* Returns: (nullable) (transfer none): the embedding #GdkWindow, or
* %NULL if @window is not an mbedded offscreen window
* Returns: (transfer none): the embedding #GdkWindow, or %NULL
* if @window is not an mbedded offscreen window
*
* Since: 2.18
*/
@@ -735,7 +734,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->focus = NULL;
impl_class->set_type_hint = NULL;
impl_class->get_type_hint = NULL;
impl_class->set_modal_hint = gdk_offscreen_window_set_boolean;
impl_class->set_modal_hint = NULL;
impl_class->set_skip_taskbar_hint = gdk_offscreen_window_set_boolean;
impl_class->set_skip_pager_hint = gdk_offscreen_window_set_boolean;
impl_class->set_urgency_hint = gdk_offscreen_window_set_boolean;
@@ -746,7 +745,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->set_transient_for = gdk_offscreen_window_set_transient_for;
impl_class->get_frame_extents = gdk_offscreen_window_get_frame_extents;
impl_class->set_override_redirect = NULL;
impl_class->set_accept_focus = gdk_offscreen_window_set_boolean;
impl_class->set_accept_focus = NULL;
impl_class->set_focus_on_map = gdk_offscreen_window_set_boolean;
impl_class->set_icon_list = gdk_offscreen_window_set_list;
impl_class->set_icon_name = gdk_offscreen_window_set_string;

View File

@@ -31,8 +31,10 @@ G_BEGIN_DECLS
GDK_AVAILABLE_IN_ALL
PangoContext *gdk_pango_context_get_for_screen (GdkScreen *screen);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
PangoContext *gdk_pango_context_get (void);
#endif
/* Get a clip region to draw only part of a layout or

View File

@@ -24,6 +24,7 @@
#include "gdkpixbuf.h"
#include "gdkcolor.h"
#include "gdkwindow.h"
#include "gdkinternals.h"
@@ -76,8 +77,8 @@
* (In short, there are several ways this function can fail, and if it fails
* it returns %NULL; so check the return value.)
*
* Returns: (nullable) (transfer full): A newly-created pixbuf with a
* reference count of 1, or %NULL on error
* Returns: (transfer full): A newly-created pixbuf with a reference
* count of 1, or %NULL on error
*/
GdkPixbuf *
gdk_pixbuf_get_from_window (GdkWindow *src,
@@ -224,8 +225,8 @@ convert_no_alpha (guchar *dest_data,
* This function will create an RGB pixbuf with 8 bits per channel.
* The pixbuf will contain an alpha channel if the @surface contains one.
*
* Returns: (nullable) (transfer full): A newly-created pixbuf with a
* reference count of 1, or %NULL on error
* Returns: (transfer full): A newly-created pixbuf with a reference
* count of 1, or %NULL on error
*/
GdkPixbuf *
gdk_pixbuf_get_from_surface (cairo_surface_t *surface,

View File

@@ -427,8 +427,8 @@ gdk_screen_set_font_options (GdkScreen *screen,
*
* Gets any options previously set with gdk_screen_set_font_options().
*
* Returns: (nullable): the current font options, or %NULL if no
* default font options have been set.
* Returns: the current font options, or %NULL if no default
* font options have been set.
*
* Since: 2.10
**/
@@ -760,8 +760,8 @@ gdk_screen_get_monitor_height_mm (GdkScreen *screen,
* Usually something like VGA, DVI, or TV, not the actual
* product name of the display device.
*
* Returns: (nullable): a newly-allocated string containing the name
* of the monitor, or %NULL if the name cannot be determined
* Returns: a newly-allocated string containing the name of the monitor,
* or %NULL if the name cannot be determined
*
* Since: 2.14
*/
@@ -899,9 +899,8 @@ gdk_screen_get_system_visual (GdkScreen * screen)
* For setting an overall opacity for a top-level window, see
* gdk_window_set_opacity().
*
* Returns: (nullable) (transfer none): a visual to use for windows
* with an alpha channel or %NULL if the capability is not
* available.
* Returns: (transfer none): a visual to use for windows with an
* alpha channel or %NULL if the capability is not available.
*
* Since: 2.8
**/
@@ -975,8 +974,7 @@ gdk_screen_make_display_name (GdkScreen *screen)
* The returned window should be unrefed using g_object_unref() when
* no longer needed.
*
* Returns: (nullable) (transfer full): the currently active window,
* or %NULL.
* Returns: (transfer full): the currently active window, or %NULL.
*
* Since: 2.10
**/
@@ -1008,8 +1006,9 @@ gdk_screen_get_active_window (GdkScreen *screen)
* windows it contains, so it should be freed using g_list_free() and
* its windows unrefed using g_object_unref() when no longer needed.
*
* Returns: (nullable) (transfer full) (element-type GdkWindow): a
* list of #GdkWindows for the current window stack, or %NULL.
* Returns: (transfer full) (element-type GdkWindow):
* a list of #GdkWindows for the current window stack,
* or %NULL.
*
* Since: 2.10
**/

View File

@@ -62,7 +62,7 @@
/**
* gdk_selection_owner_set:
* @owner: (allow-none): a #GdkWindow or %NULL to indicate that the
* @owner: a #GdkWindow or %NULL to indicate that the
* the owner for the given should be unset.
* @selection: an atom identifying a selection.
* @time_: timestamp to use when setting the selection.
@@ -95,12 +95,14 @@ gdk_selection_owner_set (GdkWindow *owner,
*
* Determines the owner of the given selection.
*
* Returns: (nullable) (transfer none): if there is a selection owner
* for this window, and it is a window known to the current process,
* the #GdkWindow that owns the selection, otherwise %NULL. Note
* that the return value may be owned by a different process if a
* foreign window was previously created for that window, but a new
* foreign window will never be created by this call.
* Returns: (transfer none): if there is a selection owner for
* this window, and it is a window known to the current
* process, the #GdkWindow that owns the selection, otherwise
* %NULL. Note that the return value may be owned
* by a different process if a foreign window
* was previously created for that window, but
* a new foreign window will never be created by
* this call.
*/
GdkWindow*
gdk_selection_owner_get (GdkAtom selection)
@@ -136,7 +138,7 @@ gdk_selection_send_notify (GdkWindow *requestor,
/**
* gdk_selection_owner_set_for_display:
* @display: the #GdkDisplay
* @owner: (nullable): a #GdkWindow or %NULL to indicate that the owner for
* @owner: a #GdkWindow or %NULL to indicate that the owner for
* the given should be unset
* @selection: an atom identifying a selection
* @time_: timestamp to use when setting the selection
@@ -177,10 +179,9 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
* process if a foreign window was previously created for that
* window, but a new foreign window will never be created by this call.
*
* Returns: (nullable) (transfer none): if there is a selection owner
* for this window, and it is a window known to the current
* process, the #GdkWindow that owns the selection, otherwise
* %NULL.
* Returns: (transfer none): if there is a selection owner for this window,
* and it is a window known to the current process, the #GdkWindow that
* owns the selection, otherwise %NULL.
*
* Since: 2.2
*/
@@ -317,10 +318,10 @@ gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
* is not specified; it may be as pseudo-escape sequences
* \x{ABCD}, or it may be in some other form of approximation.
*
* Returns: (nullable): the newly-allocated string, or %NULL if the
* conversion failed. (It should not fail for any properly
* formed UTF-8 string unless system limits like memory or
* file descriptors are exceeded.)
* Returns: the newly-allocated string, or %NULL if the
* conversion failed. (It should not fail for
* any properly formed UTF-8 string unless system
* limits like memory or file descriptors are exceeded.)
**/
gchar *
gdk_utf8_to_string_target (const gchar *str)

View File

@@ -152,6 +152,7 @@ G_BEGIN_DECLS
/* Selections
*/
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gboolean gdk_selection_owner_set (GdkWindow *owner,
GdkAtom selection,
@@ -159,6 +160,8 @@ gboolean gdk_selection_owner_set (GdkWindow *owner,
gboolean send_event);
GDK_AVAILABLE_IN_ALL
GdkWindow* gdk_selection_owner_get (GdkAtom selection);
#endif/* GDK_MULTIHEAD_SAFE */
GDK_AVAILABLE_IN_ALL
gboolean gdk_selection_owner_set_for_display (GdkDisplay *display,
GdkWindow *owner,

View File

@@ -122,15 +122,6 @@
*/
#define GDK_VERSION_3_12 (G_ENCODE_VERSION (3, 12))
/**
* GDK_VERSION_3_14:
*
* A macro that evaluates to the 3.14 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.14
*/
#define GDK_VERSION_3_14 (G_ENCODE_VERSION (3, 14))
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
@@ -302,19 +293,4 @@
# define GDK_AVAILABLE_IN_3_12 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_14
# define GDK_DEPRECATED_IN_3_14 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_14_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_14 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_14_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_14
# define GDK_AVAILABLE_IN_3_14 GDK_UNAVAILABLE(3, 14)
#else
# define GDK_AVAILABLE_IN_3_14 _GDK_EXTERN
#endif
#endif /* __GDK_VERSION_MACROS_H__ */

View File

@@ -203,8 +203,8 @@ gdk_visual_get_best_with_type (GdkVisualType visual_type)
* Combines gdk_visual_get_best_with_depth() and
* gdk_visual_get_best_with_type().
*
* Returns: (nullable) (transfer none): best visual with both @depth
* and @visual_type, or %NULL if none
* Returns: (transfer none): best visual with both @depth and
* @visual_type, or %NULL if none
*/
GdkVisual*
gdk_visual_get_best_with_both (gint depth,

View File

@@ -82,6 +82,7 @@ typedef enum
GDK_AVAILABLE_IN_ALL
GType gdk_visual_get_type (void) G_GNUC_CONST;
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gint gdk_visual_get_best_depth (void);
GDK_AVAILABLE_IN_ALL
@@ -107,6 +108,7 @@ void gdk_query_visual_types (GdkVisualType **visual_types,
GDK_AVAILABLE_IN_ALL
GList* gdk_list_visuals (void);
#endif
GDK_AVAILABLE_IN_ALL
GdkScreen *gdk_visual_get_screen (GdkVisual *visual);

View File

@@ -329,8 +329,8 @@ gdk_window_class_init (GdkWindowClass *klass)
* The ::pick-embedded-child signal is emitted to find an embedded
* child at the given position.
*
* Returns: (nullable) (transfer none): the #GdkWindow of the
* embedded child at @x, @y, or %NULL
* Returns: (transfer none): the #GdkWindow of the embedded child at
* @x, @y, or %NULL
*
* Since: 2.18
*/
@@ -935,7 +935,7 @@ recompute_visible_regions_internal (GdkWindow *private,
/* Convert from parent coords to window coords */
cairo_region_translate (new_clip, -private->x, -private->y);
if (should_apply_clip_as_shape (private) && private->shape)
if (private->shape)
cairo_region_intersect (new_clip, private->shape);
}
else
@@ -1243,6 +1243,9 @@ gdk_window_new (GdkWindow *parent,
if (!parent)
{
GDK_NOTE (MULTIHEAD,
g_warning ("gdk_window_new(): no parent specified reverting to parent = default root window"));
screen = gdk_screen_get_default ();
parent = gdk_screen_get_root_window (screen);
}
@@ -1850,14 +1853,14 @@ window_remove_from_pointer_info (GdkWindow *window,
/**
* _gdk_window_destroy_hierarchy:
* @window: a #GdkWindow
* @recursing: If %TRUE, then this is being called because a parent
* @recursing: If TRUE, then this is being called because a parent
* was destroyed.
* @recursing_native: If %TRUE, then this is being called because a native parent
* @recursing_native: If TRUE, then this is being called because a native parent
* was destroyed. This generally means that the call to the
* windowing system to destroy the window can be omitted, since
* it will be destroyed as a result of the parent being destroyed.
* Unless @foreign_destroy.
* @foreign_destroy: If %TRUE, the window or a parent was destroyed by some
* @foreign_destroy: If TRUE, the window or a parent was destroyed by some
* external agency. The window has already been destroyed and no
* windowing system calls should be made. (This may never happen
* for some windowing systems.)
@@ -2021,7 +2024,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
/**
* _gdk_window_destroy:
* @window: a #GdkWindow
* @foreign_destroy: If %TRUE, the window or a parent was destroyed by some
* @foreign_destroy: If TRUE, the window or a parent was destroyed by some
* external agency. The window has already been destroyed and no
* windowing system calls should be made. (This may never happen
* for some windowing systems.)
@@ -3776,7 +3779,7 @@ gdk_window_invalidate_rect (GdkWindow *window,
}
/**
* gdk_window_set_invalidate_handler: (skip)
* gdk_window_set_invalidate_handler:
* @window: a #GdkWindow
* @handler: a #GdkWindowInvalidateHandlerFunc callback function
*
@@ -3958,7 +3961,7 @@ gdk_window_invalidate_maybe_recurse_full (GdkWindow *window,
*
* The @child_func parameter controls whether the region of
* each child window that intersects @region will also be invalidated.
* Only children for which @child_func returns #TRUE will have the area
* Only children for which @child_func returns TRUE will have the area
* invalidated.
**/
void
@@ -4409,9 +4412,9 @@ gdk_window_constrain_size (GdkGeometry *geometry,
* The position is given in coordinates relative to the upper left
* corner of @window.
*
* Returns: (nullable) (transfer none): the window containing the
* pointer (as with gdk_window_at_pointer()), or %NULL if the window
* containing the pointer isnt known to GDK
* Returns: (transfer none): the window containing the pointer (as with
* gdk_window_at_pointer()), or %NULL if the window containing the
* pointer isnt known to GDK
*
* Deprecated: 3.0: Use gdk_window_get_device_position() instead.
**/
@@ -4442,9 +4445,8 @@ gdk_window_get_pointer (GdkWindow *window,
* The position is given in coordinates relative to the upper left
* corner of @window.
*
* Returns: (nullable) (transfer none): The window underneath @device
* (as with gdk_device_get_window_at_position()), or %NULL if the
* window is not known to GDK.
* Returns: (transfer none): The window underneath @device (as with
* gdk_device_get_window_at_position()), or %NULL if the window is not known to GDK.
*
* Since: 3.10
**/
@@ -4499,9 +4501,8 @@ gdk_window_get_device_position_double (GdkWindow *window,
*
* Use gdk_window_get_device_position_double() if you need subpixel precision.
*
* Returns: (nullable) (transfer none): The window underneath @device
* (as with gdk_device_get_window_at_position()), or %NULL if the
* window is not known to GDK.
* Returns: (transfer none): The window underneath @device (as with
* gdk_device_get_window_at_position()), or %NULL if the window is not known to GDK.
*
* Since: 3.0
**/
@@ -5813,8 +5814,8 @@ gdk_window_set_background_pattern (GdkWindow *window,
* does not have its own background and reuses the parent's, %NULL is
* returned and youll have to query it yourself.
*
* Returns: (nullable) (transfer none): The pattern to use for the
* background or %NULL to use the parents background.
* Returns: (transfer none): The pattern to use for the background or
* %NULL to use the parents background.
*
* Since: 2.22
**/
@@ -5859,10 +5860,10 @@ gdk_window_set_cursor_internal (GdkWindow *window,
* there is no custom cursor set on the specified window, and it is
* using the cursor for its parent window.
*
* Returns: (nullable) (transfer none): a #GdkCursor, or %NULL. The
* returned object is owned by the #GdkWindow and should not be
* unreferenced directly. Use gdk_window_set_cursor() to unset the
* cursor of the window
* Returns: (transfer none): a #GdkCursor, or %NULL. The returned
* object is owned by the #GdkWindow and should not be unreferenced
* directly. Use gdk_window_set_cursor() to unset the cursor of the
* window
*
* Since: 2.18
*/
@@ -5939,10 +5940,10 @@ gdk_window_set_cursor (GdkWindow *window,
* there is no custom cursor set on the specified window, and it is
* using the cursor for its parent window.
*
* Returns: (nullable) (transfer none): a #GdkCursor, or %NULL. The
* returned object is owned by the #GdkWindow and should not be
* unreferenced directly. Use gdk_window_set_cursor() to unset the
* cursor of the window
* Returns: (transfer none): a #GdkCursor, or %NULL. The returned
* object is owned by the #GdkWindow and should not be unreferenced
* directly. Use gdk_window_set_cursor() to unset the cursor of the
* window
*
* Since: 3.0
**/
@@ -6031,7 +6032,12 @@ gdk_window_get_geometry (GdkWindow *window,
GdkWindowImplClass *impl_class;
if (!window)
window = gdk_screen_get_root_window ((gdk_screen_get_default ()));
{
GDK_NOTE (MULTIHEAD,
g_message ("gdk_window_get_geometry(): Window needs "
"to be non-NULL to be multi head safe"));
window = gdk_screen_get_root_window ((gdk_screen_get_default ()));
}
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -6883,7 +6889,6 @@ update_cursor (GdkDisplay *display,
/* Find the first window with the cursor actually set, as
the cursor is inherited from the parent */
while (cursor_window->cursor == NULL &&
!g_hash_table_contains (cursor_window->device_cursor, device) &&
(parent = get_event_parent (cursor_window)) != NULL &&
parent->window_type != GDK_WINDOW_ROOT)
cursor_window = parent;
@@ -9293,8 +9298,7 @@ gdk_window_create_similar_surface (GdkWindow * window,
/**
* gdk_window_create_similar_image_surface:
* @window: (nullable): window to make new surface similar to, or
* %NULL if none
* @window: window to make new surface similar to, or %NULL if none
* @format: (type int): the format for the new surface
* @width: width of the new surface
* @height: height of the new surface
@@ -10914,35 +10918,3 @@ gdk_window_set_shadow_width (GdkWindow *window,
if (impl_class->set_shadow_width)
impl_class->set_shadow_width (window, left, right, top, bottom);
}
/**
* gdk_window_show_window_menu:
* @window: a #GdkWindow
* @event: a #GdkEvent to show the menu for
*
* Asks the windowing system to show the window menu. The window menu
* is the menu shown when right-clicking the titlebar on traditional
* windows managed by the window manager. This is useful for windows
* using client-side decorations, activating it with a right-click
* on the window decorations.
*
* Returns: %TRUE if the window menu was shown and %FALSE otherwise.
*
* Since: 3.14
*/
gboolean
gdk_window_show_window_menu (GdkWindow *window,
GdkEvent *event)
{
GdkWindowImplClass *impl_class;
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
g_return_val_if_fail (!GDK_WINDOW_DESTROYED (window), FALSE);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
if (impl_class->show_window_menu)
return impl_class->show_window_menu (window, event);
else
return FALSE;
}

View File

@@ -1100,9 +1100,6 @@ void gdk_window_set_shadow_width (GdkWindow *window,
gint right,
gint top,
gint bottom);
GDK_AVAILABLE_IN_3_14
gboolean gdk_window_show_window_menu (GdkWindow *window,
GdkEvent *event);
G_END_DECLS

View File

@@ -301,8 +301,6 @@ struct _GdkWindowImplClass
gint right,
gint top,
gint bottom);
gboolean (* show_window_menu) (GdkWindow *window,
GdkEvent *event);
};
/* Interface Functions */

View File

@@ -44,9 +44,7 @@ libgdk_wayland_la_SOURCES = \
gdkselection-wayland.c \
gdkwindow-wayland.c \
gdkwayland.h \
gdkprivate-wayland.h \
wm-button-layout-translation.c \
wm-button-layout-translation.h
gdkprivate-wayland.h
libgdkinclude_HEADERS = \
gdkwayland.h

View File

@@ -50,12 +50,13 @@ struct _GdkWaylandCursor
{
GdkCursor cursor;
gchar *name;
guint serial;
struct
{
int hotspot_x, hotspot_y;
int width, height, scale;
cairo_surface_t *cairo_surface;
struct wl_buffer *buffer;
} surface;
struct wl_cursor *wl_cursor;
@@ -68,6 +69,8 @@ struct _GdkWaylandCursorClass
G_DEFINE_TYPE (GdkWaylandCursor, _gdk_wayland_cursor, GDK_TYPE_CURSOR)
static guint theme_serial = 0;
struct cursor_cache_key
{
GdkCursorType type;
@@ -165,8 +168,8 @@ gdk_wayland_cursor_finalize (GObject *object)
GdkWaylandCursor *cursor = GDK_WAYLAND_CURSOR (object);
g_free (cursor->name);
if (cursor->surface.cairo_surface)
cairo_surface_destroy (cursor->surface.cairo_surface);
if (cursor->surface.buffer)
wl_buffer_destroy (cursor->surface.buffer);
G_OBJECT_CLASS (_gdk_wayland_cursor_parent_class)->finalize (object);
}
@@ -222,10 +225,7 @@ _gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
*h = wayland_cursor->surface.height / wayland_cursor->surface.scale;
*scale = wayland_cursor->surface.scale;
if (wayland_cursor->surface.cairo_surface)
return _gdk_wayland_shm_surface_get_wl_buffer (wayland_cursor->surface.cairo_surface);
else
return NULL;
return wayland_cursor->surface.buffer;
}
}
@@ -316,6 +316,7 @@ _gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
"display", display,
NULL);
private->name = g_strdup (name);
private->serial = theme_serial;
private->surface.scale = 1;
/* Blank cursor case */
@@ -338,6 +339,11 @@ _gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
{
GdkWaylandCursor *cursor;
GdkWaylandDisplay *wayland_display = GDK_WAYLAND_DISPLAY (display);
int stride;
size_t size;
gpointer data;
struct wl_shm_pool *pool;
cairo_surface_t *buffer_surface;
cairo_t *cr;
cursor = g_object_new (GDK_TYPE_WAYLAND_CURSOR,
@@ -345,6 +351,7 @@ _gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
"display", wayland_display,
NULL);
cursor->name = NULL;
cursor->serial = theme_serial;
cursor->surface.hotspot_x = x;
cursor->surface.hotspot_y = y;
@@ -368,17 +375,36 @@ _gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
cursor->surface.height = 1;
}
cursor->surface.cairo_surface = _gdk_wayland_display_create_shm_surface (wayland_display,
cursor->surface.width,
cursor->surface.height,
cursor->surface.scale);
pool = _create_shm_pool (wayland_display->shm,
cursor->surface.width,
cursor->surface.height,
&size,
&data);
if (surface)
{
cr = cairo_create (cursor->surface.cairo_surface);
buffer_surface = cairo_image_surface_create_for_data (data,
CAIRO_FORMAT_ARGB32,
cursor->surface.width,
cursor->surface.height,
cursor->surface.width * 4);
cr = cairo_create (buffer_surface);
cairo_set_source_surface (cr, surface, 0, 0);
cairo_paint (cr);
cairo_destroy (cr);
cairo_surface_destroy (buffer_surface);
}
else
memset (data, 0, 4);
stride = cursor->surface.width * 4;
cursor->surface.buffer = wl_shm_pool_create_buffer (pool, 0,
cursor->surface.width,
cursor->surface.height,
stride,
WL_SHM_FORMAT_ARGB8888);
wl_shm_pool_destroy (pool);
return GDK_CURSOR (cursor);
}

View File

@@ -40,38 +40,21 @@ typedef struct _DataOffer DataOffer;
typedef struct _GdkWaylandSelectionOffer GdkWaylandSelectionOffer;
typedef struct _GdkWaylandTouchData GdkWaylandTouchData;
struct _GdkWaylandTouchData
{
uint32_t id;
gdouble x;
gdouble y;
GdkWindow *window;
guint initial_touch : 1;
};
struct _GdkWaylandDeviceData
{
guint32 id;
struct wl_seat *wl_seat;
struct wl_pointer *wl_pointer;
struct wl_keyboard *wl_keyboard;
struct wl_touch *wl_touch;
GdkDisplay *display;
GdkDeviceManager *device_manager;
GdkDevice *master_pointer;
GdkDevice *master_keyboard;
GdkDevice *pointer;
GdkDevice *keyboard;
GdkDevice *touch;
GdkCursor *cursor;
GdkKeymap *keymap;
GHashTable *touches;
GdkModifierType modifiers;
GdkWindow *pointer_focus;
GdkWindow *keyboard_focus;
@@ -684,8 +667,7 @@ pointer_handle_enter (void *data,
event = gdk_event_new (GDK_ENTER_NOTIFY);
event->crossing.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_device (event, device->pointer);
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
@@ -728,8 +710,7 @@ pointer_handle_leave (void *data,
event = gdk_event_new (GDK_LEAVE_NOTIFY);
event->crossing.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_device (event, device->pointer);
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
@@ -782,8 +763,7 @@ pointer_handle_motion (void *data,
event->motion.type = GDK_MOTION_NOTIFY;
event->motion.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_device (event, device->pointer);
event->motion.time = time;
event->motion.axes = NULL;
event->motion.state = device->modifiers;
@@ -842,8 +822,7 @@ pointer_handle_button (void *data,
event = gdk_event_new (state ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE);
event->button.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_device (event, device->pointer);
event->button.time = time;
event->button.axes = NULL;
event->button.state = device->modifiers;
@@ -902,8 +881,7 @@ pointer_handle_axis (void *data,
device->time = time;
event = gdk_event_new (GDK_SCROLL);
event->scroll.window = g_object_ref (device->pointer_focus);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->pointer);
gdk_event_set_device (event, device->pointer);
event->scroll.time = time;
event->scroll.direction = GDK_SCROLL_SMOOTH;
event->scroll.delta_x = delta_x;
@@ -966,8 +944,7 @@ keyboard_handle_enter (void *data,
event->focus_change.window = g_object_ref (device->keyboard_focus);
event->focus_change.send_event = FALSE;
event->focus_change.in = TRUE;
gdk_event_set_device (event, device->master_keyboard);
gdk_event_set_source_device (event, device->keyboard);
gdk_event_set_device (event, device->keyboard);
GDK_NOTE (EVENTS,
g_message ("focus int, device %p surface %p",
@@ -1000,8 +977,7 @@ keyboard_handle_leave (void *data,
event->focus_change.window = g_object_ref (device->keyboard_focus);
event->focus_change.send_event = FALSE;
event->focus_change.in = FALSE;
gdk_event_set_device (event, device->master_keyboard);
gdk_event_set_source_device (event, device->keyboard);
gdk_event_set_device (event, device->keyboard);
g_object_unref(device->keyboard_focus);
device->keyboard_focus = NULL;
@@ -1127,9 +1103,8 @@ deliver_key_event (GdkWaylandDeviceData *device,
event = gdk_event_new (state ? GDK_KEY_PRESS : GDK_KEY_RELEASE);
event->key.window = device->keyboard_focus ? g_object_ref (device->keyboard_focus) : NULL;
gdk_event_set_device (event, device->master_keyboard);
gdk_event_set_source_device (event, device->keyboard);
event->key.time = time_;
gdk_event_set_device (event, device->keyboard);
event->button.time = time_;
event->key.state = device->modifiers;
event->key.group = 0;
event->key.hardware_keycode = key;
@@ -1241,174 +1216,6 @@ keyboard_handle_modifiers (void *data,
g_signal_emit_by_name (keymap, "direction-changed");
}
static GdkWaylandTouchData *
_device_manager_add_touch (GdkWaylandDeviceData *device,
uint32_t id,
struct wl_surface *surface)
{
GdkWaylandTouchData *touch;
touch = g_new0 (GdkWaylandTouchData, 1);
touch->id = id;
touch->window = wl_surface_get_user_data (surface);
touch->initial_touch = (g_hash_table_size (device->touches) == 0);
g_hash_table_insert (device->touches, GUINT_TO_POINTER (id), touch);
return touch;
}
static GdkWaylandTouchData *
_device_manager_get_touch (GdkWaylandDeviceData *device,
uint32_t id)
{
return g_hash_table_lookup (device->touches, GUINT_TO_POINTER (id));
}
static void
_device_manager_remove_touch (GdkWaylandDeviceData *device,
uint32_t id)
{
g_hash_table_remove (device->touches, GUINT_TO_POINTER (id));
}
static GdkEvent *
_create_touch_event (GdkWaylandDeviceData *device,
GdkWaylandTouchData *touch,
GdkEventType evtype,
uint32_t time)
{
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
gint x_root, y_root;
GdkEvent *event;
event = gdk_event_new (evtype);
event->touch.window = g_object_ref (touch->window);
gdk_event_set_device (event, device->master_pointer);
gdk_event_set_source_device (event, device->touch);
event->touch.time = time;
event->touch.state = device->modifiers;
gdk_event_set_screen (event, display->screen);
event->touch.sequence = GUINT_TO_POINTER (touch->id + 1);
if (touch->initial_touch)
{
_gdk_event_set_pointer_emulated (event, TRUE);
event->touch.emulating_pointer = TRUE;
}
gdk_window_get_root_coords (touch->window,
touch->x, touch->y,
&x_root, &y_root);
event->touch.x = touch->x;
event->touch.y = touch->y;
event->touch.x_root = x_root;
event->touch.y_root = y_root;
return event;
}
static void
touch_handle_down (void *data,
struct wl_touch *wl_touch,
uint32_t serial,
uint32_t time,
struct wl_surface *wl_surface,
int32_t id,
wl_fixed_t x,
wl_fixed_t y)
{
GdkWaylandDeviceData *device = data;
GdkWaylandTouchData *touch;
GdkEvent *event;
touch = _device_manager_add_touch (device, id, wl_surface);
touch->x = wl_fixed_to_double (x);
touch->y = wl_fixed_to_double (y);
event = _create_touch_event (device, touch, GDK_TOUCH_BEGIN, time);
GDK_NOTE (EVENTS,
g_message ("touch begin %f %f", event->touch.x, event->touch.y));
_gdk_wayland_display_deliver_event (device->display, event);
}
static void
touch_handle_up (void *data,
struct wl_touch *wl_touch,
uint32_t serial,
uint32_t time,
int32_t id)
{
GdkWaylandDeviceData *device = data;
GdkWaylandTouchData *touch;
GdkEvent *event;
touch = _device_manager_get_touch (device, id);
event = _create_touch_event (device, touch, GDK_TOUCH_END, time);
GDK_NOTE (EVENTS,
g_message ("touch end %f %f", event->touch.x, event->touch.y));
_gdk_wayland_display_deliver_event (device->display, event);
_device_manager_remove_touch (device, id);
}
static void
touch_handle_motion (void *data,
struct wl_touch *wl_touch,
uint32_t time,
int32_t id,
wl_fixed_t x,
wl_fixed_t y)
{
GdkWaylandDeviceData *device = data;
GdkWaylandTouchData *touch;
GdkEvent *event;
touch = _device_manager_get_touch (device, id);
touch->x = wl_fixed_to_double (x);
touch->y = wl_fixed_to_double (y);
event = _create_touch_event (device, touch, GDK_TOUCH_UPDATE, time);
GDK_NOTE (EVENTS,
g_message ("touch update %f %f", event->touch.x, event->touch.y));
_gdk_wayland_display_deliver_event (device->display, event);
}
static void
touch_handle_frame (void *data,
struct wl_touch *wl_touch)
{
}
static void
touch_handle_cancel (void *data,
struct wl_touch *wl_touch)
{
GdkWaylandDeviceData *device = data;
GdkWaylandTouchData *touch;
GHashTableIter iter;
GdkEvent *event;
g_hash_table_iter_init (&iter, device->touches);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &touch))
{
event = _create_touch_event (device, touch, GDK_TOUCH_CANCEL,
GDK_CURRENT_TIME);
_gdk_wayland_display_deliver_event (device->display, event);
g_hash_table_iter_remove (&iter);
}
GDK_NOTE (EVENTS, g_message ("touch cancel"));
}
static const struct wl_pointer_listener pointer_listener = {
pointer_handle_enter,
pointer_handle_leave,
@@ -1425,14 +1232,6 @@ static const struct wl_keyboard_listener keyboard_listener = {
keyboard_handle_modifiers,
};
static const struct wl_touch_listener touch_listener = {
touch_handle_down,
touch_handle_up,
touch_handle_motion,
touch_handle_frame,
touch_handle_cancel
};
static void
seat_handle_capabilities (void *data,
struct wl_seat *seat,
@@ -1449,15 +1248,14 @@ seat_handle_capabilities (void *data,
wl_pointer_add_listener (device->wl_pointer, &pointer_listener, device);
device->pointer = g_object_new (GDK_TYPE_WAYLAND_DEVICE,
"name", "Wayland Pointer",
"type", GDK_DEVICE_TYPE_SLAVE,
"name", "Core Pointer",
"type", GDK_DEVICE_TYPE_MASTER,
"input-source", GDK_SOURCE_MOUSE,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", TRUE,
"display", device->display,
"device-manager", device->device_manager,
NULL);
_gdk_device_set_associated_device (device->pointer, device->master_pointer);
GDK_WAYLAND_DEVICE (device->pointer)->device = device;
device_manager->devices =
@@ -1469,7 +1267,6 @@ seat_handle_capabilities (void *data,
{
wl_pointer_destroy (device->wl_pointer);
device->wl_pointer = NULL;
_gdk_device_set_associated_device (device->pointer, NULL);
device_manager->devices =
g_list_remove (device_manager->devices, device->pointer);
@@ -1486,15 +1283,14 @@ seat_handle_capabilities (void *data,
wl_keyboard_add_listener (device->wl_keyboard, &keyboard_listener, device);
device->keyboard = g_object_new (GDK_TYPE_WAYLAND_DEVICE,
"name", "Wayland Keyboard",
"type", GDK_DEVICE_TYPE_SLAVE,
"name", "Core Keyboard",
"type", GDK_DEVICE_TYPE_MASTER,
"input-source", GDK_SOURCE_KEYBOARD,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", FALSE,
"display", device->display,
"device-manager", device->device_manager,
NULL);
_gdk_device_set_associated_device (device->keyboard, device->master_keyboard);
GDK_WAYLAND_DEVICE (device->keyboard)->device = device;
device_manager->devices =
@@ -1506,7 +1302,6 @@ seat_handle_capabilities (void *data,
{
wl_keyboard_destroy (device->wl_keyboard);
device->wl_keyboard = NULL;
_gdk_device_set_associated_device (device->keyboard, NULL);
device_manager->devices =
g_list_remove (device_manager->devices, device->keyboard);
@@ -1516,41 +1311,10 @@ seat_handle_capabilities (void *data,
device->keyboard = NULL;
}
if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !device->wl_touch)
if (device->keyboard && device->pointer)
{
device->wl_touch = wl_seat_get_touch (seat);
wl_touch_set_user_data (device->wl_touch, device);
wl_touch_add_listener (device->wl_touch, &touch_listener, device);
device->touch = g_object_new (GDK_TYPE_WAYLAND_DEVICE,
"name", "Wayland Touch",
"type", GDK_DEVICE_TYPE_SLAVE,
"input-source", GDK_SOURCE_TOUCHSCREEN,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", FALSE,
"display", device->display,
"device-manager", device->device_manager,
NULL);
_gdk_device_set_associated_device (device->touch, device->master_pointer);
GDK_WAYLAND_DEVICE (device->touch)->device = device;
device_manager->devices =
g_list_prepend (device_manager->devices, device->touch);
g_signal_emit_by_name (device_manager, "device-added", device->touch);
}
else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && device->wl_touch)
{
wl_touch_destroy (device->wl_touch);
device->wl_touch = NULL;
_gdk_device_set_associated_device (device->touch, NULL);
device_manager->devices =
g_list_remove (device_manager->devices, device->touch);
g_signal_emit_by_name (device_manager, "device-removed", device->touch);
g_object_unref (device->touch);
device->touch = NULL;
_gdk_device_set_associated_device (device->pointer, device->keyboard);
_gdk_device_set_associated_device (device->keyboard, device->pointer);
}
}
@@ -1573,49 +1337,6 @@ init_settings (GdkWaylandDeviceData *device)
}
}
static void
init_devices (GdkWaylandDeviceData *device)
{
GdkWaylandDeviceManager *device_manager =
GDK_WAYLAND_DEVICE_MANAGER (device->device_manager);
/* pointer */
device->master_pointer = g_object_new (GDK_TYPE_WAYLAND_DEVICE,
"name", "Core Pointer",
"type", GDK_DEVICE_TYPE_MASTER,
"input-source", GDK_SOURCE_MOUSE,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", TRUE,
"display", device->display,
"device-manager", device_manager,
NULL);
GDK_WAYLAND_DEVICE (device->master_pointer)->device = device;
device_manager->devices =
g_list_prepend (device_manager->devices, device->master_pointer);
g_signal_emit_by_name (device_manager, "device-added", device->master_pointer);
/* keyboard */
device->master_keyboard = g_object_new (GDK_TYPE_WAYLAND_DEVICE,
"name", "Core Keyboard",
"type", GDK_DEVICE_TYPE_MASTER,
"input-source", GDK_SOURCE_KEYBOARD,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", FALSE,
"display", device->display,
"device-manager", device_manager,
NULL);
GDK_WAYLAND_DEVICE (device->master_keyboard)->device = device;
device_manager->devices =
g_list_prepend (device_manager->devices, device->master_keyboard);
g_signal_emit_by_name (device_manager, "device-added", device->master_keyboard);
/* link both */
_gdk_device_set_associated_device (device->master_pointer, device->master_keyboard);
_gdk_device_set_associated_device (device->master_keyboard, device->master_pointer);
}
void
_gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
guint32 id,
@@ -1633,8 +1354,7 @@ _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
device->keymap = _gdk_wayland_keymap_new ();
device->display = display;
device->device_manager = device_manager;
device->touches = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) g_free);
device->wl_seat = wl_seat;
wl_seat_add_listener (device->wl_seat, &seat_listener, device);
@@ -1649,7 +1369,6 @@ _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
device->pointer_surface =
wl_compositor_create_surface (display_wayland->compositor);
init_devices (device);
init_settings (device);
}
@@ -1672,7 +1391,6 @@ _gdk_wayland_device_manager_remove_seat (GdkDeviceManager *manager,
wl_surface_destroy (device->pointer_surface);
/* FIXME: destroy data_device */
g_clear_object (&device->keyboard_settings);
g_hash_table_destroy (device->touches);
g_free (device);
break;
@@ -1703,14 +1421,12 @@ gdk_wayland_device_manager_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type)
{
GdkWaylandDeviceManager *wayland_device_manager;
GList *devices = NULL, *l;
GList *devices = NULL;
wayland_device_manager = (GdkWaylandDeviceManager *) device_manager;
for (l = wayland_device_manager->devices; l; l = l->next)
if (type == GDK_DEVICE_TYPE_MASTER)
{
if (gdk_device_get_device_type (l->data) == type)
devices = g_list_prepend (devices, l->data);
wayland_device_manager = (GdkWaylandDeviceManager *) device_manager;
devices = g_list_copy (wayland_device_manager->devices);
}
return devices;

View File

@@ -22,7 +22,6 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <glib.h>
#include "gdkwayland.h"
@@ -122,6 +121,29 @@ gdk_input_init (GdkDisplay *display)
g_list_free (list);
}
static void
init_sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
{
GdkWaylandDisplay *display = data;
display->init_ref_count--;
wl_callback_destroy(callback);
}
static const struct wl_callback_listener init_sync_listener = {
init_sync_callback
};
static void
wait_for_roundtrip(GdkWaylandDisplay *display)
{
struct wl_callback *callback;
display->init_ref_count++;
callback = wl_display_sync(display->wl_display);
wl_callback_add_listener(callback, &init_sync_listener, display);
}
static void
xdg_shell_ping (void *data,
struct xdg_shell *xdg_shell,
@@ -166,13 +188,23 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
display_wayland->gtk_shell =
wl_registry_bind(display_wayland->wl_registry, id, &gtk_shell_interface, 1);
_gdk_wayland_screen_set_has_gtk_shell (display_wayland->screen);
/* We need another roundtrip to receive the shell capabilities */
wait_for_roundtrip(display_wayland);
} else if (strcmp(interface, "wl_output") == 0) {
output =
wl_registry_bind(display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2));
_gdk_wayland_screen_add_output(display_wayland->screen, id, output, MIN (version, 2));
/* We need another roundtrip to receive the modes and geometry
* events for the output, which gives us the physical properties
* and available modes on the output. */
wait_for_roundtrip(display_wayland);
} else if (strcmp(interface, "wl_seat") == 0) {
seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, 1);
_gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat);
/* We need another roundtrip to receive the wl_seat capabilities
* event which informs us of available input devices on this
* seat. */
wait_for_roundtrip(display_wayland);
} else if (strcmp(interface, "wl_data_device_manager") == 0) {
display_wayland->data_device_manager =
wl_registry_bind(display_wayland->wl_registry, id,
@@ -219,18 +251,26 @@ _gdk_wayland_display_open (const gchar *display_name)
return NULL;
display = g_object_new (GDK_TYPE_WAYLAND_DISPLAY, NULL);
display_wayland = GDK_WAYLAND_DISPLAY (display);
display_wayland->wl_display = wl_display;
display_wayland->screen = _gdk_wayland_screen_new (display);
display->device_manager = _gdk_wayland_device_manager_new (display);
display_wayland = GDK_WAYLAND_DISPLAY (display);
display_wayland->wl_display = wl_display;
display_wayland->screen = _gdk_wayland_screen_new (display);
display_wayland->event_source = _gdk_wayland_display_event_source_new (display);
/* Set up listener so we'll catch all events. */
display_wayland->wl_registry = wl_display_get_registry(display_wayland->wl_display);
wl_registry_add_listener(display_wayland->wl_registry, &registry_listener, display_wayland);
/* Wait until the dust has settled during init... */
wl_display_roundtrip (display_wayland->wl_display);
/* We use init_ref_count to track whether some part of our
* initialization still needs a roundtrip to complete. */
wait_for_roundtrip(display_wayland);
while (display_wayland->init_ref_count > 0)
wl_display_roundtrip(display_wayland->wl_display);
display_wayland->event_source =
_gdk_wayland_display_event_source_new (display);
gdk_input_init (display);
@@ -722,170 +762,3 @@ gdk_wayland_display_get_xdg_shell (GdkDisplay *display)
return wayland_display->xdg_shell;
}
static const cairo_user_data_key_t gdk_wayland_cairo_key;
typedef struct _GdkWaylandCairoSurfaceData {
gpointer buf;
size_t buf_length;
struct wl_shm_pool *pool;
struct wl_buffer *buffer;
GdkWaylandDisplay *display;
uint32_t scale;
gboolean busy;
} GdkWaylandCairoSurfaceData;
static void
buffer_release_callback (void *_data,
struct wl_buffer *wl_buffer)
{
cairo_surface_t *surface = _data;
GdkWaylandCairoSurfaceData *data = cairo_surface_get_user_data (surface, &gdk_wayland_cairo_key);
data->busy = FALSE;
cairo_surface_destroy (surface);
}
static const struct wl_buffer_listener buffer_listener = {
buffer_release_callback
};
struct wl_shm_pool *
create_shm_pool (struct wl_shm *shm,
int width,
int height,
size_t *buf_length,
void **data_out)
{
char filename[] = "/tmp/wayland-shm-XXXXXX";
struct wl_shm_pool *pool;
int fd, size, stride;
void *data;
fd = mkstemp (filename);
if (fd < 0)
{
g_critical (G_STRLOC ": Unable to create temporary file (%s): %s",
filename, g_strerror (errno));
return NULL;
}
stride = width * 4;
size = stride * height;
if (ftruncate (fd, size) < 0)
{
g_critical (G_STRLOC ": Truncating temporary file failed: %s",
g_strerror (errno));
close (fd);
return NULL;
}
data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
unlink (filename);
if (data == MAP_FAILED)
{
g_critical (G_STRLOC ": mmap'ping temporary file failed: %s",
g_strerror (errno));
close (fd);
return NULL;
}
pool = wl_shm_create_pool(shm, fd, size);
close (fd);
*data_out = data;
*buf_length = size;
return pool;
}
static void
gdk_wayland_cairo_surface_destroy (void *p)
{
GdkWaylandCairoSurfaceData *data = p;
if (data->buffer)
wl_buffer_destroy (data->buffer);
if (data->pool)
wl_shm_pool_destroy (data->pool);
munmap (data->buf, data->buf_length);
g_free (data);
}
cairo_surface_t *
_gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
int width,
int height,
guint scale)
{
GdkWaylandCairoSurfaceData *data;
cairo_surface_t *surface = NULL;
cairo_status_t status;
int stride;
data = g_new (GdkWaylandCairoSurfaceData, 1);
data->display = display;
data->buffer = NULL;
data->scale = scale;
data->busy = FALSE;
stride = width * 4;
data->pool = create_shm_pool (display->shm,
width*scale, height*scale,
&data->buf_length,
&data->buf);
surface = cairo_image_surface_create_for_data (data->buf,
CAIRO_FORMAT_ARGB32,
width*scale,
height*scale,
stride*scale);
data->buffer = wl_shm_pool_create_buffer (data->pool, 0,
width*scale, height*scale,
stride*scale, WL_SHM_FORMAT_ARGB8888);
wl_buffer_add_listener (data->buffer, &buffer_listener, surface);
cairo_surface_set_user_data (surface, &gdk_wayland_cairo_key,
data, gdk_wayland_cairo_surface_destroy);
#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (surface, scale, scale);
#endif
status = cairo_surface_status (surface);
if (status != CAIRO_STATUS_SUCCESS)
{
g_critical (G_STRLOC ": Unable to create Cairo image surface: %s",
cairo_status_to_string (status));
}
return surface;
}
struct wl_buffer *
_gdk_wayland_shm_surface_get_wl_buffer (cairo_surface_t *surface)
{
GdkWaylandCairoSurfaceData *data = cairo_surface_get_user_data (surface, &gdk_wayland_cairo_key);
return data->buffer;
}
void
_gdk_wayland_shm_surface_set_busy (cairo_surface_t *surface)
{
GdkWaylandCairoSurfaceData *data = cairo_surface_get_user_data (surface, &gdk_wayland_cairo_key);
data->busy = TRUE;
cairo_surface_reference (surface);
}
gboolean
_gdk_wayland_shm_surface_get_busy (cairo_surface_t *surface)
{
GdkWaylandCairoSurfaceData *data = cairo_surface_get_user_data (surface, &gdk_wayland_cairo_key);
return data->busy;
}

View File

@@ -50,7 +50,8 @@ struct _GdkWaylandDisplay
/* Startup notification */
gchar *startup_notification_id;
/* Most recent serial */
/* Time of most recent user interaction and most recent serial */
gulong user_time;
guint32 serial;
/* Wayland fields below */
@@ -68,6 +69,7 @@ struct _GdkWaylandDisplay
GSource *event_source;
int init_ref_count;
int compositor_version;
struct xkb_context *xkb_context;

View File

@@ -178,12 +178,10 @@ void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
guint32 _gdk_wayland_display_get_serial (GdkWaylandDisplay *wayland_display);
void _gdk_wayland_display_update_serial (GdkWaylandDisplay *wayland_display, guint32 serial);
cairo_surface_t * _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
int width,
int height,
guint scale);
struct wl_buffer *_gdk_wayland_shm_surface_get_wl_buffer (cairo_surface_t *surface);
void _gdk_wayland_shm_surface_set_busy (cairo_surface_t *surface);
gboolean _gdk_wayland_shm_surface_get_busy (cairo_surface_t *surface);
struct wl_shm_pool * _create_shm_pool (struct wl_shm *shm,
int width,
int height,
size_t *buf_length,
void **data_out);
#endif /* __GDK_PRIVATE_WAYLAND_H__ */

View File

@@ -29,8 +29,6 @@
#include "gdkwayland.h"
#include "gdkprivate-wayland.h"
#include "wm-button-layout-translation.h"
typedef struct _GdkWaylandScreen GdkWaylandScreen;
typedef struct _GdkWaylandScreenClass GdkWaylandScreenClass;
@@ -482,9 +480,6 @@ update_xft_settings (GdkScreen *screen)
}
}
#define WM_SETTINGS_SCHEMA "org.gnome.desktop.wm.preferences"
#define CLASSIC_WM_SETTINGS_SCHEMA "org.gnome.shell.extensions.classic-overrides"
typedef struct _TranslationEntry TranslationEntry;
struct _TranslationEntry {
const gchar *schema;
@@ -516,8 +511,6 @@ static TranslationEntry translations[] = {
{ "org.gnome.desktop.sound", "input-feedback-sounds", "gtk-enable-input-feedback-sounds", G_TYPE_BOOLEAN, { . b = FALSE } },
{ "org.gnome.desktop.privacy", "recent-files-max-age", "gtk-recent-files-max-age", G_TYPE_INT, { .i = 30 } },
{ "org.gnome.desktop.privacy", "remember-recent-files", "gtk-recent-files-enabled", G_TYPE_BOOLEAN, { .b = TRUE } },
{ WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } },
{ CLASSIC_WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } },
{ "org.gnome.settings-daemon.plugins.xsettings", "antialiasing", "gtk-xft-antialias", G_TYPE_NONE, { .i = 0 } },
{ "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 0 } },
{ "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i = 0 } },
@@ -688,41 +681,6 @@ set_value_from_entry (GdkScreen *screen,
}
}
static void
set_decoration_layout_from_entry (GdkScreen *screen,
TranslationEntry *entry,
GValue *value)
{
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
GSettings *settings = NULL;
const char *session;
/* Hack: until we get session-dependent defaults in GSettings,
* swap out the usual schema for the "classic" one when
* running in classic mode
*/
session = g_getenv ("XDG_CURRENT_DESKTOP");
if (session && strstr (session, "GNOME-Classic"))
settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, CLASSIC_WM_SETTINGS_SCHEMA);
if (settings == NULL)
settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, WM_SETTINGS_SCHEMA);
if (settings)
{
gchar *s = g_settings_get_string (settings, entry->key);
translate_wm_button_layout_to_gtk (s);
g_value_set_string (value, s);
g_free (s);
}
else
{
g_value_set_static_string (value, entry->fallback.s);
}
}
static gboolean
set_capability_setting (GdkScreen *screen,
GValue *value,
@@ -747,10 +705,7 @@ gdk_wayland_screen_get_setting (GdkScreen *screen,
entry = find_translation_entry_by_setting (name);
if (entry != NULL)
{
if (strcmp (name, "gtk-decoration-layout") == 0)
set_decoration_layout_from_entry (screen, entry, value);
else
set_value_from_entry (screen, entry, value);
set_value_from_entry (screen, entry, value);
return TRUE;
}
@@ -1031,7 +986,6 @@ output_handle_scale(void *data,
GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
monitor->scale = factor;
g_signal_emit_by_name (monitor->screen, "monitors-changed");
}
static void

View File

@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
#include <errno.h>
#define WL_SURFACE_HAS_BUFFER_SCALE 3
@@ -47,6 +48,14 @@
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN && \
GDK_WINDOW_TYPE (window) != GDK_WINDOW_OFFSCREEN)
/* Return whether time1 is considered later than time2 as far as xserver
* time is concerned. Accounts for wraparound.
*/
#define XSERVER_TIME_IS_LATER(time1, time2) \
( (( time1 > time2 ) && ( time1 - time2 < ((guint32)-1)/2 )) || \
(( time1 < time2 ) && ( time2 - time1 > ((guint32)-1)/2 )) \
)
typedef struct _GdkWaylandWindow GdkWaylandWindow;
typedef struct _GdkWaylandWindowClass GdkWaylandWindowClass;
@@ -86,6 +95,8 @@ struct _GdkWindowImplWayland
GdkWindow *wrapper;
GdkCursor *cursor;
/* The wl_outputs that this window currently touches */
GSList *outputs;
@@ -101,10 +112,24 @@ struct _GdkWindowImplWayland
GdkWindowTypeHint hint;
GdkWindow *transient_for;
/* The surface which is being "drawn to" to */
cairo_surface_t *cairo_surface;
/* The surface that was the last surface the Wayland buffer from which was attached
* to the Wayland surface. It will be the same as cairo_surface after a call
* to gdk_wayland_window_attach_image. But after a call to
* gdk_wayland_window_update_size and then
* gdk_wayland_window_ref_cairo_surface the above pointer will be different.
*/
cairo_surface_t *server_surface;
gchar *title;
uint32_t resize_edges;
/* Time of most recent user interaction. */
gulong user_time;
GdkGeometry geometry_hints;
GdkWindowHints geometry_mask;
@@ -361,11 +386,25 @@ on_frame_clock_before_paint (GdkFrameClock *clock,
}
}
static const cairo_user_data_key_t gdk_wayland_cairo_key;
typedef struct _GdkWaylandCairoSurfaceData {
gpointer buf;
size_t buf_length;
struct wl_shm_pool *pool;
struct wl_buffer *buffer;
GdkWaylandDisplay *display;
int32_t width, height;
uint32_t scale;
gboolean busy;
} GdkWaylandCairoSurfaceData;
static void
on_frame_clock_after_paint (GdkFrameClock *clock,
GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
struct wl_callback *callback;
if (!impl->pending_commit)
@@ -379,7 +418,14 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
_gdk_frame_clock_freeze (clock);
wl_surface_commit (impl->surface);
_gdk_wayland_shm_surface_set_busy (impl->cairo_surface);
data = cairo_surface_get_user_data (impl->cairo_surface,
&gdk_wayland_cairo_key);
if (!data->busy)
{
data->busy = TRUE;
cairo_surface_reference (impl->cairo_surface);
}
}
static void
@@ -503,35 +549,210 @@ gdk_wayland_window_attach_image (GdkWindow *window)
{
GdkWaylandDisplay *display;
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
int32_t server_width, server_height, dx, dy;
if (GDK_WINDOW_DESTROYED (window))
return;
/* The wayland surface is attached to a buffer that is from the old "drawn
* to" surface. Unref the surface and restore the state.
*/
if (impl->server_surface)
{
data = cairo_surface_get_user_data (impl->server_surface,
&gdk_wayland_cairo_key);
/* Save the old dimensions used for the surface */
server_width = data->width;
server_height = data->height;
cairo_surface_destroy (impl->server_surface);
}
else
{
server_width = 0;
server_height = 0;
}
/* Save the current "drawn to" surface for future calls into here */
impl->server_surface = cairo_surface_reference (impl->cairo_surface);
/* Get a Wayland buffer from this new surface */
data = cairo_surface_get_user_data (impl->cairo_surface,
&gdk_wayland_cairo_key);
if (impl->resize_edges & XDG_SURFACE_RESIZE_EDGE_LEFT)
dx = server_width - data->width;
else
dx = 0;
if (impl->resize_edges & XDG_SURFACE_RESIZE_EDGE_TOP)
dy = server_height - data->height;
else
dy = 0;
/* Attach this new buffer to the surface */
wl_surface_attach (impl->surface,
_gdk_wayland_shm_surface_get_wl_buffer (impl->cairo_surface),
0, 0);
wl_surface_attach (impl->surface, data->buffer, dx, dy);
/* Only set the buffer scale if supported by the compositor */
display = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
if (display->compositor_version >= WL_SURFACE_HAS_BUFFER_SCALE)
wl_surface_set_buffer_scale (impl->surface, impl->scale);
wl_surface_set_buffer_scale (impl->surface, data->scale);
impl->pending_commit = TRUE;
}
static void
gdk_wayland_cairo_surface_destroy (void *p)
{
GdkWaylandCairoSurfaceData *data = p;
if (data->buffer)
wl_buffer_destroy (data->buffer);
if (data->pool)
wl_shm_pool_destroy (data->pool);
munmap (data->buf, data->buf_length);
g_free (data);
}
struct wl_shm_pool *
_create_shm_pool (struct wl_shm *shm,
int width,
int height,
size_t *buf_length,
void **data_out)
{
char filename[] = "/tmp/wayland-shm-XXXXXX";
struct wl_shm_pool *pool;
int fd, size, stride;
void *data;
fd = mkstemp (filename);
if (fd < 0)
{
g_critical (G_STRLOC ": Unable to create temporary file (%s): %s",
filename, g_strerror (errno));
return NULL;
}
stride = width * 4;
size = stride * height;
if (ftruncate (fd, size) < 0)
{
g_critical (G_STRLOC ": Truncating temporary file failed: %s",
g_strerror (errno));
close (fd);
return NULL;
}
data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
unlink (filename);
if (data == MAP_FAILED)
{
g_critical (G_STRLOC ": mmap'ping temporary file failed: %s",
g_strerror (errno));
close (fd);
return NULL;
}
pool = wl_shm_create_pool(shm, fd, size);
close (fd);
*data_out = data;
*buf_length = size;
return pool;
}
static void
buffer_release_callback (void *_data,
struct wl_buffer *wl_buffer)
{
cairo_surface_t *surface = _data;
GdkWaylandCairoSurfaceData *data = cairo_surface_get_user_data (surface, &gdk_wayland_cairo_key);
data->busy = FALSE;
cairo_surface_destroy (surface);
}
static const struct wl_buffer_listener buffer_listener = {
buffer_release_callback
};
static cairo_surface_t *
gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
int width,
int height,
guint scale)
{
GdkWaylandCairoSurfaceData *data;
cairo_surface_t *surface = NULL;
cairo_status_t status;
int stride;
data = g_new (GdkWaylandCairoSurfaceData, 1);
data->display = display;
data->buffer = NULL;
data->width = width;
data->height = height;
data->scale = scale;
data->busy = FALSE;
stride = width * 4;
data->pool = _create_shm_pool (display->shm,
width*scale, height*scale,
&data->buf_length,
&data->buf);
surface = cairo_image_surface_create_for_data (data->buf,
CAIRO_FORMAT_ARGB32,
width*scale,
height*scale,
stride*scale);
data->buffer = wl_shm_pool_create_buffer (data->pool, 0,
width*scale, height*scale,
stride*scale, WL_SHM_FORMAT_ARGB8888);
wl_buffer_add_listener (data->buffer, &buffer_listener, surface);
cairo_surface_set_user_data (surface, &gdk_wayland_cairo_key,
data, gdk_wayland_cairo_surface_destroy);
#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (surface, scale, scale);
#endif
status = cairo_surface_status (surface);
if (status != CAIRO_STATUS_SUCCESS)
{
g_critical (G_STRLOC ": Unable to create Cairo image surface: %s",
cairo_status_to_string (status));
}
return surface;
}
static void
gdk_wayland_window_ensure_cairo_surface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (!impl->cairo_surface)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (impl->wrapper));
GdkWaylandDisplay *display_wayland =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (impl->wrapper));
impl->cairo_surface = _gdk_wayland_display_create_shm_surface (display_wayland,
impl->wrapper->width,
impl->wrapper->height,
impl->scale);
impl->cairo_surface =
gdk_wayland_create_cairo_surface (display_wayland,
impl->wrapper->width,
impl->wrapper->height,
impl->scale);
}
}
@@ -567,8 +788,13 @@ gdk_window_impl_wayland_begin_paint_region (GdkWindow *window,
const cairo_region_t *region)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
gdk_wayland_window_ensure_cairo_surface (window);
return _gdk_wayland_shm_surface_get_busy (impl->cairo_surface);
data = cairo_surface_get_user_data (impl->cairo_surface,
&gdk_wayland_cairo_key);
return data->busy;
}
static void
@@ -580,6 +806,9 @@ gdk_window_impl_wayland_finalize (GObject *object)
impl = GDK_WINDOW_IMPL_WAYLAND (object);
if (impl->cursor)
g_object_unref (impl->cursor);
g_free (impl->title);
g_clear_pointer (&impl->opaque_region, cairo_region_destroy);
@@ -616,10 +845,16 @@ gdk_wayland_window_configure (GdkWindow *window,
}
static void
gdk_wayland_window_sync_parent (GdkWindow *window)
gdk_wayland_window_set_user_time (GdkWindow *window,
guint32 user_time)
{
}
static void
gdk_wayland_window_sync_transient_for (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
struct wl_surface *parent_surface;
struct wl_surface *transient_for_surface;
if (!impl->xdg_surface)
return;
@@ -632,12 +867,12 @@ gdk_wayland_window_sync_parent (GdkWindow *window)
if (!impl_parent->surface)
return;
parent_surface = impl_parent->surface;
transient_for_surface = impl_parent->surface;
}
else
parent_surface = NULL;
transient_for_surface = NULL;
xdg_surface_set_parent (impl->xdg_surface, parent_surface);
xdg_surface_set_transient_for (impl->xdg_surface, transient_for_surface);
}
static void
@@ -778,56 +1013,68 @@ static void
xdg_surface_configure (void *data,
struct xdg_surface *xdg_surface,
int32_t width,
int32_t height,
struct wl_array *states,
uint32_t serial)
int32_t height)
{
GdkWindow *window = GDK_WINDOW (data);
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindowState new_state = 0;
uint32_t *p;
if (width > 0 && height > 0)
{
gdk_window_constrain_size (&impl->geometry_hints,
impl->geometry_mask,
width,
height,
&width,
&height);
gdk_window_constrain_size (&impl->geometry_hints,
impl->geometry_mask,
width,
height,
&width,
&height);
gdk_wayland_window_configure (window, width, height);
}
wl_array_for_each(p, states)
{
uint32_t state = *p;
switch (state)
{
case XDG_SURFACE_STATE_FULLSCREEN:
new_state |= GDK_WINDOW_STATE_FULLSCREEN;
break;
case XDG_SURFACE_STATE_MAXIMIZED:
new_state |= GDK_WINDOW_STATE_MAXIMIZED;
break;
case XDG_SURFACE_STATE_ACTIVATED:
new_state |= GDK_WINDOW_STATE_FOCUSED;
break;
case XDG_SURFACE_STATE_RESIZING:
break;
default:
/* Unknown state */
break;
}
}
_gdk_set_window_state (window, new_state);
xdg_surface_ack_configure (xdg_surface, serial);
gdk_wayland_window_configure (window, width, height);
}
static void
xdg_surface_close (void *data,
struct xdg_surface *xdg_surface)
xdg_surface_change_state (void *data,
struct xdg_surface *xdg_surface,
uint32_t state_type,
uint32_t value,
uint32_t serial)
{
GdkWindow *window = GDK_WINDOW (data);
switch (state_type)
{
case XDG_SURFACE_STATE_MAXIMIZED:
if (value)
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_MAXIMIZED);
else
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_MAXIMIZED, 0);
break;
case XDG_SURFACE_STATE_FULLSCREEN:
if (value)
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
else
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FULLSCREEN, 0);
break;
}
xdg_surface_ack_change_state (xdg_surface, state_type, value, serial);
}
static void
xdg_surface_activated (void *data,
struct xdg_surface *xdg_surface)
{
GdkWindow *window = GDK_WINDOW (data);
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
}
static void
xdg_surface_deactivated (void *data,
struct xdg_surface *xdg_surface)
{
GdkWindow *window = GDK_WINDOW (data);
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
}
static void
xdg_surface_delete (void *data,
struct xdg_surface *xdg_surface)
{
GdkWindow *window = GDK_WINDOW (data);
GdkDisplay *display;
@@ -845,7 +1092,10 @@ xdg_surface_close (void *data,
static const struct xdg_surface_listener xdg_surface_listener = {
xdg_surface_configure,
xdg_surface_close,
xdg_surface_change_state,
xdg_surface_activated,
xdg_surface_deactivated,
xdg_surface_delete,
};
static void
@@ -857,7 +1107,7 @@ gdk_wayland_window_create_xdg_surface (GdkWindow *window)
impl->xdg_surface = xdg_shell_get_xdg_surface (display_wayland->xdg_shell, impl->surface);
xdg_surface_add_listener (impl->xdg_surface, &xdg_surface_listener, window);
gdk_wayland_window_sync_parent (window);
gdk_wayland_window_sync_transient_for (window);
gdk_wayland_window_sync_title (window);
gdk_wayland_window_sync_margin (window);
xdg_surface_set_app_id (impl->xdg_surface, gdk_get_program_class ());
@@ -968,47 +1218,6 @@ gdk_wayland_window_create_xdg_popup (GdkWindow *window,
xdg_popup_add_listener (impl->xdg_popup, &xdg_popup_listener, window);
}
static struct wl_seat *
find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
{
GdkWindow *attached_grab_window;
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindowImplWayland *tmp_impl;
/* Use the device that was used for the grab as the device for
* the popup window setup - so this relies on GTK+ taking the
* grab before showing the popup window.
*/
if (impl->grab_input_seat)
return impl->grab_input_seat;
/* HACK: GtkMenu grabs a special window known as the "grab transfer window"
* and then transfers the grab over to the correct window later. Look for
* this window when taking the grab to know it's correct.
*
* See: associate_menu_grab_transfer_window in gtkmenu.c
*/
attached_grab_window = g_object_get_data (G_OBJECT (window), "gdk-attached-grab-window");
if (attached_grab_window)
{
tmp_impl = GDK_WINDOW_IMPL_WAYLAND (attached_grab_window->impl);
if (tmp_impl->grab_input_seat)
return tmp_impl->grab_input_seat;
}
while (transient_for)
{
tmp_impl = GDK_WINDOW_IMPL_WAYLAND (transient_for->impl);
if (tmp_impl->grab_input_seat)
return tmp_impl->grab_input_seat;
transient_for = tmp_impl->transient_for;
}
return NULL;
}
static void
gdk_wayland_window_map (GdkWindow *window)
{
@@ -1037,7 +1246,26 @@ gdk_wayland_window_map (GdkWindow *window)
if (transient_for)
{
struct wl_seat *grab_input_seat = find_grab_input_seat (window, transient_for);
struct wl_seat *grab_input_seat = NULL;
GdkWindowImplWayland *tmp_impl;
/* Use the device that was used for the grab as the device for
* the popup window setup - so this relies on GTK+ taking the
* grab before showing the popup window.
*/
grab_input_seat = impl->grab_input_seat;
tmp_impl = GDK_WINDOW_IMPL_WAYLAND (transient_for->impl);
while (!grab_input_seat)
{
grab_input_seat = tmp_impl->grab_input_seat;
if (tmp_impl->transient_for)
tmp_impl = GDK_WINDOW_IMPL_WAYLAND (tmp_impl->transient_for->impl);
else
break;
}
if (grab_input_seat &&
(impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
impl->hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
@@ -1059,14 +1287,27 @@ static void
gdk_wayland_window_show (GdkWindow *window,
gboolean already_mapped)
{
GdkDisplay *display;
GdkWaylandDisplay *display_wayland;
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkEvent *event;
display = gdk_window_get_display (window);
display_wayland = GDK_WAYLAND_DISPLAY (display);
if (impl->user_time != 0 &&
display_wayland->user_time != 0 &&
XSERVER_TIME_IS_LATER (display_wayland->user_time, impl->user_time))
gdk_wayland_window_set_user_time (window, impl->user_time);
if (!impl->surface)
gdk_wayland_window_create_surface (window);
gdk_wayland_window_map (window);
gdk_window_set_type_hint (window, impl->hint);
_gdk_make_event (window, GDK_MAP, NULL, FALSE);
event = _gdk_make_event (window, GDK_VISIBILITY_NOTIFY, NULL, FALSE);
event->visibility.state = GDK_VISIBILITY_UNOBSCURED;
if (impl->cairo_surface)
gdk_wayland_window_attach_image (window);
@@ -1104,6 +1345,9 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
xdg_popup_destroy (impl->xdg_popup);
impl->xdg_popup = NULL;
}
cairo_surface_destroy (impl->server_surface);
impl->server_surface = NULL;
}
impl->mapped = FALSE;
@@ -1340,7 +1584,11 @@ gdk_wayland_window_destroy (GdkWindow *window,
gdk_wayland_window_hide_surface (window, TRUE);
if (impl->cairo_surface)
cairo_surface_finish (impl->cairo_surface);
{
cairo_surface_finish (impl->cairo_surface);
cairo_surface_set_user_data (impl->cairo_surface, &gdk_wayland_cairo_key,
NULL, NULL);
}
}
static void
@@ -1488,7 +1736,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
impl->transient_for = parent;
gdk_wayland_window_sync_parent (window);
gdk_wayland_window_sync_transient_for (window);
}
static void
@@ -1516,6 +1764,17 @@ static void
gdk_wayland_window_set_focus_on_map (GdkWindow *window,
gboolean focus_on_map)
{
focus_on_map = focus_on_map != FALSE;
if (window->focus_on_map != focus_on_map)
{
window->focus_on_map = focus_on_map;
if ((!GDK_WINDOW_DESTROYED (window)) &&
(!window->focus_on_map) &&
WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
gdk_wayland_window_set_user_time (window, 0);
}
}
static void
@@ -1576,7 +1835,10 @@ gdk_wayland_window_maximize (GdkWindow *window)
if (!impl->xdg_surface)
return;
xdg_surface_set_maximized (impl->xdg_surface);
xdg_surface_request_change_state (impl->xdg_surface,
XDG_SURFACE_STATE_MAXIMIZED,
TRUE,
0 /* serial, unused */);
}
static void
@@ -1590,7 +1852,10 @@ gdk_wayland_window_unmaximize (GdkWindow *window)
if (!impl->xdg_surface)
return;
xdg_surface_unset_maximized (impl->xdg_surface);
xdg_surface_request_change_state (impl->xdg_surface,
XDG_SURFACE_STATE_MAXIMIZED,
FALSE,
0 /* serial, unused */);
}
static void
@@ -1604,7 +1869,10 @@ gdk_wayland_window_fullscreen (GdkWindow *window)
if (!impl->xdg_surface)
return;
xdg_surface_set_fullscreen (impl->xdg_surface, NULL);
xdg_surface_request_change_state (impl->xdg_surface,
XDG_SURFACE_STATE_FULLSCREEN,
TRUE,
0 /* serial, unused */);
}
static void
@@ -1618,7 +1886,10 @@ gdk_wayland_window_unfullscreen (GdkWindow *window)
if (!impl->xdg_surface)
return;
xdg_surface_unset_fullscreen (impl->xdg_surface);
xdg_surface_request_change_state (impl->xdg_surface,
XDG_SURFACE_STATE_FULLSCREEN,
FALSE,
0 /* serial, unused */);
}
static void
@@ -1732,6 +2003,7 @@ gdk_wayland_window_begin_resize_drag (GdkWindow *window,
if (!impl->xdg_surface)
return;
impl->resize_edges = resize_edges;
xdg_surface_resize (impl->xdg_surface,
gdk_wayland_device_get_wl_seat (device),
_gdk_wayland_display_get_serial (wayland_display),
@@ -1808,6 +2080,8 @@ gdk_wayland_window_process_updates_recurse (GdkWindow *window,
cairo_rectangle_int_t rect;
int i, n;
gdk_wayland_window_map (window);
gdk_wayland_window_ensure_cairo_surface (window);
gdk_wayland_window_attach_image (window);
@@ -1926,40 +2200,6 @@ gdk_wayland_window_set_shadow_width (GdkWindow *window,
gdk_wayland_window_sync_margin (window);
}
static gboolean
gdk_wayland_window_show_window_menu (GdkWindow *window,
GdkEvent *event)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkEventButton *event_button = (GdkEventButton *) event;
struct wl_seat *seat;
double x, y;
GdkWaylandDeviceData *device;
switch (event->type)
{
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
break;
default:
return FALSE;
}
if (!impl->xdg_surface)
return FALSE;
seat = gdk_wayland_device_get_wl_seat (event_button->device);
device = wl_seat_get_user_data (seat);
gdk_event_get_coords (event, &x, &y);
xdg_surface_show_window_menu (impl->xdg_surface,
seat,
_gdk_wayland_device_get_button_press_serial (device),
x, y);
return TRUE;
}
static void
_gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
{
@@ -2049,7 +2289,6 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
impl_class->get_scale_factor = gdk_wayland_window_get_scale_factor;
impl_class->set_opaque_region = gdk_wayland_window_set_opaque_region;
impl_class->set_shadow_width = gdk_wayland_window_set_shadow_width;
impl_class->show_window_menu = gdk_wayland_window_show_window_menu;
}
void

View File

@@ -137,8 +137,11 @@
</description>
</request>
<request name="set_parent">
<request name="set_transient_for">
<description summary="surface is a child of another surface">
Setting a surface as transient of another means that it is child
of another surface.
Child surfaces are stacked above their parents, and will be
unmapped if the parent is unmapped too. They should not appear
on task bars and alt+tab.
@@ -198,26 +201,6 @@
<arg name="app_id" type="string"/>
</request>
<request name="show_window_menu">
<description summary="show the window menu">
Clients implementing client-side decorations might want to show
a context menu when right-clicking on the decorations, giving the
user a menu that they can use to maximize or minimize the window.
This request asks the compositor to pop up such a window menu at
the given position, relative to the parent surface. There are
no guarantees as to what the window menu contains.
Your surface must have focus on the seat passed in to pop up the
window menu.
</description>
<arg name="seat" type="object" interface="wl_seat" summary="the seat to pop the window up on"/>
<arg name="serial" type="uint" summary="serial of the event to pop up the window for"/>
<arg name="x" type="int" summary="the x position to pop up the window menu at"/>
<arg name="y" type="int" summary="the y position to pop up the window menu at"/>
</request>
<request name="move">
<description summary="start an interactive move">
Start a pointer-driven move of the surface.
@@ -261,6 +244,40 @@
<arg name="edges" type="uint" summary="which edge or corner is being dragged"/>
</request>
<event name="configure">
<description summary="suggest resize">
The configure event asks the client to resize its surface.
The size is a hint, in the sense that the client is free to
ignore it if it doesn't resize, pick a smaller size (to
satisfy aspect ratio or resize in steps of NxM pixels).
The client is free to dismiss all but the last configure
event it received.
The width and height arguments specify the size of the window
in surface local coordinates.
</description>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</event>
<request name="set_output">
<description summary="set the default output used by this surface">
Set the default output used by this surface when it is first mapped.
If this value is NULL (default), it's up to the compositor to choose
which display will be used to map this surface.
When fullscreen or maximized state are set on this surface, and it
wasn't mapped yet, the output set with this method will be used.
Otherwise, the output where the surface is currently mapped will be
used.
</description>
<arg name="output" type="object" interface="wl_output" allow-null="true"/>
</request>
<enum name="state">
<description summary="types of state on the surface">
The different state values used on the surface. This is designed for
@@ -283,82 +300,93 @@
0x1000 - 0x1FFF: GNOME
</description>
<entry name="maximized" value="1" summary="the surface is maximized">
The surface is maximized. The window geometry specified in the configure
event must be obeyed by the client.
A non-zero value indicates the surface is maximized. Otherwise,
the surface is unmaximized.
</entry>
<entry name="fullscreen" value="2" summary="the surface is fullscreen">
The surface is fullscreen. The window geometry specified in the configure
event must be obeyed by the client.
</entry>
<entry name="resizing" value="3">
The surface is being resized. The window geometry specified in the
configure event is a maximum; the client cannot resize beyond it.
Clients that have aspect ratio or cell sizing configuration can use
a smaller size, however.
</entry>
<entry name="activated" value="4">
Client window decorations should be painted as if the window is
active. Do not assume this means that the window actually has
keyboard or pointer focus.
A non-zero value indicates the surface is fullscreen. Otherwise,
the surface is not fullscreen.
</entry>
</enum>
<event name="configure">
<description summary="suggest a surface chnage">
The configure event asks the client to resize its surface.
<request name="request_change_state">
<description summary="client requests to change a surface's state">
This asks the compositor to change the state. If the compositor wants
to change the state, it will send a change_state event with the same
state_type, value, and serial, and the event flow continues as if it
it was initiated by the compositor.
The width and height arguments specify a hint to the window
about how its surface should be resized in surface local
coordinates. The states listed in the event specify how the
width/height arguments should be interpreted.
If the compositor does not want to change the state, it will send a
change_state to the client with the old value of the state.
</description>
<arg name="state_type" type="uint" summary="the state to set"/>
<arg name="value" type="uint" summary="the value to change the state to"/>
<arg name="serial" type="uint" summary="an event serial">
This serial is so the client can know which change_state event corresponds
to which request_change_state request it sent out.
</arg>
</request>
A client should arrange a new surface, and then send a
ack_configure request with the serial sent in this configure
event before attaching a new surface.
If the client receives multiple configure events before it
can respond to one, it is free to discard all but the last
event it received.
<event name="change_state">
<description summary="compositor wants to change a surface's state">
This event tells the client to change a surface's state. The client
should respond with an ack_change_state request to the compositor to
guarantee that the compositor knows that the client has seen it.
</description>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
<arg name="states" type="array"/>
<arg name="serial" type="uint"/>
<arg name="state_type" type="uint" summary="the state to set"/>
<arg name="value" type="uint" summary="the value to change the state to"/>
<arg name="serial" type="uint" summary="a serial for the compositor's own tracking"/>
</event>
<request name="ack_configure">
<description summary="ack a configure event">
When a configure event is received, a client should then ack it
using the ack_configure request to ensure that the compositor
<request name="ack_change_state">
<description summary="ack a change_state event">
When a change_state event is received, a client should then ack it
using the ack_change_state request to ensure that the compositor
knows the client has seen the event.
By this point, the state is confirmed, and the next attach should
contain the buffer drawn for the configure event you are acking.
contain the buffer drawn for the new state value.
The values here need to be the same as the values in the cooresponding
change_state event.
</description>
<arg name="serial" type="uint" summary="a serial to configure for"/>
<arg name="state_type" type="uint" summary="the state to set"/>
<arg name="value" type="uint" summary="the value to change the state to"/>
<arg name="serial" type="uint" summary="a serial to pass to change_state"/>
</request>
<request name="set_maximized" />
<request name="unset_maximized" />
<request name="set_fullscreen">
<description summary="set the window as fullscreen on a monitor">
Make the surface fullscreen.
You can specify an output that you would prefer to be fullscreen.
If this value is NULL, it's up to the compositor to choose which
display will be used to map this surface.
<request name="set_minimized">
<description summary="minimize the surface">
Minimize the surface.
</description>
<arg name="output" type="object" interface="wl_output" allow-null="true"/>
</request>
<request name="unset_fullscreen" />
<request name="set_minimized" />
<event name="activated">
<description summary="surface was activated">
The activated_set event is sent when this surface has been
activated, which means that the surface has user attention.
Window decorations should be updated accordingly. You should
not use this event for anything but the style of decorations
you display, use wl_keyboard.enter and wl_keyboard.leave for
determining keyboard focus.
</description>
</event>
<event name="close">
<event name="deactivated">
<description summary="surface was deactivated">
The deactivate event is sent when this surface has been
deactivated, which means that the surface lost user attention.
Window decorations should be updated accordingly. You should
not use this event for anything but the style of decorations
you display, use wl_keyboard.enter and wl_keyboard.leave for
determining keyboard focus.
</description>
</event>
<event name="delete">
<description summary="surface wants to be closed">
The close event is sent by the compositor when the user
The delete event is sent by the compositor when the user
wants the surface to be closed. This should be equivalent to
the user clicking the close button in client-side decorations,
if your application has any...

View File

@@ -1,88 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2014 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Florian Müllner <fmuellner@gnome.org>
*/
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "wm-button-layout-translation.h"
static void
translate_buttons (char *layout, int *len_p)
{
char *strp = layout, *button;
int len = 0;
if (!layout || !*layout)
goto out;
while ((button = strsep (&strp, ",")))
{
char *gtkbutton;
if (strcmp (button, "menu") == 0)
gtkbutton = "icon";
else if (strcmp (button, "appmenu") == 0)
gtkbutton = "menu";
else if (strcmp (button, "minimize") == 0)
gtkbutton = "minimize";
else if (strcmp (button, "maximize") == 0)
gtkbutton = "maximize";
else if (strcmp (button, "close") == 0)
gtkbutton = "close";
else
continue;
if (len)
layout[len++] = ',';
strcpy (layout + len, gtkbutton);
len += strlen (gtkbutton);
}
layout[len] = '\0';
out:
if (len_p)
*len_p = len;
}
void
translate_wm_button_layout_to_gtk (char *layout)
{
char *strp = layout, *left_buttons, *right_buttons;
int left_len, right_len = 0;
left_buttons = strsep (&strp, ":");
right_buttons = strp;
translate_buttons (left_buttons, &left_len);
memmove (layout, left_buttons, left_len);
if (strp == NULL)
goto out; /* no ":" in layout */
layout[left_len++] = ':';
translate_buttons (right_buttons, &right_len);
memmove (layout + left_len, right_buttons, right_len);
out:
layout[left_len + right_len] = '\0';
}

View File

@@ -1,26 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2014 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Florian Müllner <fmuellner@gnome.org>
*/
#ifndef __WM_BUTTON_LAYOUT_TRANSLATION__
#define __WM_BUTTON_LAYOUT_TRANSLATION__
void translate_wm_button_layout_to_gtk (char *layout);
#endif

View File

@@ -1285,15 +1285,12 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
if (target == _image_bmp)
{
HGLOBAL hdatanew;
SIZE_T size;
guchar *ptr;
g_return_val_if_fail (GlobalSize (hdata) >= sizeof (BITMAPFILEHEADER), NULL);
/* No conversion is needed, just strip the BITMAPFILEHEADER */
size = GlobalSize (hdata) - sizeof (BITMAPFILEHEADER);
ptr = GlobalLock (hdata);
HGLOBAL hdatanew;
SIZE_T size = GlobalSize (hdata) - sizeof (BITMAPFILEHEADER);
guchar *ptr = GlobalLock (hdata);
memmove (ptr, ptr + sizeof (BITMAPFILEHEADER), size);
GlobalUnlock (hdata);

View File

@@ -469,6 +469,8 @@ _gdk_x11_window_get_property (GdkWindow *window,
{
GdkScreen *screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD, g_message ("gdk_property_get(): window is NULL\n"));
}
else if (!GDK_WINDOW_IS_X11 (window))
return FALSE;
@@ -605,6 +607,8 @@ _gdk_x11_window_change_property (GdkWindow *window,
screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD, g_message ("gdk_property_change(): window is NULL\n"));
}
else if (!GDK_WINDOW_IS_X11 (window))
return;
@@ -654,6 +658,9 @@ _gdk_x11_window_delete_property (GdkWindow *window,
{
GdkScreen *screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD,
g_message ("gdk_property_delete(): window is NULL\n"));
}
else if (!GDK_WINDOW_IS_X11 (window))
return;

View File

@@ -5702,53 +5702,6 @@ gdk_x11_window_set_opaque_region (GdkWindow *window,
g_free (data);
}
static gboolean
gdk_x11_window_show_window_menu (GdkWindow *window,
GdkEvent *event)
{
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
GdkDevice *device;
int device_id;
double x_root, y_root;
XClientMessageEvent xclient = { 0 };
switch (event->type)
{
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
break;
default:
return FALSE;
}
if (!gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
gdk_atom_intern_static_string ("_GTK_SHOW_WINDOW_MENU")))
return FALSE;
gdk_event_get_root_coords (event, &x_root, &y_root);
device = gdk_event_get_device (event);
g_object_get (G_OBJECT (device),
"device-id", &device_id,
NULL);
/* Ungrab the implicit grab */
gdk_device_ungrab (device, gdk_event_get_time (event));
xclient.type = ClientMessage;
xclient.window = GDK_WINDOW_XID (window);
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_GTK_SHOW_WINDOW_MENU");
xclient.data.l[0] = device_id;
xclient.data.l[1] = x_root;
xclient.data.l[2] = y_root;
xclient.format = 32;
XSendEvent (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XROOTWIN (window), False,
SubstructureRedirectMask | SubstructureNotifyMask,
(XEvent *)&xclient);
return TRUE;
}
static void
gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
{
@@ -5838,5 +5791,4 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
impl_class->get_scale_factor = gdk_x11_window_get_scale_factor;
impl_class->set_opaque_region = gdk_x11_window_set_opaque_region;
impl_class->set_shadow_width = gdk_x11_window_set_shadow_width;
impl_class->show_window_menu = gdk_x11_window_show_window_menu;
}

View File

@@ -49,6 +49,7 @@ Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *displa
GDK_AVAILABLE_IN_ALL
const gchar * gdk_x11_get_xatom_name_for_display (GdkDisplay *display,
Atom xatom);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
Atom gdk_x11_atom_to_xatom (GdkAtom atom);
GDK_AVAILABLE_IN_ALL
@@ -57,6 +58,7 @@ GDK_AVAILABLE_IN_ALL
Atom gdk_x11_get_xatom_by_name (const gchar *atom_name);
GDK_AVAILABLE_IN_ALL
const gchar * gdk_x11_get_xatom_name (Atom xatom);
#endif
G_END_DECLS

View File

@@ -61,8 +61,10 @@ int gdk_x11_screen_get_screen_number (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gint gdk_x11_get_default_screen (void);
#endif
/**
* GDK_SCREEN_XDISPLAY:

View File

@@ -36,17 +36,21 @@
G_BEGIN_DECLS
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
Window gdk_x11_get_default_root_xwindow (void);
GDK_AVAILABLE_IN_ALL
Display *gdk_x11_get_default_xdisplay (void);
#endif
#ifndef GDK_MULTIHEAD_SAFE
/**
* GDK_ROOT_WINDOW:
*
* Obtains the Xlib window id of the root window of the current screen.
*/
#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
#endif
/**
* GDK_XID_TO_POINTER:
@@ -67,10 +71,12 @@ Display *gdk_x11_get_default_xdisplay (void);
*/
#define GDK_POINTER_TO_XID(pointer) GPOINTER_TO_UINT(pointer)
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
void gdk_x11_grab_server (void);
GDK_AVAILABLE_IN_ALL
void gdk_x11_ungrab_server (void);
#endif
G_END_DECLS

View File

@@ -22,7 +22,7 @@ GTK+ is free software and part of the GNU Project. However, the
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
developers, including those developing proprietary software, without
any license fees or royalties.</description>
<homepage rdf:resource="http://www.gtk.org/" />
<homepage rdf:resource="http://www.gtk+.org/" />
<license rdf:resource="http://usefulinc.com/doap/licenses/lgpl" />
<bug-database rdf:resource="http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B" />
<download-page rdf:resource="http://download.gnome.org/sources/gtk+/" />

Some files were not shown because too many files have changed in this diff Show More