Compare commits

..

133 Commits

Author SHA1 Message Date
Robert Ancell 08b276a6d4 Update to GDK 3.12 API 2014-06-17 14:06:54 +12:00
Robert Ancell e6289f6169 Fix some transient window issues 2014-06-17 13:49:01 +12:00
Robert Ancell bf6743712d Add some more debugging info 2014-06-17 13:48:58 +12:00
Robert Ancell 7ce746b9a5 Don't create surfaces for input only windows 2014-06-17 13:48:56 +12:00
Robert Ancell ddd9718cde Don't crash on unknown properties 2014-06-17 13:48:53 +12:00
Robert Ancell 0c69298c1c Move debugging into a separate file 2014-06-17 13:48:51 +12:00
Robert Ancell 1104088cbf Regenerate surface on resize 2014-06-17 13:48:48 +12:00
Robert Ancell ce50fc001a Make GdkMirWindowImpl private again 2014-06-17 13:48:45 +12:00
Robert Ancell 2e8f42da85 Unref window when pointer object is finalized 2014-06-17 13:48:42 +12:00
Robert Ancell 73864a350b Draw transient windows onto their parents 2014-06-17 13:48:37 +12:00
Robert Ancell f3f5b6bd02 Whoops, I forgot the magic 8 2014-06-17 13:46:31 +12:00
Robert Ancell 0835964a3d Provide gtk-error-bell setting 2014-06-17 13:46:29 +12:00
Ryan Lortie 3b2cd941e3 mir: more gtksettings... 2014-06-17 13:46:26 +12:00
Ryan Lortie e8d7fa2d32 mir: handle resize events
...including the possibility that we don't receive the buffer size that
we request.
2014-06-17 13:46:24 +12:00
Ryan Lortie a514240b72 build: add mir .pc files to distclean 2014-06-17 13:46:21 +12:00
Ryan Lortie 5ae4249f37 mir: one more gtksetting... 2014-06-17 13:46:18 +12:00
Ryan Lortie 6e2230b270 mir: set core pointer on GdkDisplay 2014-06-17 13:46:16 +12:00
Ryan Lortie 8eafde7353 mir: one more gtksetting... 2014-06-17 13:46:09 +12:00
Ryan Lortie 582231fe18 mir: allow windows to become focused
Send focus change events to toplevels in response to getting the event
from mir.

Now that the window is focused, cursor blink works, so wire up those
GtkSettings as well.
2014-06-17 13:46:07 +12:00
Ryan Lortie 4073e6b3f5 mir: fill in some more GtkSettings
...and add an assert for those we don't handle.
2014-06-17 13:46:04 +12:00
Robert Ancell 2ffc1945ad Correct spelling of Ambiance theme (still doesn't work though) 2014-06-17 13:46:01 +12:00
Ryan Lortie d3566a9370 mir: we must leak the window ref for now
By the time we get the call to ensure_no_surface() the window is already
being disposed and the qdata is gone.  Our attempt to free the copy of
the ref owned by Mir by looking it up again from our qdata will fail.
2014-06-17 13:45:59 +12:00
Robert Ancell f7fb50be8d Set KeyEvent string field 2014-06-17 13:45:57 +12:00
Ryan Lortie f0bc0d955d mir: do proper event dispatching
We had a race where destroying a window while an event is being
dispatched to it could result in a crash.  We can't just hold a ref on
the window because the object is externally visible and we could end up
running a binding's toggle ref handler in the mir thread.

Add a proper source type with a queue and try to do this properly by
dispatching the event back to the main thread before we check if the
window still exists (through use of a weak ref).

This commit also moves all of the event translation code out of
gdkmirwindowimpl.c (which is getting a bit big...).
2014-06-17 13:45:54 +12:00
Robert Ancell 86623e1514 Counter suspicious hover-exit events 2014-06-17 13:45:52 +12:00
Robert Ancell e40795cbff Generate crossing events 2014-06-17 13:45:50 +12:00
Robert Ancell 2c6694dbd7 Let GDK decide if it wants events, ignore the event mask 2014-06-17 13:45:47 +12:00
Robert Ancell 09f81372c0 Remove debugging 2014-06-17 13:45:45 +12:00
Robert Ancell bc1328f7ae Correctly hide windows 2014-06-17 13:45:42 +12:00
Robert Ancell 610b1bd561 Handle Mir events on the main thread 2014-06-17 13:45:38 +12:00
Robert Ancell bfa2bedda0 Finalize MirWindowImpl values 2014-06-17 13:45:35 +12:00
Robert Ancell ee65b232d8 Implement gdk_mir_window_impl_get_device_state 2014-06-17 13:45:33 +12:00
Robert Ancell b73b191e08 Get menus working (sort of) 2014-06-17 13:45:30 +12:00
Robert Ancell 40207471d5 Fix return windows in gdk_mir_pointer_query_state 2014-06-17 13:45:28 +12:00
Robert Ancell 3e4167f06e Use event queue (sort of) correctly 2014-06-17 13:45:25 +12:00
Robert Ancell 0022c25ab6 Disable debugging message 2014-06-17 13:45:23 +12:00
Robert Ancell bd0e083ef2 Disable debugging message 2014-06-17 13:45:20 +12:00
Robert Ancell 5cea3ab1f3 Flesh out keymap 2014-06-17 13:45:17 +12:00
Robert Ancell 674672dd66 Emit events 2014-06-17 13:45:15 +12:00
Robert Ancell 7b9afbd5a0 Don't set send_event, make public function private 2014-06-17 13:45:12 +12:00
Robert Ancell da9db83702 Link associated devices 2014-06-17 13:45:09 +12:00
Robert Ancell 469dad556a Make separate keyboard and pointer device classes 2014-06-17 13:45:06 +12:00
Robert Ancell 5628a398ab Set initial window event mask, don't set event variables we don't need 2014-06-17 13:44:53 +12:00
Robert Ancell eaff88f0ec Set more event fields 2014-06-17 13:44:50 +12:00
Ryan Lortie 4e829c244e mir: create devices from _constructed
The "display" property is not yet set at time of _init.
2014-06-17 13:44:46 +12:00
Robert Ancell 99310900bf Stub Mir module 2014-06-17 13:44:38 +12:00
Ryan Lortie ec68c85c52 Revert "GtkMenuTracker: fix signal handler argument list"
This reverts commit f15f13a0fb.

This fix applied on master but it makes no sense here (where we have an
actual signal rather than just a property notify).
2014-06-10 11:04:18 -04:00
Joanmarie Diggs c9e110870e GtkEntryAccessible: Emit signal after insertion
The signal needs to be emitted after the text insertion as at-spi gets
the text to compute the inserted text due to the AtkText::insert-text
signal not containing it.
Also adjust position to reflect changes to the offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=731429
2014-06-10 01:14:29 +02:00
Chun-wei Fan d2c8f0a84b MSVC 2010+ Projects: Update "Installation" Process
Currently, due to the way that Visual Studio 2010+ projects are handled,
the "install" project does not re-build upon changes to the sources, as it
does not believe that its dependencies have changed, although the changed
sources are automatically recompiled.  This means that if a part or more
of the solution does not build, or if the sources need some other fixes
or enhancements, the up-to-date build is not copied automatically, which
can be misleading.

Improve on the situation by forcing the "install" project to trigger its
rebuild, so that the updated binaries can be copied.  This does trigger an
MSBuild warning, but having that warning is way better than not having an
up-to-date build, especially during testing and development.
2014-06-09 12:11:24 +08:00
Carlos Garnacho d6c1a6280d combobox: Fix reentrancy in gtk_combo_box_popdown()
If called when already popped down, warnings would be issued due
to priv->grab_pointer being unexpectedly NULL, this would happen
in regular operation when selecting items in appears-as-list mode.

So both add a NULL check for priv->grab_pointer, and bail out early
if the popup window is already hidden.
2014-06-05 21:18:22 +02:00
Ryan Lortie f15f13a0fb GtkMenuTracker: fix signal handler argument list
The signal handler for the visibility of menu items changing had the
wrong signature, resulting in the GParamSpec from the notify signal
being treated as a boolean (which was always true).  This resulted in
items being added over and over and never being removed.

Fix that...
2014-06-05 08:30:16 -04:00
Yuri Myasoedov dc9d8e9202 Updated Russian translation 2014-05-19 21:42:45 +04:00
GunChleoc 350e76ae48 Updated Scottish Gaelic translation 2014-05-19 08:56:00 +00:00
Chun-wei Fan d917bdc836 gdkselection-win32.c: Declare Variables At Top Of Block
...so that builds on Visual C++ can be fixed.
2014-05-16 12:23:52 +08:00
Owen W. Taylor 84f6eefec8 GtkPopover: inherit actions from the relative_to widget
Make the relative_to widget the parent for a GtkPopover's
GtkActionGroup. This, for example, makes the menu model of a
GtkMenuButton find action groups attached to the button.

https://bugzilla.gnome.org/show_bug.cgi?id=729915
2014-05-12 16:44:12 -04:00
Matthias Clasen d80ef2f827 Bump version 2014-05-12 11:20:26 -04:00
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
816 changed files with 33091 additions and 66711 deletions
+5 -3
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}
@@ -33,11 +33,11 @@ MAINTAINERCLEANFILES = \
## Copy .pc files to target-specific names
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc: gtk+-3.0.pc
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc gtk+-mir-3.0.pc: gtk+-3.0.pc
rm -f $@ && \
cp gtk+-3.0.pc $@
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc: gdk-3.0.pc
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc gdk-mir-3.0.pc: gdk-3.0.pc
rm -f $@ && \
cp gdk-3.0.pc $@
@@ -59,12 +59,14 @@ DISTCLEANFILES = \
gtk+-quartz-3.0.pc \
gtk+-broadway-3.0.pc \
gtk+-wayland-3.0.pc \
gtk+-mir-3.0.pc \
gdk-3.0.pc \
gdk-x11-3.0.pc \
gdk-win32-3.0.pc \
gdk-quartz-3.0.pc \
gdk-broadway-3.0.pc \
gdk-wayland-3.0.pc \
gdk-mir-3.0.pc \
gail-3.0.pc \
config.lt
+33 -170
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
============================================
+1 -3
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() + \
+4 -4
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 \
+17 -17
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
+8 -36
View File
@@ -68,8 +68,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 +158,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 +280,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 +294,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 +394,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 +420,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 +474,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 +658,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 +670,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 +698,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 +776,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
-4
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">
-1
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" />
@@ -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>
@@ -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>
@@ -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">
+2 -2
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 \
+18 -18
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
+5 -18
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;
-1
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" />
@@ -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>
+39 -8
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_minor_version], [12])
m4_define([gtk_micro_version], [3])
m4_define([gtk_interface_age], [0])
m4_define([gtk_interface_age], [3])
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])
@@ -322,6 +322,10 @@ AC_ARG_ENABLE(wayland-backend,
[AS_HELP_STRING([--enable-wayland-backend],
[enable the wayland gdk backend])],
[backend_set=yes])
AC_ARG_ENABLE(mir-backend,
[AS_HELP_STRING([--enable-mir-backend],
[enable the Mir gdk backend])],
[backend_set=yes])
if test -z "$backend_set"; then
if test "$platform_win32" = yes; then
@@ -329,6 +333,7 @@ if test -z "$backend_set"; then
else
enable_x11_backend=yes
enable_wayland_backend=maybe
enable_mir_backend=maybe
fi
fi
@@ -450,6 +455,30 @@ else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
MIR_DEPENDENCIES="mirclient"
if test "$enable_mir_backend" = "maybe" ; then
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
if test "$have_mir_deps" = "no" ; then
enable_mir_backend=no
else
enable_mir_backend=yes
fi
AC_MSG_RESULT($enable_mir_backend)
fi
if test "$enable_mir_backend" = "yes"; then
cairo_backends="$cairo_backends cairo"
GDK_BACKENDS="$GDK_BACKENDS mir"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_MIR"
MIR_PACKAGES="$MIR_DEPENDENCIES"
AM_CONDITIONAL(USE_MIR, true)
else
AM_CONDITIONAL(USE_MIR, false)
fi
# strip leading space
GDK_BACKENDS=${GDK_BACKENDS#* }
@@ -1321,7 +1350,7 @@ CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends"
if test "x$enable_x11_backend" = xyes; then
GDK_PRIVATE_PACKAGES="$GDK_PRIVATE_PACKAGES pangoft2"
fi
@@ -1358,7 +1387,7 @@ fi
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES"
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES"
if test "x$enable_x11_backend" = xyes; then
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
fi
@@ -1881,16 +1910,18 @@ gdk/win32/rc/Makefile
gdk/win32/rc/gdk.rc
gdk/quartz/Makefile
gdk/wayland/Makefile
gdk/mir/Makefile
gdk/gdkversionmacros.h
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
-1
View File
@@ -24,7 +24,6 @@ demos = \
entry_completion.c \
event_axes.c \
expander.c \
gestures.c \
headerbar.c \
hypertext.c \
iconview.c \
+1 -1
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
-1
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>
-199
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;
}
+2 -2
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);
+6 -10
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);
+2 -6
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),
+4 -3
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>
-1
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");
-6
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);
+11 -15
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);
}
+18 -122
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
+1 -9
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>
-6
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
+2 -9
View File
@@ -145,19 +145,17 @@ content_files = \
osx.sgml \
broadway.xml \
wayland.xml \
mir.xml \
question_index.sgml \
resources.sgml \
text_widget.sgml \
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 +298,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 +346,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 +425,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 +447,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
+9 -2
View File
@@ -394,6 +394,11 @@ How to compile GTK+ itself
<arg choice="plain">--disable-wayland-backend</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-mir-backend</arg>
<arg choice="plain">--disable-mir-backend</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-introspection=[no/auto/yes]</arg>
</group>
@@ -595,8 +600,10 @@ How to compile GTK+ itself
<systemitem>--disable-quartz-backend</systemitem>,
<systemitem>--enable-broadway-backend</systemitem>,
<systemitem>--disable-broadway-backend</systemitem>,
<systemitem>--enable-wayland-backend</systemitem>, and
<systemitem>--disable-wayland-backend</systemitem></title>
<systemitem>--enable-wayland-backend</systemitem>,
<systemitem>--disable-wayland-backend</systemitem>
<systemitem>--enable-mir-backend</systemitem>, and
<systemitem>--disable-mir-backend</systemitem></title>
<para>
Enables specific backends for GDK. If none of these options
+7
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
+5 -25
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" />
@@ -411,6 +394,7 @@
<xi:include href="osx.sgml" />
<xi:include href="broadway.xml" />
<xi:include href="wayland.xml" />
<xi:include href="mir.xml" />
</part>
<xi:include href="glossary.xml" />
@@ -451,10 +435,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>
-59
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>
+58 -313
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>
@@ -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>
-11
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

-287
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>
+35
View File
@@ -0,0 +1,35 @@
<?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="gtk-mir">
<refmeta>
<refentrytitle>Using GTK+ with Mir</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Using GTK+ with Mir</refname>
<refpurpose>
Mir-specific aspects of using GTK+
</refpurpose>
</refnamediv>
<refsect1>
<title>Using GTK+ with Mir</title>
<para>
The GDK Mir backend provides support for running GTK+ applications
under Mir based display servers. To run your application in this way,
select the Mir backend by setting <literal>GDK_BACKEND=mir</literal>.
</para>
<para>
Currently, the Mir backend does not use any additional commandline
options or environment variables.
</para>
</refsect1>
</refentry>
+1 -1
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>
+14 -50
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>
@@ -483,6 +474,11 @@ nevertheless.
<listitem><para>Selects the Wayland backend for connecting to Wayland display servers</para></listitem>
</varlistentry>
<varlistentry>
<term>mir</term>
<listitem><para>Selects the Mir backend for connecting to Mir display servers</para></listitem>
</varlistentry>
</variablelist>
Since 3.10, this environment variable can contain a comma-separated list
of backend names, which are tried in order. The list may also contain
@@ -518,38 +514,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>
-6
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>
-69
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 ());
+2 -3
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);
+15 -24
View File
@@ -13,7 +13,7 @@ INTROSPECTION_COMPILER_ARGS = \
SUBDIRS = $(GDK_BACKENDS) .
DIST_SUBDIRS = win32 x11 quartz broadway wayland
DIST_SUBDIRS = win32 x11 quartz broadway wayland mir
CLEANFILES =
@@ -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) \
@@ -206,10 +193,14 @@ if USE_WAYLAND
libgdk_3_la_LIBADD += wayland/libgdk-wayland.la
endif
if USE_MIR
libgdk_3_la_LIBADD += mir/libgdk-mir.la
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 +382,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 +417,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 +427,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 +437,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>' \
;; \
+6 -5
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)
+1 -4
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__ */
+1 -1
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>
+1 -16
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)
+7 -7
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);
+6 -10
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
*/
+2
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,
+16 -22
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
+3 -3
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
**/
+10 -13
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
*/
+17 -11
View File
@@ -60,6 +60,10 @@
#include "wayland/gdkprivate-wayland.h"
#endif
#ifdef GDK_WINDOWING_MIR
#include "mir/gdkmir-private.h"
#endif
/**
* SECTION:gdkdisplaymanager
* @Short_description: Maintains a list of all open GdkDisplays
@@ -69,13 +73,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
@@ -272,6 +276,9 @@ static GdkBackend gdk_backends[] = {
#ifdef GDK_WINDOWING_WAYLAND
{ "wayland", _gdk_wayland_display_open },
#endif
#ifdef GDK_WINDOWING_MIR
{ "mir", _gdk_mir_display_open },
#endif
#ifdef GDK_WINDOWING_BROADWAY
{ "broadway", _gdk_broadway_display_open },
#endif
@@ -313,8 +320,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 +338,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 +355,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 +418,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
*/
+11 -1
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;
+1 -1
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
*
+31 -51
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.
+6 -5
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__ */
+5 -5
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 *
+3 -2
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);
+3 -3
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)
+2
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);
+4
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);
+5 -6
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;
+2
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
+5 -4
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,
+10 -11
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
**/
+17 -16
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)
+3
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,
-24
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__ */
+2 -2
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,
+2
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);
+36 -64
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;
}
-3
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
-2
View File
@@ -301,8 +301,6 @@ struct _GdkWindowImplClass
gint right,
gint top,
gint bottom);
gboolean (* show_window_menu) (GdkWindow *window,
GdkEvent *event);
};
/* Interface Functions */
+39
View File
@@ -0,0 +1,39 @@
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-3.0/gdk
libgdkmirincludedir = $(includedir)/gtk-3.0/gdk/mir
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DGDK_COMPILATION \
-I$(top_srcdir) \
-I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \
$(GDK_HIDDEN_VISIBILITY_CFLAGS) \
$(GTK_DEBUG_FLAGS) \
$(GDK_DEP_CFLAGS)
LDADDS = $(GDK_DEP_LIBS)
noinst_LTLIBRARIES = \
libgdk-mir.la
libgdk_mir_la_SOURCES = \
gdkmircursor.c \
gdkmirdevicemanager.c \
gdkmirdisplay.c \
gdkmireventsource.c \
gdkmirkeyboard.c \
gdkmirkeymap.c \
gdkmirpointer.c \
gdkmirscreen.c \
gdkmirwindow.c \
gdkmirwindowimpl.c \
gdkmir-debug.c \
gdkmir.h
libgdkinclude_HEADERS = \
gdkmir.h
-include $(top_srcdir)/git.mk
+293
View File
@@ -0,0 +1,293 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gdkmir-private.h"
void
_gdk_mir_print_modifiers (unsigned int modifiers)
{
g_printerr (" Modifiers");
if ((modifiers & mir_key_modifier_alt) != 0)
g_printerr (" alt");
if ((modifiers & mir_key_modifier_alt_left) != 0)
g_printerr (" alt-left");
if ((modifiers & mir_key_modifier_alt_right) != 0)
g_printerr (" alt-right");
if ((modifiers & mir_key_modifier_shift) != 0)
g_printerr (" shift");
if ((modifiers & mir_key_modifier_shift_left) != 0)
g_printerr (" shift-left");
if ((modifiers & mir_key_modifier_shift_right) != 0)
g_printerr (" shift-right");
if ((modifiers & mir_key_modifier_sym) != 0)
g_printerr (" sym");
if ((modifiers & mir_key_modifier_function) != 0)
g_printerr (" function");
if ((modifiers & mir_key_modifier_ctrl) != 0)
g_printerr (" ctrl");
if ((modifiers & mir_key_modifier_ctrl_left) != 0)
g_printerr (" ctrl-left");
if ((modifiers & mir_key_modifier_ctrl_right) != 0)
g_printerr (" ctrl-right");
if ((modifiers & mir_key_modifier_meta) != 0)
g_printerr (" meta");
if ((modifiers & mir_key_modifier_meta_left) != 0)
g_printerr (" meta-left");
if ((modifiers & mir_key_modifier_meta_right) != 0)
g_printerr (" meta-right");
if ((modifiers & mir_key_modifier_caps_lock) != 0)
g_printerr (" caps-lock");
if ((modifiers & mir_key_modifier_num_lock) != 0)
g_printerr (" num-lock");
if ((modifiers & mir_key_modifier_scroll_lock) != 0)
g_printerr (" scroll-lock");
g_printerr ("\n");
}
void
_gdk_mir_print_key_event (const MirKeyEvent *event)
{
g_printerr ("KEY\n");
g_printerr (" Device %i\n", event->device_id);
g_printerr (" Source %i\n", event->source_id);
g_printerr (" Action ");
switch (event->action)
{
case mir_key_action_down:
g_printerr ("down");
break;
case mir_key_action_up:
g_printerr ("up");
break;
case mir_key_action_multiple:
g_printerr ("multiple");
break;
default:
g_printerr ("%u", event->action);
break;
}
g_printerr ("\n");
g_printerr (" Flags");
if ((event->flags & mir_key_flag_woke_here) != 0)
g_printerr (" woke-here");
if ((event->flags & mir_key_flag_soft_keyboard) != 0)
g_printerr (" soft-keyboard");
if ((event->flags & mir_key_flag_keep_touch_mode) != 0)
g_printerr (" keep-touch-mode");
if ((event->flags & mir_key_flag_from_system) != 0)
g_printerr (" from-system");
if ((event->flags & mir_key_flag_editor_action) != 0)
g_printerr (" editor-action");
if ((event->flags & mir_key_flag_canceled) != 0)
g_printerr (" canceled");
if ((event->flags & mir_key_flag_virtual_hard_key) != 0)
g_printerr (" virtual-hard-key");
if ((event->flags & mir_key_flag_long_press) != 0)
g_printerr (" long-press");
if ((event->flags & mir_key_flag_canceled_long_press) != 0)
g_printerr (" canceled-long-press");
if ((event->flags & mir_key_flag_tracking) != 0)
g_printerr (" tracking");
if ((event->flags & mir_key_flag_fallback) != 0)
g_printerr (" fallback");
g_printerr ("\n");
_gdk_mir_print_modifiers (event->modifiers);
g_printerr (" Key Code %i\n", event->key_code);
g_printerr (" Scan Code %i\n", event->scan_code);
g_printerr (" Repeat Count %i\n", event->repeat_count);
g_printerr (" Down Time %lli\n", (long long int) event->down_time);
g_printerr (" Event Time %lli\n", (long long int) event->event_time);
g_printerr (" Is System Key %s\n", event->is_system_key ? "true" : "false");
}
void
_gdk_mir_print_motion_event (const MirMotionEvent *event)
{
size_t i;
g_printerr ("MOTION\n");
g_printerr (" Device %i\n", event->device_id);
g_printerr (" Source %i\n", event->source_id);
g_printerr (" Action ");
switch (event->action)
{
case mir_motion_action_down:
g_printerr ("down");
break;
case mir_motion_action_up:
g_printerr ("up");
break;
case mir_motion_action_move:
g_printerr ("move");
break;
case mir_motion_action_cancel:
g_printerr ("cancel");
break;
case mir_motion_action_outside:
g_printerr ("outside");
break;
case mir_motion_action_pointer_down:
g_printerr ("pointer-down");
break;
case mir_motion_action_pointer_up:
g_printerr ("pointer-up");
break;
case mir_motion_action_hover_move:
g_printerr ("hover-move");
break;
case mir_motion_action_scroll:
g_printerr ("scroll");
break;
case mir_motion_action_hover_enter:
g_printerr ("hover-enter");
break;
case mir_motion_action_hover_exit:
g_printerr ("hover-exit");
break;
default:
g_printerr ("%u", event->action);
}
g_printerr ("\n");
g_printerr (" Flags");
switch (event->flags)
{
case mir_motion_flag_window_is_obscured:
g_printerr (" window-is-obscured");
break;
}
g_printerr ("\n");
_gdk_mir_print_modifiers (event->modifiers);
g_printerr (" Edge Flags %i\n", event->edge_flags);
g_printerr (" Button State");
switch (event->button_state)
{
case mir_motion_button_primary:
g_printerr (" primary");
break;
case mir_motion_button_secondary:
g_printerr (" secondary");
break;
case mir_motion_button_tertiary:
g_printerr (" tertiary");
break;
case mir_motion_button_back:
g_printerr (" back");
break;
case mir_motion_button_forward:
g_printerr (" forward");
break;
}
g_printerr ("\n");
g_printerr (" Offset (%f, %f)\n", event->x_offset, event->y_offset);
g_printerr (" Precision (%f, %f)\n", event->x_precision, event->y_precision);
g_printerr (" Down Time %lli\n", (long long int) event->down_time);
g_printerr (" Event Time %lli\n", (long long int) event->event_time);
g_printerr (" Pointer Coordinates\n");
for (i = 0; i < event->pointer_count; i++)
{
g_printerr (" ID=%i location=(%f, %f) raw=(%f, %f) touch=(%f, %f) size=%f pressure=%f orientation=%f scroll=(%f, %f) tool=",
event->pointer_coordinates[i].id,
event->pointer_coordinates[i].x, event->pointer_coordinates[i].y,
event->pointer_coordinates[i].raw_x, event->pointer_coordinates[i].raw_y,
event->pointer_coordinates[i].touch_major, event->pointer_coordinates[i].touch_minor,
event->pointer_coordinates[i].size,
event->pointer_coordinates[i].pressure,
event->pointer_coordinates[i].orientation,
event->pointer_coordinates[i].hscroll, event->pointer_coordinates[i].vscroll);
switch (event->pointer_coordinates[i].tool_type)
{
case mir_motion_tool_type_unknown:
g_printerr ("unknown");
break;
case mir_motion_tool_type_finger:
g_printerr ("finger");
break;
case mir_motion_tool_type_stylus:
g_printerr ("stylus");
break;
case mir_motion_tool_type_mouse:
g_printerr ("mouse");
break;
case mir_motion_tool_type_eraser:
g_printerr ("eraser");
break;
default:
g_printerr ("%u", event->pointer_coordinates[i].tool_type);
break;
}
g_printerr ("\n");
}
}
void
_gdk_mir_print_surface_event (const MirSurfaceEvent *event)
{
g_printerr ("SURFACE\n");
g_printerr (" Surface %i\n", event->id);
g_printerr (" Attribute ");
switch (event->attrib)
{
case mir_surface_attrib_type:
g_printerr ("type");
break;
case mir_surface_attrib_state:
g_printerr ("state");
break;
case mir_surface_attrib_swapinterval:
g_printerr ("swapinterval");
break;
case mir_surface_attrib_focus:
g_printerr ("focus");
break;
default:
g_printerr ("%u", event->attrib);
break;
}
g_printerr ("\n");
g_printerr (" Value %i\n", event->value);
}
void
_gdk_mir_print_resize_event (const MirResizeEvent *event)
{
g_printerr ("RESIZE\n");
g_printerr (" Surface %i\n", event->surface_id);
g_printerr (" Size (%i, %i)\n", event->width, event->height);
}
void
_gdk_mir_print_event (const MirEvent *event)
{
switch (event->type)
{
case mir_event_type_key:
_gdk_mir_print_key_event (&event->key);
break;
case mir_event_type_motion:
_gdk_mir_print_motion_event (&event->motion);
break;
case mir_event_type_surface:
_gdk_mir_print_surface_event (&event->surface);
break;
case mir_event_type_resize:
_gdk_mir_print_resize_event (&event->resize);
break;
default:
g_printerr ("EVENT %u\n", event->type);
break;
}
}
+86
View File
@@ -0,0 +1,86 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_PRIVATE_MIR_H__
#define __GDK_PRIVATE_MIR_H__
#include "config.h"
#include "gdkmir.h"
#include "gdkdisplay.h"
#include "gdkscreen.h"
#include "gdkdevicemanager.h"
#include "gdkkeys.h"
#include "gdkwindowimpl.h"
typedef struct _GdkMirWindowImpl GdkMirWindowImpl;
typedef struct _GdkMirWindowReference GdkMirWindowReference;
typedef struct _GdkMirEventSource GdkMirEventSource;
#define GDK_TYPE_MIR_WINDOW_IMPL (gdk_mir_window_impl_get_type ())
#define GDK_MIR_WINDOW_IMPL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_MIR, GdkMirWindowImpl))
#define GDK_IS_WINDOW_IMPL_MIR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_MIR))
GdkDisplay *_gdk_mir_display_open (const gchar *display_name);
GdkScreen *_gdk_mir_screen_new (GdkDisplay *display);
GdkDeviceManager *_gdk_mir_device_manager_new (GdkDisplay *display);
GdkDevice *_gdk_mir_device_manager_get_keyboard (GdkDeviceManager *device_manager);
GdkKeymap *_gdk_mir_keymap_new (void);
GdkDevice *_gdk_mir_keyboard_new (GdkDeviceManager *device_manager, const gchar *name);
GdkDevice *_gdk_mir_pointer_new (GdkDeviceManager *device_manager, const gchar *name);
void _gdk_mir_pointer_set_location (GdkDevice *pointer, gdouble x, gdouble y, GdkWindow *window, GdkModifierType mask);
GdkCursor *_gdk_mir_cursor_new (GdkDisplay *display, GdkCursorType type);
GdkWindowImpl *_gdk_mir_window_impl_new (void);
void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state);
void _gdk_mir_window_impl_set_cursor_state (GdkMirWindowImpl *impl, gdouble x, gdouble y, gboolean cursor_inside, MirMotionButton button_state);
void _gdk_mir_window_impl_get_cursor_state (GdkMirWindowImpl *impl, gdouble *x, gdouble *y, gboolean *cursor_inside, MirMotionButton *button_state);
GdkMirEventSource *_gdk_mir_display_get_event_source (GdkDisplay *display);
GdkMirEventSource *_gdk_mir_event_source_new (GdkDisplay *display);
GdkMirWindowReference *_gdk_mir_event_source_get_window_reference (GdkWindow *window);
void _gdk_mir_window_reference_unref (GdkMirWindowReference *ref);
void _gdk_mir_event_source_queue (GdkMirWindowReference *window_ref, const MirEvent *event);
void _gdk_mir_print_modifiers (unsigned int modifiers);
void _gdk_mir_print_key_event (const MirKeyEvent *event);
void _gdk_mir_print_motion_event (const MirMotionEvent *event);
void _gdk_mir_print_surface_event (const MirSurfaceEvent *event);
void _gdk_mir_print_resize_event (const MirResizeEvent *event);
void _gdk_mir_print_event (const MirEvent *event);
#endif /* __GDK_PRIVATE_MIR_H__ */
+39
View File
@@ -0,0 +1,39 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_MIR_H__
#define __GDK_MIR_H__
#include <gdk/gdk.h>
#include <mir_toolkit/mir_client_library.h>
#define GDK_TYPE_MIR_DISPLAY (gdk_mir_display_get_type ())
#define GDK_IS_MIR_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_DISPLAY))
#define GDK_TYPE_MIR_WINDOW (gdk_mir_window_get_type ())
#define GDK_IS_WINDOW_MIR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_MIR))
GDK_AVAILABLE_IN_3_10
GType gdk_mir_display_get_type (void);
GDK_AVAILABLE_IN_3_10
struct MirConnection *gdk_mir_display_get_mir_connection (GdkDisplay *display);
GDK_AVAILABLE_IN_3_10
GType gdk_mir_window_get_type (void);
#endif /* __GDK_MIR_H__ */
+73
View File
@@ -0,0 +1,73 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkcursorprivate.h"
#include "gdkmir.h"
#include "gdkmir-private.h"
typedef struct GdkMirCursor GdkMirCursor;
typedef struct GdkMirCursorClass GdkMirCursorClass;
#define GDK_TYPE_MIR_CURSOR (gdk_mir_cursor_get_type ())
#define GDK_MIR_CURSOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_CURSOR, GdkMirCursor))
#define GDK_MIR_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_CURSOR, GdkMirCursorClass))
#define GDK_IS_MIR_CURSOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_CURSOR))
#define GDK_IS_MIR_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_CURSOR))
#define GDK_MIR_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_CURSOR, GdkMirCursorClass))
struct GdkMirCursor
{
GdkCursor parent_instance;
};
struct GdkMirCursorClass
{
GdkCursorClass parent_class;
};
G_DEFINE_TYPE (GdkMirCursor, gdk_mir_cursor, GDK_TYPE_CURSOR)
GdkCursor *
_gdk_mir_cursor_new (GdkDisplay *display, GdkCursorType type)
{
return g_object_new (GDK_TYPE_MIR_CURSOR, "display", display, "cursor-type", type, NULL);
}
cairo_surface_t *
gdk_mir_cursor_get_surface (GdkCursor *cursor,
gdouble *x_hot,
gdouble *y_hot)
{
g_printerr ("gdk_mir_cursor_get_surface\n");
return NULL;
}
static void
gdk_mir_cursor_init (GdkMirCursor *cursor)
{
}
static void
gdk_mir_cursor_class_init (GdkMirCursorClass *klass)
{
GdkCursorClass *cursor_class = GDK_CURSOR_CLASS (klass);
cursor_class->get_surface = gdk_mir_cursor_get_surface;
}
+120
View File
@@ -0,0 +1,120 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkdevicemanagerprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkdeviceprivate.h"
#include "gdkmir.h"
#include "gdkmir-private.h"
typedef struct GdkMirDeviceManager GdkMirDeviceManager;
typedef struct GdkMirDeviceManagerClass GdkMirDeviceManagerClass;
#define GDK_TYPE_MIR_DEVICE_MANAGER (gdk_mir_device_manager_get_type ())
#define GDK_MIR_DEVICE_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_DEVICE_MANAGER, GdkMirDeviceManager))
#define GDK_MIR_DEVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_DEVICE_MANAGER, GdkMirDeviceManagerClass))
#define GDK_IS_MIR_DEVICE_MANAGER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_DEVICE_MANAGER))
#define GDK_IS_MIR_DEVICE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_DEVICE_MANAGER))
#define GDK_MIR_DEVICE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_DEVICE_MANAGER, GdkMirDeviceManagerClass))
struct GdkMirDeviceManager
{
GdkDeviceManager parent_instance;
GdkDevice *pointer;
GdkDevice *keyboard;
};
struct GdkMirDeviceManagerClass
{
GdkDeviceManagerClass parent_class;
};
G_DEFINE_TYPE (GdkMirDeviceManager, gdk_mir_device_manager, GDK_TYPE_DEVICE_MANAGER)
GdkDeviceManager *
_gdk_mir_device_manager_new (GdkDisplay *display)
{
return g_object_new (GDK_TYPE_MIR_DEVICE_MANAGER, "display", display, NULL);
}
static GList *
gdk_mir_device_manager_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type)
{
//g_printerr ("gdk_mir_device_manager_list_devices (%u)\n", type);
GdkMirDeviceManager *dm = GDK_MIR_DEVICE_MANAGER (device_manager);
if (type == GDK_DEVICE_TYPE_MASTER)
{
GList *devices;
devices = g_list_append (NULL, dm->keyboard);
devices = g_list_append (devices, dm->pointer);
return devices;
}
return NULL;
}
static GdkDevice *
gdk_mir_device_manager_get_client_pointer (GdkDeviceManager *device_manager)
{
//g_printerr ("gdk_mir_device_manager_get_client_pointer\n");
return GDK_MIR_DEVICE_MANAGER (device_manager)->pointer;
}
GdkDevice *
_gdk_mir_device_manager_get_keyboard (GdkDeviceManager *device_manager)
{
return GDK_MIR_DEVICE_MANAGER (device_manager)->keyboard;
}
static void
gdk_mir_device_manager_init (GdkMirDeviceManager *device_manager)
{
}
static void
gdk_mir_device_manager_constructed (GObject *object)
{
GdkMirDeviceManager *device_manager = GDK_MIR_DEVICE_MANAGER (object);
device_manager->keyboard = _gdk_mir_keyboard_new (GDK_DEVICE_MANAGER (device_manager), "Mir Keyboard");
device_manager->pointer = _gdk_mir_pointer_new (GDK_DEVICE_MANAGER (device_manager), "Mir Pointer");
_gdk_device_set_associated_device (device_manager->keyboard, device_manager->pointer);
_gdk_device_set_associated_device (device_manager->pointer, device_manager->keyboard);
gdk_device_manager_get_display (GDK_DEVICE_MANAGER (device_manager))->core_pointer = device_manager->pointer;
G_OBJECT_CLASS (gdk_mir_device_manager_parent_class)->constructed (object);
}
static void
gdk_mir_device_manager_class_init (GdkMirDeviceManagerClass *klass)
{
GdkDeviceManagerClass *device_manager_class = GDK_DEVICE_MANAGER_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
device_manager_class->list_devices = gdk_mir_device_manager_list_devices;
device_manager_class->get_client_pointer = gdk_mir_device_manager_get_client_pointer;
object_class->constructed = gdk_mir_device_manager_constructed;
}
+571
View File
@@ -0,0 +1,571 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkdisplayprivate.h"
#include "gdkinternals.h"
#include "gdkmir.h"
#include "gdkmir-private.h"
#define GDK_MIR_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_MIR, GdkMirDisplay))
#define GDK_MIR_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_MIR, GdkMirDisplayClass))
#define GDK_IS_MIR_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_DISPLAY))
#define GDK_MIR_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_DISPLAY, GdkMirDisplayImplClass))
typedef struct GdkMirDisplay
{
GdkDisplay parent_instance;
/* Connection to Mir server */
MirConnection *connection;
/* Event source */
GdkMirEventSource *event_source;
/* Serial number? */
gulong serial;
/* Screen information */
GdkScreen *screen;
GdkCursor *cursor;
GdkKeymap *keymap;
} GdkMirDisplay;
typedef struct GdkMirDisplayClass
{
GdkDisplayClass parent_class;
} GdkMirDisplayClass;
/**
* SECTION:mir_interaction
* @Short_description: Mir backend-specific functions
* @Title: Mir Interaction
*
* The functions in this section are specific to the GDK Mir backend.
* To use them, you need to include the <literal>&lt;gdk/gdkmir.h&gt;</literal>
* header and use the Mir-specific pkg-config files to build your
* application (either <literal>gdk-mir-3.0</literal> or
* <literal>gtk+-mir-3.0</literal>).
*
* To make your code compile with other GDK backends, guard backend-specific
* calls by an ifdef as follows. Since GDK may be built with multiple
* backends, you should also check for the backend that is in use (e.g. by
* using the GDK_IS_MIR_DISPLAY() macro).
* |[
* #ifdef GDK_WINDOWING_MIR
* if (GDK_IS_MIR_DISPLAY (display))
* {
* /&ast; make Mir-specific calls here &ast;/
* }
* else
* #endif
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
* /&ast; make X11-specific calls here &ast;/
* }
* else
* #endif
* g_error ("Unsupported GDK backend");
* ]|
*/
G_DEFINE_TYPE (GdkMirDisplay, gdk_mir_display, GDK_TYPE_DISPLAY)
GdkDisplay *
_gdk_mir_display_open (const gchar *display_name)
{
MirConnection *connection;
GdkMirDisplay *display;
g_printerr ("gdk_mir_display_open\n");
connection = mir_connect_sync (NULL, "GDK-Mir");
if (!connection)
return NULL;
if (!mir_connection_is_valid (connection))
{
g_printerr ("Failed to connect to Mir: %s\n", mir_connection_get_error_message (connection));
mir_connection_release (connection);
return NULL;
}
display = g_object_new (GDK_TYPE_MIR_DISPLAY, NULL);
display->connection = connection;
GDK_DISPLAY (display)->device_manager = _gdk_mir_device_manager_new (GDK_DISPLAY (display));
display->screen = _gdk_mir_screen_new (GDK_DISPLAY (display));
g_signal_emit_by_name (display, "opened");
return GDK_DISPLAY (display);
}
/**
* gdk_mir_display_get_mir_connection
* @display: (type GdkMirDisplay): a #GdkDisplay
*
* Returns the #MirConnection for a #GdkDisplay
*
* Returns: (transfer none): a #MirConnection
*
* Since: 3.14
*/
struct MirConnection *
gdk_mir_display_get_mir_connection (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_MIR_DISPLAY (display), NULL);
return GDK_MIR_DISPLAY (display)->connection;
}
GdkMirEventSource *
_gdk_mir_display_get_event_source (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_MIR_DISPLAY (display), NULL);
return GDK_MIR_DISPLAY (display)->event_source;
}
static void
gdk_mir_display_dispose (GObject *object)
{
GdkMirDisplay *display = GDK_MIR_DISPLAY (object);
g_object_unref (display->screen);
display->screen = NULL;
G_OBJECT_CLASS (gdk_mir_display_parent_class)->dispose (object);
}
static void
gdk_mir_display_finalize (GObject *object)
{
GdkMirDisplay *display = GDK_MIR_DISPLAY (object);
mir_connection_release (display->connection);
G_OBJECT_CLASS (gdk_mir_display_parent_class)->finalize (object);
}
static const gchar *
gdk_mir_display_get_name (GdkDisplay *display)
{
//g_printerr ("gdk_mir_display_get_name\n");
return "Mir";
}
static GdkScreen *
gdk_mir_display_get_default_screen (GdkDisplay *display)
{
//g_printerr ("gdk_mir_display_get_default_screen\n");
return GDK_MIR_DISPLAY (display)->screen;
}
static void
gdk_mir_display_beep (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_beep\n");
/* No system level beep... */
}
static void
gdk_mir_display_sync (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_sync\n");
}
static void
gdk_mir_display_flush (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_flush\n");
}
static gboolean
gdk_mir_display_has_pending (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_has_pending\n");
/* We don't need to poll for events - so nothing pending */
return FALSE;
}
static void
gdk_mir_display_queue_events (GdkDisplay *display)
{
//g_printerr ("gdk_mir_display_queue_events\n");
/* We don't need to poll for events - so don't do anything*/
}
static void
gdk_mir_display_make_default (GdkDisplay *display)
{
//g_printerr ("gdk_mir_display_make_default\n");
}
static GdkWindow *
gdk_mir_display_get_default_group (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_get_default_group\n");
return NULL;
}
static gboolean
gdk_mir_display_supports_shapes (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_supports_shapes\n");
/* Mir doesn't support shaped windows */
return FALSE;
}
static gboolean
gdk_mir_display_supports_input_shapes (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_supports_input_shapes\n");
return FALSE;
}
static gboolean
gdk_mir_display_supports_composite (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_supports_composite\n");
return FALSE;
}
static gboolean
gdk_mir_display_supports_clipboard_persistence (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_supports_clipboard_persistence\n");
return FALSE;
}
static gboolean
gdk_mir_display_supports_cursor_alpha (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_supports_cursor_alpha\n");
return FALSE;
}
static gboolean
gdk_mir_display_supports_cursor_color (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_supports_cursor_color\n");
return FALSE;
}
static gboolean
gdk_mir_display_supports_selection_notification (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_supports_selection_notification\n");
return FALSE;
}
static gboolean
gdk_mir_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
g_printerr ("gdk_mir_display_request_selection_notification\n");
return FALSE;
}
static void
gdk_mir_display_store_clipboard (GdkDisplay *display,
GdkWindow *clipboard_window,
guint32 time_,
const GdkAtom *targets,
gint n_targets)
{
g_printerr ("gdk_mir_display_store_clipboard\n");
}
static void
gdk_mir_display_get_default_cursor_size (GdkDisplay *display,
guint *width,
guint *height)
{
g_printerr ("gdk_mir_display_get_default_cursor_size\n");
*width = *height = 32; // FIXME: Random value
}
static void
gdk_mir_display_get_maximal_cursor_size (GdkDisplay *display,
guint *width,
guint *height)
{
g_printerr ("gdk_mir_display_get_maximal_cursor_size\n");
*width = *height = 32; // FIXME: Random value
}
static GdkCursor *
gdk_mir_display_get_cursor_for_type (GdkDisplay *display,
GdkCursorType cursor_type)
{
//g_printerr ("gdk_mir_display_get_cursor_for_type (%u)\n", cursor_type);
/* We don't support configurable cursors */
return g_object_ref (GDK_MIR_DISPLAY (display)->cursor);
}
static GdkCursor *
gdk_mir_display_get_cursor_for_name (GdkDisplay *display,
const gchar *name)
{
g_printerr ("gdk_mir_display_get_cursor_for_name (\"%s\")\n", name);
/* We don't support configurable cursors */
return g_object_ref (GDK_MIR_DISPLAY (display)->cursor);
}
static GdkCursor *
gdk_mir_display_get_cursor_for_surface (GdkDisplay *display,
cairo_surface_t *surface,
gdouble x,
gdouble y)
{
g_printerr ("gdk_mir_display_get_cursor_for_surface (%f, %f)\n", x, y);
return NULL;
}
static GList *
gdk_mir_display_list_devices (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_list_devices\n");
// FIXME: Should this access the device manager?
return NULL;
}
static GdkAppLaunchContext *
gdk_mir_display_get_app_launch_context (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_get_app_launch_context\n");
return NULL;
}
static void
gdk_mir_display_before_process_all_updates (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_before_process_all_updates\n");
}
static void
gdk_mir_display_after_process_all_updates (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_after_process_all_updates\n");
}
static gulong
gdk_mir_display_get_next_serial (GdkDisplay *display)
{
//g_printerr ("gdk_mir_display_get_next_serial\n");
return GDK_MIR_DISPLAY (display)->serial++;
}
static void
gdk_mir_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id)
{
//g_printerr ("gdk_mir_display_notify_startup_complete\n");
}
static void
gdk_mir_display_event_data_copy (GdkDisplay *display,
const GdkEvent *src,
GdkEvent *dst)
{
//g_printerr ("gdk_mir_display_event_data_copy\n");
}
static void
gdk_mir_display_event_data_free (GdkDisplay *display,
GdkEvent *event)
{
//g_printerr ("gdk_mir_display_event_data_free\n");
}
static void
gdk_mir_display_create_window_impl (GdkDisplay *display,
GdkWindow *window,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask)
{
g_printerr ("gdk_mir_display_create_window_impl");
g_printerr (" window=%p", window);
g_printerr (" location=(%d, %d)", window->x, window->y);
g_printerr (" size=(%d, %d)", window->width, window->height);
g_printerr ("\n");
if (attributes->wclass != GDK_INPUT_OUTPUT)
return;
window->impl = _gdk_mir_window_impl_new ();
}
static GdkKeymap *
gdk_mir_display_get_keymap (GdkDisplay *display)
{
//g_printerr ("gdk_mir_display_get_keymap\n");
return GDK_MIR_DISPLAY (display)->keymap;
}
static void
gdk_mir_display_push_error_trap (GdkDisplay *display)
{
g_printerr ("gdk_mir_display_push_error_trap\n");
}
static gint
gdk_mir_display_pop_error_trap (GdkDisplay *display,
gboolean ignored)
{
g_printerr ("gdk_mir_display_pop_error_trap\n");
return 0;
}
static GdkWindow *
gdk_mir_display_get_selection_owner (GdkDisplay *display,
GdkAtom selection)
{
g_printerr ("gdk_mir_display_get_selection_owner\n");
return NULL;
}
static gboolean
gdk_mir_display_set_selection_owner (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,
guint32 time,
gboolean send_event)
{
g_printerr ("gdk_mir_display_set_selection_owner\n");
return FALSE;
}
static void
gdk_mir_display_send_selection_notify (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time)
{
g_printerr ("gdk_mir_display_send_selection_notify\n");
}
static gint
gdk_mir_display_get_selection_property (GdkDisplay *display,
GdkWindow *requestor,
guchar **data,
GdkAtom *ret_type,
gint *ret_format)
{
g_printerr ("gdk_mir_display_get_selection_property\n");
return 0;
}
static void
gdk_mir_display_convert_selection (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
GdkAtom target,
guint32 time)
{
g_printerr ("gdk_mir_display_convert_selection\n");
}
static gint
gdk_mir_display_text_property_to_utf8_list (GdkDisplay *display,
GdkAtom encoding,
gint format,
const guchar *text,
gint length,
gchar ***list)
{
g_printerr ("gdk_mir_display_text_property_to_utf8_list\n");
return 0;
}
static gchar *
gdk_mir_display_utf8_to_string_target (GdkDisplay *display,
const gchar *str)
{
g_printerr ("gdk_mir_display_utf8_to_string_target\n");
return NULL;
}
static void
gdk_mir_display_init (GdkMirDisplay *display)
{
display->event_source = _gdk_mir_event_source_new (GDK_DISPLAY (display));
display->cursor = _gdk_mir_cursor_new (GDK_DISPLAY (display), GDK_ARROW);
display->keymap = _gdk_mir_keymap_new ();
}
static void
gdk_mir_display_class_init (GdkMirDisplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkDisplayClass *display_class = GDK_DISPLAY_CLASS (klass);
object_class->dispose = gdk_mir_display_dispose;
object_class->finalize = gdk_mir_display_finalize;
display_class->window_type = gdk_mir_window_get_type ();
display_class->get_name = gdk_mir_display_get_name;
display_class->get_default_screen = gdk_mir_display_get_default_screen;
display_class->beep = gdk_mir_display_beep;
display_class->sync = gdk_mir_display_sync;
display_class->flush = gdk_mir_display_flush;
display_class->has_pending = gdk_mir_display_has_pending;
display_class->queue_events = gdk_mir_display_queue_events;
display_class->make_default = gdk_mir_display_make_default;
display_class->get_default_group = gdk_mir_display_get_default_group;
display_class->supports_shapes = gdk_mir_display_supports_shapes;
display_class->supports_input_shapes = gdk_mir_display_supports_input_shapes;
display_class->supports_composite = gdk_mir_display_supports_composite;
display_class->supports_clipboard_persistence = gdk_mir_display_supports_clipboard_persistence;
display_class->supports_cursor_alpha = gdk_mir_display_supports_cursor_alpha;
display_class->supports_cursor_color = gdk_mir_display_supports_cursor_color;
display_class->supports_selection_notification = gdk_mir_display_supports_selection_notification;
display_class->request_selection_notification = gdk_mir_display_request_selection_notification;
display_class->store_clipboard = gdk_mir_display_store_clipboard;
display_class->get_default_cursor_size = gdk_mir_display_get_default_cursor_size;
display_class->get_maximal_cursor_size = gdk_mir_display_get_maximal_cursor_size;
display_class->get_cursor_for_type = gdk_mir_display_get_cursor_for_type;
display_class->get_cursor_for_name = gdk_mir_display_get_cursor_for_name;
display_class->get_cursor_for_surface = gdk_mir_display_get_cursor_for_surface;
display_class->list_devices = gdk_mir_display_list_devices;
display_class->get_app_launch_context = gdk_mir_display_get_app_launch_context;
display_class->before_process_all_updates = gdk_mir_display_before_process_all_updates;
display_class->after_process_all_updates = gdk_mir_display_after_process_all_updates;
display_class->get_next_serial = gdk_mir_display_get_next_serial;
display_class->notify_startup_complete = gdk_mir_display_notify_startup_complete;
display_class->event_data_copy = gdk_mir_display_event_data_copy;
display_class->event_data_free = gdk_mir_display_event_data_free;
display_class->create_window_impl = gdk_mir_display_create_window_impl;
display_class->get_keymap = gdk_mir_display_get_keymap;
display_class->push_error_trap = gdk_mir_display_push_error_trap;
display_class->pop_error_trap = gdk_mir_display_pop_error_trap;
display_class->get_selection_owner = gdk_mir_display_get_selection_owner;
display_class->set_selection_owner = gdk_mir_display_set_selection_owner;
display_class->send_selection_notify = gdk_mir_display_send_selection_notify;
display_class->get_selection_property = gdk_mir_display_get_selection_property;
display_class->convert_selection = gdk_mir_display_convert_selection;
display_class->text_property_to_utf8_list = gdk_mir_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = gdk_mir_display_utf8_to_string_target;
}
+624
View File
@@ -0,0 +1,624 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkinternals.h"
#include "gdkdisplayprivate.h"
#include "gdkmir.h"
#include "gdkmir-private.h"
struct _GdkMirWindowReference {
GdkMirEventSource *source;
GdkWindow *window;
gint ref_count;
};
typedef struct {
GdkMirWindowReference *window_ref;
MirEvent event;
} GdkMirQueuedEvent;
struct _GdkMirEventSource
{
GSource parent_instance;
GMutex mir_event_lock;
GQueue mir_events;
GdkDisplay *display;
};
static void
send_event (GdkWindow *window, GdkDevice *device, GdkEvent *event)
{
GdkDisplay *display;
GList *node;
gdk_event_set_device (event, device);
gdk_event_set_screen (event, gdk_display_get_screen (gdk_window_get_display (window), 0));
event->any.window = g_object_ref (window);
display = gdk_window_get_display (window);
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, _gdk_display_get_next_serial (display));
}
static void
set_key_event_string (GdkEventKey *event)
{
gunichar c = 0;
if (event->keyval != GDK_KEY_VoidSymbol)
c = gdk_keyval_to_unicode (event->keyval);
if (c)
{
gchar buf[7];
gint len;
gsize bytes_written;
/* Apply the control key - Taken from Xlib
*/
if (event->state & GDK_CONTROL_MASK)
{
if ((c >= '@' && c < '\177') || c == ' ') c &= 0x1F;
else if (c == '2')
{
event->string = g_memdup ("\0\0", 2);
event->length = 1;
buf[0] = '\0';
return;
}
else if (c >= '3' && c <= '7') c -= ('3' - '\033');
else if (c == '8') c = '\177';
else if (c == '/') c = '_' & 0x1F;
}
len = g_unichar_to_utf8 (c, buf);
buf[len] = '\0';
event->string = g_locale_from_utf8 (buf, len,
NULL, &bytes_written,
NULL);
if (event->string)
event->length = bytes_written;
}
else if (event->keyval == GDK_KEY_Escape)
{
event->length = 1;
event->string = g_strdup ("\033");
}
else if (event->keyval == GDK_KEY_Return ||
event->keyval == GDK_KEY_KP_Enter)
{
event->length = 1;
event->string = g_strdup ("\r");
}
if (!event->string)
{
event->length = 0;
event->string = g_strdup ("");
}
}
static void
generate_key_event (GdkWindow *window, GdkEventType type, guint state, guint keyval, guint16 keycode, gboolean is_modifier)
{
GdkEvent *event;
event = gdk_event_new (type);
event->key.state = state;
event->key.keyval = keyval;
event->key.hardware_keycode = keycode + 8;
event->key.is_modifier = is_modifier;
set_key_event_string (&event->key);
send_event (window, _gdk_mir_device_manager_get_keyboard (gdk_display_get_device_manager (gdk_window_get_display (window))), event);
}
static GdkDevice *
get_pointer (GdkWindow *window)
{
return gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gdk_window_get_display (window)));
}
static void
generate_button_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble y, guint button, guint state)
{
GdkEvent *event;
event = gdk_event_new (type);
event->button.x = x;
event->button.y = y;
event->button.state = state;
event->button.button = button;
send_event (window, get_pointer (window), event);
}
static void
generate_scroll_event (GdkWindow *window, gdouble x, gdouble y, gdouble delta_x, gdouble delta_y, guint state)
{
GdkEvent *event;
event = gdk_event_new (GDK_SCROLL);
event->scroll.x = x;
event->scroll.y = y;
event->scroll.state = state;
event->scroll.direction = GDK_SCROLL_SMOOTH;
event->scroll.delta_x = delta_x;
event->scroll.delta_y = delta_y;
send_event (window, get_pointer (window), event);
}
static void
generate_motion_event (GdkWindow *window, gdouble x, gdouble y, guint state)
{
GdkEvent *event;
event = gdk_event_new (GDK_MOTION_NOTIFY);
event->motion.x = x;
event->motion.y = y;
event->motion.state = state;
event->motion.is_hint = FALSE;
send_event (window, get_pointer (window), event);
}
static void
generate_crossing_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble y)
{
GdkEvent *event;
event = gdk_event_new (type);
event->crossing.x = x;
event->crossing.y = y;
event->crossing.mode = GDK_CROSSING_NORMAL;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
event->crossing.focus = TRUE;
send_event (window, get_pointer (window), event);
}
static void
generate_focus_event (GdkWindow *window, gboolean focused)
{
GdkEvent *event;
if (focused)
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
else
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.send_event = FALSE;
event->focus_change.in = focused;
send_event (window, get_pointer (window), event);
}
static guint
get_modifier_state (unsigned int modifiers, unsigned int button_state)
{
guint modifier_state = 0;
if ((modifiers & mir_key_modifier_alt) != 0)
modifier_state |= GDK_MOD1_MASK;
if ((modifiers & mir_key_modifier_shift) != 0)
modifier_state |= GDK_SHIFT_MASK;
if ((modifiers & mir_key_modifier_ctrl) != 0)
modifier_state |= GDK_CONTROL_MASK;
if ((modifiers & mir_key_modifier_meta) != 0)
modifier_state |= GDK_SUPER_MASK;
if ((modifiers & mir_key_modifier_caps_lock) != 0)
modifier_state |= GDK_LOCK_MASK;
if ((button_state & mir_motion_button_primary) != 0)
modifier_state |= GDK_BUTTON1_MASK;
if ((button_state & mir_motion_button_secondary) != 0)
modifier_state |= GDK_BUTTON3_MASK;
if ((button_state & mir_motion_button_tertiary) != 0)
modifier_state |= GDK_BUTTON2_MASK;
return modifier_state;
}
/*
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (event_data->window->impl);
MirMotionButton changed_button_state;
GdkEventType event_type;
gdouble x, y;
guint modifier_state;
gboolean is_modifier = FALSE;
*/
static void
handle_key_event (GdkWindow *window, const MirKeyEvent *event)
{
guint modifier_state;
gboolean is_modifier = FALSE;
modifier_state = get_modifier_state (event->modifiers, 0); // FIXME: Need to track button state
switch (event->action)
{
case mir_key_action_down:
case mir_key_action_up:
// FIXME: Convert keycode
// FIXME: is_modifier
generate_key_event (window,
event->action == mir_key_action_down ? GDK_KEY_PRESS : GDK_KEY_RELEASE,
modifier_state,
event->key_code,
event->scan_code,
is_modifier);
break;
default:
//case mir_key_action_multiple:
// FIXME
break;
}
}
static void
handle_motion_event (GdkWindow *window, const MirMotionEvent *event)
{
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
gdouble x, y;
gboolean cursor_inside;
MirMotionButton button_state;
guint modifier_state;
GdkEventType event_type;
MirMotionButton changed_button_state;
_gdk_mir_window_impl_get_cursor_state (impl, &x, &y, &cursor_inside, &button_state);
if (event->pointer_count > 0)
{
x = event->pointer_coordinates[0].x;
y = event->pointer_coordinates[0].y;
}
modifier_state = get_modifier_state (event->modifiers, event->button_state);
/* The Mir events generate hover-exits even while inside the window so
counteract this by always generating an enter notify on all other events */
if (!cursor_inside && event->action != mir_motion_action_hover_exit)
{
cursor_inside = TRUE;
generate_crossing_event (window, GDK_ENTER_NOTIFY, x, y);
}
/* Update which window has focus */
_gdk_mir_pointer_set_location (get_pointer (window), x, y, window, modifier_state);
switch (event->action)
{
case mir_motion_action_down:
case mir_motion_action_up:
event_type = event->action == mir_motion_action_down ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE;
changed_button_state = button_state ^ event->button_state;
if ((changed_button_state & mir_motion_button_primary) != 0)
generate_button_event (window, event_type, x, y, GDK_BUTTON_PRIMARY, modifier_state);
if ((changed_button_state & mir_motion_button_secondary) != 0)
generate_button_event (window, event_type, x, y, GDK_BUTTON_SECONDARY, modifier_state);
if ((changed_button_state & mir_motion_button_tertiary) != 0)
generate_button_event (window, event_type, x, y, GDK_BUTTON_MIDDLE, modifier_state);
button_state = event->button_state;
break;
case mir_motion_action_scroll:
generate_scroll_event (window, x, y, event->pointer_coordinates[0].hscroll, event->pointer_coordinates[0].vscroll, modifier_state);
break;
case mir_motion_action_move: // move with button
case mir_motion_action_hover_move: // move without button
generate_motion_event (window, x, y, modifier_state);
break;
case mir_motion_action_hover_exit:
cursor_inside = FALSE;
generate_crossing_event (window, GDK_LEAVE_NOTIFY, x, y);
break;
}
_gdk_mir_window_impl_set_cursor_state (impl, x, y, cursor_inside, button_state);
}
static void
handle_surface_event (GdkWindow *window, const MirSurfaceEvent *event)
{
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
switch (event->attrib)
{
case mir_surface_attrib_type:
break;
case mir_surface_attrib_state:
_gdk_mir_window_impl_set_surface_state (impl, event->value);
// FIXME: notify
break;
case mir_surface_attrib_swapinterval:
break;
case mir_surface_attrib_focus:
generate_focus_event (window, event->value != 0);
break;
default:
break;
}
}
static void
generate_configure_event (GdkWindow *window,
gint width,
gint height)
{
GdkEvent *event;
event = gdk_event_new (GDK_CONFIGURE);
event->configure.send_event = FALSE;
event->configure.width = width;
event->configure.height = height;
send_event (window, get_pointer (window), event);
}
static void
handle_resize_event (GdkWindow *window,
const MirResizeEvent *event)
{
window->width = event->width;
window->height = event->height;
_gdk_window_update_size (window);
generate_configure_event (window, event->width, event->height);
}
typedef struct
{
GdkWindow *window;
MirEvent event;
} EventData;
static void
gdk_mir_event_source_queue_event (GdkDisplay *display,
GdkWindow *window,
const MirEvent *event)
{
if (g_getenv ("GDK_MIR_LOG_EVENTS"))
_gdk_mir_print_event (event);
// FIXME: Only generate events if the window wanted them?
switch (event->type)
{
case mir_event_type_key:
handle_key_event (window, &event->key);
break;
case mir_event_type_motion:
handle_motion_event (window, &event->motion);
break;
case mir_event_type_surface:
handle_surface_event (window, &event->surface);
break;
case mir_event_type_resize:
handle_resize_event (window, &event->resize);
break;
default:
g_assert_not_reached ();
// FIXME?
break;
}
}
static GdkMirQueuedEvent *
gdk_mir_event_source_take_queued_event (GdkMirEventSource *source)
{
GdkMirQueuedEvent *queued_event;
g_mutex_lock (&source->mir_event_lock);
queued_event = g_queue_pop_head (&source->mir_events);
g_mutex_unlock (&source->mir_event_lock);
return queued_event;
}
static void
gdk_mir_queued_event_free (GdkMirQueuedEvent *event)
{
_gdk_mir_window_reference_unref (event->window_ref);
g_slice_free (GdkMirQueuedEvent, event);
}
static void
gdk_mir_event_source_convert_events (GdkMirEventSource *source)
{
GdkMirQueuedEvent *event;
while ((event = gdk_mir_event_source_take_queued_event (source)))
{
GdkWindow *window = event->window_ref->window;
/* The window may have been destroyed in the main thread while the
* event was being dispatched...
*/
if (window != NULL)
gdk_mir_event_source_queue_event (source->display, window, &event->event);
else
g_warning ("window was destroyed before event arrived...");
gdk_mir_queued_event_free (event);
}
}
static gboolean
gdk_mir_event_source_prepare (GSource *g_source,
gint *timeout)
{
GdkMirEventSource *source = (GdkMirEventSource *) g_source;
gboolean mir_events_in_queue;
if (_gdk_event_queue_find_first (source->display))
return TRUE;
g_mutex_lock (&source->mir_event_lock);
mir_events_in_queue = g_queue_get_length (&source->mir_events) > 0;
g_mutex_unlock (&source->mir_event_lock);
return mir_events_in_queue;
}
static gboolean
gdk_mir_event_source_check (GSource *g_source)
{
return gdk_mir_event_source_prepare (g_source, NULL);
}
static gboolean
gdk_mir_event_source_dispatch (GSource *g_source,
GSourceFunc callback,
gpointer user_data)
{
GdkMirEventSource *source = (GdkMirEventSource *) g_source;
GdkEvent *event;
/* First, run the queue of events from the thread */
gdk_mir_event_source_convert_events (source);
/* Next, dispatch one single event from the display's queue.
*
* If there is more than one event then we will soon find ourselves
* back here again.
*/
gdk_threads_enter ();
event = gdk_display_get_event (source->display);
if (event)
{
_gdk_event_emit (event);
gdk_event_free (event);
}
gdk_threads_leave ();
return TRUE;
}
static void
gdk_mir_event_source_finalize (GSource *g_source)
{
GdkMirEventSource *source = (GdkMirEventSource *) g_source;
GdkMirQueuedEvent *event;
while ((event = gdk_mir_event_source_take_queued_event (source)))
gdk_mir_queued_event_free (event);
g_mutex_clear (&source->mir_event_lock);
}
static GSourceFuncs gdk_mir_event_source_funcs = {
gdk_mir_event_source_prepare,
gdk_mir_event_source_check,
gdk_mir_event_source_dispatch,
gdk_mir_event_source_finalize
};
GdkMirEventSource *
_gdk_mir_event_source_new (GdkDisplay *display)
{
GdkMirEventSource *source;
GSource *g_source;
g_source = g_source_new (&gdk_mir_event_source_funcs, sizeof (GdkMirEventSource));
g_source_attach (g_source, NULL);
source = (GdkMirEventSource *) g_source;
g_mutex_init (&source->mir_event_lock);
source->display = display;
return source;
}
GdkMirWindowReference *
_gdk_mir_event_source_get_window_reference (GdkWindow *window)
{
static GQuark win_ref_quark;
GdkMirWindowReference *ref;
if G_UNLIKELY (!win_ref_quark)
win_ref_quark = g_quark_from_string ("GdkMirEventSource window reference");
ref = g_object_get_qdata (G_OBJECT (window), win_ref_quark);
if (!ref)
{
GdkMirEventSource *source;
source = _gdk_mir_display_get_event_source (gdk_window_get_display (window));
g_source_ref ((GSource *) source);
ref = g_slice_new (GdkMirWindowReference);
ref->window = window;
ref->source = source;
ref->ref_count = 0;
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &ref->window);
g_object_set_qdata_full (G_OBJECT (window), win_ref_quark,
ref, (GDestroyNotify) _gdk_mir_window_reference_unref);
}
g_atomic_int_inc (&ref->ref_count);
return ref;
}
void
_gdk_mir_window_reference_unref (GdkMirWindowReference *ref)
{
if (g_atomic_int_dec_and_test (&ref->ref_count))
{
if (ref->window)
g_object_remove_weak_pointer (G_OBJECT (ref->window), (gpointer *) &ref->window);
g_source_unref ((GSource *) ref->source);
g_slice_free (GdkMirWindowReference, ref);
}
}
void
_gdk_mir_event_source_queue (GdkMirWindowReference *window_ref,
const MirEvent *event)
{
GdkMirEventSource *source = window_ref->source;
GdkMirQueuedEvent *queued_event;
/* We are in the wrong thread right now. We absolutely cannot touch
* the window.
*
* We can do pretty much anything we want with the source, though...
*/
queued_event = g_slice_new (GdkMirQueuedEvent);
g_atomic_int_inc (&window_ref->ref_count);
queued_event->window_ref = window_ref;
queued_event->event = *event;
g_mutex_lock (&source->mir_event_lock);
g_queue_push_tail (&source->mir_events, queued_event);
g_mutex_unlock (&source->mir_event_lock);
g_main_context_wakeup (NULL);
}
+173
View File
@@ -0,0 +1,173 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkdeviceprivate.h"
typedef struct GdkMirKeyboard GdkMirKeyboard;
typedef struct GdkMirKeyboardClass GdkMirKeyboardClass;
#define GDK_TYPE_MIR_KEYBOARD (gdk_mir_keyboard_get_type ())
#define GDK_MIR_KEYBOARD(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_KEYBOARD, GdkMirKeyboard))
#define GDK_MIR_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_KEYBOARD, GdkMirKeyboardClass))
#define GDK_IS_MIR_KEYBOARD(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_KEYBOARD))
#define GDK_IS_MIR_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_KEYBOARD))
#define GDK_MIR_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_KEYBOARD, GdkMirKeyboardClass))
struct GdkMirKeyboard
{
GdkDevice parent_instance;
};
struct GdkMirKeyboardClass
{
GdkDeviceClass parent_class;
};
G_DEFINE_TYPE (GdkMirKeyboard, gdk_mir_keyboard, GDK_TYPE_DEVICE)
GdkDevice *
_gdk_mir_keyboard_new (GdkDeviceManager *device_manager, const gchar *name)
{
return g_object_new (GDK_TYPE_MIR_KEYBOARD,
"display", gdk_device_manager_get_display (device_manager),
"device-manager", device_manager,
"name", name,
"type", GDK_DEVICE_TYPE_MASTER,
"input-source", GDK_SOURCE_KEYBOARD,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", FALSE,
NULL);
}
static gboolean
gdk_mir_keyboard_get_history (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
g_printerr ("gdk_mir_keyboard_get_history\n");
return FALSE;
}
static void
gdk_mir_keyboard_get_state (GdkDevice *device,
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask)
{
g_printerr ("gdk_mir_keyboard_get_state\n");
}
static void
gdk_mir_keyboard_set_window_cursor (GdkDevice *device,
GdkWindow *window,
GdkCursor *cursor)
{
//g_printerr ("gdk_mir_keyboard_set_window_cursor\n");
/* Keyboards don't have cursors... */
}
static void
gdk_mir_keyboard_warp (GdkDevice *device,
GdkScreen *screen,
gdouble x,
gdouble y)
{
//g_printerr ("gdk_mir_keyboard_warp\n");
/* Can't warp a keyboard... */
}
static void
gdk_mir_keyboard_query_state (GdkDevice *device,
GdkWindow *window,
GdkWindow **root_window,
GdkWindow **child_window,
gdouble *root_x,
gdouble *root_y,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask)
{
g_printerr ("gdk_mir_keyboard_query_state\n");
}
static GdkGrabStatus
gdk_mir_keyboard_grab (GdkDevice *device,
GdkWindow *window,
gboolean owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
GdkCursor *cursor,
guint32 time_)
{
//g_printerr ("gdk_mir_keyboard_grab\n");
/* Mir doesn't do grabs, so sure, you have the grab */
return GDK_GRAB_SUCCESS;
}
static void
gdk_mir_keyboard_ungrab (GdkDevice *device,
guint32 time_)
{
//g_printerr ("gdk_mir_keyboard_ungrab\n");
/* Mir doesn't do grabs */
}
static GdkWindow *
gdk_mir_keyboard_window_at_position (GdkDevice *device,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask,
gboolean get_toplevel)
{
//g_printerr ("gdk_mir_keyboard_window_at_position (%f, %f)\n", *win_x, *win_y);
/* Keyboard don't have locations... */
return NULL; // FIXME: Or the window with the keyboard focus?
}
static void
gdk_mir_keyboard_select_window_events (GdkDevice *device,
GdkWindow *window,
GdkEventMask event_mask)
{
g_printerr ("gdk_mir_keyboard_select_window_events\n");
}
static void
gdk_mir_keyboard_init (GdkMirKeyboard *device)
{
}
static void
gdk_mir_keyboard_class_init (GdkMirKeyboardClass *klass)
{
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->get_history = gdk_mir_keyboard_get_history;
device_class->get_state = gdk_mir_keyboard_get_state;
device_class->set_window_cursor = gdk_mir_keyboard_set_window_cursor;
device_class->warp = gdk_mir_keyboard_warp;
device_class->query_state = gdk_mir_keyboard_query_state;
device_class->grab = gdk_mir_keyboard_grab;
device_class->ungrab = gdk_mir_keyboard_ungrab;
device_class->window_at_position = gdk_mir_keyboard_window_at_position;
device_class->select_window_events = gdk_mir_keyboard_select_window_events;
}
+466
View File
@@ -0,0 +1,466 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <xkbcommon/xkbcommon.h>
#include "gdkkeysprivate.h"
typedef struct GdkMirKeymap GdkMirKeymap;
typedef struct GdkMirKeymapClass GdkMirKeymapClass;
#define GDK_TYPE_MIR_KEYMAP (gdk_mir_keymap_get_type ())
#define GDK_MIR_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_KEYMAP, GdkMirKeymap))
#define GDK_MIR_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_KEYMAP, GdkMirKeymapClass))
#define GDK_IS_MIR_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_KEYMAP))
#define GDK_IS_MIR_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_KEYMAP))
#define GDK_MIR_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_KEYMAP, GdkMirKeymapClass))
struct GdkMirKeymap
{
GdkKeymap parent_instance;
struct xkb_keymap *xkb_keymap;
struct xkb_state *xkb_state;
PangoDirection *direction;
gboolean bidi;
};
struct GdkMirKeymapClass
{
GdkKeymapClass parent_class;
};
G_DEFINE_TYPE (GdkMirKeymap, gdk_mir_keymap, GDK_TYPE_KEYMAP)
GdkKeymap *
_gdk_mir_keymap_new (void)
{
return g_object_new (GDK_TYPE_MIR_KEYMAP, NULL);
}
static PangoDirection
gdk_mir_keymap_get_direction (GdkKeymap *keymap)
{
//g_printerr ("gdk_mir_keymap_get_direction\n");
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
gint i;
for (i = 0; i < xkb_keymap_num_layouts (mir_keymap->xkb_keymap); i++)
{
if (xkb_state_layout_index_is_active (mir_keymap->xkb_state, i, XKB_STATE_LAYOUT_EFFECTIVE))
return mir_keymap->direction[i];
}
return PANGO_DIRECTION_NEUTRAL;
}
static gboolean
gdk_mir_keymap_have_bidi_layouts (GdkKeymap *keymap)
{
//g_printerr ("gdk_mir_keymap_have_bidi_layouts\n");
return FALSE;
}
static gboolean
gdk_mir_keymap_get_caps_lock_state (GdkKeymap *keymap)
{
//g_printerr ("gdk_mir_keymap_get_caps_lock_state\n");
return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_CAPS);
}
static gboolean
gdk_mir_keymap_get_num_lock_state (GdkKeymap *keymap)
{
//g_printerr ("gdk_mir_keymap_get_num_lock_state\n");
return xkb_state_led_name_is_active (GDK_MIR_KEYMAP (keymap)->xkb_state, XKB_LED_NAME_NUM);
}
static gboolean
gdk_mir_keymap_get_entries_for_keyval (GdkKeymap *keymap,
guint keyval,
GdkKeymapKey **keys,
gint *n_keys)
{
//g_printerr ("gdk_mir_keymap_get_entries_for_keyval\n");
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
GArray *key_array;
guint keycode;
key_array = g_array_new (FALSE, FALSE, sizeof (GdkKeymapKey));
for (keycode = 8; keycode < 255; keycode++) /* FIXME: min/max keycode */
{
gint num_layouts, layout;
num_layouts = xkb_keymap_num_layouts_for_key (mir_keymap->xkb_keymap, keycode);
for (layout = 0; layout < num_layouts; layout++)
{
gint num_levels, level;
num_levels = xkb_keymap_num_levels_for_key (mir_keymap->xkb_keymap, keycode, layout);
for (level = 0; level < num_levels; level++)
{
const xkb_keysym_t *syms;
gint num_syms, sym;
num_syms = xkb_keymap_key_get_syms_by_level (mir_keymap->xkb_keymap, keycode, layout, level, &syms);
for (sym = 0; sym < num_syms; sym++)
{
if (syms[sym] == keyval)
{
GdkKeymapKey key;
key.keycode = keycode;
key.group = layout;
key.level = level;
g_array_append_val (key_array, key);
}
}
}
}
}
*n_keys = key_array->len;
*keys = (GdkKeymapKey*) g_array_free (key_array, FALSE);
return TRUE;
}
static gboolean
gdk_mir_keymap_get_entries_for_keycode (GdkKeymap *keymap,
guint hardware_keycode,
GdkKeymapKey **keys,
guint **keyvals,
gint *n_entries)
{
//g_printerr ("gdk_mir_keymap_get_entries_for_keycode\n");
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
gint num_layouts, layout;
gint num_entries;
gint i;
num_layouts = xkb_keymap_num_layouts_for_key (mir_keymap->xkb_keymap, hardware_keycode);
num_entries = 0;
for (layout = 0; layout < num_layouts; layout++)
num_entries += xkb_keymap_num_levels_for_key (mir_keymap->xkb_keymap, hardware_keycode, layout);
if (n_entries)
*n_entries = num_entries;
if (keys)
*keys = g_new0 (GdkKeymapKey, num_entries);
if (keyvals)
*keyvals = g_new0 (guint, num_entries);
i = 0;
for (layout = 0; layout < num_layouts; layout++)
{
gint num_levels, level;
num_levels = xkb_keymap_num_levels_for_key (mir_keymap->xkb_keymap, hardware_keycode, layout);
for (level = 0; level < num_levels; level++)
{
const xkb_keysym_t *syms;
int num_syms;
num_syms = xkb_keymap_key_get_syms_by_level (mir_keymap->xkb_keymap, hardware_keycode, layout, 0, &syms);
if (keys)
{
(*keys)[i].keycode = hardware_keycode;
(*keys)[i].group = layout;
(*keys)[i].level = level;
}
if (keyvals && num_syms > 0)
(*keyvals)[i] = syms[0];
i++;
}
}
return num_entries > 0;
}
static guint
gdk_mir_keymap_lookup_key (GdkKeymap *keymap,
const GdkKeymapKey *key)
{
//g_printerr ("gdk_mir_keymap_lookup_key\n");
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
const xkb_keysym_t *syms;
int num_syms;
num_syms = xkb_keymap_key_get_syms_by_level (mir_keymap->xkb_keymap,
key->keycode,
key->group,
key->level,
&syms);
if (num_syms > 0)
return syms[0];
else
return XKB_KEY_NoSymbol;
}
static guint32
get_xkb_modifiers (struct xkb_keymap *xkb_keymap,
GdkModifierType state)
{
guint32 mods = 0;
if (state & GDK_SHIFT_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_SHIFT);
if (state & GDK_LOCK_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_CAPS);
if (state & GDK_CONTROL_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_CTRL);
if (state & GDK_MOD1_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_ALT);
if (state & GDK_MOD2_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod2");
if (state & GDK_MOD3_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod3");
if (state & GDK_MOD4_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_LOGO);
if (state & GDK_MOD5_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod5");
return mods;
}
static GdkModifierType
get_gdk_modifiers (struct xkb_keymap *xkb_keymap,
guint32 mods)
{
GdkModifierType state = 0;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_SHIFT)))
state |= GDK_SHIFT_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_CAPS)))
state |= GDK_LOCK_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_CTRL)))
state |= GDK_CONTROL_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_ALT)))
state |= GDK_MOD1_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod2")))
state |= GDK_MOD2_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod3")))
state |= GDK_MOD3_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_LOGO)))
state |= GDK_MOD4_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod5")))
state |= GDK_MOD5_MASK;
return state;
}
static gboolean
gdk_mir_keymap_translate_keyboard_state (GdkKeymap *keymap,
guint hardware_keycode,
GdkModifierType state,
gint group,
guint *keyval,
gint *effective_group,
gint *effective_level,
GdkModifierType *consumed_modifiers)
{
//g_printerr ("gdk_mir_keymap_translate_keyboard_state\n");
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
struct xkb_state *xkb_state;
guint32 modifiers;
guint32 consumed;
xkb_layout_index_t layout;
xkb_level_index_t level;
xkb_keysym_t sym;
modifiers = get_xkb_modifiers (mir_keymap->xkb_keymap, state);
xkb_state = xkb_state_new (mir_keymap->xkb_keymap);
xkb_state_update_mask (xkb_state, modifiers, 0, 0, group, 0, 0);
layout = xkb_state_key_get_layout (xkb_state, hardware_keycode);
level = xkb_state_key_get_level (xkb_state, hardware_keycode, layout);
sym = xkb_state_key_get_one_sym (xkb_state, hardware_keycode);
consumed = modifiers & ~xkb_state_mod_mask_remove_consumed (xkb_state, hardware_keycode, modifiers);
xkb_state_unref (xkb_state);
if (keyval)
*keyval = sym;
if (effective_group)
*effective_group = layout;
if (effective_level)
*effective_level = level;
if (consumed_modifiers)
*consumed_modifiers = get_gdk_modifiers (mir_keymap->xkb_keymap, consumed);
return TRUE;
}
static void
gdk_mir_keymap_add_virtual_modifiers (GdkKeymap *keymap,
GdkModifierType *state)
{
//g_printerr ("gdk_mir_keymap_add_virtual_modifiers\n");
// FIXME: What is this?
}
static gboolean
gdk_mir_keymap_map_virtual_modifiers (GdkKeymap *keymap,
GdkModifierType *state)
{
//g_printerr ("gdk_mir_keymap_map_virtual_modifiers\n");
// FIXME: What is this?
return TRUE;
}
static guint
gdk_mir_keymap_get_modifier_state (GdkKeymap *keymap)
{
//g_printerr ("gdk_mir_keymap_get_modifier_state\n");
GdkMirKeymap *mir_keymap = GDK_MIR_KEYMAP (keymap);
xkb_mod_mask_t mods;
mods = xkb_state_serialize_mods (mir_keymap->xkb_state, XKB_STATE_MODS_EFFECTIVE);
return get_gdk_modifiers (mir_keymap->xkb_keymap, mods);
}
static void
update_direction (GdkMirKeymap *keymap)
{
gint num_layouts;
gint *rtl;
guint key;
gboolean have_rtl, have_ltr;
gint i;
num_layouts = xkb_keymap_num_layouts (keymap->xkb_keymap);
g_free (keymap->direction);
keymap->direction = g_new0 (PangoDirection, num_layouts);
rtl = g_new0 (gint, num_layouts);
for (key = 8; key < 255; key++) /* FIXME: min/max keycode */
{
gint layouts;
gint layout;
layouts = xkb_keymap_num_layouts_for_key (keymap->xkb_keymap, key);
for (layout = 0; layout < layouts; layout++)
{
const xkb_keysym_t *syms;
gint num_syms;
gint sym;
num_syms = xkb_keymap_key_get_syms_by_level (keymap->xkb_keymap, key, layout, 0, &syms);
for (sym = 0; sym < num_syms; sym++)
{
PangoDirection dir;
dir = pango_unichar_direction (xkb_keysym_to_utf32 (syms[sym]));
switch (dir)
{
case PANGO_DIRECTION_RTL:
rtl[layout]++;
break;
case PANGO_DIRECTION_LTR:
rtl[layout]--;
break;
default:
break;
}
}
}
}
have_rtl = have_ltr = FALSE;
for (i = 0; i < num_layouts; i++)
{
if (rtl[i] > 0)
{
keymap->direction[i] = PANGO_DIRECTION_RTL;
have_rtl = TRUE;
}
else
{
keymap->direction[i] = PANGO_DIRECTION_LTR;
have_ltr = TRUE;
}
}
if (have_rtl && have_ltr)
keymap->bidi = TRUE;
g_free (rtl);
}
static void
gdk_mir_keymap_init (GdkMirKeymap *keymap)
{
struct xkb_context *context;
struct xkb_rule_names names;
context = xkb_context_new (0);
names.rules = "evdev";
names.model = "pc105";
names.layout = "us";
names.variant = "";
names.options = "";
keymap->xkb_keymap = xkb_keymap_new_from_names (context, &names, 0);
keymap->xkb_state = xkb_state_new (keymap->xkb_keymap);
xkb_context_unref (context);
update_direction (keymap);
}
static void
gdk_mir_keymap_finalize (GObject *object)
{
GdkMirKeymap *keymap = GDK_MIR_KEYMAP (object);
xkb_keymap_unref (keymap->xkb_keymap);
xkb_state_unref (keymap->xkb_state);
g_free (keymap->direction);
G_OBJECT_CLASS (gdk_mir_keymap_parent_class)->finalize (object);
}
static void
gdk_mir_keymap_class_init (GdkMirKeymapClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkKeymapClass *keymap_class = GDK_KEYMAP_CLASS (klass);
object_class->finalize = gdk_mir_keymap_finalize;
keymap_class->get_direction = gdk_mir_keymap_get_direction;
keymap_class->have_bidi_layouts = gdk_mir_keymap_have_bidi_layouts;
keymap_class->get_caps_lock_state = gdk_mir_keymap_get_caps_lock_state;
keymap_class->get_num_lock_state = gdk_mir_keymap_get_num_lock_state;
keymap_class->get_entries_for_keyval = gdk_mir_keymap_get_entries_for_keyval;
keymap_class->get_entries_for_keycode = gdk_mir_keymap_get_entries_for_keycode;
keymap_class->lookup_key = gdk_mir_keymap_lookup_key;
keymap_class->translate_keyboard_state = gdk_mir_keymap_translate_keyboard_state;
keymap_class->add_virtual_modifiers = gdk_mir_keymap_add_virtual_modifiers;
keymap_class->map_virtual_modifiers = gdk_mir_keymap_map_virtual_modifiers;
keymap_class->get_modifier_state = gdk_mir_keymap_get_modifier_state;
}
+250
View File
@@ -0,0 +1,250 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkdeviceprivate.h"
#include "gdkscreen.h"
#include "gdkwindow.h"
typedef struct GdkMirPointer GdkMirPointer;
typedef struct GdkMirPointerClass GdkMirPointerClass;
#define GDK_TYPE_MIR_POINTER (gdk_mir_pointer_get_type ())
#define GDK_MIR_POINTER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_POINTER, GdkMirPointer))
#define GDK_MIR_POINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_POINTER, GdkMirPointerClass))
#define GDK_IS_MIR_POINTER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_POINTER))
#define GDK_IS_MIR_POINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_POINTER))
#define GDK_MIR_POINTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_POINTER, GdkMirPointerClass))
struct GdkMirPointer
{
GdkDevice parent_instance;
/* Location of pointer */
gdouble x;
gdouble y;
/* Window this pointer is over */
GdkWindow *over_window;
/* Current modifier mask */
GdkModifierType modifier_mask;
};
struct GdkMirPointerClass
{
GdkDeviceClass parent_class;
};
G_DEFINE_TYPE (GdkMirPointer, gdk_mir_pointer, GDK_TYPE_DEVICE)
GdkDevice *
_gdk_mir_pointer_new (GdkDeviceManager *device_manager, const gchar *name)
{
return g_object_new (GDK_TYPE_MIR_POINTER,
"display", gdk_device_manager_get_display (device_manager),
"device-manager", device_manager,
"name", name,
"type", GDK_DEVICE_TYPE_MASTER,
"input-source", GDK_SOURCE_MOUSE,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", TRUE,
NULL);
}
void
_gdk_mir_pointer_set_location (GdkDevice *pointer,
gdouble x,
gdouble y,
GdkWindow *window,
GdkModifierType mask)
{
GdkMirPointer *p = GDK_MIR_POINTER (pointer);
p->x = x;
p->y = y;
if (p->over_window)
g_object_unref (p->over_window);
p->over_window = g_object_ref (window);
p->modifier_mask = mask;
}
static gboolean
gdk_mir_pointer_get_history (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
g_printerr ("gdk_mir_pointer_get_history\n");
return FALSE;
}
static void
gdk_mir_pointer_get_state (GdkDevice *device,
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask)
{
//g_printerr ("gdk_mir_pointer_get_state\n");
GdkMirPointer *p = GDK_MIR_POINTER (device);
gdouble x, y;
gdk_window_get_device_position_double (window, device, &x, &y, mask);
if (axes)
{
axes[0] = p->x;
axes[1] = p->y;
}
}
static void
gdk_mir_pointer_set_window_cursor (GdkDevice *device,
GdkWindow *window,
GdkCursor *cursor)
{
//g_printerr ("gdk_mir_pointer_set_window_cursor\n");
/* Mir doesn't support cursors */
}
static void
gdk_mir_pointer_warp (GdkDevice *device,
GdkScreen *screen,
gdouble x,
gdouble y)
{
//g_printerr ("gdk_mir_pointer_warp\n");
/* Mir doesn't support warping */
}
static void
gdk_mir_pointer_query_state (GdkDevice *device,
GdkWindow *window,
GdkWindow **root_window,
GdkWindow **child_window,
gdouble *root_x,
gdouble *root_y,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask)
{
//g_printerr ("gdk_mir_pointer_query_state\n");
GdkMirPointer *p = GDK_MIR_POINTER (device);
if (root_window)
*root_window = gdk_screen_get_root_window (gdk_display_get_default_screen (gdk_device_get_display (device)));
if (child_window)
*child_window = p->over_window;
if (root_x)
*root_x = p->x;
if (root_y)
*root_y = p->y;
if (win_x)
*win_x = p->x; // FIXME
if (win_y)
*win_y = p->y;
if (mask)
*mask = p->modifier_mask;
}
static GdkGrabStatus
gdk_mir_pointer_grab (GdkDevice *device,
GdkWindow *window,
gboolean owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
GdkCursor *cursor,
guint32 time_)
{
//g_printerr ("gdk_mir_pointer_grab\n");
/* Mir doesn't do grabs, so sure, you have the grab */
return GDK_GRAB_SUCCESS;
}
static void
gdk_mir_pointer_ungrab (GdkDevice *device,
guint32 time_)
{
//g_printerr ("gdk_mir_pointer_ungrab\n");
/* Mir doesn't do grabs */
}
static GdkWindow *
gdk_mir_pointer_window_at_position (GdkDevice *device,
gdouble *win_x,
gdouble *win_y,
GdkModifierType *mask,
gboolean get_toplevel)
{
//g_printerr ("gdk_mir_pointer_window_at_position\n");
GdkMirPointer *p = GDK_MIR_POINTER (device);
if (win_x)
*win_x = p->x;
if (win_y)
*win_y = p->y;
if (mask)
*mask = p->modifier_mask;
return p->over_window;
}
static void
gdk_mir_pointer_select_window_events (GdkDevice *device,
GdkWindow *window,
GdkEventMask event_mask)
{
g_printerr ("gdk_mir_pointer_select_window_events\n");
// FIXME?
}
static void
gdk_mir_pointer_init (GdkMirPointer *device)
{
}
static void
gdk_mir_pointer_finalize (GObject *object)
{
GdkMirPointer *p = GDK_MIR_POINTER (object);
if (p->over_window)
g_object_unref (p->over_window);
G_OBJECT_CLASS (gdk_mir_pointer_parent_class)->finalize (object);
}
static void
gdk_mir_pointer_class_init (GdkMirPointerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
object_class->finalize = gdk_mir_pointer_finalize;
device_class->get_history = gdk_mir_pointer_get_history;
device_class->get_state = gdk_mir_pointer_get_state;
device_class->set_window_cursor = gdk_mir_pointer_set_window_cursor;
device_class->warp = gdk_mir_pointer_warp;
device_class->query_state = gdk_mir_pointer_query_state;
device_class->grab = gdk_mir_pointer_grab;
device_class->ungrab = gdk_mir_pointer_ungrab;
device_class->window_at_position = gdk_mir_pointer_window_at_position;
device_class->select_window_events = gdk_mir_pointer_select_window_events;
}
+720
View File
@@ -0,0 +1,720 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include "gdkscreenprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkvisualprivate.h"
#include "gdkinternals.h"
#include "gdkmir.h"
#include "gdkmir-private.h"
#define VISUAL_TYPE GDK_VISUAL_TRUE_COLOR
#define VISUAL_DEPTH 32
typedef struct GdkMirScreen GdkMirScreen;
typedef struct GdkMirScreenClass GdkMirScreenClass;
#define GDK_TYPE_MIR_SCREEN (gdk_mir_screen_get_type ())
#define GDK_MIR_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MIR_SCREEN, GdkMirScreen))
#define GDK_MIR_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_SCREEN, GdkMirScreenClass))
#define GDK_IS_MIR_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_SCREEN))
#define GDK_IS_MIR_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_SCREEN))
#define GDK_MIR_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_SCREEN, GdkMirScreenClass))
struct GdkMirScreen
{
GdkScreen parent_instance;
/* Display this screen is running on */
GdkDisplay *display;
/* Current monitor configuration */
MirDisplayConfiguration *display_config;
GdkVisual *visual;
GdkWindow *root_window;
};
struct GdkMirScreenClass
{
GdkScreenClass parent_class;
};
G_DEFINE_TYPE (GdkMirScreen, gdk_mir_screen, GDK_TYPE_SCREEN)
static MirConnection *
get_connection (GdkMirScreen *screen)
{
return gdk_mir_display_get_mir_connection (GDK_DISPLAY (screen->display));
}
static void
get_screen_size (MirDisplayConfiguration *config, gint *width, gint *height)
{
uint32_t i;
*width = 0;
*height = 0;
if (!config)
return;
for (i = 0; i < config->num_outputs; i++)
{
MirDisplayOutput *o = &config->outputs[i];
gint w, h;
if (!o->used)
continue;
w = o->position_x + o->modes[o->current_mode].horizontal_resolution;
if (w > *width)
*width = w;
h = o->position_y + o->modes[o->current_mode].vertical_resolution;
if (h > *height)
*height = h;
}
}
static void
update_display_config (GdkMirScreen *screen)
{
gdk_mir_display_get_mir_connection (GDK_DISPLAY (screen->display));
mir_display_config_destroy (screen->display_config);
screen->display_config = mir_connection_create_display_config (get_connection (screen));
}
static void
config_changed_cb (MirConnection *connection, void *data)
{
GdkMirScreen *screen = data;
gint old_width, old_height, new_width, new_height;
get_screen_size (screen->display_config, &old_width, &old_height);
update_display_config (screen);
get_screen_size (screen->display_config, &new_width, &new_height);
g_signal_emit_by_name (screen, "monitors-changed");
if (old_width > 0 && (old_width != new_width || old_height != new_height))
g_signal_emit_by_name (screen, "size-changed");
}
GdkScreen *
_gdk_mir_screen_new (GdkDisplay *display)
{
GdkMirScreen *screen;
screen = g_object_new (GDK_TYPE_MIR_SCREEN, NULL);
screen->display = display;
mir_connection_set_display_config_change_callback (get_connection (screen), config_changed_cb, display);
update_display_config (screen);
return GDK_SCREEN (screen);
}
static void
gdk_mir_screen_dispose (GObject *object)
{
G_OBJECT_CLASS (gdk_mir_screen_parent_class)->dispose (object);
}
static void
gdk_mir_screen_finalize (GObject *object)
{
G_OBJECT_CLASS (gdk_mir_screen_parent_class)->finalize (object);
}
static GdkDisplay *
gdk_mir_screen_get_display (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_display\n");
return GDK_DISPLAY (GDK_MIR_SCREEN (screen)->display);
}
static MirDisplayOutput *
get_output (GdkScreen *screen, gint monitor_num)
{
MirDisplayConfiguration *config;
uint32_t i, j;
config = GDK_MIR_SCREEN (screen)->display_config;
for (i = 0, j = 0; i < config->num_outputs; i++)
{
if (!config->outputs[i].used)
continue;
if (j == monitor_num)
return &config->outputs[i];
j++;
}
return NULL;
}
static gint
gdk_mir_screen_get_width (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_get_width\n");
gint width, height;
get_screen_size (GDK_MIR_SCREEN (screen)->display_config, &width, &height);
return width;
}
static gint
gdk_mir_screen_get_height (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_get_height\n");
gint width, height;
get_screen_size (GDK_MIR_SCREEN (screen)->display_config, &width, &height);
return height;
}
static gint
gdk_mir_screen_get_width_mm (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_get_width_mm\n");
// FIXME: A combination of all screens?
return get_output (screen, 0)->physical_width_mm;
}
static gint
gdk_mir_screen_get_height_mm (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_get_height_mm\n");
// FIXME: A combination of all screens?
return get_output (screen, 0)->physical_height_mm;
}
static gint
gdk_mir_screen_get_number (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_number\n");
/* There is only one screen... */
return 0;
}
static GdkWindow *
gdk_mir_screen_get_root_window (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_root_window\n");
GdkMirScreen *s = GDK_MIR_SCREEN (screen);
gint width, height;
if (s->root_window)
return s->root_window;
get_screen_size (GDK_MIR_SCREEN (screen)->display_config, &width, &height);
s->root_window = _gdk_display_create_window (s->display);
s->root_window->impl = _gdk_mir_window_impl_new ();
s->root_window->impl_window = s->root_window;
s->root_window->visual = s->visual;
s->root_window->window_type = GDK_WINDOW_ROOT;
s->root_window->depth = VISUAL_DEPTH;
s->root_window->x = 0;
s->root_window->y = 0;
s->root_window->abs_x = 0;
s->root_window->abs_y = 0;
s->root_window->width = width;
s->root_window->height = height;
s->root_window->viewable = TRUE;
return s->root_window;
}
static gint
gdk_mir_screen_get_n_monitors (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_n_monitors\n");
MirDisplayConfiguration *config;
uint32_t i;
gint count = 0;
config = GDK_MIR_SCREEN (screen)->display_config;
for (i = 0; i < config->num_outputs; i++)
if (config->outputs[i].used)
count++;
return count;
}
static gint
gdk_mir_screen_get_primary_monitor (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_get_primary_monitor\n");
return 0; //?
}
static gint
gdk_mir_screen_get_monitor_width_mm (GdkScreen *screen,
gint monitor_num)
{
g_printerr ("gdk_mir_screen_get_monitor_width_mm (%d)\n", monitor_num);
return get_output (screen, monitor_num)->physical_width_mm;
}
static gint
gdk_mir_screen_get_monitor_height_mm (GdkScreen *screen,
gint monitor_num)
{
g_printerr ("gdk_mir_screen_get_monitor_height_mm (%d)\n", monitor_num);
return get_output (screen, monitor_num)->physical_height_mm;
}
static gchar *
gdk_mir_screen_get_monitor_plug_name (GdkScreen *screen,
gint monitor_num)
{
g_printerr ("gdk_mir_screen_get_monitor_plug_name (%d)\n", monitor_num);
return NULL; //?
}
static void
gdk_mir_screen_get_monitor_geometry (GdkScreen *screen,
gint monitor_num,
GdkRectangle *dest)
{
//g_printerr ("gdk_mir_screen_get_monitor_geometry (%d)\n", monitor_num);
MirDisplayOutput *output;
MirDisplayMode *mode;
output = get_output (screen, monitor_num);
mode = &output->modes[output->current_mode];
dest->x = output->position_x;
dest->y = output->position_y;
dest->width = mode->horizontal_resolution;
dest->height = mode->vertical_resolution;
}
static void
gdk_mir_screen_get_monitor_workarea (GdkScreen *screen,
gint monitor_num,
GdkRectangle *dest)
{
//g_printerr ("gdk_mir_screen_get_monitor_workarea (%d)\n", monitor_num);
// FIXME: Don't know what this is
gdk_mir_screen_get_monitor_geometry (screen, monitor_num, dest);
}
static GList *
gdk_mir_screen_list_visuals (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_list_visuals\n");
return g_list_append (NULL, GDK_MIR_SCREEN (screen)->visual);
}
static GdkVisual *
gdk_mir_screen_get_system_visual (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_system_visual\n");
return GDK_MIR_SCREEN (screen)->visual;
}
static GdkVisual *
gdk_mir_screen_get_rgba_visual (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_rgba_visual\n");
return GDK_MIR_SCREEN (screen)->visual;
}
static gboolean
gdk_mir_screen_is_composited (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_is_composited\n");
/* We're always composited */
return TRUE;
}
static gchar *
gdk_mir_screen_make_display_name (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_make_display_name\n");
return NULL; // FIXME
}
static GdkWindow *
gdk_mir_screen_get_active_window (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_get_active_window\n");
return NULL; // FIXME
}
static GList *
gdk_mir_screen_get_window_stack (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_get_window_stack\n");
return NULL; // FIXME
}
static void
gdk_mir_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
{
g_printerr ("gdk_mir_screen_broadcast_client_message\n");
// FIXME
}
static gboolean
gdk_mir_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
//g_printerr ("gdk_mir_screen_get_setting (\"%s\")\n", name);
if (strcmp (name, "gtk-theme-name") == 0)
{
g_value_set_string (value, "Ambiance");
return TRUE;
}
if (strcmp (name, "gtk-font-name") == 0)
{
g_value_set_string (value, "Ubuntu");
return TRUE;
}
if (strcmp (name, "gtk-enable-animations") == 0)
{
g_value_set_boolean (value, TRUE);
return TRUE;
}
if (strcmp (name, "gtk-xft-dpi") == 0)
{
g_value_set_int (value, 96 * 1024);
return TRUE;
}
if (strcmp (name, "gtk-xft-antialias") == 0)
{
g_value_set_int (value, TRUE);
return TRUE;
}
if (strcmp (name, "gtk-xft-hinting") == 0)
{
g_value_set_int (value, TRUE);
return TRUE;
}
if (strcmp (name, "gtk-xft-hintstyle") == 0)
{
g_value_set_static_string (value, "hintfull");
return TRUE;
}
if (strcmp (name, "gtk-xft-rgba") == 0)
{
g_value_set_static_string (value, "rgba");
return TRUE;
}
if (g_str_equal (name, "gtk-modules"))
{
g_value_set_string (value, NULL);
return TRUE;
}
if (g_str_equal (name, "gtk-application-prefer-dark-theme"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-key-theme-name"))
{
g_value_set_string (value, NULL);
return TRUE;
}
if (g_str_equal (name, "gtk-double-click-time"))
{
g_value_set_int (value, 250);
return TRUE;
}
if (g_str_equal (name, "gtk-double-click-distance"))
{
g_value_set_int (value, 5);
return TRUE;
}
if (g_str_equal (name, "gtk-cursor-theme-name"))
{
g_value_set_string (value, "Raleigh");
return TRUE;
}
if (g_str_equal (name, "gtk-cursor-theme-size"))
{
g_value_set_int (value, 128);
return TRUE;
}
if (g_str_equal (name, "gtk-icon-theme-name"))
{
g_value_set_string (value, "hicolor");
return TRUE;
}
if (g_str_equal (name, "gtk-shell-shows-app-menu"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-shell-shows-menubar"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-shell-shows-desktop"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-recent-files-enabled"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-alternative-sort-arrows"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-enable-accels"))
{
g_value_set_boolean (value, TRUE);
return TRUE;
}
if (g_str_equal (name, "gtk-enable-mnemonics"))
{
g_value_set_boolean (value, TRUE);
return TRUE;
}
if (g_str_equal (name, "gtk-menu-images"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-button-images"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-split-cursor"))
{
g_value_set_boolean (value, TRUE);
return TRUE;
}
if (g_str_equal (name, "gtk-im-module"))
{
g_value_set_string (value, NULL);
return TRUE;
}
if (g_str_equal (name, "gtk-menu-bar-accel"))
{
g_value_set_string (value, "F10");
return TRUE;
}
if (g_str_equal (name, "gtk-cursor-blink"))
{
g_value_set_boolean (value, TRUE);
return TRUE;
}
if (g_str_equal (name, "gtk-cursor-blink-time"))
{
g_value_set_int (value, 1200);
return TRUE;
}
if (g_str_equal (name, "gtk-cursor-blink-timeout"))
{
g_value_set_int (value, 10);
return TRUE;
}
if (g_str_equal (name, "gtk-entry-select-on-focus"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-error-bell"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
if (g_str_equal (name, "gtk-label-select-on-focus"))
{
g_value_set_boolean (value, FALSE);
return TRUE;
}
g_warning ("unknown property %s", name);
return FALSE;
}
static gint
gdk_mir_screen_visual_get_best_depth (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_visual_get_best_depth\n");
return VISUAL_DEPTH;
}
static GdkVisualType
gdk_mir_screen_visual_get_best_type (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_visual_get_best_type\n");
return VISUAL_TYPE;
}
static GdkVisual*
gdk_mir_screen_visual_get_best (GdkScreen *screen)
{
g_printerr ("gdk_mir_screen_visual_get_best\n");
return GDK_MIR_SCREEN (screen)->visual;
}
static GdkVisual*
gdk_mir_screen_visual_get_best_with_depth (GdkScreen *screen,
gint depth)
{
g_printerr ("gdk_mir_screen_visual_get_best_with_depth (%d)\n", depth);
return GDK_MIR_SCREEN (screen)->visual;
}
static GdkVisual*
gdk_mir_screen_visual_get_best_with_type (GdkScreen *screen,
GdkVisualType visual_type)
{
g_printerr ("gdk_mir_screen_visual_get_best_with_type (%d)\n", visual_type);
return GDK_MIR_SCREEN (screen)->visual;
}
static GdkVisual*
gdk_mir_screen_visual_get_best_with_both (GdkScreen *screen,
gint depth,
GdkVisualType visual_type)
{
g_printerr ("gdk_mir_screen_visual_get_best_with_both\n");
return GDK_MIR_SCREEN (screen)->visual;
}
static void
gdk_mir_screen_query_depths (GdkScreen *screen,
gint **depths,
gint *count)
{
g_printerr ("gdk_mir_screen_query_depths\n");
static gint supported_depths[] = { VISUAL_DEPTH };
*depths = supported_depths;
*count = 1;
}
static void
gdk_mir_screen_query_visual_types (GdkScreen *screen,
GdkVisualType **visual_types,
gint *count)
{
g_printerr ("gdk_mir_screen_query_visual_types\n");
static GdkVisualType supported_visual_types[] = { VISUAL_TYPE };
*visual_types = supported_visual_types;
*count = 1;
}
static gint
gdk_mir_screen_get_monitor_scale_factor (GdkScreen *screen,
gint monitor_num)
{
//g_printerr ("gdk_mir_screen_get_monitor_scale_factor (%d)\n", monitor_num);
/* Don't support monitor scaling */
return 1;
}
static void
gdk_mir_screen_init (GdkMirScreen *screen)
{
screen->visual = g_object_new (GDK_TYPE_VISUAL, NULL);
screen->visual->screen = GDK_SCREEN (screen);
screen->visual->type = VISUAL_TYPE;
screen->visual->depth = VISUAL_DEPTH;
}
static void
gdk_mir_screen_class_init (GdkMirScreenClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkScreenClass *screen_class = GDK_SCREEN_CLASS (klass);
object_class->dispose = gdk_mir_screen_dispose;
object_class->finalize = gdk_mir_screen_finalize;
screen_class->get_display = gdk_mir_screen_get_display;
screen_class->get_width = gdk_mir_screen_get_width;
screen_class->get_height = gdk_mir_screen_get_height;
screen_class->get_width_mm = gdk_mir_screen_get_width_mm;
screen_class->get_height_mm = gdk_mir_screen_get_height_mm;
screen_class->get_number = gdk_mir_screen_get_number;
screen_class->get_root_window = gdk_mir_screen_get_root_window;
screen_class->get_n_monitors = gdk_mir_screen_get_n_monitors;
screen_class->get_primary_monitor = gdk_mir_screen_get_primary_monitor;
screen_class->get_monitor_width_mm = gdk_mir_screen_get_monitor_width_mm;
screen_class->get_monitor_height_mm = gdk_mir_screen_get_monitor_height_mm;
screen_class->get_monitor_plug_name = gdk_mir_screen_get_monitor_plug_name;
screen_class->get_monitor_geometry = gdk_mir_screen_get_monitor_geometry;
screen_class->get_monitor_workarea = gdk_mir_screen_get_monitor_workarea;
screen_class->list_visuals = gdk_mir_screen_list_visuals;
screen_class->get_system_visual = gdk_mir_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_mir_screen_get_rgba_visual;
screen_class->is_composited = gdk_mir_screen_is_composited;
screen_class->make_display_name = gdk_mir_screen_make_display_name;
screen_class->get_active_window = gdk_mir_screen_get_active_window;
screen_class->get_window_stack = gdk_mir_screen_get_window_stack;
screen_class->broadcast_client_message = gdk_mir_screen_broadcast_client_message;
screen_class->get_setting = gdk_mir_screen_get_setting;
screen_class->visual_get_best_depth = gdk_mir_screen_visual_get_best_depth;
screen_class->visual_get_best_type = gdk_mir_screen_visual_get_best_type;
screen_class->visual_get_best = gdk_mir_screen_visual_get_best;
screen_class->visual_get_best_with_depth = gdk_mir_screen_visual_get_best_with_depth;
screen_class->visual_get_best_with_type = gdk_mir_screen_visual_get_best_with_type;
screen_class->visual_get_best_with_both = gdk_mir_screen_visual_get_best_with_both;
screen_class->query_depths = gdk_mir_screen_query_depths;
screen_class->query_visual_types = gdk_mir_screen_query_visual_types;
screen_class->get_monitor_scale_factor = gdk_mir_screen_get_monitor_scale_factor;
}
+52
View File
@@ -0,0 +1,52 @@
/*
* Copyright © 2014 Canonical Ltd
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkinternals.h"
#include "gdkmir.h"
#define GDK_MIR_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_MIR, GdkMirWindow))
#define GDK_MIR_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_MIR, GdkMirWindowClass))
#define GDK_IS_WINDOW_MIR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_MIR))
#define GDK_MIR_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_MIR, GdkMirWindowClass))
typedef struct _GdkMirWindow GdkMirWindow;
typedef struct _GdkMirWindowClass GdkMirWindowClass;
struct _GdkMirWindow
{
GdkWindow parent_instance;
};
struct _GdkMirWindowClass
{
GdkWindowClass parent_class;
};
G_DEFINE_TYPE (GdkMirWindow, gdk_mir_window, GDK_TYPE_WINDOW)
static void
gdk_mir_window_init (GdkMirWindow *impl)
{
}
static void
gdk_mir_window_class_init (GdkMirWindowClass *klass)
{
}
File diff suppressed because it is too large Load Diff
+1 -3
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
+38 -12
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);
}
+21 -305
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;

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