Compare commits

...

588 Commits

Author SHA1 Message Date
Roddy Shuler e2efc165d1 modules: fix gtk-2.0 paths to gtk-3.0
Both print backends and configuration files for multipress are being
installed in the wrong directory, so let's fix that.
2018-06-22 13:53:43 +01:00
Daniel Boles 9156908a3a EmojiCompletion: Avoid un/signed compare warnings
(A) Use gsize to match the result of g_variant_n_children
(B) Use guint for n_matches, like the struct (and all other n_matches)
2018-06-20 20:36:19 +01:00
Daniel Boles 934b40f4f3 EmojiCompletion: Use Box:spacing instead of CSS
master uses CSS border-spacing, but that is not available in GTK+ 3.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1166
2018-06-20 20:33:45 +01:00
Daniel Boles 7dbd3da2dd Adwaita: Don't use a property that GTK+ 3 lacks
border-spacing was not backported (yet?). If it won't be, then a
suitable replacement is needed. Until then, avoid the runtime error that
can result from using a nonexistent property in our theme.

https://gitlab.gnome.org/GNOME/gtk/issues/1166
2018-06-20 20:24:19 +01:00
Daniel Boles 848a524d95 Adwaita: Regenerate CSS for emoji completion popup
Commit 65bb238a3f forgot this bit.
2018-06-20 19:37:45 +01:00
Daniel Boles 7f91af2516 HC: Avoid excessive selectors from prev commit
The new rule does not need to affect all those other pseudoclasses. I
just put it in the wrong scope.
2018-06-20 19:26:29 +01:00
Daniel Boles 3f48bba79b gtk3-sections: Add GtkInfoBar.[gs]et-revealed()
https://gitlab.gnome.org/GNOME/gtk/issues/1165
2018-06-20 19:15:21 +01:00
Daniel Boles b1997c96ea InfoBar: Fix wrong type in copy-pasted param doc
https://gitlab.gnome.org/GNOME/gtk/issues/1165
2018-06-20 19:15:21 +01:00
Daniel Boles 4c61ff2a3a HC: Avoid same BG/FG colors in flat treeview entry
Selected rows in tree views in HighContrast have a background colour the
same or nearly as the normal text colour, so we cannot let entries in
such rows have transparent backgrounds, or the text inside the entry
becomes nearly or totally impossible to see.

Dodge this by giving entry.flat inside treeview and with :focus the
$base_color, which is different from the text & so lets that be seen.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/125
2018-06-20 19:15:21 +01:00
Benjamin Otte 0a37b564d4 x11: Add necessary NULL check
(Backported from master 3438dcdd4e)
2018-06-20 20:02:01 +02:00
Matthias Clasen 5265514c66 Merge branch 'wip/dboles/searchenginetracker-plug-3' into 'gtk-3-24'
searchenginetracker: Don't leak the hits' GFiles

See merge request GNOME/gtk!206
2018-06-20 16:13:04 +00:00
Daniel Boles 3ebcc5a7d5 searchenginetracker: Don't leak the hits' GFiles 2018-06-20 10:04:13 +01:00
Matthias Clasen 380ec086eb Merge branch '1160-crash-clearing-gtkentry-icon-tooltip' into 'gtk-3-24'
Resolve "Crash clearing GtkEntry icon tooltip"

See merge request GNOME/gtk!204
2018-06-19 19:40:42 +00:00
Daniel Boles 004b24a818 a11y/entry: Fix copy-pasteo re 2ndary icon tooltip
The else case was wrongly resetting the accessible description on the
primary icon, which might not exist and can therefore cause a crash.

https://gitlab.gnome.org/GNOME/gtk/issues/1160
2018-06-19 18:38:49 +01:00
Matthias Clasen 70d035ae95 Merge branch 'patch-1' into 'gtk-3-24'
wayland: Use shm_open(SHM_ANON) on FreeBSD

See merge request GNOME/gtk!203
2018-06-19 15:43:40 +00:00
myfreeweb 055c1b2faa wayland: Use shm_open(SHM_ANON) on FreeBSD
This functionality is similar to Linux's memfd. It creates anonymous shared memory without touching the filesystem, which allows it to work in Capsicum capability mode (sandbox).
2018-06-19 14:49:18 +00:00
Benjamin Otte 01d1bc3c75 x11: Always set None pixmap for no background
None means no background, so it's always the correct thing to use and
ParentRelative is always wrong.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1134
2018-06-19 16:43:56 +02:00
Chun-wei Fan defbbb95e9 gtk/gtkemojicompletion.c: Fix build on C89 and non-GCC
Declare variables at the top of the clock, and ensure that we don't try
to use g_autoptr(), which is a GCCism.
2018-06-19 18:30:22 +08:00
Chun-wei Fan aa76abbbeb gtk/language-names.c: Fix build on non-GCC/CLang
Remove g_auto*() usage from these sources and use the traditional
g_free(), as g_auto*() are GCCisms (or CLangisms).

Also, don't include unistd.h unconditionally and stop including
langinfo.h and dirent.h, since they seem to be unused.

Partially cherry-picked from a4c0395343

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-06-19 18:23:22 +08:00
Matthias Clasen a0b0cbe98d Merge branch 'window-activate-grab-3-again-24' into 'gtk-3-24'
gdk: activate surface on keyboard grabs

See merge request GNOME/gtk!176
2018-06-18 11:24:36 +00:00
Samuel Thibault f23bfc6b69 gdk: activate surface on keyboard grabs
In 01455399e8 ("gdk: do not deactivate surface on keyboard grabs"), we
made gdk avoid deactivating surfaces when another application takes a
keyboard grab, by using has_focus_window instead of has_focus. That however
broke activating surfaces when the gdk application acquired a grab itself,
in which case has_focus_window is false but has_focus is true.

We thus actually need to use both: surfaces should be activated either
because we have normal keyboard focus, or because we grabbed the keyboard.

This also renames HAS_FOCUS to APPEARS_FOCUSED to better reflect its
role.

Fixes #85

(cherry picked from commit 3287ac96e02ff236d74db10164c5b0c1e7b2b0bf)
2018-06-18 10:32:02 +02:00
Mohammed Sadiq 61f37b2b0d search-bar: Fix link to search-bar example
The master branch is now Gtk4. We should be linking to
stable branch here.
2018-06-16 10:35:55 +05:30
Michael Natterer c0ba041c73 gtk: fix wheel scrolling for very small adjustment page_size
For very small page sizes of < 1.0, the effect of pow() is the
opposite of what's intended and the scroll steps become unusably
large, make sure we never get a scroll_unit larger than page_size /
2.0, which used to be the default before the pow() magic was
introduced.
2018-06-12 18:53:12 +02:00
Victor Toso 2c8b95a518 gdkseatdefault: Don't hide GdkWindow on grab failure
Application is not expecting that.

Bug found due gdk_seat_grab() failure on Lock Screen. When user
Unlock the screen, the application is visible but does not receive
enter-event any more on X11/GNOME.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1485968
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571422

Signed-off-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Carlos Garnacho <mrgarnacho@gmail.com>
2018-06-11 08:16:26 -04:00
Piotr Drąg f62ee9f74a Update Polish translation 2018-06-10 15:31:47 +02:00
Matthias Clasen a7eb696314 Merge branch 'lrn/gks_vk_menu' into 'gtk-3-24'
GDK W32: Don't forget to check VK_MENU and set MK_ALT

See merge request GNOME/gtk!181
2018-06-08 10:54:42 +00:00
Matthias Clasen f7cee65268 Merge branch 'wip/tchaik/fontconfig-timestamp' into 'gtk-3-24'
wayland: Implement 'gtk-fontconfig-timestamp' & 'gtk-modules'

See merge request GNOME/gtk!157
2018-06-07 19:52:02 +00:00
Matthias Clasen 81878617c7 Merge branch 'gtk-3-24' into 'gtk-3-24'
Fix reference to user styles in gtkstyleprovider.h

See merge request GNOME/gtk!183
2018-06-07 18:30:48 +00:00
Mohammed Sadiq 5591076361 font-button: Suggest non deprecated function in docs
gtk_font_button_get_font_name() has been deprecated in 3.22 and
its public API is removed from GTK4.
2018-06-07 15:49:28 +05:30
Matijs van Zuijlen 37ec227dc1 Fix reference to user styles in gtkstyleprovider.h 2018-06-07 08:49:59 +00:00
Jordi Mas c3737ca316 Update Catalan translation 2018-06-06 18:58:34 +01:00
Jordi Mas a1ef678ee7 Update Catalan translation 2018-06-06 08:25:49 +01:00
Руслан Ижбулатов 3200c0390d GDK W32: Don't forget to check VK_MENU and set MK_ALT 2018-06-06 01:06:38 +00:00
Matthias Clasen 7e0b9704ed Merge branch '1088-getting-css-properties-defined-in-em-etc-in-px-rounds-toward-0-delivering-1-too-few-pixels' into 'gtk-3-24'
Resolve "Getting CSS properties defined in em (etc.) in px rounds toward 0, delivering 1 too few pixels"

See merge request GNOME/gtk!158
2018-06-05 22:12:45 +00:00
Daniel Boles daecee75b4 CssGadget: Round px values up for min-width|height
Otherwise, requesting a min size in em where the equivalent in px had a
fractional part would lead to the gadget getting allocated 1 too few px.
You could see this in the CSS property vs. allocation in the Inspector.

Note that margin/border/padding are left alone: the rationale is that we
do as browsers do, and Benjamin said we already do that for those,
whereas his tests on min-(width|height) showed otherwise.  My subsequent
analysis indicated it to be far less clear-cut than that, but he remains
unconvinced that we should ceil() all the things! So just do these ones.

https://gitlab.gnome.org/GNOME/gtk/issues/1088
2018-06-05 18:42:45 +01:00
Matthias Clasen 700d167b9e docs: Add indices for 3.24 api
We have some now.
2018-06-05 13:07:05 -04:00
Matthias Clasen f6a0dfeb4d Add new fontchooser api to the docs
We have docs.
2018-06-05 13:06:08 -04:00
Matthias Clasen 8500b1209a Add gdk_window_move_to_rect to the docs
We have docs.
2018-06-05 13:00:11 -04:00
Matthias Clasen 018be97e30 Merge branch 'wip/move-to-rect-public-gtk-3-24' into 'gtk-3-24'
gdk: Make gdk_window_move_to_rect public (gtk-3-24)

See merge request GNOME/gtk!180
2018-06-05 16:57:46 +00:00
Jonas Ådahl 9b3c745fc4 gdk: Make gdk_window_move_to_rect public
This is the API used by GtkMenu to properly position menus on the screen
without requiring GTK to query the menu window's position or the work
area of where the window is positioned. It makes it possible to position
popup windows properly when using Wayland.

Make this API available to external users so custom popup windows can be
positioned properly as well.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/997
2018-06-05 15:01:52 +02:00
Matthias Clasen 91748d1aa3 Update NEWS 2018-06-04 18:58:08 -04:00
Matthias Clasen c7168f48d5 Bump version to 3.23.0
Yes, we are adding some api here.
2018-06-04 18:58:08 -04:00
Matthias Clasen 51aa16346e Miscellaneous font chooser fixes
Fix various oversights in the backports of the
font chooser features.
2018-06-04 18:58:08 -04:00
Matthias Clasen dfe04d0c9a font chooser: Make the language property writable
This is meant as an input to the font chooser.
We don't want the user to select a language, but
rather have fonts presented as they would work for
the current language. Therefore, do away with the
lang/script combo on the tweak page.
2018-06-04 18:58:08 -04:00
Matthias Clasen 71acf23697 font chooser: Add examples for font features
For some font features, we can figure out affected
glyphs, and show before/after. For some others, we
hardcode typical sequences.

Still to do: figure out how to find ligatures and
show them.
2018-06-04 18:58:08 -04:00
Matthias Clasen 19b9659cce Add a 3.24 version 2018-06-04 18:58:08 -04:00
Matthias Clasen 83159ffabf Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkWindow: Handle non-square icons with height > width correctly

See merge request GNOME/gtk!173
2018-06-03 23:21:33 +00:00
Christian Stadelmann d4feb8929e GtkWindow: Handle non-square icons with height > width correctly 2018-06-03 21:05:46 +02:00
Matthias Clasen 7951f0e9a9 menu: Remove unstable annotations
These apis are not going to change in GTK+ 3.x.
2018-06-03 09:48:40 -04:00
Matthias Clasen 1f37cbfbfd Drop Ctrl-Shift-e support
Now that we have Emoji completion, drop the rather limited
Ctrl-Shift-e support in GtkIMContextSimple, and leave this
sequence to input methods.
2018-06-03 09:43:28 -04:00
Matthias Clasen f595791492 widget-factory: add emoji completion to an entry 2018-06-03 09:43:28 -04:00
Matthias Clasen 09e3529d0e entry: Add emoji completion
Pop up completions when the text in the entry matches :word:
This functionality has to be enabled using the enable-emoji-completion
property.
2018-06-03 09:43:28 -04:00
Matthias Clasen 65bb238a3f Add an emoji completion popup
This widget provides entry completion-like functionality
for Emoji codes like 😁 or 💋.
2018-06-03 09:43:28 -04:00
Matthias Clasen 7e9ae85dd4 Export some entry functions privately
This will be used in the following commits.
2018-06-03 09:43:28 -04:00
Matthias Clasen d0f7364260 emoji: Hide recent section when empty
This is part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-06-03 09:43:28 -04:00
Matthias Clasen a628e03042 emoji: Improve section scrolling
Leave some space above the section heading when scrolling.

This is a part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-06-03 09:43:28 -04:00
Jordi Mas f1d9ccd6c7 Update Catalan translation 2018-06-03 12:13:19 +02:00
Christian Hergert d6a29e1b8c treeview: respect expander-size style property
Without enforcement to the expander-size, we can end up rendering icons
rather fuzzy. This uses the expander-size style property to determine
the square for the icon, centered on what was the calculated space for
the expander.
2018-06-01 11:04:45 -04:00
Mohammed Sadiq 1918fefbd4 widget: Fix example code in doc 2018-05-31 18:23:10 +05:30
Martin Blanchard cbc8d39887 wayland: Implement'gtk-fontconfig-timestamp' & 'gtk-modules'
The 'gtk-fontconfig-timestamp' and 'gtk-modules' settings are
currently not available at all on Wayland. On X11, they are
implemented through xsettings maintained up-to-date by
gnome-settings-daemon.

This patch implements both GtkSettings for Wayland using a
new dbus interface also provided by gnome-settings-daemon.

Closes #886
2018-05-30 19:26:24 +01:00
Jason Zaman 866050d015 gtksocket: Adjust X sizes by scale-factor
X uses unscaled sizes, so they must be scaled properly. Otherwise
GtkSockets end up twice as big as they should be.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=765327
Signed-off-by: Jason Zaman <jason@perfinion.com>

Close !165
2018-05-30 11:37:12 +01:00
Emmanuele Bassi 9ac7f906aa Merge branch 'gtksocket-scale-3-22' into 'gtk-3-22'
gtksocket: Adjust X sizes by scale-factor

See merge request GNOME/gtk!164
2018-05-30 10:18:56 +00:00
Matthias Clasen e0206cafcd Merge branch 'gesture-docs' into 'master'
Gesture stuff

See merge request GNOME/gtk!169

(cherry picked from commit 8b24d59cde)

334c7911 gesture: Fix get_last_event() docs
e9765c04 gesture: Fix code snippet
4d2b39d9 gesturemultipress: Don’t fire ::released after ::cancel
2018-05-30 06:01:40 +00:00
Matthias Clasen 7e0db63601 Merge branch 'gesture-docs' into 'master'
Gesture stuff

See merge request GNOME/gtk!169

(cherry picked from commit 8b24d59cde)

334c7911 gesture: Fix get_last_event() docs
e9765c04 gesture: Fix code snippet
4d2b39d9 gesturemultipress: Don’t fire ::released after ::cancel
2018-05-30 05:59:02 +00:00
Matthias Clasen a73fa04e92 x11: Don't set NET_WM_PID when sandboxed
It is not useful, and some window managers misinterpret it and
add some "runs as root" indication to the window decoration.

See https://github.com/mate-desktop/marco/issues/301
2018-05-29 20:31:32 -04:00
Matthias Clasen 929a19ca89 gdk: Add a private api to find sandboxes
This will be used in more places in the future.
2018-05-29 20:27:05 -04:00
Daniel Mustieles 83c53369a1 Update Spanish translation 2018-05-28 15:53:58 +00:00
Daniel Boles f040918ffa gdkdnd: Fix 2 typos in docs 2018-05-27 18:10:16 +01:00
Christoph Reiter f888b4958e ci: update the docker image to fedora 28
So we get a newer pango
2018-05-27 18:38:28 +02:00
Matthias Clasen 38b796d2c3 Merge branch 'gtk-3-24' into 'gtk-3-24'
icontheme: Keep dir_mtimes in order

See merge request GNOME/gtk!162
2018-05-27 15:50:45 +00:00
Piotr Drąg 8a9d78ccc5 Update Polish translation 2018-05-27 08:16:50 +02:00
Piotr Drąg eac2f9b622 Update POTFILES.in and POTFILES.skip 2018-05-27 08:03:18 +02:00
Daniel Boles bd82962e21 SpinButton: Fix an obviously wrong arg description
:climb-rate is not about what you get when you single-click on a button,
as this implied: it's what happens if you hold down a button or a key.
Fix the description of @climb_rate to new(), and while here, mention the
key in the blurb of :climb-rate itself.
2018-05-26 01:07:19 +01:00
Daniel Boles 6ff7fdfdc4 GdkWin: Avoid leak if bailing from process_updates
There is no point creating the list if we don't need to because we are
failing out, and even less point in leaking it in that case.
2018-05-25 21:10:58 +01:00
Daniel Boles 2d12660916 StyleContext: Add a missing apostrophe
(or rather, the right single quote dictated by the HIG, which is
semantically not an apostrophe at all! I will die on this hill.)
2018-05-25 21:10:58 +01:00
Olivier Fourdan cc4dd0d343 wayland: check native window for crossing events
gdk_wayland_*_grab()/ungrab() would emit crossing events which translate
as focus_in/focus_out events for keyboard.

However, the ungrab() functions compare the native toplevel as this is
what gets the Wayland pointer enter/leave events with the grab window,
so if the grab is issued on a child gdk window, those won't match and we
would emit more focus_out events than focus_in events.

This means that a widget such as spice-gtk which issues a keyboard grab
whenever the pointer enters the window and releases the grab when it
leaves the window would get uneven numbers of focus_in/focus_out events.

Also, gdk_wayland_seat_ungrab() would not emit crossing events for
keyboard devices, whereas gdk_wayland_device_ungrab() does, which adds
even more potential discrepancies between focus_in/focus_out events.

To solve this problem, introduce two new helper functions which check
the relevant native windows to emit crossing events when needed that get
called evenly from both gdk_wayland_seat_grab()/ungrab() and gdk_Wayland
_device_grab()/ungrab() APIs.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=780422
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/792
2018-05-25 21:10:58 +01:00
Jason Zaman c8b0a0dea5 gtksocket: Adjust X sizes by scale-factor
X uses unscaled sizes, so they must be scaled properly. Otherwise
GtkSockets end up twice as big as they should be.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=765327
Signed-off-by: Jason Zaman <jason@perfinion.com>
2018-05-25 23:48:01 +08:00
Jan Alexander Steffens (heftig) 3bb6670f9c icontheme: Keep dir_mtimes in order
Don't reverse the order each time we insert a theme. Reverse it only
once, after all themes have been loaded.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1115
2018-05-23 20:09:42 +02:00
Carlos Garnacho d354000680 Merge branch 'bz780422' into 'gtk-3-22'
wayland: check native window for crossing events

See merge request GNOME/gtk!147
2018-05-22 11:06:35 +00:00
Daniel Boles a7cd20823d StyleContext: Don't advise using invalidate()
It's deprecated. Also, set_screen() is not used/needed in the demo cited
2018-05-21 23:40:11 +01:00
Matthias Clasen abcc477317 Remove the "without parent" warning
We've had it for a long time, and it hasn't really made
a difference. And I don't think we are prepared to turn
this into a hard error. So just drop it.
2018-05-21 17:17:21 -04:00
Daniel Boles 6b30de9487 Range: Up should only mean ++ if we are a GtkScale
The last round of patches to get the desired direction of value move in
response to scrolls/keypresses on scales had the inadvertent side effect
of giving the opposite direction on scrollbars. Seeing as gtkrange.c is
already a collection of hacks, add another so that fix only holds if the
instance is a GtkScale, since that is what those patches were aimed at.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1065
2018-05-21 20:08:05 +01:00
Daniel Boles f3fa34e850 ProgressBar: Fix typo in doc comment 2018-05-21 20:08:05 +01:00
Daniel Boles 4c39e06f45 Range: Up should only mean ++ if we are a GtkScale
The last round of patches to get the desired direction of value move in
response to scrolls/keypresses on scales had the inadvertent side effect
of giving the opposite direction on scrollbars. Seeing as gtkrange.c is
already a collection of hacks, add another so that fix only holds if the
instance is a GtkScale, since that is what those patches were aimed at.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1065
2018-05-21 20:07:42 +01:00
Daniel Boles 87f454ebd3 ProgressBar: Fix typo in doc comment 2018-05-20 19:28:28 +01:00
Matthias Clasen f30ecaa22f font chooser: Support font variations
Add sliders for the axes on the tweak page.
2018-05-18 09:31:15 +01:00
Matthias Clasen 6271326718 font chooser: Add properties for font features and language
These can't be returned as part of the font description,
so we need new api for them. For now, this is just readonly
properties. Maybe these should be writable too, eventually.
2018-05-18 09:31:15 +01:00
Matthias Clasen d60cd1f49f font chooser: Add font features
Populate the tweak page with OpenType font features.
2018-05-18 09:31:15 +01:00
Matthias Clasen b57e10ad60 font chooser: Add a tweak page 2018-05-18 09:31:15 +01:00
Matthias Clasen cc35a35752 font chooser: introduce font chooser levels
This is a more systematic approach to reducing the
level of detail in the font chooser.
2018-05-18 09:31:15 +01:00
Matthias Clasen 90c9a4ba05 Bump the pango requirement
We want to use the new font variation api in pango 1.41.
2018-05-18 09:31:15 +01:00
Matthias Clasen 2f58c7c060 Add a flatpak manifest for widget-factory
This makes it easier to build GTK+.
2018-05-17 19:28:28 +01:00
Matthias Clasen 08f31f8f4a Merge branch '1053-scroll-cursor-gets-left-behind-if-a-child-widget-steals-the-scroll' into 'gtk-3-22'
Resolve "Scroll cursor gets left behind if a child widget steals the scroll"

See merge request GNOME/gtk!134
2018-05-17 15:19:49 +00:00
Matthias Clasen f2868f5cf3 textview: Don't scroll for pastes in another view
GtkTextView scrolls to the insertion point when the text
buffer signals a paste is done. This is wrong when there
are multiple views on the same buffer, and the paste
happened in another view.

To fix this, flip the handling of the scroll_after_paste
boolean to only be TRUE if we know that we want to scroll.
2018-05-17 11:06:46 +01:00
Benjamin Otte 0caa3dbccf Merge branch '1069-thread-1-glade-received-signal-sigfpe-arithmetic-exception' into 'gtk-3-22'
Resolve "Thread 1 "glade" received signal SIGFPE, Arithmetic exception."

See merge request GNOME/gtk!151
2018-05-16 12:48:46 +00:00
Mohammed Sadiq d219596212 appchooserdialog: Fix memory leak 2018-05-13 14:51:00 +01:00
Mohammed Sadiq 26b6071db8 appchooserdialog: Don't fire notify::heading twice
The gtk_app_chooser_dialog_set_heading() function do emit
notify::heading. Since the setter simply calls the function,
the setter itself shouldn't emit a notify signal by itself.
2018-05-13 14:51:00 +01:00
Mohammed Sadiq 7886c645c4 textview: Always show select-all button in touch popup
"Select all" action is possible regardless of the text selection state
or if the text is editable or not.
2018-05-13 14:51:00 +01:00
Mohammed Sadiq a8363a9887 textview: Simplify creating bubble action buttons
Buttons can be created simply with gtk_button_new_from_icon_name().
2018-05-13 14:51:00 +01:00
Juan Pablo Ugarte 87aed887be GtkBox: do not divide by zero on gtk_box_size_allocate_with_center()
https://gitlab.gnome.org/GNOME/gtk/issues/1069
2018-05-12 11:06:37 -03:00
Chun-wei Fan 0dde06124e Visual Studio 2008 builds: Generate gtk/gtktypefuncs.c
This is the updates to the Visual Studio 2008 projects to generate
gtk/gtktypefuncs.c using the preprocessor and the gentypefuncs.py that
was adapted from master.

Unfortunately we could not clean up the projects as we did for the 201x
ones due to the differences in project file format.
2018-05-12 11:03:55 +08:00
Chun-wei Fan 1d02739992 Visual Studio 201x builds: Clean up project files
Combine repetitive parts, and unify using $(PythonDir) for all builds,
which the paths set in the property sheets are now based on the Visual
Studio version and platform combination.
2018-05-12 10:52:47 +08:00
Chun-wei Fan a8262c7581 Visual Studio 201x builds: Fix previous commit
Not that it will make a difference, but to be consistent with the
autotools builds.  Include gtkx.h instead of gtk.h when we generate the
source to feed to the preprocessor.
2018-05-12 10:24:59 +08:00
Chun-wei Fan 1517acee55 Visual Studio 201x builds: Generate gtk/gtktypefuncs.c
We now need to generate gtktypefuncs.c by ourselves, so modify the
gentypefuncs.py script from master, and add a custom build step in the
projects to generate gtktypefuncs.c.  The custom build step for the 2008
projects will be added later.
2018-05-12 01:15:33 +08:00
Matthias Clasen 7b3129ad4f Merge branch 'wip/restart-cursor-animation-gtk-3' into 'gtk-3-22'
wayland: Fix restarting cursor animation

See merge request GNOME/gtk!150
2018-05-11 15:24:55 +00:00
Chun-wei Fan 95e6a0650b gtk/Makefile.am: Fix Visual Studio project generation
We now need the generated sources to be included explicitly in the list
so that they get listed in the project files to be built.
2018-05-11 18:05:46 +08:00
Jonas Ådahl 7edd465f6d wayland: Fix restarting cursor animation
When an animated cursor was set and the previous cursor animation delay
happened to be the same, we wouldn't restart the animation timeout and
just return G_SOURCE_CONTINUE assuming the timer would continue. This
assumption is however only valid if the function was called from the
timeout, which is not the case.

Instead also arm the timer also if there is no previous timer active.
2018-05-09 22:13:10 +02:00
Olivier Fourdan cd5502ddf4 wayland: check native window for crossing events
gdk_wayland_*_grab()/ungrab() would emit crossing events which translate
as focus_in/focus_out events for keyboard.

However, the ungrab() functions compare the native toplevel as this is
what gets the Wayland pointer enter/leave events with the grab window,
so if the grab is issued on a child gdk window, those won't match and we
would emit more focus_out events than focus_in events.

This means that a widget such as spice-gtk which issues a keyboard grab
whenever the pointer enters the window and releases the grab when it
leaves the window would get uneven numbers of focus_in/focus_out events.

Also, gdk_wayland_seat_ungrab() would not emit crossing events for
keyboard devices, whereas gdk_wayland_device_ungrab() does, which adds
even more potential discrepancies between focus_in/focus_out events.

To solve this problem, introduce two new helper functions which check
the relevant native windows to emit crossing events when needed that get
called evenly from both gdk_wayland_seat_grab()/ungrab() and gdk_Wayland
_device_grab()/ungrab() APIs.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=780422
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/792
2018-05-09 15:49:35 +02:00
John Ralls 828f634d5c [Quartz] Hardcode screen resolution for text at 96.0.
It seems that CoreText is internally calibrated for this, see
https://bugzilla.gnome.org/show_bug.cgi?id=787867 for a detailed
discussion.
2018-05-08 17:58:00 -07:00
Benjamin Otte 85fa6ba631 gtk: Fix reserved pointers
So gcc stops complaining about unnecessary parenthesis.

Closes #1059
2018-05-07 22:02:56 +02:00
Björn Lindqvist 893fc1dec4 Range: Bin pointless check before emitting signal
In scroll_event(), there is no need to check whether we are realized
before emitting ::change-value, as we must be when receiving an event.

Git-formatted/rebased/cleaned up by Daniel Boles <dboles.src@gmail.com>

Close https://gitlab.gnome.org/GNOME/gtk/issues/292
2018-05-06 19:58:15 +01:00
Daniel Boles 96774e8b5c Menu: cleanups for previous commit and nearby
• #include <math.h> for the new uses of floor()
• Move the new ints and popdown_data into the scopes where they are used
• Don’t pointlessly init other ints to 0 as they always get reassigned
• Burninate gint
2018-05-06 11:49:11 +01:00
Sam Douglas f443dbe8c1 Menu: Fix broken navigation triangle/hysteresis
This issue was caused when mouse coordinates were changed to floating
point values in commit e8b38fedbd.

This patch floors the event->x_root and event->y_root values when
setting the navigation region, so the previous behaviour is restored.

https://gitlab.gnome.org/GNOME/gtk/issues/450
2018-05-06 11:49:01 +01:00
Daniel Boles 133e8fc03f ScrolledWindow: Unset cursor if child takes scroll
https://gitlab.gnome.org/GNOME/gtk/issues/1053
2018-05-05 11:45:43 +01:00
Benjamin Otte 2ce63a86ba x11: Set a transparent background on windows by default
This avoids black flicker on compositing WMs when a window is first shown.
2018-05-04 13:46:46 +02:00
Matthias Clasen 609cb85f3a emoji chooser: Match search terms better
Use g_str_match_string for better results.

cherry-pick of be2853e5de

https://gitlab.gnome.org/GNOME/gtk/issues/898
2018-05-04 09:45:44 +01:00
Matthias Clasen cb56bbe430 Merge branch 'wip/lantw/gtk3-use-dev-evdev-input-h-on-freebsd' into 'gtk-3-22'
wayland: Use dev/evdev/input.h on FreeBSD (GTK3)

See merge request GNOME/gtk!132
2018-05-02 10:56:25 +00:00
Jiri Grönroos 8fc72c902d Update Finnish translation 2018-05-01 19:47:02 +00:00
Ting-Wei Lan a9f0704ae1 wayland: Use dev/evdev/input.h on FreeBSD
The header linux/input.h used by GDK is specific to Linux. It is
possible to get a few Linux headers on FreeBSD by installing v4l_compat,
but it is usually better to use the one shipped with FreeBSD.

We prefer dev/evdev/input.h to linux/input.h here, so it will always use
dev/evdev/input.h on FreeBSD regardless of v4l_compat.

https://svnweb.freebsd.org/changeset/ports/465644
2018-05-01 22:00:31 +08:00
Benjamin Otte 33bec5a4fb Merge branch '169-gtktextview-accesses-already-disposed-object-3-22' into 'gtk-3-22'
Resolve "GtkTextView accesses already disposed object" in 3.22

See merge request GNOME/gtk!110
2018-04-30 11:57:14 +00:00
Benjamin Otte 279d7bb2f5 Merge branch 'window-activate-grab-3-3' into 'gtk-3-22'
gdk: do not deactivate window on keyboard grabs

See merge request GNOME/gtk!127
2018-04-30 09:55:45 +00:00
Samuel Thibault c926b28d96 gdk: do not deactivate surface on keyboard grabs
When pressing e.g. a window manager shortcut, which acquires keyboard grab,
Xorg would send FocusOut NotifyGrab then FocusIn NotifyUngrab.  Currently
gdk would then deactivate the current surface, which makes accessibility
screen readers think that we have switched to a non-accessible application
and came back again, and thus reannounce the application frame etc. which we
don't want when e.g. just raising volume.

And actually, receiving FocusOut NotifyGrab does not mean losing the
X focus, it only means an application aqcuired a grab, i.e. it is
temporarily stealing keyboard events. On Wayland, this isn't even
notified actually.

This commit makes gdk only deactivate surfaces when there was an actual
focus switch to another window, as determined by has_focus_window (instead
of just has_focus), which happens either normally through FocusOut with
NotifyNormal, or during grabs through FocusOut with NotifyWhileGrabbed.

Fixes #85

(cherry picked from commit 01455399e8)
2018-04-30 11:17:34 +02:00
Руслан Ижбулатов ff47cb0c51 gtkselection: ensure W32 functions used only for W32 displays (v2)
Another instance of a check needed for gdk_win32_selection_add_targets().
2018-04-26 19:46:24 +00:00
Руслан Ижбулатов b9bb63b1ab gtkselection: ensure W32 functions used only for W32 displays
gdk_win32_selection_add_targets() is for W32 displays only.
2018-04-26 19:36:27 +00:00
Руслан Ижбулатов 9ca3bacddf imcontextsimple: ensure W32 code only runs on W32 displays
gdk_win32_keymap_check_compose() shouldn't be called for
non-W32 displays (i.e. when using broadway or other backends
that could be made to run on Windows).
2018-04-26 17:42:49 +00:00
Benjamin Otte f5482e6954 fishbowl: Port version from GTK 4
This version also merges widgetbowl into fishbowl.
2018-04-26 00:32:44 +02:00
Adrian Johnson fff08fa319 Add _gtk_printer_get_hard_margins_for_paper_size()
to retreive paper size specific hard margins and use this
to set the hard margins in the print context.
(modified by Marek Kasik <mkasik@redhat.com>)

https://bugzilla.gnome.org/show_bug.cgi?id=686109
2018-04-25 16:28:07 +02:00
Daniel Mustieles d20101e878 Update Spanish translation 2018-04-25 11:29:02 +00:00
Daniel Boles af350b20b1 testentrycompletion: Avoid a compiler cast warning
Instead of getting the model again but then forgetting to cast it to a
ListStore, just use the other variable store where we already did both.
2018-04-24 13:43:18 +01:00
Stas Solovey 8535e2e417 Update Russian translation 2018-04-24 10:00:32 +00:00
Emmanuele Bassi 88b08c05c0 wayland: Allow a NULL inhibitors hash table
The shortcuts inhibitors hash table is created when we create a
GdkWaylandWindow implementation for a GdkWindow, and it's destroyed once
we finalize the instance. The fake "root" window we create for the
Wayland display does not have a backing native window, so the shortcuts
inhibitors hash table is set to NULL; this causes a critical error
message when calling g_hash_table_destroy() on it. The finalization of
the root window happens when we close a display connection.

We should use g_clear_pointer(), instead, as it's NULL safe.

Without this change, the displayclose test fails, as all warnings are
considered fatal.
2018-04-23 10:02:43 +01:00
Emmanuele Bassi dad773b129 build: Do not dist generated files
We expect these files to be regenerated even when building GTK+ from a
release tarball, so there's no point in distributing them if they are
going to be ignored.
2018-04-23 09:13:41 +01:00
Emmanuele Bassi 07124b5e99 x11: Query whether we have GLX support
Epoxy 1.4 has new ad hoc API that we can use to check whether GLX is
available on the current system.

If we didn't use this API, we'd have to manually dlopen libGL (or its
equivalent on different OSes) and check if it had GLX symbols; since
Epoxy already does all of this internally, we can simply ask it instead.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
(cherry picked from commit 02eb344950)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2018-04-23 09:13:41 +01:00
Emmanuele Bassi ba883b55ee Bump up the dependency of libepoxy
We're going to use API introduced in libepoxy 1.4 to check for GLX
availability.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
2018-04-23 09:13:41 +01:00
Daniel Boles d35ecbb5a4 themes: Fix a new comment
bah.
2018-04-22 22:21:22 +01:00
Daniel Boles a3cb26cad7 themes: Fix swapped borders on RTL PathBar buttons
.linked assumes the container is a GtkBox, which is documented as never
flipping children in RTL, so :first-child is always the left child, etc.
GtkBox does that by reordering its CSS nodes when the direction changes.

But most widgets don’t do that, so :first|last-child are 1st/last ADDED
and swap sides in RTL. GtkPathBar is so, and ignoring that in our themes
meant that in RTL, its left/right buttons got each other’s borders. Yuk!

This patch adds the groundwork for supporting widgets like that, via the
%linked_flippable placeholder, and applies that to override buttons in
  filechooser .path-bar.linked > button
so that the correct borders get applied to those buttons when using RTL.

Note that I select only PathBars within a FileChooser because we also
have NautilusPathBar, which also uses widget.path-bar – but *does* flip
its nodes for RTL already, so letting that get affected broke it again!

https://bugzilla.gnome.org/show_bug.cgi?id=772817
2018-04-22 22:05:09 +01:00
Daniel Boles 1ee80fa4c6 MenuButton: popover connects to menu_deactivate_cb
This was missed (even before my recent patches).

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:29:22 +01:00
Daniel Boles db85e888c7 MenuButton: Disconnect newly added signal handler
Otherwise, we do stuff we shouldn't, as the failing pipeline showed:
https://gitlab.gnome.org/GNOME/gtk/pipelines/9431

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:29:20 +01:00
Daniel Boles 2ba118c961 MenuButton: Clarify NULL popup/over/menu/model doc 2018-04-22 16:11:01 +01:00
Daniel Boles 476d3ea170 MenuButton: Drop ref to Popover on its ::destroy
Otherwise, if the Popover is destroyed before the MenuButton, the latter
still had a non-NULL but invalid instance and tried to use it in dispose

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:11:01 +01:00
Daniel Boles 8cdee69a82 docs/running: Document the GTK_OVERLAY_SCROLLING env var
https://bugzilla.gnome.org/show_bug.cgi?id=786524
2018-04-22 16:11:01 +01:00
Daniel Boles 2c2ea83333 Stock: Emphasise deprecation; explain alternatives
A user in #gtk+ was confused what to do instead of creating a Button via
gtk_button_new_from_stock(). Our docs could stand to be clearer on this
point; it only costs a few lines. So, link from that constructor* to the
GtkStock doc, and add a banner there telling folk they shouldn’t use it.

* not that most [of these][links] even work right now…
2018-04-22 16:11:01 +01:00
Daniel Boles c2672b4f05 Entry: Show optional style classes in node diagram 2018-04-22 16:11:01 +01:00
Daniel Boles 2d02854685 gdkselection: Clarify that X is only a design base
rather than being a requirement for using our selection APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=791542
2018-04-22 16:11:01 +01:00
Juan Pablo Ugarte 9ae6d09234 a11y/ScrolledWin|IconView: Connect signals safely
Use g_signal_connect_data() instead of g_signal_connect_object()
to make sure the callback gets disconnected when the data object
is destroyed. This avoids problems in garbage-collected bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=789215
2018-04-22 16:11:01 +01:00
Matthias Clasen 21fddc3994 printing: Be more careful when deserializing
The GVariant we are getting here might not be coming
from GTK+, but rather from some other source. Best to
be forgiving and deal with missing data without crashing.

This was causing the GTK+ portal backends to crash on
print requests from Qt.
2018-04-20 17:57:08 -04:00
Emmanuele Bassi ecc612b1a2 Merge branch 'stack-set-name-guard' into 'gtk-3-22'
stack: protect set_visible_child_name from NULL stack

See merge request GNOME/gtk!117
2018-04-19 08:38:09 +00:00
Emmanuele Bassi 1945c7a1a8 Merge branch 'gtkplacesview-finalization-fixes-master' into 'master'
Gtkplacesview finalization fixes

See merge request GNOME/gtk!119

(cherry picked from commit e30176a522)

f9452957 gtkplacesview: unset entry_pulse_timeout_id before removing it
4900c3eb gtkplacesview: disconnect from server list monitor changes on destroy
2018-04-19 08:27:27 +00:00
Marco Trevisan (Treviño) 2ee5aee4a9 stack: protect set_visible_child_name from NULL stack
Return with error if gtk_stack_set_visible_child_name is called
with NULL parameter
2018-04-18 21:02:42 -05:00
Daniel Boles cfbbcf5fc4 UIManager: Document deprecation; link replacements
Close https://gitlab.gnome.org/GNOME/gtk/issues/193
2018-04-18 23:31:47 +01:00
Daniel Boles 7ff9222600 Range: Use should_invert_move() to scroll value
This fixes RTL and/or :inverted Ranges responding to a horizontal scroll
by moving the value/slider button in the opposite direction... See prev.

https://bugzilla.gnome.org/show_bug.cgi?id=791802
2018-04-18 18:33:56 +01:00
Daniel Boles 9b011081c5 Range: Add should_invert_move() for scrolls & keys
This will be used in subsequent commits to fix the sign by which the
value is changed in response to directional scroll or keypress events.

The idea is: you have a movement to make – in the form of a delta that
follows widget directions, i.e. −1 means left or up, +1 means right or
down – and you want to know whether that delta needs to be inverted in
order to produce the intuitively expected directional change of :value.

The existing should_invert() is not sufficient: it just determines
whether to invert visually, but we need more nuance than that for input.

To answer that – while not doubling up the work for scrolls and keys – I
add a helper should_invert_move(), which considers other relevant state:

 • A parallel movement on priv->orientation should just use the existing
   should_invert(), which already worked OK for this case (not others).

 • Movements on the other orientation now depend on priv->orientation:

    ◦ For a horizontal Range, always invert, so up (i.e. −ve in terms of
      widget coords) always means increase value & vice-versa. This was
      done in get_wheel_delta(), but move it here for use with keys too.

    ◦ For a vertical Range, ignore :invert as it’s only relevant to the
      parallel orientation. Do not care about text direction here either
      as RTL locales do not invert number lines, Cartesian plots, etc.

This returns TRUE if the delta should be inverted before applying to the
value, and we can now use this function in both scroll and key handlers.

https://bugzilla.gnome.org/show_bug.cgi?id=407242
https://bugzilla.gnome.org/show_bug.cgi?id=791802
2018-04-17 21:44:16 +01:00
Daniel Boles 0c46d94ec3 Menu|Item: Fix FIXME re non-const interned strings
These are members of the private struct, so it hurts no one to fix this.
2018-04-17 21:07:18 +01:00
Daniel Boles a7a4a459ea Menu: Sanitise @torn_off gboolean in public API 2018-04-17 21:07:18 +01:00
Daniel Boles 30405ee68c Menu: Remove redundant typecheck in private func
Everything that calls this already ensured we are a valid GtkMenu.
2018-04-17 21:07:18 +01:00
Daniel Boles b5cc0d8fcd Menu: Document/annotate nullability of 2 API args
.set_accel_path(): Use (nullable) instead of (allow-none), and explain
                   what a NULL means (albeit very briefly)

.set_title(): Annotate @title as (nullable), and explain NULL’s meaning
2018-04-17 21:07:18 +01:00
Daniel Boles a53bdcd222 Menu: Typecheck AccelGroup passed via public API 2018-04-17 21:07:18 +01:00
Daniel Boles 1d1405edd8 Menu: Typecheck before dereferencing to get ->priv 2018-04-17 21:07:18 +01:00
Daniel Boles 8e24626c49 MenuShell: Sanitise take_focus bool via public API
We store in priv then compare it later, so better make sure it’s 0 or 1.
2018-04-17 21:07:18 +01:00
Daniel Boles bcc539ca07 MenuShell: Typecheck the instance @ select_first()
since this is public API and therefore might get junk passed to it.
2018-04-17 21:07:18 +01:00
Daniel Boles 60b4a3869a Merge branch '154-documentation-lifecycle-of-editables-inside-gtkcellrenderers-is-not-clear' into 'gtk-3-22'
Resolve "Documentation: Lifecycle of Editables inside GtkCellRenderers is not clear"

See merge request GNOME/gtk!97
2018-04-17 18:06:33 +00:00
Daniel Boles 7f846ce7d8 CellRenderer: Link to CellEditable.start_editing()
...from CellRenderer::start-editing, to point people in the direction of
info about the lifecycle of the Editable and how to do generic setup.

https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 18:28:43 +01:00
Daniel Boles 2e21a2256e CellRenderer: Clarify doc of .start_editing()
Drop the line copied from .activate(), replace it with a description of
what this method actually does, and explain what a NULL result means.

https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 18:28:43 +01:00
Daniel Boles bbcfc261e0 CellRenderer: Entry is not the only CellEditable
so link to GtkCellEditable and note that GtkEntry is just one example.
2018-04-17 18:28:43 +01:00
Daniel Boles 4ccbe10571 CellRenderer|Editable: Don't @See_also subclasses
The documentation knows that from the inheritance hierarchy, without us
having to manually duplicate that info here. Link to each other instead.
2018-04-17 18:28:43 +01:00
Daniel Boles b48fbcbb7c CellEditable: Clarify doc on lifecycle of editable
* Note in the intro that we're really thinking about temporary widgets
* Mention a gotcha regarding GtkEntry and how ::focus-out stops editing
* Give some examples of what you'd want to do in ::editing-done
* Be a bit more precise about what ::remove-widget represents
* Summarise the lifecycle between Renderer/Editable in .start_editing()
* Emphasise again there that this should be viewed as a temporary widget

https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 18:28:43 +01:00
Daniel Boles c2da6fc299 CellEditable: Move arg description to right place
Move it from the body to the argument line, and while there, update
the deprecated (allow-none) to (nullable).
2018-04-17 18:28:43 +01:00
Daniel Boles 2ba6dcbce5 CellEditable: Fix grammar error in doc synopsis 2018-04-17 18:28:43 +01:00
Christoph Reiter b19c524a83 ci: move docker images to gitlab.gnome.org 2018-04-17 18:26:40 +02:00
Emmanuele Bassi 16a6c39a9b Merge branch 'm4macros-gtk3' into 'gtk-3-22'
[gtk3] m4macros: Set a serial number

See merge request GNOME/gtk!103
2018-04-17 15:21:17 +00:00
Marek Kasik 8da5111edd TextView: Don't access already disposed text mark
Instead of asking of TextMark for its buffer,
let's reference also the buffer in the SelectionData.

Closes #169
2018-04-17 16:07:05 +02:00
Matthias Clasen 2e7ac262be 3.22.30 2018-04-16 14:06:02 -04:00
Aron Xu cb71d083ab po: fix zh_CN translation 2018-04-14 13:10:27 +08:00
Benjamin Otte b47bdda271 widget: Add a frameclock_connected boolean
... and use it to not connect anything to the frameclock if it isn't
set.

This gets around the problem that the frame clock is disconnected before
GtkWidgetClass.unrealize() is called but the widget is still marked as
realized and the frame clock is available during the vfunc, which makes
calls like gtk_widget_queue_resize() reconnect to the frame clock.

Closes #168
2018-04-11 18:11:39 +02:00
Benjamin Otte 9e926f9a28 examples: Check for error when loading file
People playing with those examples tend to mess up things, so it's
really really unhelpful if we don't do error checking.
2018-04-11 03:11:22 +02:00
Benjamin Otte 5a0759bc1b colorutils: Remove unused macro 2018-04-11 03:11:22 +02:00
Benjamin Otte d92df4ff2c Merge branch 'gtk-3-22' into 'gtk-3-22'
wayland: Fix setting geometry hints

See merge request GNOME/gtk!98
2018-04-09 20:17:00 +00:00
Emmanuele Bassi 22fd5b5766 docs: Link to GResource
Since we're referring to GLib's functionality, might as well save some
time to the reader, and link to the GResource API reference page.
2018-04-09 20:10:47 +01:00
Emmanuele Bassi b685eb1779 docs: Fix the Git links for the example apps
The links to the repository's web UI still refer to the old
git.gnome.org cgit UI, and to the master branch; we should be using
GitLab and the gtk-3-22 branch instead.
2018-04-09 20:05:57 +01:00
Daniel Boles 5ee381a596 AccelGroup: Remove @See_also of deleted function
gtk_item_factory_new() is not a thing that exists.

Also, maybe the lack of space after the colon was what stopped the link
from rendering.
2018-04-09 19:43:45 +01:00
Sébastien Villemot 59136773b8 gdk_x11_display_get_monitor: fix monitor number test logic
When asked for a nonexistent (positive) monitor number,
gdk_x11_display_get_monitor would (at best) return an uninitialized pointer,
instead of returning NULL.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/107
2018-04-09 18:27:44 +01:00
Daniel Boles 7a75b89efe testmodelbutton: Test :centered, :icon, :inverted
Test more stuff.
2018-04-08 18:49:26 +01:00
Daniel Boles b2caaaa3f9 Revert "ModelButton: Properly update indicator on set_role"
This reverts commit ba307aa35e.

This is not needed; see the previous commit for the explanation.

https://gitlab.gnome.org/GNOME/gtk/issues/163#note_94842
2018-04-08 18:49:22 +01:00
Daniel Boles b7e5a2dd10 testmodelbutton: Fix wrongly overridding MB child
I was setting a GtkButton:label, which resulted in the ModelButton's own
custom children getting lost. That doesn't make for a useful test...

https://gitlab.gnome.org/GNOME/gtk/issues/163#note_94842
2018-04-08 18:49:19 +01:00
Daniel Boles e52aa73b36 ModelButton: Use WARN_INVALID_PROPERTY, not assert
Do the same thing we do everywhere else for invalid properties.
2018-04-08 18:39:53 +01:00
Daniel Boles 2d415d9354 ModelButton: Fix type Wether => Whether 2018-04-08 17:13:33 +01:00
Daniel Boles e6e306ae8e testmodelbutton: Add explanatory comments to CSS
and load at an earlier, more sensible place, before creating any widgets
2018-04-08 16:07:35 +01:00
Mohammed Sadiq 79d8c9dff0 listbox: Fix signal name in documentation 2018-04-08 13:46:33 +01:00
Daniel Boles ba307aa35e ModelButton: Properly update indicator on set_role
Redrawing is insufficient: when :role changes to/from NORMAL, the
indicator gadget reallocates, but we didn't reflect that in the widget.

https://gitlab.gnome.org/GNOME/gtk/issues/163
2018-04-08 13:16:30 +01:00
Daniel Boles fa520c5769 ModelButton: Protect against nonsensical gbooleans
the same way we do normally.
2018-04-08 13:16:30 +01:00
Daniel Boles e193cd1cf1 tests/testmodelbutton: Add this
and test whether :action-name, :role, and CSS nodes work as expected

https://gitlab.gnome.org/GNOME/gtk/issues/163
2018-04-08 13:16:30 +01:00
Rūdolfs Mazurs 1bf354aec8 Update Latvian translation 2018-04-07 16:02:54 +00:00
Simon McVittie 31cb0fee9c m4macros: Set a serial number
When a project has a bundled copy of our macro included in tarball
source releases, typically in a m4/ or aclocal/ directory, aclocal
uses the serial number to determine whether the system copy in
/usr/share/aclocal is newer or older than the bundled copy. Without
a serial number, the bundled copy will always be used and will not
be overwritten, even if it is outdated.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-04-06 11:31:49 +01:00
Benjamin Otte b0b2992165 Merge branch 'textview-delete' into 'gtk-3-22'
gtktextviewaccessible: update cursor position after text suppression

See merge request GNOME/gtk!101
2018-04-04 18:19:05 +00:00
Benjamin Otte 48e40762c7 Merge branch 'text-changed-delete' into 'gtk-3-22'
gtkentryaccessible: Fix text-changed::delete length

See merge request GNOME/gtk!99
2018-04-04 18:17:26 +00:00
Samuel Thibault fa6994d033 gtktextviewaccessible: update cursor position after text suppression
delete_range_cb is set to be called before the text suppression done by
the gtktextlayout (otherwise it does not work properly). But at that
point the cursor position is not yet up to date.  We thus need to move
the accessibility cursor notification to after the actual text
suppression, by using another callback.

This fixes cursor position in brltty screen reading.
2018-04-04 18:22:16 +02:00
Samuel Thibault 209f908a03 gtkentryaccessible: Fix text-changed::delete length
The second parameter of the text-changed::delete event is to be the length,
not the end position.  This fixes spurious text removals in brltty
screen reading.
2018-04-04 17:56:38 +02:00
Jan Alexander Steffens (heftig) 8e74e515c7 wayland: Fix setting geometry hints
The stable xdg_shell port (5c8bb51a) introduced an error in
gdk_wayland_window_set_geometry_hints which would set the minimum size
to the maximum size, if provided.

This resulted in various wxWidgets apps (FileZilla, Audacity, Veracrypt)
crashing because they attempted to allocate a ginormous surface.

Fixes #157.
2018-04-04 14:38:45 +02:00
Daniel Boles 46dac1aba4 GLArea: Remove wrong transfer annotation on new()
Like other widgets, this returns a floating reference, so
(transfer full) is wrong. Just omit the annotation as others do,
thus implying (transfer none).

Close https://gitlab.gnome.org/GNOME/gtk/issues/156
2018-04-04 12:04:35 +01:00
Matthias Clasen 4b95d74068 wayland: Don't emit signals if nothing changed
We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.

https://gitlab.gnome.org/GNOME/gtk/issues/132
https://gitlab.gnome.org/GNOME/gtk/merge_requests/83#note_93411
2018-04-04 09:39:31 +01:00
Robert Antoni Buj Gelonch 34bcc71f4e Update Catalan translation 2018-04-03 17:56:01 +00:00
Carlos Garnacho 7751001ff1 Merge branch 'gtk-3-22' into 'gtk-3-22'
Fix imwayland crashes

See merge request GNOME/gtk!89
2018-04-03 16:42:41 +00:00
Daniel Boles e42d8598ca ProgressBar: Drop leftover "superimposed" mention
This was missed from the commit that dropped other mentions to the
previous ability to superimpose text.

https://bugzilla.gnome.org/show_bug.cgi?id=748784
2018-03-31 12:27:21 +01:00
Nelson Benítez León 7a11fcf054 appchooserwidget: search text using g_str_match_string()
so we match on diacritics (eg. accented letters) and also
search on text tokens. As a plus we also reduce code size.

https://bugzilla.gnome.org/show_bug.cgi?id=745128
2018-03-31 13:32:42 +05:00
Daniel Boles 154fa9817d themes: Make disabled Expander arrow look disabled
If GtkExpander:sensitive was FALSE, the arrow still got the normal fg
colour, which made it look clickable, in contrast to the adjacent label.
Fix this by adding selectors to catch the applicable :disabled states.

Note: Needing these may indicate an oops in generic styles elsewhere,
but I couldn’t see any, so let’s just get it looking right for now.

https://gitlab.gnome.org/GNOME/gtk/issues/146
2018-03-29 21:00:00 +01:00
Daniel Boles 6e8cc589f2 emojichooser.ui: Reuse headings as button tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=792632
2018-03-29 18:42:39 +01:00
Tomasz Miąsko 56d44fd10c Widget: Fix doc of default ::keynav-failed handler
https://bugzilla.gnome.org/show_bug.cgi?id=793089
2018-03-29 18:29:51 +01:00
Daniel Boles 0102e0f914 HighContrast: Honour .monospace set by GtkTextView
Copy the line that sets a monospace family from Adwaita (same place too)

noticed at https://gitlab.gnome.org/GNOME/gtk/issues/141#note_91610
2018-03-29 18:16:57 +01:00
Nathan Follens f12b44d697 Update Dutch translation 2018-03-29 13:02:08 +00:00
Марко Костић b5e959b6ff Update Serbian translation 2018-03-28 20:50:42 +00:00
Lionel Landwerlin 314531640f imwayland: destroy objects only if it matches our manager object
Should fix one of the crash from #129.
2018-03-28 12:11:10 +01:00
Emmanuele Bassi a0f273465e Merge branch 'wip/smcv/ac-path-tool-2' into 'gtk-3-22'
m4macros: Use PKG_PROG_PKG_CONFIG

See merge request GNOME/gtk!81
2018-03-26 10:45:36 +00:00
Milo Casagrande 3dbeab2b4a Update Italian translation 2018-03-26 10:34:48 +00:00
Cheng-Chia Tseng f38d8f8c1b Update Chinese (Taiwan) translation 2018-03-26 09:20:17 +00:00
Simon McVittie a36c564b54 m4macros: Use PKG_PROG_PKG_CONFIG
Signed-off-by: Simon McVittie <smcv@debian.org>
2018-03-26 09:31:31 +01:00
Simon McVittie 323d86b6e4 m4macros: Fix underquoting in AC_PATH_TOOL
While these lines are being changed anyway, they might as well be
more correct.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-03-26 08:58:57 +01:00
Helmut Grohne 3a7fbb3b30 AM_PATH_GTK_3_0: Use AC_PATH_TOOL to find pkg-config
AM_PATH_GTK_3_0 uses AC_PATH_PROG for finding pkg-config. Unfortunately,
that will find the build architecture pkg-config which in turn will miss
the host architecture gtk+3.0. What must be used here is the host
architecture pkg-config and that is found with AC_PATH_TOOL.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894069
Reviewed-by: Simon McVittie <smcv@debian.org>
Fixes: #133
2018-03-26 08:58:40 +01:00
Matthias Clasen a09df57a5f Merge branch 'gtk-3-22-bz773274' into 'gtk-3-22'
wayland: Don't paint if the window is unmapped

See merge request GNOME/gtk!31
2018-03-25 20:47:02 +00:00
Dz Chen b0f8426c29 Update zh_CN po and po-properties translations 2018-03-24 00:03:55 +08:00
Daniel Boles dbaaa701ad HighContrast: Regenerate CSS missing from !50
https://gitlab.gnome.org/GNOME/gtk/merge_requests/50 forgot this.
2018-03-22 21:01:08 +00:00
Nikita Churaev ef3fe9ead3 theme: Be more selective when adding margins to toolbar items
Only add margins to direct children of toolbar items, this fixes the
gaps between linked buttons inside custom toolbar items.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/66
2018-03-22 20:59:15 +00:00
Matej Urbančič 6551ddd8e0 Updated Slovenian translation ... 2018-03-21 16:01:46 +01:00
Matej Urbančič 332d41792d Updated Slovenian translation ... 2018-03-21 15:58:15 +01:00
Charles Monzat 240cb0bb5a Update French translation 2018-03-21 08:45:43 +00:00
Matthias Clasen 5c8bb51a58 Merge branch 'wip/xdg-shell-gtk-3-22' into 'gtk-3-22'
xdg shell (stable; gtk 3 22)

See merge request GNOME/gtk!36
2018-03-20 16:28:00 +00:00
Cheng-Chia Tseng 68fce76faf Update Chinese (Taiwan) translation 2018-03-20 15:53:58 +00:00
Matthias Clasen b88bffac23 Merge branch 'wip/carlosg/fix-issue-114' into 'gtk-3-22'
Fix issue #114

See merge request GNOME/gtk!73
2018-03-20 15:31:49 +00:00
Carlos Garnacho 4f78abddfc imwayland: Avoid TOGGLE_INPUT_PANEL requests if there's no focus
Fixes two things: 1) As GTK+ can be coerced into using the wayland IM
module despite the compositor not implementing the interface, all paths
not checking for global state before sending requests are prone to
crashes, this one fell hit this pitfall.

And 2) ensures the tap gesture only triggers TOGGLE_INPUT_PANEL if the
widget IM is focused. This is a possibility on eg. WebKit pages, where
its IM is only focused as long as a form element in the page is focused.
Tapping elsewhere shouldn't toggle the OSK.

https://gitlab.gnome.org/GNOME/gtk/issues/114

Closes: #114
2018-03-20 15:56:53 +01:00
Peter Bloomfield 6e2d14037c gtkimmodule: make match_backend() query
…the wayland registry.

Wnen _gtk_im_module_get_default_context_id calls
match_backend (context_id) and the default GdkDisplay
is wayland, match_backend() should return TRUE only if
gdk_wayland_display_query_registry (display, "gtk_text_input_manager")
returns TRUE.
2018-03-20 15:56:53 +01:00
Benjamin Otte 9781ffae51 Merge branch 'style-context-null-widget-guard' into 'gtk-3-22'
gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places

See merge request GNOME/gtk!70
2018-03-20 14:55:57 +00:00
Christoph Reiter d65a4c2e0a gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places
When the widget gets finalized it clears the widgetnode and gtk_css_widget_node_get_widget
returns NULL. Guard against gtk_css_widget_node_get_widget() returning NULL like in other
places.

See https://gitlab.gnome.org/GNOME/pygobject/issues/28#note_82862
2018-03-19 18:21:25 +01:00
Daniel Boles 92bef46b4c gdkrgba: Add a missing apostrophe in a doc comment 2018-03-19 15:13:04 +00:00
Daniel Boles f4bb394d60 _common.scss: Use : for properties in new comments
This is cosmetic and unlikely to have confused anyone, but still
2018-03-19 14:27:28 +00:00
Daniel Boles e0befe02fa Merge branch 'searchbar-double-border-fix' into 'gtk-3-22'
Fix the double border in windows with a search bar.

See merge request GNOME/gtk!50
2018-03-19 14:26:11 +00:00
Руслан Ижбулатов 3e68abddbc Merge branch 'lrn/issue-82_3-22' into gtk-3-22 2018-03-19 09:40:58 +00:00
Chun-wei Fan 84ff404a17 Visual Studio builds: Fix .pc generation
Since the Cairo build files for Visual Studio does not really generate
the pkg-config files for us, and we stopped making makeshift ones in
gobject-introspection, stop making the .pc files we generate here refer
to the Cairo .pc's, and instead make them link directly to
cairo-gobject.lib and cairo.lib.
2018-03-19 16:53:57 +08:00
Milo Casagrande 9604eb5c53 Update Italian translation 2018-03-17 14:51:14 +00:00
Dušan Kazik 9c8e53b968 Update Slovak translation 2018-03-17 14:36:47 +00:00
Timm Bäder eb01ba8573 widget: Only print allocation warnings with --enable-debug
i.e. if G_ENABLE_CONSISTENCY_CHECKS is defined. This makes sense,
considering that this warning is about consistency of internal widget
state.
2018-03-17 13:15:33 +01:00
Daniel Boles 7fd9f2d31e Notebook: Don’t show raw underline/markup in popup
If @menu_label == NULL, we create a default page->menu_label. This took
@tab_label.get_label() and passed that to page->menu_label.set_text().
This is wrong because we set the plain text of the menu_label from the
rich text of @tab_label. So, if @tab_label used mnemonics or markup, our
menu_label got the raw underline or markup tags shown in it as raw text.

As we call set_text() on the menu Label, the fix is to be symmetric: use
@tab_label’s get_text() as source, as that strips underlines and markup.

It’s not worth making the default Label ‘inherit’ :use-underline/markup;
that’s a slippery slope, and users wanting such things can just create a
fully fledged GtkLabel to pass as @menu_label to suppress the default.

https://bugzilla.gnome.org/show_bug.cgi?id=705509
2018-03-16 22:32:50 +00:00
Olivier Fourdan 3bd7b379c8 wayland: Drop cairo surfaces when withdrawing
If a window is unmapped by the client while gdk is processing updates,
(for example Firefox un-mapping its window on Expose events), the
windowing backend resources might be lost (for example with Wayland)
which can cause a crash in end_paint().

Make sure we drop the cairo surfaces as well when hiding the surface,
that will avoid the crash in gdk_window_impl_wayland_end_paint() when
trying to attach the staging cairo surface to a released wl_surface,
these will be recreated when needed when the surface becomes visible
again and there is no need to keep such buffers around for a surface
which is not visible anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=793062
2018-03-16 16:01:21 +01:00
Jonas Ådahl 0454a1cace wayland: Minor whitespace cleanups
Broke up a long line, added an empty one, and indented another one.

https://bugzilla.gnome.org/show_bug.cgi?id=791939
2018-03-16 17:44:48 +08:00
Jonas Ådahl a46bc8b5a3 wayland: Add support for xdg-shell stable
This commit adds support the stable version of the xdg-shell protocol.
Support for the last version of the unstable series is left intact, but
will not receive new features.

The stable version is prioritized above the older version.

https://bugzilla.gnome.org/show_bug.cgi?id=791939
2018-03-16 17:44:48 +08:00
Timm Bäder 5d27915aa4 demo: Add widgetbowl demo
Backported from gtk4.
2018-03-15 21:04:45 +01:00
Matthias Clasen cac2845bd6 Merge branch 'wip/filechooser-non-default-display-gtk3' into 'gtk-3-22'
Fix filechooser dialog using non default display (gtk3)

See merge request GNOME/gtk!59
2018-03-15 17:47:15 +00:00
Kukuh Syafaat 3ee7604d6e Update Indonesian translation 2018-03-15 14:08:17 +00:00
Balázs Úr 0fa391cc24 Update Hungarian translation 2018-03-15 13:39:01 +00:00
Daniel Boles 0a0323813e SpinButton: Redraw +/- buttons after :wrap changes
Otherwise, the + or - button might change sensitivity based on whether
it can be used to wrap, but without ensuring we update its state, the
ability to :wrap isn't reflected until something else triggers a draw.

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:48 +00:00
Daniel Boles fcfabb2fd3 testspinbutton: Add button to toggle wrap on Spins
I found myself wanting to test this for something else, so let's test
it. It revealed a bug immediately!

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:08 +00:00
Daniel Boles bb16f1a0ff testspinbutton: Orient box orthogonally to Spins
This makes better use of space.
2018-03-14 23:00:59 +00:00
Emin Tufan Çetin c179d5eb6e Update Turkish translation 2018-03-14 19:57:40 +00:00
Jonas Ådahl ba83a2c46b entrycompletion: Realize popup after setting screen
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.

To avoid this issue, realize the popup after the screen has been
properly set up.

Fixes #83 in gtk3
2018-03-14 11:57:00 +08:00
Christoph Reiter fc9a71abae Merge branch 'gtk-3-22' into 'gtk-3-22'
Add proper annotation for gdk_frame_clock_get_refresh_info

See merge request GNOME/gtk!54
2018-03-13 20:31:30 +00:00
Christoph Reiter 600003e83f run-docker.sh: Disable SELinux for the container
On Fedora and similar SELinux by default prevents containers accessing
mounted host directories. This script is just used for testing,
so disable it.
2018-03-13 21:19:30 +01:00
Nathan Follens b485cf91b5 Update Dutch translation 2018-03-13 19:29:02 +00:00
Руслан Ижбулатов 577f1a992e GDK W32: send a DELETE selection when using LOCAL selection protocol
This was not needed before, but now it seems to be necessary for
some reason. The code is just an adjusted copy of the appropriate
piece of the OLE2 protocol code, sending GDK_SELECTION_REQUEST.

The rest is just fixing the fallout, allowing LOCAL protocol to pass
the functions it wasn't supposed to pass before.

Closes #82
2018-03-13 18:21:50 +00:00
Emin Tufan Çetin a2efd3f3dc Update Turkish translation 2018-03-13 17:17:01 +00:00
Tim Sabsch 98afaed718 Update German translation 2018-03-13 15:03:39 +00:00
Rafael Fontenelle 491e696226 Update Brazilian Portuguese translation 2018-03-13 10:37:16 +00:00
Matthias Clasen 9f6deab88c 3.22.29 2018-03-12 22:22:05 -04:00
Daniel Boles 0f3396d742 FileChooserWidget: Fix leaks in .get_subtitle()
Now that subtitle's default value "Searching" for OPERATION_MODE_SEARCH
is duplicated as it should be, we cannot reassign other strings to it
anymore, as that resulted in the original dupe of "Searching" leaking.

Fix this by only assigning the dup'd "Searching" after trying to get
more specific values, not before. We therefore need to set it to NULL
during its declaration, and that means we needn't in the final else.
2018-03-13 00:19:51 +00:00
Daniel Boles 9d8fadee97 FileChooserWidget: Avoid crash freeing static str
Having a FileChooserDialog in location-entry mode then pressing
<primary>f to move to search mode would crash with an invalid free().

In that case, FileChooserWidget.get_subtitle() returned a static string
straight from gettext. This crashed when the GBinding from :subtitle to
FileChooserDialog’s HeaderBar:subtitle shortly tried to free the string.

Fix by duplicating the string before returning it, like all other paths.

https://bugzilla.gnome.org/show_bug.cgi?id=791004
2018-03-12 23:06:21 +00:00
Stas Solovey 0e01668683 Update Russian translation 2018-03-12 21:08:05 +00:00
Aurimas Černius bcd920c288 Updated Lithuanian translation 2018-03-12 23:01:22 +02:00
gogo 6c4261338a Update Croatian translation 2018-03-12 20:57:04 +00:00
Anders Jonsson a2f81d83bb Update Swedish translation 2018-03-12 20:43:21 +00:00
Daniel Boles cbb22b2916 testinfobar: Test more properties, response signal
Also test :message-type, :show-close-button, and ::response.
2018-03-12 19:00:20 +00:00
Marek Černocký 41f6c469e3 Updated Czech translation 2018-03-12 19:51:52 +01:00
Mart Raudsepp e4e2b7687d Update Estonian translation 2018-03-12 16:27:50 +00:00
Daniel Boles f08eeecae6 ListBox: Avoid ::row-activated/Row::activate ambig
…uity, by adding a doc comment to Row::activate explaining what it does
and why it is probably not what the user reading that is looking for.

https://bugzilla.gnome.org/show_bug.cgi?id=794008
2018-03-12 16:12:13 +00:00
Daniel Boles f7a47a632c InfoBar: Be most specific in new Since annotations 2018-03-12 16:12:13 +00:00
Piotr Drąg 1122508e1c Update Polish translation 2018-03-12 16:42:03 +01:00
Daniel Boles 6b4d95e86d testinfobar: Add simple test of :visible/:revealed
This exists merely to prove that, having added :revealed, show() and
hide() now work reliably, as does set_revealed() for the animated case.

https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:30:49 +00:00
Timm Bäder e9d84e2653 infobar: Add :revealed property
https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:17:24 +00:00
Timm Bäder 45aa018839 infobar: Keep GParamSpecs around
So we can use them in notify_by_pspec

https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:17:18 +00:00
Sander Sweers f0bea1ab1d Add proper annotation for gdk_frame_clock_get_refresh_info
See https://gitlab.gnome.org/GNOME/gtk/issues/77
2018-03-12 16:06:46 +01:00
Timm Bäder 04ff9b58f1 emojichooser: Only measure reference emoji once
Doing that once for every emoji is pretty slow and unnecessary as the
width does not change.
2018-03-12 14:40:02 +00:00
Alexandre Franke 72ed0c9539 Update French translation 2018-03-10 22:06:23 +00:00
Nikita Churaev 4e2f59ad23 Tidy up the search bar double border fix
Match "box" instead of "*", as already done for the search bar GTK4 and
for the action box in GTK3. Also clarify which widget property is
causing the margin which needs to be undone.
2018-03-09 22:13:01 +03:00
Pavel Roskin cc967849f7 x11: Avoid a division by zero
This is similar to f44baf51d9 but for RandR 1.3 servers like
x11rdp and Windows Exceed which don't return a refresh rate. Avoid a
crash when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=775546
2018-03-08 16:00:40 +01:00
Ask Hjorth Larsen add3592809 Updated Danish translation 2018-03-08 12:23:42 +01:00
Nikita Churaev b202c44fd8 Fix double borders in windows with a search bar in HighContrast 2018-03-08 00:57:59 +03:00
Ask Hjorth Larsen 8c09b3994a Updated Danish translation of gtk-properties 2018-03-07 22:37:47 +01:00
Ask Hjorth Larsen b9b2f7711b Updated Danish translation of gtk 2018-03-07 22:37:45 +01:00
Nikita Churaev d465d790f0 Fix the double border in windows with a search bar.
Includes applications like GNOME Software and GNOME Documents. The
search bar is a composite widget with a revealer inside it, and when the
content of the revealer is hidden, the border lingers. Changed the CSS
to add style to the content of the revealer instead of the search bar
widget itself.
2018-03-07 08:54:11 +03:00
Timm Bäder 46828f8e0a expander: fix sizes in resize_toplevel
We can't use gtk_widget_get_allocation for either non-anchored widgets
(which happens with the child widget when the expander is unexpanded)
nor toplevel windows since that will include the window decorations.

Fixes #70 in gtk3
2018-03-06 18:11:34 +01:00
Christoph Reiter 23b91856e1 Merge branch '63-regression-3-22-26-3-22-27-hidpi-checkboxes-and-radiobuttons-pixmaps-are-not-scaled' into 'gtk-3-22'
Resolve "[ Regression 3.22.26 -> 3.22.27 ] [HIDPI] Checkboxes and radiobuttons pixmaps are not scaled"

See merge request GNOME/gtk!47
2018-03-05 19:58:04 +00:00
Juan Pablo Ugarte e36b629c36 GtkCssImageSurface: set device scale for cache surface
Closes #63
2018-03-05 14:47:00 -03:00
Stas Solovey fa47667df9 Update Russian translation 2018-03-05 16:25:05 +00:00
Rūdolfs Mazurs bb498ba554 Update Latvian translation 2018-03-04 19:22:05 +00:00
Christoph Reiter 5fc27126f5 Merge branch 'phase-field' into 'gtk-3-22'
Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe.

See merge request GNOME/gtk!45
2018-03-04 19:21:26 +00:00
Rūdolfs Mazurs cccb66afb4 Update Latvian translation 2018-03-04 19:19:38 +00:00
Tomasz Miąsko 5d258bf314 Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe.
When using type annotations, the ABI of type being annotated and a new
type introduced from annotation should match.

In case of enumerations, the most common ABI, and probably the only one
currently used in practice with gtk, corresponds to -fno-short-enums
compiler option. It uses int as the underlying type of enum, bumping it
up to unsigned int, long int or unsigned long int, in that order, when
necessary.

Thus, when annotating a field of integer type with an enum type, it is
never correct to annotate field smaller than int, because it changes the
ABI from perspective on introspection.

The gint8 phase field in GdkEventTouchpadSwipe and GdkEventTouchpadPinch
structures have been previously annotated in such a way, and this change
removes this annotation to restore ABI compatibility.

Size of structures before (which does not match C):

```
>>> Gdk.EventTouchpadPinch.__info__.get_size()
104
>>> Gdk.EventTouchpadSwipe.__info__.get_size()
88
```

Size of structures after (which does match C):

```
>>> Gdk.EventTouchpadPinch.__info__.get_size()
96
>>> Gdk.EventTouchpadSwipe.__info__.get_size()
80
```

Fixes issue #57.
2018-03-04 17:55:44 +01:00
Christoph Reiter 464888a2da Merge branch 'c-includes' into 'gtk-3-22'
Include C headers in introspection file.

See merge request GNOME/gtk!44
2018-03-04 15:03:24 +00:00
Tomasz Miąsko 91498c7db3 Include C headers in introspection file.
Include gtk/gtk.h and gtk/gtk-a11y.h unconditionally,
and gtk/gtkx.h when building with X11. Ensures that
introspection data contains complete set required
headers, which is useful when generating C code based
on introspection data.

Diff for generated gir (when using X11):

```diff
   <include name="xlib" version="2.0"/>
   <package name="gtk+-3.0"/>
+  <c:include name="gtk/gtk-a11y.h"/>
+  <c:include name="gtk/gtk.h"/>
+  <c:include name="gtk/gtkx.h"/>
   <namespace name="Gtk"
              version="3.0"
```

Fixes issue #56.
2018-03-04 15:36:24 +01:00
Christoph Reiter 119d8f996f Merge branch 'gitlab-ci-gtk-3-22' into 'gtk-3-22'
Add gitlab-ci support using a prebuilt docker image

See merge request GNOME/gtk!18
2018-03-04 11:54:24 +00:00
Christoph Reiter 81c4fa5d50 Add gitlab-ci support using a prebuilt docker image
This uses autotools and just calls make
2018-03-04 10:52:49 +01:00
Christoph Reiter 5ca21f6dbb Merge branch 'include-gtkstackaccessible-gtk-3-22' into 'gtk-3-22'
a11y: Include gtkstackaccessible.h in gtk-a11y.h

See merge request GNOME/gtk!42
2018-03-04 09:40:57 +00:00
Kristjan SCHMIDT 7a15bf56a0 Update Esperanto translation 2018-03-03 20:07:27 +00:00
Tomasz Miąsko 3000384b90 a11y: Include gtkstackaccessible.h in gtk-a11y.h 2018-03-03 20:11:14 +01:00
Jordi Mas fd71badf16 Fix to Catalan translation 2018-03-03 18:12:43 +01:00
Marek Černocký ead2c3f38f Updated Czech translation 2018-03-03 06:53:53 +01:00
Bruce Cowan 3059df0d4d Update British English translation 2018-03-02 22:09:11 +00:00
Timm Bäder f0d5b9561b Revert "file chooser: Allow activating without double-click"
This reverts commit fb0a13b7f0.

It's already reverted in master via
c8a6a1138b, so let's not leave subtle
behavior changes that would make a gtk3->gtk4 migration. And just like
the commit message of the revert already mentions: it didn't really make
anybody happy anyway.
2018-03-01 19:47:11 +01:00
Timm Bäder b13362b369 separatormenuitem: Don't create label widget in get_label
Calling gtk_menu_item_get_label on a GtkSeparatorMenuItem would
otherwise create a GtkLabel child, increasing the vertical size request
to that of the child label.
2018-03-01 19:33:25 +01:00
Christoph Reiter b68256f7a1 Merge branch 'quartz-missing-config-include' into 'gtk-3-22'
macos: Fix missing gdk symbol exports for gtk dnd

See merge request GNOME/gtk!38
2018-03-01 13:46:36 +00:00
Christoph Reiter 342aee304a macos: export gdk_quartz_drag_source_context()
It's used in the gtk dnd code but not exported in gdk.
Append a "_libgtk_only" suffix as with other internal exports and
export the symbol.

See #32
2018-03-01 14:35:05 +01:00
Kukuh Syafaat abc171c93a Update Indonesian translation 2018-03-01 09:46:57 +00:00
Christoph Reiter 5c0d242ea3 macos: Fix gdk_quartz_drag_context_get_dragging_info_libgtk_only symbol export
The header got included without config.h being included first which resulted in the
wrong _GDK_EXTERN macro being used. As a result some symbols weren't exported
and starting a DnD action would crash in the linker.

This patch adds config.h includes in all places where clang complained about
_GDK_EXTERN redefinitions.

See #32 for more info.
2018-02-27 19:53:43 +01:00
Dušan Kazik d76c7c82fc Update Slovak translation 2018-02-26 11:17:48 +00:00
Milo Casagrande 5d3ccfe21e Update Italian translation 2018-02-26 08:02:38 +00:00
Sveinn í Felli 44e7df2a14 Update Icelandic translation 2018-02-26 07:51:26 +00:00
Christoph Reiter 9f84e9a2c5 Merge branch 'quartz-symbol-not-found-gtk3' into 'gtk-3-22'
gdkquartz.h: export pasteboard functions

See merge request GNOME/gtk!20
2018-02-25 21:29:03 +00:00
Kristjan SCHMIDT 9112ca7f88 Update Esperanto translation 2018-02-25 18:15:28 +00:00
Furkan Ahmet Kara 4c43e8468a Update Turkish translation 2018-02-25 15:51:20 +00:00
Changwoo Ryu d41dfcab35 Update Korean translation 2018-02-25 14:49:53 +00:00
Changwoo Ryu 80458ff586 Update Korean translation 2018-02-25 14:48:59 +00:00
Baurzhan Muftakhidinov 4fe6cba27a Update Kazakh translation 2018-02-24 15:14:20 +00:00
Balázs Úr 5b328804ec Update Hungarian translation 2018-02-23 22:17:48 +00:00
GNOME Translation Robot f3f75f62e8 Update Scottish Gaelic translation 2018-02-23 17:34:56 +00:00
GNOME Translation Robot 68eb897900 Update Scottish Gaelic translation 2018-02-23 17:25:08 +00:00
Fabio Tomat 5cd21e5579 Update Friulian translation 2018-02-23 08:56:19 +00:00
Fran Dieguez bc3a939f90 Update Galician translation 2018-02-23 00:26:32 +00:00
GNOME Translation Robot 2246a1e3c9 Update Dutch translation 2018-02-22 19:56:58 +00:00
Daniel Mustieles af9f458bc9 Updated Spanish translation 2018-02-22 11:23:24 +01:00
Милош Поповић e3fb265b90 Update Serbian Latin translation 2018-02-22 10:16:15 +00:00
Марко Костић 57f6f8307d Update Serbian translation 2018-02-22 10:09:01 +00:00
Милош Поповић ab628e365d Update Serbian Latin translation 2018-02-21 14:35:57 +00:00
Марко Костић 4107e670d0 Update Serbian translation 2018-02-21 14:33:06 +00:00
Fabio Tomat 57a4558691 Update Friulian translation 2018-02-21 09:28:45 +00:00
Charles Monzat 796245ca30 Update French translation 2018-02-19 21:28:35 +00:00
Matthias Clasen 146b1e0d42 Merge branch 'test-fix-a11y-schema' into 'gtk-3-22'
testsuite/a11y: Fix missing glib schemas

See merge request GNOME/gtk!16
2018-02-19 18:23:11 +00:00
Matthias Clasen c96be5a00b Merge branch 'gtk-3-22' into 'gtk-3-22'
gtkprintbackendcups.c: fix \n at end of a debugging note

See merge request GNOME/gtk!24
2018-02-19 17:57:04 +00:00
Matthias Clasen 92711d7f79 Merge branch 'gtk-debug-flags-with-open-display' into 'gtk-3-22'
gtk_init: Fix debug flags handling when a display is already open

See merge request GNOME/gtk!26
2018-02-19 17:55:12 +00:00
Aurimas Černius 8f82b06676 Updated Lithuanian translation 2018-02-18 21:43:14 +02:00
Mario Blättermann 2946ca859c Update German translation 2018-02-18 12:48:31 +00:00
Christoph Reiter 49e3c10575 Merge branch 'gtk-3-22' into 'gtk-3-22'
Fix annotation for gtk_tree_view_is_blank_at_pos()

See merge request GNOME/gtk!12
2018-02-18 10:45:52 +00:00
Christoph Reiter 8e540f2f62 gtk_init: Fix debug flags handling when a display is already open
In PyGObject gdk_init() is called before gtk_init() and thus there is
already a default display open when gtk_init() is called.
The code assigning the display to the debug_flags struct gets only
called when the default display changes, which never happens
when there already is one. As a result GTK_DEBUG=interactive
doesn't do anyting with Python apps.

This makes it call the change callback in case a display is already
there.

See https://gitlab.gnome.org/GNOME/pygobject/issues/166
2018-02-18 10:34:52 +01:00
John Lindgren 5aa939dc93 Fix incorrect optimization in find_builtin_icon().
When we found an icon with exactly the requested size, we'd stop
searching immediately (good), but we'd neglect to set the returned
min_difference to 0 (bad).  This caused theme_lookup_icon() to
prefer other, potentially much worse, matches over the exact one.
2018-02-17 22:03:27 -05:00
Emmanuele Bassi bd13a5a5ce docs: Add proper deprecation text for GtkStatusIcon
We link to the HowDoI for GNotification in the class description, but we
should be more verbose in the deprecation notices for each function of
the GtkStatusIcon class.

https://bugzilla.gnome.org/show_bug.cgi?id=743975
2018-02-17 17:30:54 -05:00
Ivan Zakharyaschev d2a4febfa7 gtkprintbackendcups.c: fix \n at end of a debugging note
(cherry picked from commit 7461ceebe3)
2018-02-17 21:25:41 +03:00
Piotr Drąg 688426f57f Update Polish translation 2018-02-17 17:18:59 +01:00
gogo 9bf8449a2e Update Croatian translation 2018-02-16 23:01:50 +00:00
gogo b6343a1f4d Update Croatian translation 2018-02-16 22:57:44 +00:00
Rafael Fontenelle c830834170 Update Brazilian Portuguese translation 2018-02-16 16:20:06 +00:00
Tom Schoonjans 2760b020a8 gdkquartz.h: export pasteboard functions 2018-02-16 12:44:18 +00:00
Piotr Drąg ff40208857 Update Polish translation 2018-02-15 17:12:30 +01:00
Christoph Reiter c60ea284c5 testsuite/a11y: Fix missing glib schemas
The a11y tests complain that org.gtk.Settings schemas are missing
and fail. This copies the code to build and include the schemas from
the reftests testsuite.
2018-02-15 12:30:57 +01:00
Anders Jonsson 238239c00d Update Swedish translation 2018-02-15 09:47:55 +00:00
Carlos Soriano fb79115314 gtkplacessidebar: Rename favorites to starred
To have more consistency in the name. The same was done in Nautilus in
commit https://gitlab.gnome.org/GNOME/nautilus/commit/27b039b37c1149fc8abbef6a683dd939e6f2bf1f.
2018-02-15 10:16:10 +01:00
Piotr Drąg 8cc04e8337 Update POTFILES.in 2018-02-15 04:31:13 +01:00
Matthias Clasen 9f142161e4 Merge branch 'wip/carlosg/imwayland-3-22' into 'gtk-3-22'
modules: Add wayland IM implementation

See merge request GNOME/gtk!5
2018-02-15 03:03:02 +00:00
Matthias Clasen 463ee95136 3.22.28 2018-02-14 12:48:01 -05:00
Carlos Garnacho e8bffe0c56 modules: Add wayland IM implementation
This IM context implementation goes through the gtk-text-input protocol,
leaving up to the compositor the actual interaction with IM engines. If
the protocol is not offered by the compositor, GTK+ will fallback to the
IMs as specified through GtkSettings.
2018-02-14 14:58:06 +01:00
Carlos Garnacho 3146f29d3a gdk/wayland: Add GdkDisplay call to query available globals
The internal known_globals hashtable is used to carry accounting for
interfaces that depend on others (as ordering is not guaranteed), extend
its usage so it also keeps track of unimplemented interfaces (here at
least).

The API call will then use this to allow querying the globals offered by
the compositor, it will be useful to determine whether we can use
text-input protocols or should fallback to other IMs.
2018-02-14 14:58:06 +01:00
Daniel van Vugt c6901a8b95 Fix irregular gdk_frame_clock_get_frame_time
This fixes stuttering in animations that rely on the regularity of
gdk_frame_clock_get_frame_time.

https://bugzilla.gnome.org/show_bug.cgi?id=787665

BEFORE
gdkgears:
58 FPS and visibly stuttering
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +17278μs, gdk_frame_clock_get_frame_time +17278μs
"paint" g_get_monotonic_time +17449μs, gdk_frame_clock_get_frame_time +17426μs
"paint" g_get_monotonic_time +17620μs, gdk_frame_clock_get_frame_time +17600μs

AFTER
gdkgears:
60 FPS and smoother
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +18228μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +15010μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +17134μs, gdk_frame_clock_get_frame_time +16680μs
2018-02-14 08:02:52 -05:00
Gniourf 3274f3a6cc Fix annotation for gtk_tree_view_is_blank_at_pos()
The annotation (allow-none) is wrong. Since
gtk_tree_view_is_blank_at_pos() also calls
gtk_tree_view_get_path_at_pos(), the same fields should have the same
annotations.
2018-02-14 13:51:22 +01:00
Emmanuele Bassi f82a6421f4 Add missing private header to the build
Closes: #26

        https://bugzilla.gnome.org/show_bug.cgi?id=793442
2018-02-14 10:36:24 +00:00
Mart Raudsepp 97f3a4397a Update Estonian translation 2018-02-13 22:20:41 +00:00
Matthias Clasen 7ea53087ca 3.22.27 2018-02-13 16:30:44 -05:00
Mart Raudsepp af2d039717 Update Estonian translation 2018-02-13 20:14:22 +00:00
Matthias Clasen af8b247b45 Merge branch 'gtk-3-22' into 'gtk-3-22'
calendar: Use the new "%OB" format if supported

See merge request GNOME/gtk!2
2018-02-13 13:27:05 +00:00
Rafal Luzynski cbf118c285 calendar: Use the new "%OB" format if supported
Due to the recent changes introduced in glibc 2.27 "%OB" is the
correct format to obtain a month name as used in the calendar
header.  The same rule has been working in BSD family (including
OS X) since 1990s.  This simple hack checks whether "%OB" is supported
at runtime and uses it if it is, falls back to the old "%B" otherwise.

Closes: #9
2018-02-12 22:09:28 +01:00
Benjamin Otte 4b1c02560f x11: Don't call XInput API for core events
Fixes emacs crashing with XMing.

https://bugzilla.redhat.com/show_bug.cgi?id=1483942
2018-02-12 21:11:58 +01:00
Mart Raudsepp 8dc234717e Update Estonian translation 2018-02-12 00:38:59 +00:00
Efstathios Iosifidis 79995748e0 Update Greek translation 2018-02-11 23:38:57 +00:00
Emmanuele Bassi 12913d1a35 docs: Use the appropriate deprecation for properties
The GtkFontButton:font-name property has been deprecated, but it's using
a non-standard annotation in its documentation.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi ade22d00f2 gtk: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi c03ce68c38 Do not use deprecated error trap API
Use the X11-specific API instead.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 4e5ef1a377 toolbar: Use gdk_display_flush()
Instead of the deprecated gdk_flush().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 81c0e7af0e selection: Disable deprecation warnings
We are using a lot of deprecated API, and we know it.

Since the selection code is going to be replaced in GTK 4.0, there's no
real point in keeping the warnings enabled in 3.22.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 3067fb8c24 placessidebar: Move declaration inside conditional block
The `sidebar` variable is only used by the conditional block for
libcloudprovider.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 382d6c1bcb Ignore deprecations for gdk_flush()
When terminating the main loop, we're really trying to flush all
GdkDisplay connections, so it's actually a legitimate internal use
case.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 299a91bd46 docs: Properly deprecate gdk_keymap_get_default()
We're using a compiler annotation, but there's no deprecation notice in
the gtk-doc stanza.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 9c6ae95ece accelgroup: Do not use deprecated API
Use gdk_keymap_get_for_display() with the default display, instead of
the deprecated gdk_keymap_get_default().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 855e4cb88e deprecated: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi c229716796 a11y: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 80e5f28ca0 Remove stray format character
We are not using any string in the debug message.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi 2de14479b2 broadway: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi d219bd4d5a x11: Balance an error trap
We are pushing an error trap, and never popping it from the stack.
2018-02-11 23:28:50 +00:00
Alban Browaeys 255e2dd704 Fix overzalous method annotations for drag and drop
Functional revert of commit 9c4892f291.

Fixes introspection scanner warnings like:

  Warning: Gtk: gtk_drag_finish: Methods must belong to the same
  namespace as the class they belong to

That is, the gtk_drag_* functions cannot be methods as they have a
"GdkDragContext" as the instance parameter, and that is not a valid
type for the Gtk namespace.

This is not an introspected ABI change, as the generated introspection
data ignores the annotation.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692152
2018-02-11 23:28:50 +00:00
Anders Jonsson 10d2e44ae2 Update Swedish translation 2018-02-11 19:17:29 +00:00
Piotr Drąg 25afe278e3 Update Polish translation 2018-02-11 16:25:35 +01:00
Emmanuele Bassi 4f962c6dbf Add AGPL3-only licence to GtkAboutDialog
https://bugzilla.gnome.org/show_bug.cgi?id=792793
2018-02-11 14:22:09 +00:00
Fabio Tomat 6e4c6ce6c3 Update Friulian translation 2018-02-11 09:43:48 +00:00
Fabio Tomat 7130656d37 Update Friulian translation 2018-02-11 08:29:56 +00:00
Fran Dieguez 5c85f2cccc Update Galician translation 2018-02-10 18:43:45 +00:00
Fran Dieguez 0e5964ce27 Update Galician translation 2018-02-10 18:41:38 +00:00
Cheng-Chia Tseng ff43627167 Update Chinese (Taiwan) translation 2018-02-10 07:08:45 +00:00
Cheng-Chia Tseng 6c36eaea98 Update Chinese (Taiwan) translation 2018-02-10 06:54:24 +00:00
Carlos Garnacho cacd8e6254 Merge branch 'wip/carlosg/fix-issue-1' into 'gtk-3-22'
wayland: Improve EOF detection when reading selections

See merge request GNOME/gtk!1
2018-02-09 10:23:31 +00:00
Carlos Garnacho 08f60dbcf6 wayland: Improve EOF detection when reading selections
g_input_stream_read_bytes() roughly provides the same guarantees
than g_input_stream_read() wrt the number of bytes being possibly
read (i.e. it being a best effort, but no real guarantees).

Instead, rely on the 0-len read that we'd get at the end of the
transfer.

Fixes clipboard/DnD transfers possibly being cut short, resulting
on "Broken pipe" errors on the other side.

https://gitlab.gnome.org/GNOME/gtk/issues/1

Closes: #1
2018-02-08 16:29:18 +01:00
Benjamin Otte 63f534f4b3 cssprovider: Only free bytes when they exist 2018-02-05 18:58:54 +01:00
Benjamin Otte 6ff326a82f css: Add a workaround for gtk_widget_override_font()
The problem here is that the CSS machinery expects font sizes to be in
pixels, but gtk_widget_override_font() provides a value in point and the
CSS machinery has no ability to query the DPI and convert.

This patch changes the dconversion DPI we use from a hardcoded 96 to the
default screen's DPI, which should work better than before.
This will of course not listen to changes in the default screen's DPI,
but that shouldn't be a problem.

People who want to workaround this should use gtk_widget_override_font()
with a font that has an absolute size set via
pango_font_description_set_absolute_size (size * PANGO_SCALE *
                                          gdk_screen_get_resolution (screen));

https://bugzilla.gnome.org/show_bug.cgi?id=774248
2018-02-05 18:49:10 +01:00
Jiri Grönroos 8af082f3c7 Update Finnish translation 2018-02-04 09:14:54 +00:00
Jordi Mas 07324131b3 Update Catalan translation 2018-02-03 21:31:58 +01:00
Jordi Mas 67274f7d9d Update Catalan translation 2018-02-03 21:31:08 +01:00
Matthias Clasen 9b69fe7a7e iconview: Fix a problem with the previous change
After commit ffef28a7e8,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.
2018-01-31 18:37:19 +01:00
Jason Gerecke c94993e29b wayland: Add support for BTN_STYLUS3
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
2018-01-30 21:32:24 +01:00
Kalev Lember 60750b3ffd tests: Don't add testswitch twice in Makefile.am 2018-01-27 14:49:34 +01:00
Timm Bäder 136b88534c menu: Guard against NULL toplevel
This can happen, as indicated by GtkMenu explicitly connecting to
::destroy of its toplevel window. Do the same thing in GtkComboBox.
2018-01-26 11:37:31 +01:00
Pieter Schalk Schoeman 4c8f7c4aca Update Afrikaans translation 2018-01-24 11:40:40 +00:00
Pieter Schalk Schoeman 0cbf45a663 Update Afrikaans translation 2018-01-24 11:36:50 +00:00
Daniel Boles b8e2430486 Widget: Don’t call reset() on NULL EventController
GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
_gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
our EventControllerData but does not delete said ECData from our GList.

Subsequently, if that same Widget gets unparent()ed, that method calls
unset_state_flags(), which leads to doing reset_controllers() if we are
insensitive. Now, unlike most most other loops over the GList of ECData,
reset_controllers() does not skip nodes whose pointer-to-Controller is
NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.

This surfaced in a gtkmm program. The Gesture is destroyed before the
Widget. The Widget then gets dispose()d, which calls unparent()… boom.
I didn’t find an MCVE yet but would hope this logic is correct anyway:

The simplest fix is to make the loop in gtk_widget_reset_controllers()
skip GList nodes with a NULL Controller pointer, like most other such
loops, so we avoid passing the NULL to gtk_event_controller_reset().

In other, live cases, _gtk_widget_run_controllers() loops over the GList
and removes/frees nodes having NULL Controllers, so that should suffice.
But this clearly was not getting a chance to happen in the failing case.

https://bugzilla.gnome.org/show_bug.cgi?id=792624
2018-01-22 19:09:50 +00:00
GNOME Translation Robot 814c55d473 Update Esperanto translation 2018-01-22 18:34:48 +00:00
Juan Pablo Ugarte beed1f660e GtkGestureMultiPress: check event state before emiting released signal
Fix bug 771986 "Inconsistent 'row-activated' signal emission before \
drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"
2018-01-22 15:42:54 +01:00
Balázs Úr e6be9a2a4d Update Hungarian translation 2018-01-21 22:53:01 +00:00
Balázs Úr 51220e3a31 Update Hungarian translation 2018-01-21 22:49:00 +00:00
Matthias Clasen 5ab5a5166e iconview: Fix updates with filter models
Filter models rely on views taking a ref on every node
they care about. GtkIconView was not doing that. Amazingly,
this has never shown up in a bug so far, until I spotted
the fallout in gnome-font-viewer.
2018-01-19 16:06:01 +01:00
Matthias Clasen 5b19d6b1b8 Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 16:05:51 +01:00
Matthias Clasen ef72f3cbce font chooser: Fix property notification
We must notify the font and font-desc properties when the
list selection changes, and return NULL values for them
when there is no selection in the list.
2018-01-18 19:58:27 -05:00
Matthias Clasen 5f675181ce font chooser dialog: Improve sensitivity handling
Enable the select button when a font is selected, as it should be.
2018-01-18 19:48:12 -05:00
Matthias Clasen e10f616065 font chooser: Small revision of the UI
Show only the font names in the list, in their own
font, in order to make the list less noisy.
2018-01-18 19:36:56 -05:00
Chris Lamb 6b85162f43 gtk/queryimmodules.c: Make the output deterministic.
Whilst working on the Reproducible Builds effort [0], we noticed that
queryimmodules generates non-reproducible output as it iterates over the
filesystem without sorting.

Patch attached.

 [0] https://reproducible-builds.org/

Signed-off-by: Chris Lamb <lamby@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=786528
2018-01-16 22:39:03 -05:00
Matthias Clasen 53bc2566b3 tree model sort: Fix set_sort_column
We were failing to change the sort order for the
default sort column in some cases. Fix that, and
add a testcase for this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=792459

Add a testcase for the previous fix
2018-01-16 18:19:10 -05:00
Matthias Clasen e1aeb73a62 tree model sort: Fix initial default sort func
gtk_tree_sortable_has_default_sort_func should return
FALSE initially.
2018-01-16 18:19:01 -05:00
Piotr Drąg bb844e44b6 Update Polish translation 2018-01-15 22:16:51 +01:00
Matthias Clasen 9e3b814580 emoji: Skip overly wide fallback rendering
Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.
2018-01-15 08:21:52 -05:00
Daniel Boles bcd3c42b92 GdkMonitor: Fix link to nonexistent Display method
There is no gdk_display_get_monitors(). Instead, we have to use
gdk_display_get_n_monitors() and gdk_display_get_monitor(int).
2018-01-13 20:03:37 +00:00
Daniel Boles b5e4a9d716 HeaderBar: Explain use in conjunction w/ GtkWindow
After hinting how good GtkHeaderBar is for GtkWindow, let’s link to
the latter and indicate how users can make the two work together.
2018-01-12 23:12:19 +00:00
Daniel Boles fe220402cb Window: Mention GtkHeaderBar in set_titlebar() doc
This is the typical thing passed here and what most users want, so we
should mention it here, rather than requiring users to figure it out.
2018-01-12 23:12:19 +00:00
Daniel Boles e75d91e7b1 Window: Clarify resize() doc about titlebar widget
Clarify the reference to HeaderBar, as it applies to any custom title
widget; HeaderBar is only the most common one used. Also, fix a typo.
2018-01-12 23:03:44 +00:00
Ting-Wei Lan b68e55ecce wayland: Use portable sed syntax in gdk/wayland/Makefile.am
Replace non-portable \<, \>, \+ with \(, \), \{, \} to avoid build
failure on systems not using GNU sed.

https://bugzilla.gnome.org/show_bug.cgi?id=792279
2018-01-10 00:45:07 +08:00
Juan Pablo Ugarte 2a8e1745cf GtkCssImageSurface: add cache for the last drawn size.
Keep a copy of the scaled image to speed up rendering multiple times
the image at the same size.
2018-01-09 11:29:10 -03:00
Daniel Boles 8ed4b48b4c Adwaita: Fix typo lenght => length in SASS 2018-01-09 09:49:24 +00:00
Sveinn í Felli d96a7c9e87 Update Icelandic translation 2018-01-08 17:47:11 +00:00
Sveinn í Felli 856486fea8 Update Icelandic translation 2018-01-08 17:39:46 +00:00
Daniel Boles a9499dbe48 ScrolledWindow: add() before remove() in snippet
We can't remove() a child widget that wasn't already add()ed, of course.
2018-01-07 16:47:41 +00:00
Matthias Clasen 081488f8f2 file button: Don't leak rows
The file chooser button manually manages the memory of
data in its model, so it needs to explicitly free the
rows.
2018-01-07 16:38:42 +00:00
Matthias Clasen 7de01b31ef Remove a dead macro
GCs have been dead for a long time.
2018-01-07 16:38:42 +00:00
Timm Bäder d15fbee353 Make a few more code samples compile 2018-01-07 16:38:42 +00:00
Timm Bäder fda98ba562 entry: Remove some questionable code examples 2018-01-07 16:38:41 +00:00
Timm Bäder c006c2fdbc widget: Make all code snippets compile 2018-01-07 16:38:41 +00:00
Timm Bäder 6e197ffac9 liststore: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder e00de3814e searchbar: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder a443b525c3 menuitem: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder 456ca1062b expander: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder e5240de5bc treeviewcolumn: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder a65ae5fb40 notebook: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder af1d5362ab scrolledwindow: Fix code sample compilation 2018-01-07 16:38:41 +00:00
Matthias Clasen 9cf48ec3f8 Drop an unused enum value
We haven't had a GtkWindow::frame-event since the
linux-fb backends demise.
2018-01-07 16:38:41 +00:00
Rico Tzschichholz 6f26d0dc0c filechooser: Add missing array annotations to add_choice() 2018-01-06 09:40:39 +01:00
Rico Tzschichholz 43433f3ccd iconview: Prevent ownership transfer of cell out-param in get_item_at_pos() 2018-01-06 09:40:26 +01:00
Arnaud Bonatti 01c349995c Add test for GtkActionable GtkListBoxRow.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Arnaud Bonatti cb935d947c Make GtkListBoxRow GtkActionable.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Ting-Wei Lan 31f7b55306 configure: Don't declare functions in AC_TRY_COMPILE and AC_LANG_PROGRAM
Both AC_TRY_COMPILE and AC_LANG_PROGRAM put code passed to their second
arguments to the body of the main function. This means that we cannot
and should not declare functions there, or we end up checking whether
the compiler support nested functions instead of whether a compiler or
linker flag is supported.

GCC supports nested functions and tests succeed. Clang doesn't support
nested functions, so tests fail and -fvisibility=hidden won't be used.
This means that functions which are not intended to be used by other
programs, such as gtk_menu_tracker*, gtk_action_observ*,
gtk_menu_muxer_*, become global symbols with default visibility.

GNOME Shell has a private library libgnome-shell-menu.so, which also has
symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* that are
intended to be used by GNOME Shell itself. When GNOME Shell still used
Autotools build system, the executable gnome-shell explicitly linked to
libgnome-shell-menu.so, so the linker loaded libgnome-shell-menu.so
before libgtk-3.so.0 and GNOME Shell used correct symbols from its
private library.

However, after GNOME Shell switched to Meson build system, gnome-shell
executable no longer lists libgnome-shell-menu.so as its dependency.
Even if we adds it to the build file, it won't be listed in DT_NEEDED of
gnome-shell because Meson uses -Wl,--as-needed by default. This causes
the runtime linker to load libgtk-3.so.0 before libgnome-shell-menu.so
and symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* are
bound to libgtk-3.so.0 instead of libgnome-shell-menu.so. GNOME Shell
hangs when opening more than one window because it uses functions from
the wrong library.

This problem is already fixed in OpenBSD ports. The article describing
it can be found on OpenBSD Journal with this link:
https://undeadly.org/cgi?action=article;sid=20170930133438

https://bugzilla.gnome.org/show_bug.cgi?id=791943
2018-01-03 02:19:18 +08:00
Arnaud Rebillout 1e7982212f gtk: remove non-breaking space, probably there by mistake
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:42:18 +00:00
Arnaud Rebillout 9b2e487a7f css docs: fix some formatting inconsistencies along the way
Mostly spaces.

Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:42:09 +00:00
Arnaud Rebillout 4a371de393 css docs: remove useless <para>
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:28 +00:00
Arnaud Rebillout 084db132e9 css docs: swap border-width and border-left shorthands, to keep going clockwise
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:18 +00:00
Arnaud Rebillout 489d0db6d1 css docs: Fix refentry and refname
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:09 +00:00
Arnaud Rebillout 352f678ac1 css docs: Ensure the first column does not break for every table
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:01 +00:00
Arnaud Rebillout ce79fac68d css docs: Get rid of non-breaking hyphens
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:32:50 +00:00
Arnaud Rebillout ceec7e9cb8 css docs: Get rid of non-breaking spaces
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:28:37 +00:00
Arnaud Rebillout 46b38c00ad css docs: Fix some angle brackets for percentage
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:28:31 +00:00
Timm Bäder ad536f333b window: Avoid redundantly getting the GDK window
meta-pick of commit c1573a1fda: the
variable gdk_window is used in a check, but we may as well use it again
to avoid calling _gtk_widget_get_window() again unnecessarily.
2018-01-02 15:26:46 +00:00
Daniel Boles bdb3a4d505 themes: Regenerate CSS to reflect recent commits 2018-01-01 19:52:47 +00:00
Daniel Boles 7dfb99c2ca HighContrast: Avoid expander↔combobox interference
as per commit b4b9aa1e5f
2018-01-01 19:46:58 +00:00
Arnaud Rebillout 53eb42338a css docs: Fix duplicate border‑right‑width
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-01 18:55:13 +00:00
Matthias Clasen b4b9aa1e5f Adwaita: Avoid expander<>combobox interference
Putting a combobox in an expander was causing the combo arrow
to go sideways. Increase the specificity with which we address
the expander arrow to avoid that.
2018-01-01 18:48:08 +00:00
Matej Urbančič 5fef3ff971 Slovenian update ... 2017-12-31 12:28:54 +01:00
Matej Urbančič 308796628a Slovenian update ... 2017-12-31 12:28:23 +01:00
Matthias Clasen bd9ed01839 fontchooser: Add global keynav
Starting to type should focus the search entry and start
a search.
2017-12-27 17:32:16 -05:00
Matthias Clasen 176c1046cb Add some deprecation annotations
These functions have been removed in master, and their
replacements are already available here.
2017-12-25 23:00:30 -05:00
Matthias Clasen 6fa63bd92c font button: Some followup cleanups
Don't refer to the font-name property in docs either, and
don't use deprecated API internally.
2017-12-21 11:42:23 -05:00
Matthias Clasen 87e1615610 font button: Deprecate the font-name property
It has long been redundant with the GtkFontChooser::font
property.
2017-12-21 11:13:08 -05:00
Matthias Clasen ed0600e8c0 tests: Stop using gtk_font_button_get_font_name
We can instead use the GtkFontChooser::font property.
2017-12-21 11:13:08 -05:00
Daniel Boles 0e338d31a4 Range: Fix inverted vert scrolling on vert Ranges…
The change in the previous patch should only be applied when the Range
is oriented horizontally.

https://bugzilla.gnome.org/show_bug.cgi?id=737175
2017-12-19 21:18:41 +00:00
Daniel Boles 4d18a346c1 Range: Fix inverted vert scrolling on horiz Ranges
Users expect, & previous patches have tried to assure, that scrolling up
over a horizontal Range will cause the value to increase & vice-versa.
But the path using directions was still negating the delta & decreasing
the value on scrolling up. This could be seen on Win32 or X without XI2.

So, only negate the delta when scrolling down (or left), not up, so that
scrolling up (or right) will make the value increase for any event type.

https://bugzilla.gnome.org/show_bug.cgi?id=737175#c5
2017-12-19 18:40:51 +00:00
Matthias Clasen 09c94c27e1 font chooser: Stop listening to style-updated
The only time a style-updated indicates we need
to reload fonts is when it is synthesized by GtkSettings
in response to a fontconfig timestamp change, but
we are listening to those already, anyway.
2017-12-19 12:13:32 -05:00
Matthias Clasen 5f022cbc12 Avoid calling unsetenv too late
Stash the DESKTOP_AUTOSTART_ID env var in a constructor,
before any threads have been created.

https://bugzilla.gnome.org/show_bug.cgi?id=790963
2017-12-17 17:33:02 -05:00
Matthias Clasen a41e0ce4a4 wayland: Handle scale 3 for cursors
This is just a bandaid solution to make scale 3 work.
If people seriously want to go for scales larger than
that, we need a better solution.
2017-12-17 17:17:12 -05:00
Matthias Clasen b49502c167 inspector: Allow to bump scale to 3
Might as well allow this, for 'large scale testing'.
2017-12-17 17:17:02 -05:00
Matthias Clasen 0eaa76a032 cups: Warn only once if colord is not available
No need to keep complaining about this.

https://bugzilla.gnome.org/show_bug.cgi?id=791650
2017-12-17 17:11:27 -05:00
Matthias Clasen 32332b3a03 Revert "css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP"
This reverts commit 492469a94a.

People have been reporting missing invalidations with this change.
2017-12-17 11:20:50 -05:00
Matthias Clasen f44af2e6ae Revert "css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()"
This reverts commit 7e253f4bd3.
2017-12-17 11:20:15 -05:00
Matthias Clasen 7d23b33ac5 Don't place dnd cursor in placeholder text
That is just misleading - the entire placeholder text is going
to be replaced by the drop.
2017-12-17 10:54:21 -05:00
Matthias Clasen 11bfce3f36 listbox: Fix a crash during keynav
The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=791549
2017-12-15 18:46:21 -05:00
Matthias Clasen e834a2b089 x11: Avoid crash in fallback move emulation
Quietly do nothing when there is already an ongoing operation.
This matches the behavior of the ewmh code, and is much nicer
than a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=789054
2017-12-15 16:17:27 -05:00
Juan Pablo Ugarte 7e253f4bd3 css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()
https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-14 16:40:40 -05:00
Chun-wei Fan c9a54ba1c2 gdk/win32/gdkselection-win32.c: Fix build without G_ENABLE_DEBUG
_gdk_win32_data_to_string() is only available when G_ENABLE_DEBUG is
defined, so as in gdkproperty-win32.c, use GDK_NOTE on the parts where
we assemble and output the debug messages.
2017-12-15 01:11:17 +08:00
Stas Solovey 4e0adbc8dc Update Russian translation 2017-12-14 10:05:27 +00:00
Stas Solovey d69f998c26 Update Russian translation 2017-12-14 09:58:07 +00:00
Matthias Clasen 05e4e7fe87 placesview: Make middle click work
This does not cost us much, and improves consistency.
2017-12-12 13:57:06 -05:00
Matthias Clasen c4ff07025b link button: Set a drag icon
It is a bit odd to drag nothing around, so set an icon.
2017-12-10 13:58:27 -05:00
Colomban Wendling 75768a4d00 Fix updating the widget accessible description when using its tooltip
We need to notify ATK the description changed when the tooltip text associated
with the widget changes and gtk_widget_accessible_get_description() would use
it as the description.

https://bugzilla.gnome.org/show_bug.cgi?id=779009
2017-12-09 21:28:47 -05:00
Timm Bäder 492469a94a css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP
It was used to mark css properties that affect widgets with text, but it
caused unnecessary invalidations. E.g. 'color' was marked as
AFFECTS_TEXT but changing just the color of a label should not
automatically queue a resize, which is what the code in
gtk_widget_real_style_updated does.

Replace this flag with GTK_CSS_AFFECTS_TEXT_SIZE and
GTK_CSS_AFFECTS_TEXT_CLIP, which GtkWidget can use only if the widget
actually has text.

https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-09 20:16:02 -05:00
Marco Trevisan (Treviño) ecc9946566 cssshadowvalue: don't apply the y_scale offset twice to the shadow
As per commit 942e904 this changed causing a regression that
seems to be visible only when scale > 2.

https://bugzilla.gnome.org/show_bug.cgi?id=791363
2017-12-09 20:13:20 -05:00
Jonas Ådahl 25dc32c1a1 wayland: Destroy the xdg_imported after the wl_surface
This way the window manager can handle destruction while having the
transient-for relationship still valid.

https://bugzilla.gnome.org/show_bug.cgi?id=791062
2017-12-07 22:13:40 -05:00
Jonas Ådahl dee5142c91 wayland: Maybe postpone xdg-foreign state setup until mapping
In order to map a window with the correct initial parent-child
relationship when a modal dialog is set up to be a child of an imported
foreign window, the relationship must be set up before the window is
mapped.

In order to do this, if a window is not yet mapped, postpone the
relationship setup until when the window is eventually mapped.

https://bugzilla.gnome.org/show_bug.cgi?id=791062
2017-12-07 22:13:39 -05:00
Colin Leroy 279b81d202 placesview: Present FUSE-reachable network shares in Other Locations
The documentation about gtk_file_chooser_set_local_only() states
that "non-native files may still be available using the native
filesystem via a userspace filesystem (FUSE)."
The code that made this possible in GTK+2 was missing from GTK+3 and
that represented a regression for Linux users in numerous applications
(Firefox, Thunderbird, Chromium, ...)

https://bugzilla.gnome.org/show_bug.cgi?id=787128
2017-12-07 21:41:44 -05:00
Christian Hergert 86dd1e37a7 autocleanups: allow g_autoptr() usage with GtkTreePath
As the summary says, this allows using g_autoptr(GtkTreePath). This is
useful for API that uses out parameters for GtkTreePath that need to be
freed.

https://bugzilla.gnome.org/show_bug.cgi?id=791234
2017-12-04 19:34:05 -08:00
Руслан Ижбулатов 6d0b0cb99b GDK W32: Plug a resource leak
Ensure that surfaces allocated in the impl are destroyed in finalize()

https://bugzilla.gnome.org/show_bug.cgi?id=787089
2017-12-03 03:14:28 +00:00
Piotr Drąg 4c2f3e3105 Update Polish translation 2017-12-02 18:40:28 +01:00
Carlos Garnacho 3c40b217b9 gdk: Always emit motion after enter
After a pointer emulating GDK_TOUCH_END event triggering a fake leave
notify with GDK_CROSSING_TOUCH_END mode, pointer_under_window will be
unset, which will make the next motion/touch_update event to trigger
an enter notify event again.

Up till there, that's fine, however the motion event is just consumed
in favor of the just synthesized enter notify event. This is unexpected
to clients like spice-gtk that will only update coordinates from motion
events, sending both enter and motion is more consistent with X11 and
will make them happy.

https://bugzilla.gnome.org/show_bug.cgi?id=791039
2017-11-30 19:26:48 +01:00
Carlos Garnacho e7e047fc3f gdk/wayland: Restrict shortcut inhibition to keyboard grabs on toplevels
It is unlikely that popup windows will contain anything that requires this
(popup menus being more interested in redirecting keyboard focus to
themselves). OTOH popup implementations that just grab the keyboard are
commonplace enough, it makes sense not to trigger inhibition for these.

https://bugzilla.gnome.org/show_bug.cgi?id=789268
2017-11-30 18:54:47 +01:00
Руслан Ижбулатов 8df7f88b66 GDK W32: Remove an unnecessary type check
No idea why it's here, the hash table can store any kind of data,
there's no reason why it wouldn't be able to store an old X string type.
Might be a holdout from the old days, when strings were handled in
a special way (stored directly in the clipboard?).

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:28 +00:00
Руслан Ижбулатов c329940cf1 GDK W32: Make sure drag source window is not NULL
This prevents GTK from throwing a bunch of warnings when it tries
to get drag source window -> screen of that window -> ipc widget for that screen,
and then tries to attach a signal handler to that widget.

Specifically, this happens when we get a DnD move from another
application.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:28 +00:00
Руслан Ижбулатов 3fd23fcfd1 GDK W32: Special handling for DELETE requests
1) Ensure that any DELETE requests from the target are sent to GDK, even if
   both the source and the target are in the same process and it
   is therefore possible to use a shortcut and call the handler directly
   in GTK layer
2) Ensure that target GDK doesn't do anything when GTK asks it to send
   a DELETE request, just report back immediately (the code up the stack
   does not check for successfullness when request is DELETE, so not giving
   it any data is OK).

The source code already synthesizes a DELETE request, so that side is
also taken care of.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:27 +00:00
Руслан Ижбулатов 56074fbf3c GDK W32: Preserve the target value for change_property()
We need to know the target atom value to know when we need to
do something with side-effects (since side-effects are expressed via
special target values). Previously, the code side-stepped that by looking
at the data type (which was rather unique for the one side-effect
target that we supported, signalled by the TARGETS target),
but for the DELETE target that seems to be no longer an option, hence the new
field to carry this information past the convert_selection() routine.

This prevents GDK from throwing a warning when trying to convert
a DELETE target, which has no format or data objects set.

The side-effects for the DELETE target happen earlier, in GTK layer.
By the point it gets to change_property(), it's a no-op.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:26 +00:00
Kukuh Syafaat 6ab1ab9f46 Update Indonesian translation 2017-11-29 12:05:29 +00:00
Kukuh Syafaat 706c80be51 Update Indonesian translation 2017-11-29 12:04:08 +00:00
Christophe Fergeau 7d18f2fd3c wayland: Fix indentation of previous commit 2017-11-29 12:15:48 +01:00
Christophe Fergeau 8af29e3756 wayland: emit GDK_SELECTION_CLEAR on owner changes
The wayland backend currently never emits GDK_SELECTION_CLEAR events.
GtkClipboard uses this signal in order to clear the clipboard owner when
the selection is set to something outside the application.
This commit ensures the wayland backend emits GDK_SELECTION_CLEAR before
setting the clipboard owner to NULL, as this means we lost the
selection.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:21:32 +01:00
Christophe Fergeau beb2caacb9 wayland: Remove unused data structure
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:21:32 +01:00
Matthias Clasen 91ef88f77f Improve the docs
Document that gtk_application_is_inhibited can't
be guaranteed to work.
2017-11-28 22:56:11 -05:00
Милош Поповић 9ce824d360 Update Serbian translation 2017-11-27 10:29:15 +00:00
Милош Поповић 8397f22762 Update Serbian translation 2017-11-27 10:02:46 +00:00
Alex Ivanov 2b6f3f7867 wayland: Don't provide gsetting if dconf is not available
This makes gtk+ fall back to reading ~/.config/gtk-3.0/settings.ini
on systems with Wayland, but without dconf (do those exist?).

https://bugzilla.gnome.org/show_bug.cgi?id=790201
2017-11-26 19:32:52 -05:00
Jan Alexander Steffens (heftig) b0fb67eabc entry: Undo ABI breakage from addition of insert_emoji
https://bugzilla.gnome.org/show_bug.cgi?id=790862
2017-11-26 18:24:51 -05:00
Muhammet Kara 03f2eaf23a Update Turkish translation 2017-11-26 18:59:26 +00:00
Yosef Or Boczko f95cecba2d Updated Hebrew translation 2017-11-26 18:31:59 +02:00
Yosef Or Boczko f3328330b6 Updated Hebrew translation 2017-11-26 18:28:07 +02:00
Aurimas Černius 3a1a7135a2 Updated Lithuanian translation 2017-11-25 21:33:28 +02:00
Руслан Ижбулатов c6c13bd66b Fix a nefarious typo 2017-11-25 17:04:48 +00:00
Руслан Ижбулатов 934ac3f6ef GDK W32: Ensure that selection request is processed
To do that, run the message loop for one second or until the side-effect
of running the selection request handler is achieved (as opposed to
running it until the event is no longer queued).

The disavantage of this method is that if the event handling is
somehow missed (due to a variety of reasons - after all, it's not
a straight path from an event being queued to property_change()
being called), this will loop for one second. Since we do process
events during that time, this will not hang the application, but
might still restrict some of the functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:43 +00:00
Руслан Ижбулатов 7b6efc29cc GDK W32: Refuse to release mouse grab while in DnD mode
Handle WM_CANCELMODE and do nothing in response to it when DnD is
active. Otherwise pass it to DefWindowProc, which will call ReleaseCapture()
on our behalf.
This prevents us from losing mouse capture when alt-tabbing during DnD
(this includes the feature of Windows Explorer where dragging stuff over
a window button in the taskbar causes that window to receive focus, i.e.
keyboardless alt-tabbing).

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:42 +00:00
Руслан Ижбулатов 0ee453a45b GDK W32: Update layered windows on opacity changes
Without this patch layered windows are only updated when they are moved
by the user or then their contents changes. This patch adds opacity
changes to the list of things that make GDK update a window. Without this
windows that don't redraw and are not moved by the used (DnD drag indicator
windows, for example) don't change their opacity.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:41 +00:00
Руслан Ижбулатов 8caba9536c W32: Massive W32 DnD fix
Massive changes to OLE2 DnD protocol, which was completely broken before:
* Keep GdkDragContext and OLE2 objects separate (don't ref/unref them
  together, don't necessarily create them together).
* Keep IDataObject formats in the object itself, not in a global variable.
* Fix getdata() to look up the request target in its format list, not in the
  global hash table
* Create target GdkDragContext on each drag_enter, destroy it on drag_leave,
  whereas IDropTarget is created when a window becomes a drag destination
  and is re-used indefinitely.
* Query the source IDataObject for its supported types, cache them in the
  target (!) context. This is how GTK+ works, honestly.
* Remember current_src_object when we initiate a drag, to be able
  to detect later on that the data object is ours and use a
  shortcut when querying targets
* Make sure GDK_DRAG_MOTION is only sent when something changes
* Support GTK drag cursors
* Ensure that exotic GTK clipboard formats are registered
  (but try to avoid registering formats that can't be used between applications).
* Don't enumerate internal formats
* Ensure that DnD indicator window can't accept drags or receive any kind of input
  (use WS_EX_TRANSPARENT).
* Remove unneeded indentation in _gdk_win32_dnd_do_dragdrop()
* Fix indentation in gdk_win32_drag_context_drop_finish()
* Remove obsolete comments in _gdk_win32_window_register_dnd()
* Check for DnD in progress when processing WM_KILLFOCUS, don't emit a grab
  break event in such cases (this allows alt-tabbing while DnD is in progress,
  though there may be lingering issues with focus after dropping...)
* Support Shell ID List -> text/uri-list conversion, now it's possible
  to drop files (dragged from Explorer) on GTK+ applications
* Explicitly use RegisterClipboardFormatA() when we know that the string
  is not in unicode. Otherwise explicitly use RegisterClipboardFormatW()
  with a UTF8->UTF16 converted string
* Fix _gdk_win32_display_get_selection_owner() to correctly bail
  when selection owner HWND is NULL (looking up GdkWindow for NULL
  HWND always succeeds and returns the root window - not the intended
  effect)
* More logging
* Send DROP_FINISHED event after DnD loop ends
* Send STATUS event on feedback
* Move GetKeyboardState() and related code into _gdk_win32_window_drag_begin(),
  so that it's closer to the point where last_pt and start_pt are set
* Use & 0x80 to check for the key being pressed. Windows will set low-order bit
  to 1 for all mouse buttons to indicate that they are toggled, so simply
  checking for the value not being 0 is not enough anymore.
  This is probably a new thing in modern W32 that didn't exist before
  (OLE2 DnD code is old).
* Fixed (hopefully) and simplified HiDPI parts of the code.

Also adds managed DnD implementation for W32 GDK backend (for both
OLE2 and LOCAL protocols). Mostly a copy of the X11 backend code, but
there are some minor differences:
* doesn't use drag_window field in GdkDragContext,
  uses the one in GdkWin32DragContext exclusively
* subtracts hotspot offset from the window coordinates when showing
  the dragback animation
* tries to consistently support scaling and caches the scale
  in the context
* Some keynav code is removed (places where grabbing/ungrabbing should
  happen is marked with TODOs), and the rest is probably inert.

Also significantly changes the way selection (and clipboard) is handled
(as MSDN rightly notes, the handling for DnD and Clipboard
 formats is virtually the same, so it makes sense to handle
 both with the same code):
* Don't spam GDK_OWNER_CHANGE, send them only when owner
  actually changes
* Open clipboard when our process becomes the clipboard owner
  (we are doing it anyway, to empty the clipboard and *become* the owner),
  and then don't close it until a scheduled selection request event
  (with TARGETS target) is received. Process that event by announcing
  all of our supported formats (by that time add_targets() should have
  been called up the stack, thus the formats are known; just in case,
  add_targets() will also schedule a selection request, if one isn't
  scheduled already, so that late-coming formats can still be announced).
* Allow clipboard opening for selection_convert() to be delayed if it
  fails initially.
* The last two points above should fix all the bugs about GTK+ rising
  too much ruckus over OpenClipboard() failures, as owner change
  *is allowed* to fail (though not all callers currently handle
  that case), and selection_convert() is asynchronous to begin with.
  Still, this is somewhat risky, as there's a possibility that the
  code will work in unexpected ways and the clipboard will remain open.
  There's now logging to track the clipboard being opened and closed,
  and a number of failsafes that try to ensure that it isn't kept open
  for no reason.
* Added copious notes on the way clipboard works on X11, Windows and GDK-W32,
  also removed old comments in DnD implementation, replaced some of them
  with the new ones
* A lot of crufty module-global variables are stuffed into a singleton
  object, GdkWin32Selection. It's technically possible to make it a
  sub-object of the Display object (the way Wayland backend does),
  but since Display object on W32 is a singleton anyway... why bother?
* Fixed the send_change_events() a bit (was slightly broken in one of the
  previous iterations)
* Ensure that there's no confusion between selection conversion (an artifact
  term from X11) and selection transmutation (changing the data to be W32-compatible)
* Put all the transmutation code and format-target-matching code into gdkselection-win32.c,
  now this code isn't spread across multiple files.
* Consequently, moved some code away from gdkproperty-win32.c and gdkdnd-win32.c
* Extensive format transmutation checks for OLE2 DnD and clipboard.
  We now keep track of which format mappings are for transmutations,
  and which aren't (for example, when formats are passed as-is, or when
  a registered name is just an alias)
* Put transmutation code into separate functions

* Ensure that drop target keeps a format->target map for supported formats,
  this is useful when selection_convert() is called, as it only receives a
  single target and no hints on the format from which the data should
  be transmuted into this target.
* Add clear_targets() on W32, to de called by GTK
* Use g_set_object() instead of g_ref_object() where it is allowed.
* Fix indentation (and convert tabs to spaces), remove unused variables

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:40 +00:00
Руслан Ижбулатов 41026987be GDK W32: Don't leak the atom name string
https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:39 +00:00
Руслан Ижбулатов 022cf4252f GDK W32: Fix a typo in OLE2 DnD code
https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:38 +00:00
Руслан Ижбулатов 2cc7a9c034 Only register application/x-rootwindow-drop on X11
application/x-rootwindow-drop is not useful anywhere else,
so put it under #ifdef GDK_WINDOWING_X11

On W32 this prevents toplevels from automatically becoming valid
drop targets with a useless drop type.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:37 +00:00
Руслан Ижбулатов 87103b9a14 GDK W32: More flexible modal operation mode
Instead of using a boolean to indicate a modal operation being in progress,
use a set of flags, and allow these to be set and unset independently.

Specifically, this allows WM_CAPTURECHANGED handler to only act when a drag-move or
drag-resize modal operation is in progress, and ignore DND (which can also cause
WM_CAPTURECHANGED to be posted). This avoids a crash due to assertion failure when
OLE2 DND code tries to end a modal operation that was already ended by the WM_CAPTURECHANGED
handler.

https://bugzilla.gnome.org/show_bug.cgi?id=786121
2017-11-25 15:44:36 +00:00
Daniel Boles 87673af98c Be more specific in ::insert-emoji Since tag
I had been unsure whether to include the minor version, but
:show-emoji-icon already did, so do the same here to match.
2017-11-23 17:17:47 +00:00
Руслан Ижбулатов 30ddb3e1a4 GDK W32: fix monitor pruning code
Decrement the counter for each removed element, otherwise we skip
one element every time we remove one. Also, no need for continue here.
2017-11-23 07:15:28 +00:00
Daniel Boles 2c9072314a Add Since to ::insert-emoji, and some trivialities
Document when these keybinding signals were added.
2017-11-22 22:35:25 +00:00
Matthias Clasen f922aee5e2 text view: Support the Emoji chooser
Similar to GtkEntry, add an "Insert Emoji" context
menu item, and add the same keybindings. We don't
add the icon here, since it is not clear where it
would go.

https://bugzilla.gnome.org/show_bug.cgi?id=790029
2017-11-22 22:20:34 +00:00
Matthias Clasen bd56e0d918 Fix indentation mishap 2017-11-22 22:20:28 +00:00
Daniel Boles 42c3b91fa7 SpinButton: Explain meaning of nullable Adjustment
configure() marked the @adj argument as (allow-none) but did not explain
what passing NULL would do. Fix that, and move it to (nullable) as well.
2017-11-22 20:58:00 +00:00
Daniel Boles c490ac4ed8 doc: Replace uses of #NULL with %NULL 2017-11-22 20:58:00 +00:00
Daniel Boles f1b812731d CellRendererPixbuf: Improve property docs
Add Since annotations for the stock-* properties.
Add a doc comment for :stock-size in order to link to GtkIconSize.
Document :stock-detail as deprecated. It does nothing & is gone in GTK+4
2017-11-22 20:48:02 +00:00
Daniel Boles 260a6aaa71 doc: TextLayout: Add missing (out) annotations
and move from (allow-none) to (optional)
2017-11-22 20:48:02 +00:00
Matthias Clasen 55e8736613 emoji chooser: break out a helper function
This is just a small cleanup.
2017-11-22 19:11:31 +00:00
Matthias Clasen d3eacaf840 entry: Add a key binding for the emoji chooser
Make Ctrl-. and Ctrl-; bring up the emoji chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=789160
2017-11-22 19:11:31 +00:00
Matthias Clasen 6b126a70e2 emoji chooser: Make menu key work as expected
Whenever we have a right-click action, we should make
the menu key work as a keyboard-accessible alternative.
2017-11-22 19:11:31 +00:00
Matthias Clasen f301b7874e emoji chooser: handle right-click
Whereever we handle long-press for touch, it makes sense to handle
right-click as a faster alternative for mouse-based interaction.

This commit makes right-click work to bring up the variation
selector for Emojis.
2017-11-22 19:11:31 +00:00
Matthias Clasen 19670f9fe6 Trivial cleanup
Better to use G_SOURCE_REMOVE than FALSE, for clarity.
2017-11-22 19:11:31 +00:00
Matthias Clasen 65457e6d12 emoji chooser: Don't leak gestures
We were not freeing these gestures as we should.
2017-11-22 19:11:31 +00:00
Benjamin Otte f8cb3fc3a8 emojichooser: animate the adjustment
... instead of doing a dance with the scrolled window to get it to scroll
the adjustment.
2017-11-22 19:11:31 +00:00
Bastien Nocera 38e68815c6 frame-clock: Fix typo in API documentation 2017-11-22 15:25:55 +01:00
Daniel Mustieles 4de0e4b1ed Update Spanish translation 2017-11-20 08:39:00 +00:00
Daniel Mustieles 29d2a45641 Update Spanish translation 2017-11-20 08:38:35 +00:00
Muhammet Kara 29a590014d Update Turkish translation 2017-11-19 20:13:03 +00:00
Milo Casagrande 6675451cea Update Italian translation 2017-11-17 13:33:01 +00:00
Milo Casagrande 47435d0e6b Update Italian translation 2017-11-17 10:51:13 +00:00
Milo Casagrande 2157b69f1f Update Italian translation 2017-11-17 10:49:34 +00:00
Matthias Clasen 4ffdf917bb icontheme: Add a trailing / when enumerating resources
This avoids extra string copies in GResource.
2017-11-16 08:44:36 -05:00
Matthias Clasen e3f84e9bf4 application: Append a / to the icon resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-16 08:24:55 -05:00
Matthias Clasen 20c2d6c992 icontheme: Append a / to the resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-16 08:24:41 -05:00
Benjamin Otte 4c44ffda17 gdk: Fix GDK_ALL_EVENTS_MASK
This mask was forgotten to update when the last 2 event masks were
added, probably because it looks like it's already maxed.
2017-11-13 23:42:51 +01:00
Carlos Soriano 7e49a02acf gtkplacessidebar: Fix new tab/window handling for cloud accounts
It wasn't taking into account whether the sidebar had support for them
or not, resulting in a file chooser with open in new tab/window menu
items when it's not supported.

To fix it, do as with the other menus and check for the availability of
new tab/window flags.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 15:38:26 +01:00
Carlos Soriano e672c02441 gtkplacessidebar: Adapt to libcloudproviders 0.2.0
And a few improvements on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 15:38:26 +01:00
Christian Hergert b654130bd7 css: avoid copying resource data
To avoid copying data from gresources to the heap, we can use
the newly added gtk_file_load_bytes(). That function will check
for resource:// URIs and access their internal data directly.

Other URI schemes will read the contents into memory and return
a GBytes as normal.

https://bugzilla.gnome.org/show_bug.cgi?id=790270
2017-11-12 20:04:06 -08:00
Christian Hergert d46c072c4d utils: add gtk_file_load_bytes() helper
This helper will load GBytes for a GFile, but try to reuse the
embedded data for a gresource to reduce the chances of copying
data to the heap.

https://bugzilla.gnome.org/show_bug.cgi?id=790270
2017-11-12 20:04:06 -08:00
Benjamin Otte 15acb4c340 a11y: Handle a treeview with no columns
Code was spewing criticals to stderr because of nonexisting columns. So
check that there's actually an existing column first.
2017-11-13 03:55:03 +01:00
Benjamin Otte efaa6524ac progresstracker: Don't hand out NaN
When the duration is set to 0, clamp it to 1us. This way we're almost
correct: We should really instantly finish, but we don't. But we do
respect the delay.

Doing this properly would require some refactoring of how the progress
tracker actually maintains progress, and this is just a quick fix.
2017-11-12 06:30:57 +01:00
Fabio Tomat b2877605cf Update Friulian translation 2017-11-10 15:48:06 +00:00
Kjartan Maraas a4e1d01649 Updated Norwegian bokmål translation. 2017-11-09 20:09:40 +01:00
Daniel Boles e09c103187 Window: Document get_icon() return as nullable 2017-11-09 09:44:49 +00:00
Daniel Boles 5835cb2bc2 CssProvider: Use consistent theme name placeholder
commit 475d916eb9 added various paths that
use theme-name for this, but the existing path already used THEME, with
a subsequent description referring to the latter. So use that everywhere
2017-11-08 09:23:11 +00:00
Matthias Clasen 77a4e2ec37 3.22.26 2017-11-07 14:52:24 -05:00
Dušan Kazik 4ac7db34f7 Update Slovak translation 2017-11-07 18:24:11 +00:00
Dušan Kazik 8e84eff355 Update Slovak translation 2017-11-07 18:21:41 +00:00
Marek Cernocky d42559bf2f Updated Czech translation 2017-11-06 21:03:47 +01:00
Rafael Fontenelle 4bc58f03b6 Update Brazilian Portuguese translation 2017-11-06 18:19:31 +00:00
Rafael Fontenelle 0ba60b7703 Update Brazilian Portuguese translation 2017-11-06 17:53:03 +00:00
Hannie Dumoleyn 5a86b78493 Update Dutch translation 2017-11-06 16:20:55 +00:00
Hannie Dumoleyn 01b29a16ff Update Dutch translation 2017-11-06 16:17:20 +00:00
Mario Blättermann ab4cc2540b Update German translation 2017-11-06 08:35:14 +00:00
Mario Blättermann 4c5279c956 Update German translation 2017-11-06 08:32:35 +00:00
Kjartan Maraas a12ae1411a Updated Norwegian bokmål translation. 2017-11-06 09:09:53 +01:00
Anders Jonsson e57891fd6b Update Swedish translation 2017-11-05 21:23:19 +00:00
Anders Jonsson bb1e8e47f5 Update Swedish translation 2017-11-05 21:19:06 +00:00
Piotr Drąg 14cda4839a Update Polish translation 2017-11-05 21:47:10 +01:00
Piotr Drąg f7f4ecf006 placessidebar: correct quotation marks in a new string 2017-11-05 21:16:59 +01:00
Alexandru Pandelea 7f6365cf9f placessidebar: add starred location item
Add an item for showing all files marked as favorite. This item will
open all files that have the nao:predefined-tag-favorite tag

https://bugzilla.gnome.org/show_bug.cgi?id=785176
2017-11-05 20:17:22 +01:00
Chun-wei Fan d38a148f0e gdk/win32: Fix Win32 GL Context switching
Since on Windows we need to use a good amount of temporary GL contexts,
we need to switch back to the original GL contexts we were using when
we are done with the temporary GL contexts, otherwise multi-GL windows
will cause confusions causing display artifacts and crashes.

Also, use the GdkWin32GLContext::gl_hdc consistently throughout
the code and remove the GdkWin32Display::gl_hdc as Lukas K pointed out
that GdkWin32Display::gl_hdc becomes out-of-date and so the HDC that the
GL context is bound to becomes incorrect in sceanarios using multiple
windows with GtkGLArea/GdkGLArea items (which would cause the artifacts in
programs that use multiple windows with GtkGLArea/GdkGLArea items, and it
turns out that GdkWin32Display::gl_hdc is actually not necessary to help
keep track of the HDCs we use for our GL contexts.

Partly based on patch from Lukas K <lu@0x83.eu>

https://bugzilla.gnome.org/show_bug.cgi?id=789213
2017-11-04 10:39:58 +08:00
Khaled Hosny 46459f66f9 Update Arabic translation 2017-11-03 11:46:43 +02:00
Daniel Boles 40302a5268 Adwaita: Fix Entry:has-frame if backdrop/disabled
by explicitly including these in the selector removing the border, to
avoid other rules on these pseudoclasses overriding the .flat class.

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:35 +00:00
Daniel Boles a03a3c3af9 HighContrast: Fix GtkEntry:has-frame not working
• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
• Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:34 +00:00
Daniel Boles 55210ae464 Inspector: better default split of CSS nodes/props
Move the default pos of the Paned handle to 400px from the left, i.e.
50% of the default width of the window. The previous position at 300px
from left meant the node treeview was too narrow & could easily result
in the (useful) State column not being visible in the case of many
apps. The properties pane doesn't need to be as big as it was anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=788898
2017-11-01 19:57:34 +00:00
Julian Sparber f3408d89d5 AboutDialog: Fix accepting GTK_LICENSE_AGPL_3_0
Add the new GTK_LICENSE_AGPL_3_0 to the allowed enum range checked in
gtk_about_dialog_set_license_type(), so this value is not rejected.

https://bugzilla.gnome.org/show_bug.cgi?id=789678
2017-10-31 18:57:02 +00:00
Julian Sparber a0327e521e icon-browser: Centre Copy button in dialog again
This patch moves the "Copy to Clipboard" button into the same container
as the description label, to centre the button regardless of the number
of icons shown in the grid.

https://bugzilla.gnome.org/show_bug.cgi?id=789134
2017-10-31 18:33:18 +00:00
Daniel Boles 58c0418418 gdkmonitor: Fix typo 2017-10-31 18:27:34 +00:00
Daniel Boles 2b509a34d4 SpinButton: Fix typo 2017-10-31 18:26:50 +00:00
Lukas K 5b8a3bac70 make GDK_DEBUG=opengl work on win32 2017-10-30 14:40:23 +08:00
Chun-wei Fan c255ba68fc input/IME: Defer the emit of the "commit" signal
On Windows, when IME is used, each keystroke results in the
WM_IME_COMPOSITION event being sent first.  This means that in our case
when one decides on to accept the input that is in the preedit buffer,
we first get from Windows the WM_IME_COMPOSITION event
(where we emit the commit signal), followed by the WM_IME_ENDCOMPOSITION
event (where we emit the pair of preedit-changed and preedit-end
signals).

Since commit f11f989 (GtkEntry: Remove recompute idle), we do the input
recomputation directly, this will cause a pair of "Pango-WARNING:
Assertion failed: (index >= 0 && index <= layout->length)" being shown,
as gtkentry.c's priv->preedit_length and priv->preedit_cursor was unable
to be reset to 0 in time as a result of the recomputation triggered by
the commit being done before the reset of priv->preedit_length and
priv->preedit_cursor (which are no longer valid as we essentially say
that we are done with the preedit buffer).

As we could only acquire the final string that was entered in this
preedit session when we handle the WM_IME_COMPOSITION event, fix this by
saving up the final string we acquire from Windows IME in UTF-8 when we
handle the WM_IME_COMPOSITION event from Windows, and emit the commit
signal with that string after we emit the preedit-changed and
preedit-end signals when we handle the WM_IME_ENDCOMPOSITION event from
Windows, which comes afterwards.

Also fix the formatting of the code around the parts of the files that
was changed.

https://bugzilla.gnome.org/show_bug.cgi?id=787142
2017-10-30 14:33:23 +08:00
Simon McVittie 72a45366e2 wayland: Distribute protocol/server-decoration.xml in tarballs
Otherwise, builds that include the Wayland backend fail.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=789630
Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>
2017-10-30 02:16:21 +00:00
347 changed files with 82589 additions and 52906 deletions
+18
View File
@@ -0,0 +1,18 @@
image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1
stages:
- build
before_script:
- mkdir -p _ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/_ccache
cache:
paths:
- _ccache/
build:
stage: build
script:
- bash -x ./.gitlab-ci/test-docker.sh
+60
View File
@@ -0,0 +1,60 @@
FROM fedora:28
RUN dnf -y install \
adwaita-icon-theme \
atk-devel \
at-spi2-atk-devel \
avahi-gobject-devel \
cairo-devel \
cairo-gobject-devel \
ccache \
colord-devel \
cups-devel \
fribidi-devel \
gcc \
gcc-c++ \
gdk-pixbuf2-devel \
gdk-pixbuf2-modules \
gettext \
gettext-devel \
git \
glib2-devel \
gobject-introspection-devel \
graphene-devel \
gtk-doc \
hicolor-icon-theme \
itstool \
json-glib-devel \
libepoxy-devel \
libmount-devel \
librsvg2 \
libXcomposite-devel \
libXcursor-devel \
libXcursor-devel \
libXdamage-devel \
libXfixes-devel \
libXi-devel \
libXinerama-devel \
libxkbcommon-devel \
libXrandr-devel \
libXrender-devel \
make \
mesa-libEGL-devel \
mesa-libwayland-egl-devel \
meson \
pango-devel \
redhat-rpm-config \
vulkan-devel \
wayland-devel \
wayland-protocols-devel \
xorg-x11-server-Xvfb
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
USER user
WORKDIR /home/user
ENV LANG C.utf8
ENV PATH="/usr/lib64/ccache:${PATH}"
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
#
# This script builds an image from the Dockerfile, starts a container with
# the parent directory mounted as working directory and start a bash session
# there so you can test things.
# Once you are happy you can push it to the docker hub:
# sudo docker push "${TAG}"
set -e
TAG="registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1"
# HOST_USER_ID gets used to create a user with the same ID so that files
# created in the mounted volume have the same owner
sudo docker build \
--build-arg HOST_USER_ID="$UID" --tag "${TAG}" --file "Dockerfile" .
sudo docker run --security-opt label=disable \
--rm --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
./autogen.sh
make -j8
+247
View File
@@ -1,3 +1,250 @@
Overview of Changes in GTK+ 3.23.0
==================================
* Dependency bumps:
- Require libepoxy 1.4
- Require pango 1.41
* New font chooser features:
- Allow setting OpenType font features
- Show examples for OpenType font features
- Allow selecting OpenType font variations
- Support levels of details for selection
* New Emoji features:
- Support a completion popup for Emoji
- Drop Ctrl-Shift-e shortcut
* Bugs fixed:
#85 widgetDragDestFindTarget introspection data does not show nullable...
#154 Documentation: Lifecycle of Editables inside GtkCellRenderers is no...
#193 Document that GtkUIManager is deprecated by GtkBuilder
#199 MenuButton not notified when its Popover is destroyed, still access...
#292 GtkRanges should send ::change-value even if not realized
#450 Menu navigation triangle doesn't work anymore
#792 Focus events are not always matched
#898 emoji-chooser: search for flags doesn't work
#1053 Scroll cursor gets left behind if a child widget steals the scroll
#1059 -Wparentheses warnings in GTK+ headers when compiling C++ code with...
#1065 GtkScrollbar horizontal mouse wheel scroll direction is wrong
#1069 Thread 1 "glade" received signal SIGFPE, Arithmetic exception.
#1115 gtk icon theme searches system dirs before user dirs
407242 GtkScale: Up/Down keys decrease/increase value, which is opposite...
686109 gtk_print_context_get_hard_margins should return page size specif...
765327 GtkPlug scaled to half the expected size on HiDPI screens
772817 File Chooser: Path arrow button frames are reversed and detached ...
775279 early calls to libepoxy cause all gtk3 programs to abort when the...
786524 ocument GTK_OVERLAY_SCROLLING environment variable
787867 OSX macports pango text size appears to vary between version 1.40...
789215 GtkScrolledWindow and GtkIconView atk objects can cause a segfaul...
791542 GDK 3 Selections documentation makes references to X
791802 Fix direction value moves on scroll/keypress over RTL/inverted ra...
* Translation updates:
Catalan
Finnish
Polish
Russian
Spanish
Overview of Changes in GTK+ 3.22.30
===================================
* gtk-demo has a new 'Widgetbowl' demo
* The wayland backend now supports the stable xdg-shell protocol
* Bugs fixed:
#28 Adwaita: Selection mode styling flickers
#83 Completion popup on non-default GdkDisplay freezes GtkFileChooserDialog
#88 GtkSpinButton: Buttons aren't de/sensitised as they were in GTK+ 3
#114 All Wayland apps crash when focused (gtk_gesture_multi_press_end→...
#129 Segfault in `wl_proxy_marshal()`
#132 GtkTextView auto-scrolling to insert mark upon focus changes due to...
#141 GtkEntry: add a way to set the font to monospace
#146 GtkExpander arrow is not dimmed when the Expander is not :sensitive
#156 Transfer annotation for gtk_gl_area_new is incorrect
#157 Crashes in gdkdisplay-wayland when clicking any button/menu item
#163 Unable to explicitly set GtkModelButton role
705509 notebook popup window on tabs shows underscores
745128 Search is useless for translated app names
748784 GtkProgressBar text cannot be superimposed on the progress bar
791939 Add xdg-shell (stable) support
792632 Emoji Chooser: section buttons have no tooltips
793062 Crash under gdk_wayland_window_attach_image()
* Translation updates:
Brazilian Portuguese
Catalan
Chinese
Chinese (Taiwan)
Dutch
French
German
Hungarian
Indonesian
Italian
Latvian
Serbian
Slovak
Slovenian
Turkish
Overview of Changes in GTK+ 3.22.29
====================================
* Wayland
- add an input method based on the text protocol
* File chooser
- Stop activating without double-click
* Bugs fixed:
710888 GtkInfoBar not shown after calling gtk_widget_show
743975 Better deprecation information for GtkStatusIcon
775546 gdkscreen-x11: Don't try to calculate a refresh rate for RandR 1.3...
794008 GtkListBoxRow signal poorly documented
* Translation updates:
Brazilian Portuguese
British English
Catalan
Croatian
Czech
Danish
Dutch
Esperanto
Estonian
French
Friulian
Galician
German
Hungarian
Icelandic
Indonesian
Italian
Kazakh
Korean
Latvian
Lithuanian
Polish
Russian
Scottish Gaelic
Serbian
Serbian Latin
Slovak
Swedish
Turkish
2Overview of Changes in GTK+ 3.22.28
===================================
* Fix the build
* Improve frame clock accuracy (#787665)
2Overview of Changes in GTK+ 3.22.27
===================================
* Require libcloudproviders 0.2.0
* The Emoji chooser can now be used with GtkTextView as well
* The Emoji chooser avoids fallback sequences that break the grid
* GTK+ is now using ~/.config/gtk-3.0/settings.ini when using
Wayland without dconf
* Make fuse-mounted network filesystems show up in Other Locations
* The font chooser dialog supports search now
* Bugs fixed:
737175 most horizontal sliders are inverted when scrolled with mouse wheel
741633 GtkListBoxRow should implement GtkActionable
771986 Inconsistent 'row-activated' signal emission before drag'n'drop, 'acti...
774248 Desktop-wide text scaling factor is ignored by gtk_widget_override_fon...
779009 Missing property-change::accessible-description events when the toolti...
786123 GtkPlacesSidebar: Add support for libcloudproviders
786509 GDK W32: OLE2 DnD is completely broken
786528 Please make the output deterministic
787089 win32: GtkWindow of type GTK_WINDOW_POPUP/GDK_WINDOW_TEMP leaks memory...
787128 Re-add FUSE network mounts in local-only mode
789054 Firefox crashes @gdk_window_begin_move_drag() on WM without _NET_WM_MO...
789160 Add Windows compatible emoji shortcuts
789268 Keyboard grab by popup window causes a session-modal shortcut-inhibiti...
790029 GtkTextView: Support gtk 3.22.19's emoji chooser
790031 GtkClipboardClearFunc is not being called
790033 Add support for third stylus button on Wacom's new Pro Pen 3D
790201 Settings in ~/.config/gtk-3.0/settings.ini ignored with GDK_BACKEND=wa...
790270 avoid copy of CSS data from resources
790862 Addition of insert_emoji breaks ABI on gtk-3-22
790963 Thread safety issue in gtk_application_impl_dbus_startup
791039 Emit enter+motion after GDK_CROSSING_TOUCH_END leave
791062 Fix mapping window with complete xdg-foreign state
791234 autocleanups: allow g_autoptr() usage with GtkTreePath
791281 Backport size allocation optimization from master to 3.22
791363 Shadow vertical offset is wrong when scaling is > 2
791549 gtklistbox: Crash on page-up on GtkListBox
791650 Do not warn about missing colord systemd service unit
791710 css documentation, non-breaking spaces/hyphens, and other details
791943 gnome-shell built with meson hangs when opening more than one window
792279 Use portable sed syntax in gdk/wayland/Makefile.am
792459 gtk_tree_model_sort_set_sort_column_id() ignores change to sort order
792624 Critical due to gtk_widget_reset_controllers() passing NULL to gtk_e...
* Translation updates:
Africaans
Catalan
Chinese (Taiwan)
Esperanto
Finnish
Friulian
Galician
Hebrew
Hungarian
Icelandic
Indonesian
Italian
Lithuanian
Norwegian bokmål
Polish
Russian
Serbian
Slovenian
Spanish
Turkish
Overview of Changes in GTK+ 3.22.26
===================================
* Bugs fixed:
789630 Distribute protocol/server-decoration.xml in tarballs
787142 input/IME: Defer the emit of the "commit" signal
789134 icon-browser: Centre Copy button in dialog again
789678 AboutDialog: Fix accepting GTK_LICENSE_AGPL_3_0
788898 Inspector: better default split of CSS nodes/props
789733 Fix GtkEntry:has-frame not working
789213 gdk/win32: Fix Win32 GL Context switching
785176 placessidebar: add starred location item
* Translation updates:
Arabic
Brazilian Portuguese
Czech
Dutch
German
Norwegian bokmål
Polish
Slovak
Swedish
Overview of Changes in GTK+ 3.22.25
===================================
@@ -0,0 +1,45 @@
{
"app-id": "org.gtk.WidgetFactory",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"command": "gtk3-widget-factory",
"tags": ["devel", "development", "nightly"],
"rename-desktop-file": "gtk3-widget-factory.desktop",
"rename-icon": "gtk3-widget-factory",
"finish-args": [
"--device=dri",
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
"--talk-name=ca.desrt.conf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"cleanup": [
"/include",
"/lib/pkgconfig", "/share/pkgconfig",
"/share/aclocal",
"/man", "/share/man", "/share/gtk-doc",
"*.la", ".a",
"/lib/girepository-1.0",
"/share/gir-1.0",
"/share/doc"
],
"modules": [
{
"name": "gtk",
"buildsystem": "autotools",
"builddir": true,
"config-opts": [
"--libdir=/app/lib"
],
"sources": [
{
"type": "git",
"branch": "gtk-3-24",
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
}
]
}
]
}
+2 -1
View File
@@ -36,8 +36,9 @@ SUBDIRS = \
EXTRA_DIST += \
detectenv-msvc.mak \
introspection-msvc.mak \
gentypefuncs.py \
gtk-introspection-msvc.mak \
introspection-msvc.mak \
replace.py \
pc_base.py \
gtkpc.py \
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import re
import os
debug = os.getenv('GTK_GENTYPEFUNCS_DEBUG') is not None
out_file = sys.argv[1]
in_file = sys.argv[2]
funcs = []
if debug: print ('Output file: ', out_file)
# if debug: print (len(in_files), 'input files')
def open_file(filename, mode):
if sys.version_info[0] < 3:
return open(filename, mode=mode)
else:
return open(filename, mode=mode, encoding='utf-8')
with open(in_file, 'r') as f:
for line in f:
line = line.rstrip('\n').rstrip('\r')
# print line
match = re.search(r'\bg[td]k_[a-zA-Z0-9_]*_get_type\b', line)
if match:
func = match.group(0)
if not func in funcs:
funcs.append(func)
if debug: print ('Found ', func)
file_output = 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS\n'
funcs = sorted(funcs)
for f in funcs:
if f.startswith('gdk_x11') or f.startswith('gtk_socket') or f.startswith('gtk_plug'):
file_output += '#ifdef GDK_WINDOWING_X11\n'
file_output += '*tp++ = {0}();\n'.format(f)
file_output += '#endif\n'
else:
file_output += '*tp++ = {0}();\n'.format(f)
if debug: print (len(funcs), 'functions')
ofile = open(out_file, "w")
ofile.write(file_output)
ofile.close()
+4 -7
View File
@@ -31,9 +31,9 @@ def main(argv):
cairo_min_ver = '1.14.0'
gdk_pixbuf_min_ver = '2.30.0'
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi'
cairo_libs = '-lcairo-gobject -lcairo '
glib_min_ver = '2.45.8'
cairo_backends = 'cairo-win32'
gdk_backends = 'win32'
gio_package = 'gio-2.0 >= ' + glib_min_ver
broadway_extra_libs = ''
@@ -43,20 +43,17 @@ def main(argv):
# On Visual Studio, we link to zlib1.lib
broadway_extra_libs = ' -lzlib1'
gdk_backends += ' broadway'
cairo_backends += ' cairo'
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
'@GDK_BACKENDS@': gdk_backends}
pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver + ' ' + \
'cairo >= ' + cairo_min_ver + ' ' + \
'cairo-gobject >= ' + cairo_min_ver
pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver
gdk_pc_replace_items = {'@GDK_PACKAGES@': gio_package + ' ' + \
'pangowin32 pangocairo' + ' ' + \
pkg_required_packages,
'@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
'@GDK_EXTRA_LIBS@': gdk_win32_sys_libs + broadway_extra_libs,
'@GDK_PRIVATE_PACKAGES@': gio_package,
'@GDK_EXTRA_LIBS@': cairo_libs + gdk_win32_sys_libs + broadway_extra_libs,
'@GDK_EXTRA_CFLAGS@': '',
'gdk-3': 'gdk-3.0'}
+1
View File
@@ -21,6 +21,7 @@
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\gentypefuncs.py"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
<ItemGroup>
#include "gtk-3.vs10.sourcefiles.filters"
+14 -36
View File
@@ -164,46 +164,24 @@
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message>Generating GTK+ DBus Sources...</Message>
<Command>$(GenerateGtkDbusBuiltSources)</Command>
<Outputs>..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message>Copying GTK+ Win32 Version Resource...</Message>
<Command>$(CopyGtkWin32RC)</Command>
<Outputs>..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message>Generating GTK+ Win32 Manifest...</Message>
<Command>$(GenerateGtkWin32Manifest)</Command>
<Outputs>..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\gentypefuncs.py">
<Message>Generating ..\..\..\gtk\gtktypefuncs.c</Message>
<Command>$(GenerateTypeFuncs)</Command>
<Outputs>..\..\..\gtk\gtktypefuncs.c</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
+10 -4
View File
@@ -40,10 +40,16 @@ echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
</GenGdkConfigHBroadway>
<GDbusCodeGenCmd>$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml</GDbusCodeGenCmd>
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk &amp; $(PythonDir)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk &amp; $(PythonDirX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
<GenerateGtkWin32Manifest>$(PythonDir)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
<GenerateTypeFuncs>
echo #undef GTK_COMPILATION &gt; ..\..\..\gtk\gtktypefuncs.preproc.c
echo #include "gtkx.h" &gt;&gt; ..\..\..\gtk\gtktypefuncs.preproc.c
cl /EP /I..\..\..\gtk /I..\..\..\gdk /I..\..\..\gdk\win32 /I..\..\.. /I$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0 /I$(GlibEtcInstallRoot)\include\pango-1.0 /I$(GlibEtcInstallRoot)\include\atk-1.0 /I$(GlibEtcInstallRoot)\include\cairo /I$(GlibEtcInstallRoot)\include\gio-win32-2.0 /I$(GlibEtcInstallRoot)\include\glib-2.0 /I$(GlibEtcInstallRoot)\lib\glib-2.0\include /I$(GlibEtcInstallRoot)\include /DHAVE_CONFIG_H /DG_DISABLE_SINGLE_INCLUDES /DATK_DISABLE_SINGLE_INCLUDES /DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES /DGTK_DISABLE_SINGLE_INCLUDES /D_USE_MATH_DEFINES /DINCLUDE_IM_am_et /DINCLUDE_IM_cedilla /DINCLUDE_IM_cyrillic_translit /DINCLUDE_IM_ime /DINCLUDE_IM_inuktitut /DINCLUDE_IM_ipa /DINCLUDE_IM_multipress /DINCLUDE_IM_thai /DINCLUDE_IM_ti_er /DINCLUDE_IM_ti_et /DINCLUDE_IM_viqr /DGTK_COMPILATION /DG_LOG_DOMAIN=\"Gtk\" /DGTK_HOST=\"i686-pc-vs$(VSVer)\" /DGTK_PRINT_BACKENDS=\"file\" /DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED /D$(GtkIncludedImmodulesDefines) /DGTK_LIBDIR=\"$(GtkDummyPrefix)/lib\" /DGTK_DATADIR=\"$(GtkDummyPrefix)/share\" /DGTK_DATA_PREFIX=\"$(GtkDummyPrefix)\" /DGTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\" /DMULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\" /DMULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\" /DGTK_VERSION=\"$(GtkVersion)\" /DGTK_BINARY_VERSION=\"$(GtkBinaryVersion)\" /DGDK_DISABLE_DEPRECATED /DISOLATION_AWARE_ENABLED ..\..\..\gtk\gtktypefuncs.preproc.c &gt; ..\..\..\gtk\gtktypefuncs.combined.c
$(PythonDir)\python ..\gentypefuncs.py ..\..\..\gtk\gtktypefuncs.c ..\..\..\gtk\gtktypefuncs.combined.c
del ..\..\..\gtk\gtktypefuncs.combined.c ..\..\..\gtk\gtktypefuncs.preproc.c
</GenerateTypeFuncs>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3gensrcsprops</_PropertySheetDisplayName>
@@ -64,9 +70,6 @@ echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
<BuildMacro Include="GenerateGtkDbusBuiltSources">
<Value>$(GenerateGtkDbusBuiltSources)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkDbusBuiltSourcesX64">
<Value>$(GenerateGtkDbusBuiltSourcesX64)</Value>
</BuildMacro>
<BuildMacro Include="CopyGtkWin32RC">
<Value>$(CopyGtkWin32RC)</Value>
</BuildMacro>
@@ -76,5 +79,8 @@ echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
<BuildMacro Include="CopyDemosH">
<Value>$(CopyDemosH)</Value>
</BuildMacro>
<BuildMacro Include="GenerateTypeFuncs">
<Value>$(GenerateTypeFuncs)</Value>
</BuildMacro>
</ItemGroup>
</Project>
+534
View File
@@ -0,0 +1,534 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\lib\pkgconfig
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gailutil-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gtk3-demo.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
copy "$(BinDir)\broadwayd.exe" $(CopyDir)\bin
copy "$(BinDir)\broadwayd.pdb" $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_RELEASE
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_DEBUG
:DO_BROADWAY_RELEASE
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_DEBUG
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-3.0.pc"
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
</GtkDoInstallBin>
<GtkDoInstall>
echo off
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-3.0\gdk\gdk.h
copy ..\..\..\gdk\gdk-autocleanup.h $(CopyDir)\include\gtk-3.0\gdk\gdk-autocleanup.h
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkapplaunchcontext.h
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-3.0\gdk\gdkcairo.h
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-3.0\gdk\gdkcursor.h
copy ..\..\..\gdk\gdkdevice.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevice.h
copy ..\..\..\gdk\gdkdevicepad.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicepad.h
copy ..\..\..\gdk\gdkdevicetool.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicetool.h
copy ..\..\..\gdk\gdkdevicemanager.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicemanager.h
copy ..\..\..\gdk\gdkdisplay.h $(CopyDir)\include\gtk-3.0\gdk\gdkdisplay.h
copy ..\..\..\gdk\gdkdisplaymanager.h $(CopyDir)\include\gtk-3.0\gdk\gdkdisplaymanager.h
copy ..\..\..\gdk\gdkdnd.h $(CopyDir)\include\gtk-3.0\gdk\gdkdnd.h
copy ..\..\..\gdk\gdkdrawingcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkdrawingcontext.h
copy ..\..\..\gdk\gdkevents.h $(CopyDir)\include\gtk-3.0\gdk\gdkevents.h
copy ..\..\..\gdk\gdkframetimings.h $(CopyDir)\include\gtk-3.0\gdk\gdkframetimings.h
copy ..\..\..\gdk\gdkglcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkglcontext.h
copy ..\..\..\gdk\gdkkeys.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeys.h
copy ..\..\..\gdk\gdkkeysyms.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeysyms.h
copy ..\..\..\gdk\gdkkeysyms-compat.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeysyms-compat.h
copy ..\..\..\gdk\gdkmain.h $(CopyDir)\include\gtk-3.0\gdk\gdkmain.h
copy ..\..\..\gdk\gdkmonitor.h $(CopyDir)\include\gtk-3.0\gdk\gdkmonitor.h
copy ..\..\..\gdk\gdkpango.h $(CopyDir)\include\gtk-3.0\gdk\gdkpango.h
copy ..\..\..\gdk\gdkframeclock.h $(CopyDir)\include\gtk-3.0\gdk\gdkframeclock.h
copy ..\..\..\gdk\gdkpixbuf.h $(CopyDir)\include\gtk-3.0\gdk\gdkpixbuf.h
copy ..\..\..\gdk\gdkprivate.h $(CopyDir)\include\gtk-3.0\gdk\gdkprivate.h
copy ..\..\..\gdk\gdkproperty.h $(CopyDir)\include\gtk-3.0\gdk\gdkproperty.h
copy ..\..\..\gdk\gdkrectangle.h $(CopyDir)\include\gtk-3.0\gdk\gdkrectangle.h
copy ..\..\..\gdk\gdkrgba.h $(CopyDir)\include\gtk-3.0\gdk\gdkrgba.h
copy ..\..\..\gdk\gdkscreen.h $(CopyDir)\include\gtk-3.0\gdk\gdkscreen.h
copy ..\..\..\gdk\gdkseat.h $(CopyDir)\include\gtk-3.0\gdk\gdkseat.h
copy ..\..\..\gdk\gdkselection.h $(CopyDir)\include\gtk-3.0\gdk\gdkselection.h
copy ..\..\..\gdk\gdktestutils.h $(CopyDir)\include\gtk-3.0\gdk\gdktestutils.h
copy ..\..\..\gdk\gdkthreads.h $(CopyDir)\include\gtk-3.0\gdk\gdkthreads.h
copy ..\..\..\gdk\gdktypes.h $(CopyDir)\include\gtk-3.0\gdk\gdktypes.h
copy ..\..\..\gdk\gdkvisual.h $(CopyDir)\include\gtk-3.0\gdk\gdkvisual.h
copy ..\..\..\gdk\gdkwindow.h $(CopyDir)\include\gtk-3.0\gdk\gdkwindow.h
copy ..\..\..\gdk\deprecated\gdkcolor.h $(CopyDir)\include\gtk-3.0\gdk\deprecated\gdkcolor.h
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-3.0\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-3.0\gdk\gdkenumtypes.h
copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-3.0\gdk\gdkversionmacros.h
copy ..\..\..\gdk\win32\gdkwin32cursor.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32cursor.h
copy ..\..\..\gdk\win32\gdkwin32display.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32display.h
copy ..\..\..\gdk\win32\gdkwin32displaymanager.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32displaymanager.h
copy ..\..\..\gdk\win32\gdkwin32dnd.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32dnd.h
copy ..\..\..\gdk\win32\gdkwin32glcontext.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32glcontext.h
copy ..\..\..\gdk\win32\gdkwin32keys.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32keys.h
copy ..\..\..\gdk\win32\gdkwin32misc.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32misc.h
copy ..\..\..\gdk\win32\gdkwin32monitor.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32monitor.h
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32screen.h
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32window.h
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-3.0\gtk\gtk.h
copy ..\..\..\gtk\gtk-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtk-autocleanups.h
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-3.0\gtk\gtkx.h
copy ..\..\..\gtk\gtkx-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtkx-autocleanups.h
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-3.0\gtk\gtk-a11y.h
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkaboutdialog.h
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelgroup.h
copy ..\..\..\gtk\gtkaccellabel.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccellabel.h
copy ..\..\..\gtk\gtkaccelmap.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelmap.h
copy ..\..\..\gtk\gtkaccessible.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccessible.h
copy ..\..\..\gtk\gtkactionable.h $(CopyDir)\include\gtk-3.0\gtk\gtkactionable.h
copy ..\..\..\gtk\gtkactionbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkactionbar.h
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-3.0\gtk\gtkadjustment.h
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooser.h
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserbutton.h
copy ..\..\..\gtk\gtkappchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserdialog.h
copy ..\..\..\gtk\gtkappchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserwidget.h
copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-3.0\gtk\gtkapplication.h
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkapplicationwindow.h
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-3.0\gtk\gtkaspectframe.h
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-3.0\gtk\gtkassistant.h
copy ..\..\..\gtk\gtkbbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkbbox.h
copy ..\..\..\gtk\gtkbin.h $(CopyDir)\include\gtk-3.0\gtk\gtkbin.h
copy ..\..\..\gtk\gtkbindings.h $(CopyDir)\include\gtk-3.0\gtk\gtkbindings.h
copy ..\..\..\gtk\gtkborder.h $(CopyDir)\include\gtk-3.0\gtk\gtkborder.h
copy ..\..\..\gtk\gtkbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkbox.h
copy ..\..\..\gtk\gtkbuilder.h $(CopyDir)\include\gtk-3.0\gtk\gtkbuilder.h
copy ..\..\..\gtk\gtkbuildable.h $(CopyDir)\include\gtk-3.0\gtk\gtkbuildable.h
copy ..\..\..\gtk\gtkbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkbutton.h
copy ..\..\..\gtk\gtkcalendar.h $(CopyDir)\include\gtk-3.0\gtk\gtkcalendar.h
copy ..\..\..\gtk\gtkcellarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellarea.h
copy ..\..\..\gtk\gtkcellareacontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellareacontext.h
copy ..\..\..\gtk\gtkcellareabox.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellareabox.h
copy ..\..\..\gtk\gtkcelleditable.h $(CopyDir)\include\gtk-3.0\gtk\gtkcelleditable.h
copy ..\..\..\gtk\gtkcelllayout.h $(CopyDir)\include\gtk-3.0\gtk\gtkcelllayout.h
copy ..\..\..\gtk\gtkcellrenderer.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderer.h
copy ..\..\..\gtk\gtkcellrendereraccel.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendereraccel.h
copy ..\..\..\gtk\gtkcellrenderercombo.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderercombo.h
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererpixbuf.h
copy ..\..\..\gtk\gtkcellrendererprogress.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererprogress.h
copy ..\..\..\gtk\gtkcellrendererspin.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererspin.h
copy ..\..\..\gtk\gtkcellrendererspinner.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererspinner.h
copy ..\..\..\gtk\gtkcellrenderertext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderertext.h
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderertoggle.h
copy ..\..\..\gtk\gtkcellview.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellview.h
copy ..\..\..\gtk\gtkcheckbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkcheckbutton.h
copy ..\..\..\gtk\gtkcheckmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkcheckmenuitem.h
copy ..\..\..\gtk\gtkclipboard.h $(CopyDir)\include\gtk-3.0\gtk\gtkclipboard.h
copy ..\..\..\gtk\gtkcolorbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorbutton.h
copy ..\..\..\gtk\gtkcolorchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooser.h
copy ..\..\..\gtk\gtkcolorchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooserwidget.h
copy ..\..\..\gtk\gtkcolorchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooserdialog.h
copy ..\..\..\gtk\gtkcolorutils.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorutils.h
copy ..\..\..\gtk\gtkcombobox.h $(CopyDir)\include\gtk-3.0\gtk\gtkcombobox.h
copy ..\..\..\gtk\gtkcomboboxtext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcomboboxtext.h
copy ..\..\..\gtk\gtkcontainer.h $(CopyDir)\include\gtk-3.0\gtk\gtkcontainer.h
copy ..\..\..\gtk\gtkcssprovider.h $(CopyDir)\include\gtk-3.0\gtk\gtkcssprovider.h
copy ..\..\..\gtk\gtkcsssection.h $(CopyDir)\include\gtk-3.0\gtk\gtkcsssection.h
copy ..\..\..\gtk\gtkdebug.h $(CopyDir)\include\gtk-3.0\gtk\gtkdebug.h
copy ..\..\..\gtk\gtkdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkdialog.h
copy ..\..\..\gtk\gtkdnd.h $(CopyDir)\include\gtk-3.0\gtk\gtkdnd.h
copy ..\..\..\gtk\gtkdragdest.h $(CopyDir)\include\gtk-3.0\gtk\gtkdragdest.h
copy ..\..\..\gtk\gtkdragsource.h $(CopyDir)\include\gtk-3.0\gtk\gtkdragsource.h
copy ..\..\..\gtk\gtkdrawingarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkdrawingarea.h
copy ..\..\..\gtk\gtkeditable.h $(CopyDir)\include\gtk-3.0\gtk\gtkeditable.h
copy ..\..\..\gtk\gtkentry.h $(CopyDir)\include\gtk-3.0\gtk\gtkentry.h
copy ..\..\..\gtk\gtkentrybuffer.h $(CopyDir)\include\gtk-3.0\gtk\gtkentrybuffer.h
copy ..\..\..\gtk\gtkentrycompletion.h $(CopyDir)\include\gtk-3.0\gtk\gtkentrycompletion.h
copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-3.0\gtk\gtkenums.h
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkeventbox.h
copy ..\..\..\gtk\gtkeventcontroller.h $(CopyDir)\include\gtk-3.0\gtk\gtkeventcontroller.h
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-3.0\gtk\gtkexpander.h
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooser.h
copy ..\..\..\gtk\gtkfilechooserbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserbutton.h
copy ..\..\..\gtk\gtkfilechooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserdialog.h
copy ..\..\..\gtk\gtkfilechoosernative.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechoosernative.h
copy ..\..\..\gtk\gtkfilechooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserwidget.h
copy ..\..\..\gtk\gtkfilefilter.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilefilter.h
copy ..\..\..\gtk\gtkfixed.h $(CopyDir)\include\gtk-3.0\gtk\gtkfixed.h
copy ..\..\..\gtk\gtkflowbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkflowbox.h
copy ..\..\..\gtk\gtkfontbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontbutton.h
copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooser.h
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooserdialog.h
copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooserwidget.h
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-3.0\gtk\gtkframe.h
copy ..\..\..\gtk\gtkgesture.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesture.h
copy ..\..\..\gtk\gtkgesturedrag.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturedrag.h
copy ..\..\..\gtk\gtkgesturelongpress.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturelongpress.h
copy ..\..\..\gtk\gtkgesturemultipress.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturemultipress.h
copy ..\..\..\gtk\gtkgesturepan.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturepan.h
copy ..\..\..\gtk\gtkgesturerotate.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturerotate.h
copy ..\..\..\gtk\gtkgesturesingle.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturesingle.h
copy ..\..\..\gtk\gtkgestureswipe.h $(CopyDir)\include\gtk-3.0\gtk\gtkgestureswipe.h
copy ..\..\..\gtk\gtkgesturezoom.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturezoom.h
copy ..\..\..\gtk\gtkglarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkglarea.h
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-3.0\gtk\gtkgrid.h
copy ..\..\..\gtk\gtkheaderbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkheaderbar.h
copy ..\..\..\gtk\gtkicontheme.h $(CopyDir)\include\gtk-3.0\gtk\gtkicontheme.h
copy ..\..\..\gtk\gtkiconview.h $(CopyDir)\include\gtk-3.0\gtk\gtkiconview.h
copy ..\..\..\gtk\gtkimage.h $(CopyDir)\include\gtk-3.0\gtk\gtkimage.h
copy ..\..\..\gtk\gtkimcontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontext.h
copy ..\..\..\gtk\gtkimcontextinfo.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontextinfo.h
copy ..\..\..\gtk\gtkimcontextsimple.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontextsimple.h
copy ..\..\..\gtk\gtkimmodule.h $(CopyDir)\include\gtk-3.0\gtk\gtkimmodule.h
copy ..\..\..\gtk\gtkimmulticontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkimmulticontext.h
copy ..\..\..\gtk\gtkinfobar.h $(CopyDir)\include\gtk-3.0\gtk\gtkinfobar.h
copy ..\..\..\gtk\gtkinvisible.h $(CopyDir)\include\gtk-3.0\gtk\gtkinvisible.h
copy ..\..\..\gtk\gtklabel.h $(CopyDir)\include\gtk-3.0\gtk\gtklabel.h
copy ..\..\..\gtk\gtklayout.h $(CopyDir)\include\gtk-3.0\gtk\gtklayout.h
copy ..\..\..\gtk\gtklevelbar.h $(CopyDir)\include\gtk-3.0\gtk\gtklevelbar.h
copy ..\..\..\gtk\gtklinkbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtklinkbutton.h
copy ..\..\..\gtk\gtklistbox.h $(CopyDir)\include\gtk-3.0\gtk\gtklistbox.h
copy ..\..\..\gtk\gtkliststore.h $(CopyDir)\include\gtk-3.0\gtk\gtkliststore.h
copy ..\..\..\gtk\gtklockbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtklockbutton.h
copy ..\..\..\gtk\gtkmain.h $(CopyDir)\include\gtk-3.0\gtk\gtkmain.h
copy ..\..\..\gtk\gtkmenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenu.h
copy ..\..\..\gtk\gtkmenubar.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenubar.h
copy ..\..\..\gtk\gtkmenubutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenubutton.h
copy ..\..\..\gtk\gtkmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenuitem.h
copy ..\..\..\gtk\gtkmenushell.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenushell.h
copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenutoolbutton.h
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkmessagedialog.h
copy ..\..\..\gtk\gtkmodelbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmodelbutton.h
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-3.0\gtk\gtkmodules.h
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-3.0\gtk\gtkmountoperation.h
copy ..\..\..\gtk\gtknativedialog.h $(CopyDir)\include\gtk-3.0\gtk\gtknativedialog.h
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-3.0\gtk\gtknotebook.h
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkoffscreenwindow.h
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-3.0\gtk\gtkorientable.h
copy ..\..\..\gtk\gtkoverlay.h $(CopyDir)\include\gtk-3.0\gtk\gtkoverlay.h
copy ..\..\..\gtk\gtkpadcontroller.h $(CopyDir)\include\gtk-3.0\gtk\gtkpadcontroller.h
copy ..\..\..\gtk\gtkpagesetup.h $(CopyDir)\include\gtk-3.0\gtk\gtkpagesetup.h
copy ..\..\..\gtk\gtkpaned.h $(CopyDir)\include\gtk-3.0\gtk\gtkpaned.h
copy ..\..\..\gtk\gtkpapersize.h $(CopyDir)\include\gtk-3.0\gtk\gtkpapersize.h
copy ..\..\..\gtk\gtkplacessidebar.h $(CopyDir)\include\gtk-3.0\gtk\gtkplacessidebar.h
copy ..\..\..\gtk\gtkplug.h $(CopyDir)\include\gtk-3.0\gtk\gtkplug.h
copy ..\..\..\gtk\gtkpopover.h $(CopyDir)\include\gtk-3.0\gtk\gtkpopover.h
copy ..\..\..\gtk\gtkpopovermenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkpopovermenu.h
copy ..\..\..\gtk\gtkprintcontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintcontext.h
copy ..\..\..\gtk\gtkprintoperation.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintoperation.h
copy ..\..\..\gtk\gtkprintoperationpreview.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintoperationpreview.h
copy ..\..\..\gtk\gtkprintsettings.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintsettings.h
copy ..\..\..\gtk\gtkprogressbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkprogressbar.h
copy ..\..\..\gtk\gtkradiobutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiobutton.h
copy ..\..\..\gtk\gtkradiomenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiomenuitem.h
copy ..\..\..\gtk\gtkradiotoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiotoolbutton.h
copy ..\..\..\gtk\gtkrange.h $(CopyDir)\include\gtk-3.0\gtk\gtkrange.h
copy ..\..\..\gtk\gtkrecentchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooser.h
copy ..\..\..\gtk\gtkrecentchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooserdialog.h
copy ..\..\..\gtk\gtkrecentchoosermenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchoosermenu.h
copy ..\..\..\gtk\gtkrecentchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooserwidget.h
copy ..\..\..\gtk\gtkrecentfilter.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentfilter.h
copy ..\..\..\gtk\gtkrecentmanager.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentmanager.h
copy ..\..\..\gtk\gtkrender.h $(CopyDir)\include\gtk-3.0\gtk\gtkrender.h
copy ..\..\..\gtk\gtkrevealer.h $(CopyDir)\include\gtk-3.0\gtk\gtkrevealer.h
copy ..\..\..\gtk\gtkscale.h $(CopyDir)\include\gtk-3.0\gtk\gtkscale.h
copy ..\..\..\gtk\gtkscalebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkscalebutton.h
copy ..\..\..\gtk\gtkscrollable.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrollable.h
copy ..\..\..\gtk\gtkscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrollbar.h
copy ..\..\..\gtk\gtkscrolledwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrolledwindow.h
copy ..\..\..\gtk\gtksearchbar.h $(CopyDir)\include\gtk-3.0\gtk\gtksearchbar.h
copy ..\..\..\gtk\gtksearchentry.h $(CopyDir)\include\gtk-3.0\gtk\gtksearchentry.h
copy ..\..\..\gtk\gtkselection.h $(CopyDir)\include\gtk-3.0\gtk\gtkselection.h
copy ..\..\..\gtk\gtkseparator.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparator.h
copy ..\..\..\gtk\gtkseparatormenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparatormenuitem.h
copy ..\..\..\gtk\gtkseparatortoolitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparatortoolitem.h
copy ..\..\..\gtk\gtksettings.h $(CopyDir)\include\gtk-3.0\gtk\gtksettings.h
copy ..\..\..\gtk\gtkshortcutlabel.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutlabel.h
copy ..\..\..\gtk\gtkshortcutsgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutsgroup.h
copy ..\..\..\gtk\gtkshortcutssection.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutssection.h
copy ..\..\..\gtk\gtkshortcutsshortcut.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutsshortcut.h
copy ..\..\..\gtk\gtkshortcutswindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutswindow.h
copy ..\..\..\gtk\gtkshow.h $(CopyDir)\include\gtk-3.0\gtk\gtkshow.h
copy ..\..\..\gtk\gtkstacksidebar.h $(CopyDir)\include\gtk-3.0\gtk\gtkstacksidebar.h
copy ..\..\..\gtk\gtksizegroup.h $(CopyDir)\include\gtk-3.0\gtk\gtksizegroup.h
copy ..\..\..\gtk\gtksizerequest.h $(CopyDir)\include\gtk-3.0\gtk\gtksizerequest.h
copy ..\..\..\gtk\gtksocket.h $(CopyDir)\include\gtk-3.0\gtk\gtksocket.h
copy ..\..\..\gtk\gtkspinbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkspinbutton.h
copy ..\..\..\gtk\gtkspinner.h $(CopyDir)\include\gtk-3.0\gtk\gtkspinner.h
copy ..\..\..\gtk\gtkstack.h $(CopyDir)\include\gtk-3.0\gtk\gtkstack.h
copy ..\..\..\gtk\gtkstackswitcher.h $(CopyDir)\include\gtk-3.0\gtk\gtkstackswitcher.h
copy ..\..\..\gtk\gtkstatusbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkstatusbar.h
copy ..\..\..\gtk\gtkstylecontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkstylecontext.h
copy ..\..\..\gtk\gtkstyleprovider.h $(CopyDir)\include\gtk-3.0\gtk\gtkstyleprovider.h
copy ..\..\..\gtk\gtkswitch.h $(CopyDir)\include\gtk-3.0\gtk\gtkswitch.h
copy ..\..\..\gtk\gtktestutils.h $(CopyDir)\include\gtk-3.0\gtk\gtktestutils.h
copy ..\..\..\gtk\gtktextattributes.h $(CopyDir)\include\gtk-3.0\gtk\gtktextattributes.h
copy ..\..\..\gtk\gtktextbuffer.h $(CopyDir)\include\gtk-3.0\gtk\gtktextbuffer.h
copy ..\..\..\gtk\gtktextbufferrichtext.h $(CopyDir)\include\gtk-3.0\gtk\gtktextbufferrichtext.h
copy ..\..\..\gtk\gtktextchild.h $(CopyDir)\include\gtk-3.0\gtk\gtktextchild.h
copy ..\..\..\gtk\gtktextdisplay.h $(CopyDir)\include\gtk-3.0\gtk\gtktextdisplay.h
copy ..\..\..\gtk\gtktextiter.h $(CopyDir)\include\gtk-3.0\gtk\gtktextiter.h
copy ..\..\..\gtk\gtktextmark.h $(CopyDir)\include\gtk-3.0\gtk\gtktextmark.h
copy ..\..\..\gtk\gtktexttag.h $(CopyDir)\include\gtk-3.0\gtk\gtktexttag.h
copy ..\..\..\gtk\gtktexttagtable.h $(CopyDir)\include\gtk-3.0\gtk\gtktexttagtable.h
copy ..\..\..\gtk\gtktextview.h $(CopyDir)\include\gtk-3.0\gtk\gtktextview.h
copy ..\..\..\gtk\gtktogglebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktogglebutton.h
copy ..\..\..\gtk\gtktoggletoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktoggletoolbutton.h
copy ..\..\..\gtk\gtktoolbar.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolbar.h
copy ..\..\..\gtk\gtktoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolbutton.h
copy ..\..\..\gtk\gtktoolitem.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolitem.h
copy ..\..\..\gtk\gtktoolitemgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolitemgroup.h
copy ..\..\..\gtk\gtktoolpalette.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolpalette.h
copy ..\..\..\gtk\gtktoolshell.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolshell.h
copy ..\..\..\gtk\gtktooltip.h $(CopyDir)\include\gtk-3.0\gtk\gtktooltip.h
copy ..\..\..\gtk\gtktreednd.h $(CopyDir)\include\gtk-3.0\gtk\gtktreednd.h
copy ..\..\..\gtk\gtktreemodel.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodel.h
copy ..\..\..\gtk\gtktreemodelfilter.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodelfilter.h
copy ..\..\..\gtk\gtktreemodelsort.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodelsort.h
copy ..\..\..\gtk\gtktreeselection.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeselection.h
copy ..\..\..\gtk\gtktreesortable.h $(CopyDir)\include\gtk-3.0\gtk\gtktreesortable.h
copy ..\..\..\gtk\gtktreestore.h $(CopyDir)\include\gtk-3.0\gtk\gtktreestore.h
copy ..\..\..\gtk\gtktreeview.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeview.h
copy ..\..\..\gtk\gtktreeviewcolumn.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeviewcolumn.h
copy ..\..\..\gtk\gtktypes.h $(CopyDir)\include\gtk-3.0\gtk\gtktypes.h
copy ..\..\..\gtk\gtkviewport.h $(CopyDir)\include\gtk-3.0\gtk\gtkviewport.h
copy ..\..\..\gtk\gtkvolumebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkvolumebutton.h
copy ..\..\..\gtk\gtkwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkwidget.h
copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-3.0\gtk\gtkwidgetpath.h
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindow.h
copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindowgroup.h
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-3.0\gtk\gtktextlayout.h
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-3.0\gtk\gtktypebuiltins.h
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-3.0\gtk\gtkversion.h
copy ..\..\..\gtk\a11y\gtk-a11y-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtk-a11y-autocleanups.h
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkarrowaccessible.h
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbooleancellaccessible.h
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkcellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcellaccessible.h
copy ..\..\..\gtk\a11y\gtkcellaccessibleparent.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcellaccessibleparent.h
copy ..\..\..\gtk\a11y\gtkcheckmenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcheckmenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkcomboboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcomboboxaccessible.h
copy ..\..\..\gtk\a11y\gtkcontaineraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcontaineraccessible.h
copy ..\..\..\gtk\a11y\gtkcontainercellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcontainercellaccessible.h
copy ..\..\..\gtk\a11y\gtkentryaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkentryaccessible.h
copy ..\..\..\gtk\a11y\gtkexpanderaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkexpanderaccessible.h
copy ..\..\..\gtk\a11y\gtkflowboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkflowboxaccessible.h
copy ..\..\..\gtk\a11y\gtkflowboxchildaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkflowboxchildaccessible.h
copy ..\..\..\gtk\a11y\gtkframeaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkframeaccessible.h
copy ..\..\..\gtk\a11y\gtkiconviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkiconviewaccessible.h
copy ..\..\..\gtk\a11y\gtkimageaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkimageaccessible.h
copy ..\..\..\gtk\a11y\gtkimagecellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkimagecellaccessible.h
copy ..\..\..\gtk\a11y\gtklabelaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklabelaccessible.h
copy ..\..\..\gtk\a11y\gtklevelbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklevelbaraccessible.h
copy ..\..\..\gtk\a11y\gtklinkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklinkbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtklistboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklistboxaccessible.h
copy ..\..\..\gtk\a11y\gtklistboxrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklistboxrowaccessible.h
copy ..\..\..\gtk\a11y\gtklockbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklockbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkmenuaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenuaccessible.h
copy ..\..\..\gtk\a11y\gtkmenubuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenubuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkmenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkmenushellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenushellaccessible.h
copy ..\..\..\gtk\a11y\gtknotebookaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtknotebookaccessible.h
copy ..\..\..\gtk\a11y\gtknotebookpageaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtknotebookpageaccessible.h
copy ..\..\..\gtk\a11y\gtkpanedaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkpanedaccessible.h
copy ..\..\..\gtk\a11y\gtkpopoveraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkpopoveraccessible.h
copy ..\..\..\gtk\a11y\gtkprogressbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkprogressbaraccessible.h
copy ..\..\..\gtk\a11y\gtkradiobuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkradiobuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkradiomenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkradiomenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkrangeaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkrangeaccessible.h
copy ..\..\..\gtk\a11y\gtkrenderercellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkrenderercellaccessible.h
copy ..\..\..\gtk\a11y\gtkscaleaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscaleaccessible.h
copy ..\..\..\gtk\a11y\gtkscalebuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscalebuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkscrolledwindowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscrolledwindowaccessible.h
copy ..\..\..\gtk\a11y\gtkspinbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkspinbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkspinneraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkspinneraccessible.h
copy ..\..\..\gtk\a11y\gtkstatusbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkstatusbaraccessible.h
copy ..\..\..\gtk\a11y\gtkstackaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkstackaccessible.h
copy ..\..\..\gtk\a11y\gtkswitchaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkswitchaccessible.h
copy ..\..\..\gtk\a11y\gtktextcellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktextcellaccessible.h
copy ..\..\..\gtk\a11y\gtktextviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktextviewaccessible.h
copy ..\..\..\gtk\a11y\gtktogglebuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktogglebuttonaccessible.h
copy ..\..\..\gtk\a11y\gtktoplevelaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktoplevelaccessible.h
copy ..\..\..\gtk\a11y\gtktreeviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktreeviewaccessible.h
copy ..\..\..\gtk\a11y\gtkwidgetaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkwidgetaccessible.h
copy ..\..\..\gtk\a11y\gtkwindowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkwindowaccessible.h
copy ..\..\..\gtk\deprecated\gtkactivatable.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkactivatable.h
copy ..\..\..\gtk\deprecated\gtkaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkaction.h
copy ..\..\..\gtk\deprecated\gtkactiongroup.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkactiongroup.h
copy ..\..\..\gtk\deprecated\gtkalignment.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkalignment.h
copy ..\..\..\gtk\deprecated\gtkarrow.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkarrow.h
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkcolorsel.h
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkcolorseldialog.h
copy ..\..\..\gtk\deprecated\gtkfontsel.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkfontsel.h
copy ..\..\..\gtk\deprecated\gtkgradient.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkgradient.h
copy ..\..\..\gtk\deprecated\gtkhandlebox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhandlebox.h
copy ..\..\..\gtk\deprecated\gtkhbbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhbbox.h
copy ..\..\..\gtk\deprecated\gtkhbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhbox.h
copy ..\..\..\gtk\deprecated\gtkhpaned.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhpaned.h
copy ..\..\..\gtk\deprecated\gtkhscale.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhscale.h
copy ..\..\..\gtk\deprecated\gtkhscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhscrollbar.h
copy ..\..\..\gtk\deprecated\gtkhseparator.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhseparator.h
copy ..\..\..\gtk\deprecated\gtkhsv.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhsv.h
copy ..\..\..\gtk\deprecated\gtkiconfactory.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkiconfactory.h
copy ..\..\..\gtk\deprecated\gtkimagemenuitem.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkimagemenuitem.h
copy ..\..\..\gtk\deprecated\gtkmisc.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkmisc.h
copy ..\..\..\gtk\deprecated\gtknumerableicon.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtknumerableicon.h
copy ..\..\..\gtk\deprecated\gtkradioaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkradioaction.h
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkrc.h
copy ..\..\..\gtk\deprecated\gtkrecentaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkrecentaction.h
copy ..\..\..\gtk\deprecated\gtkstatusicon.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstatusicon.h
copy ..\..\..\gtk\deprecated\gtkstock.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstock.h
copy ..\..\..\gtk\deprecated\gtkstyle.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstyle.h
copy ..\..\..\gtk\deprecated\gtkstyleproperties.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstyleproperties.h
copy ..\..\..\gtk\deprecated\gtksymboliccolor.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtksymboliccolor.h
copy ..\..\..\gtk\deprecated\gtktable.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktable.h
copy ..\..\..\gtk\deprecated\gtktearoffmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktearoffmenuitem.h
copy ..\..\..\gtk\deprecated\gtkthemingengine.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkthemingengine.h
copy ..\..\..\gtk\deprecated\gtktoggleaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktoggleaction.h
copy ..\..\..\gtk\deprecated\gtkuimanager.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkuimanager.h
copy ..\..\..\gtk\deprecated\gtkvbbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvbbox.h
copy ..\..\..\gtk\deprecated\gtkvbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvbox.h
copy ..\..\..\gtk\deprecated\gtkvscale.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvscale.h
copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvscrollbar.h
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvseparator.h
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvpaned.h
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
copy ..\..\..\libgail-util\gailmisc.h $(CopyDir)\include\gail-3.0\libgail-util\gailmisc.h
copy ..\..\..\libgail-util\gailtextutil.h $(CopyDir)\include\gail-3.0\libgail-util\gailtextutil.h
copy ..\..\..\libgail-util\gail-util.h $(CopyDir)\include\gail-3.0\libgail-util\gail-util.h
for &#37;&#37;s in (16 22 24 32 48 256) do ((mkdir $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps) &amp; (copy /b ..\..\..\demos\gtk-demo\data\&#37;&#37;sx&#37;&#37;s\gtk3-demo.png $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps))
mkdir $(CopyDir)\share\glib-2.0\schemas
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 ..\..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwaydisplay.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaydisplay.h
copy ..\..\..\gdk\broadway\gdkbroadwaywindow.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaywindow.h
copy ..\..\..\gdk\broadway\gdkbroadwaycursor.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaycursor.h
copy ..\..\..\gdk\broadway\gdkbroadwaymonitor.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaymonitor.h
copy ..\..\..\gdk\broadway\gdkbroadwayvisual.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwayvisual.h
</GtkDoInstallBroadwayHeaders>
<GtkPostInstall>
echo "Compiling gsettings XML Files..."
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3installsprops</_PropertySheetDisplayName>
</PropertyGroup>
<ItemGroup>
<BuildMacro Include="BinDir">
<Value>$(BinDir)</Value>
</BuildMacro>
<BuildMacro Include="InstalledDlls">
<Value>$(InstalledDlls)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBins">
<Value>$(InstalledBins)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBroadwayBins">
<Value>$(InstalledBroadwayBins)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBin">
<Value>$(GtkDoInstallBin)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstall">
<Value>$(GtkDoInstall)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBroadwayHeaders">
<Value>$(GtkDoInstallBroadwayHeaders)</Value>
</BuildMacro>
<BuildMacro Include="GtkPostInstall">
<Value>$(GtkPostInstall)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPC">
<Value>$(GenerateGtkPC)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPCX64">
<Value>$(GenerateGtkPCX64)</Value>
</BuildMacro>
<BuildMacro Include="GtkPCFiles">
<Value>$(GtkPCFiles)</Value>
</BuildMacro>
</ItemGroup>
</Project>
+1 -1
View File
@@ -135,7 +135,7 @@ echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDirX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GenerateGtkPCX64>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>
+6 -6
View File
@@ -80,15 +80,15 @@
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean</NMakeCleanCommandLine>
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean</NMakeCleanCommandLine>
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>
+10 -13
View File
@@ -12,14 +12,17 @@
<GtkSeparateVSDllSuffix>-vs$(VSVer)</GtkSeparateVSDllSuffix>
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
<PythonDir Condition="'$(VisualStudioVersion)' == '10.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '11.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '12.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '14.0'">c:\python36</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '15.0'">c:\python36</PythonDir>
<PythonDirX64>$(PythonDir).x64</PythonDirX64>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '10.0|Win32'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '11.0|Win32'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '12.0|Win32'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '14.0|Win32'">c:\python36</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '15.0|Win32'">c:\python36</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '10.0|x64'">c:\python34.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '11.0|x64'">c:\python34.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '12.0|x64'">c:\python34.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '14.0|x64'">c:\python36.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '15.0|x64'">c:\python36.x64</PythonDir>
<IntrospectPythonParam>PYTHON=$(PythonDir)\python.exe</IntrospectPythonParam>
<IntrospectPythonParamX64>PYTHON=$(PythonDirX64)\python.exe</IntrospectPythonParamX64>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3versionpathsprops</_PropertySheetDisplayName>
@@ -61,14 +64,8 @@
<BuildMacro Include="PythonDir">
<Value>$(PythonDir)</Value>
</BuildMacro>
<BuildMacro Include="PythonDirX64">
<Value>$(PythonDirX64)</Value>
</BuildMacro>
<BuildMacro Include="IntrospectPythonParam">
<Value>$(IntrospectPythonParam)</Value>
</BuildMacro>
<BuildMacro Include="IntrospectPythonParamX64">
<Value>$(IntrospectPythonParamX64)</Value>
</BuildMacro>
</ItemGroup>
</Project>
+30
View File
@@ -252,6 +252,36 @@
/>
</FileConfiguration>
</File>
<File RelativePath="..\gentypefuncs.py">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating ..\..\..\gtk\gtktypefuncs.c..."
CommandLine="$(GenerateTypeFuncs)"
Outputs="..\..\..\gtk\gtktypefuncs.c"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating ..\..\..\gtk\gtktypefuncs.c..."
CommandLine="$(GenerateTypeFuncs)"
Outputs="..\..\..\gtk\gtktypefuncs.c"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating ..\..\..\gtk\gtktypefuncs.c..."
CommandLine="$(GenerateTypeFuncsX64)"
Outputs="..\..\..\gtk\gtktypefuncs.c"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating ..\..\..\gtk\gtktypefuncs.c..."
CommandLine="$(GenerateTypeFuncsX64)"
Outputs="..\..\..\gtk\gtktypefuncs.c"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
<File RelativePath="..\..\..\gtk\libgtk3.manifest" />
</Filter>
+20
View File
@@ -78,4 +78,24 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;
Name="CopyDemosH"
Value="copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h"
/>
<UserMacro
Name="GenerateTypeFuncs"
Value="
echo #undef GTK_COMPILATION &gt; ..\..\..\gtk\gtktypefuncs.preproc.c&#x0D;&#x0A;
echo #include &quot;gtkx.h&quot; &gt;&gt; ..\..\..\gtk\gtktypefuncs.preproc.c&#x0D;&#x0A;
cl /EP /I..\..\..\gtk /I..\..\..\gdk /I..\..\..\gdk\win32 /I..\..\.. /I$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0 /I$(GlibEtcInstallRoot)\include\pango-1.0 /I$(GlibEtcInstallRoot)\include\atk-1.0 /I$(GlibEtcInstallRoot)\include\cairo /I$(GlibEtcInstallRoot)\include\gio-win32-2.0 /I$(GlibEtcInstallRoot)\include\glib-2.0 /I$(GlibEtcInstallRoot)\lib\glib-2.0\include /I$(GlibEtcInstallRoot)\include /DHAVE_CONFIG_H /DG_DISABLE_SINGLE_INCLUDES /DATK_DISABLE_SINGLE_INCLUDES /DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES /DGTK_DISABLE_SINGLE_INCLUDES /D_USE_MATH_DEFINES /DINCLUDE_IM_am_et /DINCLUDE_IM_cedilla /DINCLUDE_IM_cyrillic_translit /DINCLUDE_IM_ime /DINCLUDE_IM_inuktitut /DINCLUDE_IM_ipa /DINCLUDE_IM_multipress /DINCLUDE_IM_thai /DINCLUDE_IM_ti_er /DINCLUDE_IM_ti_et /DINCLUDE_IM_viqr /DGTK_COMPILATION /DG_LOG_DOMAIN=\&quot;Gtk\&quot; /DGTK_HOST=\&quot;i686-pc-vs$(VSVer)\&quot; /DGTK_PRINT_BACKENDS=\&quot;file\&quot; /DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED /D$(GtkIncludedImmodulesDefines) /DGTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot; /DGTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot; /DGTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot; /DGTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot; /DMULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\&quot; /DMULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot; /DGTK_VERSION=\&quot;$(GtkVersion)\&quot; /DGTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)\&quot; /DGDK_DISABLE_DEPRECATED /DISOLATION_AWARE_ENABLED ..\..\..\gtk\gtktypefuncs.preproc.c &gt; ..\..\..\gtk\gtktypefuncs.combined.c&#x0D;&#x0A;
$(PythonDir)\python ..\gentypefuncs.py ..\..\..\gtk\gtktypefuncs.c ..\..\..\gtk\gtktypefuncs.combined.c&#x0D;&#x0A;
del ..\..\..\gtk\gtktypefuncs.combined.c ..\..\..\gtk\gtktypefuncs.preproc.c&#x0D;&#x0A;
"
/>
<UserMacro
Name="GenerateTypeFuncsX64"
Value="
echo #undef GTK_COMPILATION &gt; ..\..\..\gtk\gtktypefuncs.preproc.c&#x0D;&#x0A;
echo #include &quot;gtkx.h&quot; &gt;&gt; ..\..\..\gtk\gtktypefuncs.preproc.c&#x0D;&#x0A;
cl /EP /I..\..\..\gtk /I..\..\..\gdk /I..\..\..\gdk\win32 /I..\..\.. /I$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0 /I$(GlibEtcInstallRoot)\include\pango-1.0 /I$(GlibEtcInstallRoot)\include\atk-1.0 /I$(GlibEtcInstallRoot)\include\cairo /I$(GlibEtcInstallRoot)\include\gio-win32-2.0 /I$(GlibEtcInstallRoot)\include\glib-2.0 /I$(GlibEtcInstallRoot)\lib\glib-2.0\include /I$(GlibEtcInstallRoot)\include /DHAVE_CONFIG_H /DG_DISABLE_SINGLE_INCLUDES /DATK_DISABLE_SINGLE_INCLUDES /DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES /DGTK_DISABLE_SINGLE_INCLUDES /D_USE_MATH_DEFINES /DINCLUDE_IM_am_et /DINCLUDE_IM_cedilla /DINCLUDE_IM_cyrillic_translit /DINCLUDE_IM_ime /DINCLUDE_IM_inuktitut /DINCLUDE_IM_ipa /DINCLUDE_IM_multipress /DINCLUDE_IM_thai /DINCLUDE_IM_ti_er /DINCLUDE_IM_ti_et /DINCLUDE_IM_viqr /DGTK_COMPILATION /DG_LOG_DOMAIN=\&quot;Gtk\&quot; /DGTK_HOST=\&quot;i686-pc-vs$(VSVer)\&quot; /DGTK_PRINT_BACKENDS=\&quot;file\&quot; /DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED /D$(GtkIncludedImmodulesDefines) /DGTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot; /DGTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot; /DGTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot; /DGTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot; /DMULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\&quot; /DMULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot; /DGTK_VERSION=\&quot;$(GtkVersion)\&quot; /DGTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)\&quot; /DGDK_DISABLE_DEPRECATED /DISOLATION_AWARE_ENABLED ..\..\..\gtk\gtktypefuncs.preproc.c &gt; ..\..\..\gtk\gtktypefuncs.combined.c&#x0D;&#x0A;
$(PythonDirX64)\python ..\gentypefuncs.py ..\..\..\gtk\gtktypefuncs.c ..\..\..\gtk\gtktypefuncs.combined.c&#x0D;&#x0A;
del ..\..\..\gtk\gtktypefuncs.combined.c ..\..\..\gtk\gtktypefuncs.preproc.c&#x0D;&#x0A;
"
/>
</VisualStudioPropertySheet>
+24 -11
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], [22])
m4_define([gtk_micro_version], [25])
m4_define([gtk_interface_age], [25])
m4_define([gtk_minor_version], [23])
m4_define([gtk_micro_version], [0])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -54,17 +54,17 @@ m4_define([glib_min_required_version], m4_join([_], [GLIB_VERSION], glib_require
m4_define([glib_max_allowed_version], m4_join([_], [GLIB_VERSION], glib_required_major, glib_max_allowed_minor))
GLIB_VERSION_CFLAGS="-DGLIB_MIN_REQUIRED_VERSION=glib_min_required_version -DGLIB_MAX_ALLOWED_VERSION=glib_max_allowed_version"
m4_define([pango_required_version], [1.37.3])
m4_define([pango_required_version], [1.41.0])
m4_define([atk_required_version], [2.15.1])
m4_define([cairo_required_version], [1.14.0])
m4_define([gdk_pixbuf_required_version], [2.30.0])
m4_define([introspection_required_version], [1.39.0])
m4_define([wayland_required_version], [1.9.91])
m4_define([wayland_protocols_required_version], [1.9])
m4_define([wayland_protocols_required_version], [1.12])
m4_define([mirclient_required_version], [0.22.0])
m4_define([mircookie_required_version], [0.17.0])
m4_define([epoxy_required_version], [1.0])
m4_define([cloudproviders_required_version], [0.2.0])
m4_define([epoxy_required_version], [1.4])
m4_define([cloudproviders_required_version], [0.2.5])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
ATK_REQUIRED_VERSION=atk_required_version
@@ -459,6 +459,7 @@ if test "$enable_wayland_backend" = "yes"; then
GDK_BACKENDS="$GDK_BACKENDS wayland"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_WAYLAND"
backend_immodules="$backend_immodules,wayland"
WAYLAND_PACKAGES="$WAYLAND_DEPENDENCIES"
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
@@ -818,7 +819,13 @@ LIBS=$gtk_save_LIBS
AC_CHECK_HEADERS(linux/memfd.h,
AC_DEFINE(HAVE_LINUX_MEMFD_H, 1,
[Define to 1 if memfd.h is available]))
[Define to 1 if linux/memfd.h is available]))
AC_CHECK_HEADERS(linux/input.h,
AC_DEFINE(HAVE_LINUX_INPUT_H, 1,
[Define to 1 if linux/input.h is available]))
AC_CHECK_HEADERS(dev/evdev/input.h,
AC_DEFINE(HAVE_DEV_EVDEV_INPUT_H, 1,
[Define to 1 if dev/evdev/input.h is available]))
AC_CHECK_HEADERS(sys/mman.h,
AC_DEFINE(HAVE_SYS_MMAN_H, 1,
[Define to 1 if mman.h is available]))
@@ -990,6 +997,7 @@ AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
AM_CONDITIONAL(INCLUDE_IM_WAYLAND, [test x"$INCLUDE_wayland" = xyes])
# Checks to see whether we should include mediaLib
# support.
@@ -1430,6 +1438,7 @@ GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
ISO_CODES_PREFIX="`$PKG_CONFIG --variable=prefix iso-codes`"
AC_SUBST(GTK_PACKAGES)
AC_SUBST(GTK_PRIVATE_PACKAGES)
@@ -1443,6 +1452,7 @@ AC_SUBST(GLIB_PREFIX)
AC_SUBST(ATK_PREFIX)
AC_SUBST(PANGO_PREFIX)
AC_SUBST(CAIRO_PREFIX)
AC_SUBST(ISO_CODES_PREFIX)
AC_SUBST(GTK_DEBUG_FLAGS)
AC_SUBST(GTK_XIM_FLAGS)
@@ -1738,6 +1748,10 @@ PKG_CHECK_MODULES(FONTDEMO, harfbuzz >= 0.9 pangoft2, build_font_demo=yes, build
AC_SUBST(FONTDEMO_CFLAGS)
AC_SUBST(FONTDEMO_LIBS)
AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$build_font_demo" = xyes ])
if test "x$build_font_demo" = xyes; then
AC_DEFINE([HAVE_HARFBUZZ], 1, [defines whether we have HarfBuzz])
AC_DEFINE([HAVE_PANGOFT], 1, [defines whether we have pangoft2])
fi
##################################################
# Checks for gtk-doc and docbook-tools
@@ -1820,7 +1834,7 @@ case "$host" in
SAVED_CFLAGS="${CFLAGS}"
CFLAGS="-fvisibility=hidden"
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
AC_TRY_COMPILE([], [int main (void) { return 0; }],
AC_TRY_COMPILE([], [return 0],
AC_MSG_RESULT(yes)
enable_fvisibility_hidden=yes,
AC_MSG_RESULT(no)
@@ -1901,8 +1915,7 @@ AC_ARG_ENABLE(Bsymbolic,
[SAVED_LDFLAGS="${LDFLAGS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
[[int main (void) { return 0; }]])],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])],
[AC_MSG_RESULT(yes)
enable_Bsymbolic=yes],
[AC_MSG_RESULT(no)
+203 -112
View File
@@ -9,163 +9,254 @@
#include "gtkfishbowl.h"
GtkWidget *allow_changes;
const char *const css =
".blurred-button {"
" box-shadow: 0px 0px 5px 10px rgba(0, 0, 0, 0.5);"
"}"
"";
#define N_STATS 5
char **icon_names = NULL;
gsize n_icon_names = 0;
#define STATS_UPDATE_TIME G_USEC_PER_SEC
static void
init_icon_names (GtkIconTheme *theme)
{
GPtrArray *icons;
GList *l, *icon_list;
typedef struct _Stats Stats;
struct _Stats {
gint64 last_stats;
gint64 last_frame;
gint last_suggestion;
guint frame_counter_max;
if (icon_names)
return;
guint stats_index;
guint frame_counter[N_STATS];
guint item_counter[N_STATS];
icon_list = gtk_icon_theme_list_icons (theme, NULL);
icons = g_ptr_array_new ();
for (l = icon_list; l; l = l->next)
{
if (g_str_has_suffix (l->data, "symbolic"))
continue;
g_ptr_array_add (icons, g_strdup (l->data));
}
n_icon_names = icons->len;
g_ptr_array_add (icons, NULL); /* NULL-terminate the array */
icon_names = (char **) g_ptr_array_free (icons, FALSE);
/* don't free strings, we assigned them to the array */
g_list_free_full (icon_list, g_free);
}
static const char *
get_random_icon_name (GtkIconTheme *theme)
{
init_icon_names (theme);
return icon_names[g_random_int_range(0, n_icon_names)];
}
GtkWidget *
create_icon (void)
{
GtkWidget *image;
image = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()), GTK_ICON_SIZE_DND);
return image;
}
static GtkWidget *
create_button (void)
{
return gtk_button_new_with_label ("Button");
}
static GtkWidget *
create_blurred_button (void)
{
GtkWidget *w = gtk_button_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (w), "blurred-button");
return w;
}
static GtkWidget *
create_font_button (void)
{
return gtk_font_button_new ();
}
static GtkWidget *
create_level_bar (void)
{
GtkWidget *w = gtk_level_bar_new_for_interval (0, 100);
gtk_level_bar_set_value (GTK_LEVEL_BAR (w), 50);
/* Force them to be a bit larger */
gtk_widget_set_size_request (w, 200, -1);
return w;
}
static GtkWidget *
create_spinner (void)
{
GtkWidget *w = gtk_spinner_new ();
gtk_spinner_start (GTK_SPINNER (w));
return w;
}
static GtkWidget *
create_spinbutton (void)
{
GtkWidget *w = gtk_spin_button_new_with_range (0, 10, 1);
return w;
}
static GtkWidget *
create_label (void)
{
GtkWidget *w = gtk_label_new ("pLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
gtk_label_set_line_wrap (GTK_LABEL (w), TRUE);
gtk_label_set_max_width_chars (GTK_LABEL (w), 100);
return w;
}
#if 0
static GtkWidget *
create_gears (void)
{
GtkWidget *w = gtk_gears_new ();
gtk_widget_set_size_request (w, 100, 100);
return w;
}
#endif
static GtkWidget *
create_switch (void)
{
GtkWidget *w = gtk_switch_new ();
gtk_switch_set_state (GTK_SWITCH (w), TRUE);
return w;
}
static const struct {
const char *name;
GtkWidget * (*create_func) (void);
} widget_types[] = {
{ "Icon", create_icon },
{ "Button", create_button },
{ "Blurbutton", create_blurred_button },
{ "Fontbutton", create_font_button },
{ "Levelbar", create_level_bar },
{ "Label", create_label },
{ "Spinner", create_spinner },
{ "Spinbutton", create_spinbutton },
// { "Gears", create_gears },
{ "Switch", create_switch },
};
static Stats *
get_stats (GtkWidget *widget)
{
static GQuark stats_quark = 0;
Stats *stats;
if (G_UNLIKELY (stats_quark == 0))
stats_quark = g_quark_from_static_string ("stats");
stats = g_object_get_qdata (G_OBJECT (widget), stats_quark);
if (stats == NULL)
{
stats = g_new0 (Stats, 1);
g_object_set_qdata_full (G_OBJECT (widget), stats_quark, stats, g_free);
stats->last_frame = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
stats->last_stats = stats->last_frame;
}
return stats;
}
static int selected_widget_type = -1;
static const int N_WIDGET_TYPES = G_N_ELEMENTS (widget_types);
static void
do_stats (GtkWidget *widget,
GtkWidget *info_label,
gint *suggested_change)
set_widget_type (GtkFishbowl *fishbowl,
int widget_type_index)
{
Stats *stats;
gint64 frame_time;
GtkWidget *window, *headerbar;
stats = get_stats (widget);
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
if (widget_type_index == selected_widget_type)
return;
if (stats->last_stats + STATS_UPDATE_TIME < frame_time)
{
char *new_label;
guint i, n_frames;
selected_widget_type = widget_type_index;
n_frames = 0;
for (i = 0; i < N_STATS; i++)
{
n_frames += stats->frame_counter[i];
}
new_label = g_strdup_printf ("icons - %.1f fps",
(double) G_USEC_PER_SEC * n_frames
/ (N_STATS * STATS_UPDATE_TIME));
gtk_label_set_label (GTK_LABEL (info_label), new_label);
g_free (new_label);
gtk_fishbowl_set_creation_func (fishbowl,
widget_types[selected_widget_type].create_func);
if (stats->frame_counter[stats->stats_index] >= 19 * stats->frame_counter_max / 20)
{
if (stats->last_suggestion > 0)
stats->last_suggestion *= 2;
else
stats->last_suggestion = 1;
}
else
{
if (stats->last_suggestion < 0)
stats->last_suggestion--;
else
stats->last_suggestion = -1;
stats->last_suggestion = MAX (stats->last_suggestion, 1 - (int) stats->item_counter[stats->stats_index]);
}
window = gtk_widget_get_toplevel (GTK_WIDGET (fishbowl));
headerbar = gtk_window_get_titlebar (GTK_WINDOW (window));
gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar),
widget_types[selected_widget_type].name);
}
stats->stats_index = (stats->stats_index + 1) % N_STATS;
stats->frame_counter[stats->stats_index] = 0;
stats->item_counter[stats->stats_index] = stats->item_counter[(stats->stats_index + N_STATS - 1) % N_STATS];
stats->last_stats = frame_time;
if (suggested_change)
*suggested_change = stats->last_suggestion;
else
stats->last_suggestion = 0;
}
void
next_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
GtkFishbowl *fishbowl = user_data;
int new_index;
if (selected_widget_type + 1 >= N_WIDGET_TYPES)
new_index = 0;
else
{
if (suggested_change)
*suggested_change = 0;
}
new_index = selected_widget_type + 1;
stats->last_frame = frame_time;
stats->frame_counter[stats->stats_index]++;
stats->frame_counter_max = MAX (stats->frame_counter_max, stats->frame_counter[stats->stats_index]);
set_widget_type (fishbowl, new_index);
}
static void
stats_update (GtkWidget *widget)
void
prev_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
Stats *stats;
GtkFishbowl *fishbowl = user_data;
int new_index;
stats = get_stats (widget);
if (selected_widget_type - 1 < 0)
new_index = N_WIDGET_TYPES - 1;
else
new_index = selected_widget_type - 1;
stats->item_counter[stats->stats_index] = gtk_fishbowl_get_count (GTK_FISHBOWL (widget));
set_widget_type (fishbowl, new_index);
}
static gboolean
move_fish (GtkWidget *bowl,
GdkFrameClock *frame_clock,
gpointer info_label)
{
gint suggested_change = 0;
do_stats (bowl,
info_label,
!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (allow_changes)) ? &suggested_change : NULL);
gtk_fishbowl_set_count (GTK_FISHBOWL (bowl),
gtk_fishbowl_get_count (GTK_FISHBOWL (bowl)) + suggested_change);
stats_update (bowl);
return G_SOURCE_CONTINUE;
}
GtkWidget *
do_fishbowl (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
static GtkCssProvider *provider = NULL;
if (provider == NULL)
{
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider, css, -1, NULL);
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
if (!window)
{
GtkBuilder *builder;
GtkWidget *bowl, *info_label;
GtkWidget *bowl;
g_type_ensure (GTK_TYPE_FISHBOWL);
builder = gtk_builder_new_from_resource ("/fishbowl/fishbowl.ui");
gtk_builder_add_callback_symbols (builder,
"next_button_clicked_cb", G_CALLBACK (next_button_clicked_cb),
"prev_button_clicked_cb", G_CALLBACK (prev_button_clicked_cb),
NULL);
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
info_label = GTK_WIDGET (gtk_builder_get_object (builder, "info_label"));
allow_changes = GTK_WIDGET (gtk_builder_get_object (builder, "changes_allow"));
set_widget_type (GTK_FISHBOWL (bowl), 0);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_widget_realize (window);
gtk_widget_add_tick_callback (bowl, move_fish, info_label, NULL);
}
if (!gtk_widget_get_visible (window))
+59 -9
View File
@@ -8,27 +8,76 @@
<property name="visible">True</property>
<property name="show-close-button">True</property>
<child>
<object class="GtkLabel" id="info_label">
<object class="GtkBox">
<property name="visible">True</property>
<property name="label">icons - 0 fps</property>
<style>
<class name="linked"/>
</style>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<child>
<object class="GtkImage">
<property name="icon-name">pan-start-symbolic</property>
<property name="visible">True</property>
</object>
</child>
<signal name="clicked" handler="prev_button_clicked_cb" object="bowl" swapped="no"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<child>
<object class="GtkImage">
<property name="icon-name">pan-end-symbolic</property>
<property name="visible">True</property>
</object>
</child>
<signal name="clicked" handler="next_button_clicked_cb" object="bowl" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">fps</property>
</object>
<packing>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" bind-source="bowl" bind-property="count">0</property>
<property name="label" bind-source="bowl" bind-property="framerate"/>
</object>
<packing>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Icons, </property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" bind-source="bowl" bind-property="count"/>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="changes_allow">
<property name="active">False</property>
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean"/>
<property name="relief">none</property>
<child>
<object class="GtkImage">
@@ -38,7 +87,7 @@
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
</packing>
</child>
<child>
@@ -54,7 +103,7 @@
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
</packing>
</child>
</object>
@@ -63,6 +112,7 @@
<object class="GtkFishbowl" id="bowl">
<property name="visible">True</property>
<property name="animating">True</property>
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
</object>
</child>
</object>
+281 -148
View File
@@ -19,18 +19,25 @@
#include "gtkfishbowl.h"
#include "gtk/fallback-c89.c"
#include <math.h>
typedef struct _GtkFishbowlPrivate GtkFishbowlPrivate;
typedef struct _GtkFishbowlChild GtkFishbowlChild;
struct _GtkFishbowlPrivate
{
GtkFishCreationFunc creation_func;
GList *children;
guint count;
gint64 last_frame_time;
gint64 update_delay;
guint tick_id;
double framerate;
int last_benchmark_change;
guint benchmark : 1;
};
struct _GtkFishbowlChild
@@ -45,7 +52,10 @@ struct _GtkFishbowlChild
enum {
PROP_0,
PROP_ANIMATING,
PROP_BENCHMARK,
PROP_COUNT,
PROP_FRAMERATE,
PROP_UPDATE_DELAY,
NUM_PROPERTIES
};
@@ -56,7 +66,11 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkFishbowl, gtk_fishbowl, GTK_TYPE_CONTAINER)
static void
gtk_fishbowl_init (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
gtk_widget_set_has_window (GTK_WIDGET (fishbowl), FALSE);
priv->update_delay = G_USEC_PER_SEC;
}
/**
@@ -73,48 +87,9 @@ gtk_fishbowl_new (void)
}
static void
gtk_widget_measure (GtkWidget *widget,
GtkOrientation orientation,
gint size,
gint *minimum,
gint *natural,
gint *minimum_baseline,
gint *natural_baseline)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (size >= -1);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
if (size < 0)
gtk_widget_get_preferred_width (widget, minimum, natural);
else
gtk_widget_get_preferred_width_for_height (widget, size, minimum, natural);
if (minimum_baseline)
*minimum_baseline = -1;
if (natural_baseline)
*natural_baseline = -1;
}
else
{
gtk_widget_get_preferred_height_and_baseline_for_width (widget,
size,
minimum,
natural,
minimum_baseline,
natural_baseline);
}
}
static void
gtk_fishbowl_measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
gtk_fishbowl_get_preferred_width (GtkWidget *widget,
int *minimum,
int *natural)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
@@ -132,47 +107,42 @@ gtk_fishbowl_measure (GtkWidget *widget,
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_measure (child->widget, orientation, -1, &child_min, &child_nat, NULL, NULL);
gtk_widget_get_preferred_width (child->widget, &child_min, &child_nat);
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
}
}
static void
gtk_fishbowl_get_preferred_width (GtkWidget *widget,
int *minimum,
int *natural)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_HORIZONTAL, -1, minimum, natural, NULL, NULL);
}
static void
gtk_fishbowl_get_preferred_height (GtkWidget *widget,
int *minimum,
int *natural)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_VERTICAL, -1, minimum, natural, NULL, NULL);
}
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *children;
gint child_min, child_nat;
static void
gtk_fishbowl_get_preferred_width_for_height (GtkWidget *widget,
int for_size,
int *minimum,
int *natural)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_HORIZONTAL, for_size, minimum, natural, NULL, NULL);
}
*minimum = 0;
*natural = 0;
static void
gtk_fishbowl_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
gtk_fishbowl_measure (widget, GTK_ORIENTATION_VERTICAL, for_size, minimum, natural, minimum_baseline, natural_baseline);
for (children = priv->children; children; children = children->next)
{
int min_width;
child = children->data;
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_get_preferred_width (child->widget, &min_width, NULL);
gtk_widget_get_preferred_height_for_width (child->widget, min_width, &child_min, &child_nat);
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
}
}
static void
@@ -186,8 +156,6 @@ gtk_fishbowl_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GList *children;
gtk_widget_set_allocation (widget, allocation);
for (children = priv->children; children; children = children->next)
{
child = children->data;
@@ -244,7 +212,7 @@ gtk_fishbowl_remove (GtkContainer *container,
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GtkWidget *widget_container = GTK_WIDGET (container);
GtkWidget *widget_bowl = GTK_WIDGET (fishbowl);
GList *children;
for (children = priv->children; children; children = children->next)
@@ -261,8 +229,8 @@ gtk_fishbowl_remove (GtkContainer *container,
g_list_free (children);
g_free (child);
if (was_visible && gtk_widget_get_visible (widget_container))
gtk_widget_queue_resize (widget_container);
if (was_visible && gtk_widget_get_visible (widget_bowl))
gtk_widget_queue_resize (widget_bowl);
priv->count--;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_COUNT]);
@@ -271,6 +239,7 @@ gtk_fishbowl_remove (GtkContainer *container,
}
}
static void
gtk_fishbowl_forall (GtkContainer *container,
gboolean include_internals,
@@ -295,29 +264,6 @@ gtk_fishbowl_forall (GtkContainer *container,
}
}
static gboolean
gtk_fishbowl_draw (GtkWidget *widget,
cairo_t *cr)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *list;
for (list = priv->children;
list;
list = list->next)
{
child = list->data;
gtk_container_propagate_draw (GTK_CONTAINER (fishbowl),
child->widget,
cr);
}
return FALSE;
}
static void
gtk_fishbowl_dispose (GObject *object)
{
@@ -343,10 +289,18 @@ gtk_fishbowl_set_property (GObject *object,
gtk_fishbowl_set_animating (fishbowl, g_value_get_boolean (value));
break;
case PROP_BENCHMARK:
gtk_fishbowl_set_benchmark (fishbowl, g_value_get_boolean (value));
break;
case PROP_COUNT:
gtk_fishbowl_set_count (fishbowl, g_value_get_uint (value));
break;
case PROP_UPDATE_DELAY:
gtk_fishbowl_set_update_delay (fishbowl, g_value_get_int64 (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -367,10 +321,22 @@ gtk_fishbowl_get_property (GObject *object,
g_value_set_boolean (value, gtk_fishbowl_get_animating (fishbowl));
break;
case PROP_BENCHMARK:
g_value_set_boolean (value, gtk_fishbowl_get_benchmark (fishbowl));
break;
case PROP_COUNT:
g_value_set_uint (value, gtk_fishbowl_get_count (fishbowl));
break;
case PROP_FRAMERATE:
g_value_set_double (value, gtk_fishbowl_get_framerate (fishbowl));
break;
case PROP_UPDATE_DELAY:
g_value_set_int64 (value, gtk_fishbowl_get_update_delay (fishbowl));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -390,10 +356,7 @@ gtk_fishbowl_class_init (GtkFishbowlClass *klass)
widget_class->get_preferred_width = gtk_fishbowl_get_preferred_width;
widget_class->get_preferred_height = gtk_fishbowl_get_preferred_height;
widget_class->get_preferred_width_for_height = gtk_fishbowl_get_preferred_width_for_height;
widget_class->get_preferred_height_and_baseline_for_width = gtk_fishbowl_get_preferred_height_and_baseline_for_width;
widget_class->size_allocate = gtk_fishbowl_size_allocate;
widget_class->draw = gtk_fishbowl_draw;
container_class->add = gtk_fishbowl_add;
container_class->remove = gtk_fishbowl_remove;
@@ -406,13 +369,36 @@ gtk_fishbowl_class_init (GtkFishbowlClass *klass)
FALSE,
G_PARAM_READWRITE);
props[PROP_BENCHMARK] =
g_param_spec_boolean ("benchmark",
"Benchmark",
"Adapt the count property to hit the maximum framerate",
FALSE,
G_PARAM_READWRITE);
props[PROP_COUNT] =
g_param_spec_uint ("count",
"Count",
"Number of widgets",
0, G_MAXUINT,
0,
G_PARAM_READABLE);
G_PARAM_READWRITE);
props[PROP_FRAMERATE] =
g_param_spec_double ("framerate",
"Framerate",
"Framerate of this widget in frames per second",
0, G_MAXDOUBLE,
0,
G_PARAM_READABLE);
props[PROP_UPDATE_DELAY] =
g_param_spec_int64 ("update-delay",
"Update delay",
"Number of usecs between updates",
0, G_MAXINT64,
G_USEC_PER_SEC,
G_PARAM_READWRITE);
g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
}
@@ -425,72 +411,60 @@ gtk_fishbowl_get_count (GtkFishbowl *fishbowl)
return priv->count;
}
char **icon_names = NULL;
gsize n_icon_names = 0;
static void
init_icon_names (GtkIconTheme *theme)
{
GPtrArray *icons;
GList *l, *icon_list;
if (icon_names)
return;
icon_list = gtk_icon_theme_list_icons (theme, NULL);
icons = g_ptr_array_new ();
for (l = icon_list; l; l = l->next)
{
if (g_str_has_suffix (l->data, "symbolic"))
continue;
g_ptr_array_add (icons, g_strdup (l->data));
}
n_icon_names = icons->len;
g_ptr_array_add (icons, NULL); /* NULL-terminate the array */
icon_names = (char **) g_ptr_array_free (icons, FALSE);
/* don't free strings, we assigned them to the array */
g_list_free_full (icon_list, g_free);
}
static const char *
get_random_icon_name (GtkIconTheme *theme)
{
init_icon_names (theme);
return icon_names[g_random_int_range(0, n_icon_names)];
}
void
gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
guint count)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (priv->count == count)
return;
g_object_freeze_notify (G_OBJECT (fishbowl));
while (priv->count > count)
{
gtk_container_remove (GTK_CONTAINER (fishbowl),
((GtkFishbowlChild *) priv->children->data)->widget);
gtk_fishbowl_remove (GTK_CONTAINER (fishbowl), ((GtkFishbowlChild *) priv->children->data)->widget);
}
while (priv->count < count)
{
GtkWidget *new_widget;
new_widget = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()),
GTK_ICON_SIZE_DIALOG);
new_widget = priv->creation_func ();
gtk_widget_show (new_widget);
gtk_container_add (GTK_CONTAINER (fishbowl), new_widget);
gtk_fishbowl_add (GTK_CONTAINER (fishbowl), new_widget);
}
g_object_thaw_notify (G_OBJECT (fishbowl));
}
gboolean
gtk_fishbowl_get_benchmark (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->benchmark;
}
void
gtk_fishbowl_set_benchmark (GtkFishbowl *fishbowl,
gboolean benchmark)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (priv->benchmark == benchmark)
return;
priv->benchmark = benchmark;
if (!benchmark)
priv->last_benchmark_change = 0;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_BENCHMARK]);
}
gboolean
gtk_fishbowl_get_animating (GtkFishbowl *fishbowl)
{
@@ -499,6 +473,111 @@ gtk_fishbowl_get_animating (GtkFishbowl *fishbowl)
return priv->tick_id != 0;
}
static gint64
guess_refresh_interval (GdkFrameClock *frame_clock)
{
gint64 interval;
gint64 i;
interval = G_MAXINT64;
for (i = gdk_frame_clock_get_history_start (frame_clock);
i < gdk_frame_clock_get_frame_counter (frame_clock);
i++)
{
GdkFrameTimings *t, *before;
gint64 ts, before_ts;
t = gdk_frame_clock_get_timings (frame_clock, i);
before = gdk_frame_clock_get_timings (frame_clock, i - 1);
if (t == NULL || before == NULL)
continue;
ts = gdk_frame_timings_get_frame_time (t);
before_ts = gdk_frame_timings_get_frame_time (before);
if (ts == 0 || before_ts == 0)
continue;
interval = MIN (interval, ts - before_ts);
}
if (interval == G_MAXINT64)
return 0;
return interval;
}
static void
gtk_fishbowl_do_update (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GdkFrameClock *frame_clock;
GdkFrameTimings *start, *end;
gint64 start_counter, end_counter;
gint64 n_frames, expected_frames;
gint64 start_timestamp, end_timestamp;
gint64 interval;
frame_clock = gtk_widget_get_frame_clock (GTK_WIDGET (fishbowl));
if (frame_clock == NULL)
return;
start_counter = gdk_frame_clock_get_history_start (frame_clock);
end_counter = gdk_frame_clock_get_frame_counter (frame_clock);
start = gdk_frame_clock_get_timings (frame_clock, start_counter);
for (end = gdk_frame_clock_get_timings (frame_clock, end_counter);
end_counter > start_counter && end != NULL && !gdk_frame_timings_get_complete (end);
end = gdk_frame_clock_get_timings (frame_clock, end_counter))
end_counter--;
if (end_counter - start_counter < 4)
return;
start_timestamp = gdk_frame_timings_get_presentation_time (start);
end_timestamp = gdk_frame_timings_get_presentation_time (end);
if (start_timestamp == 0 || end_timestamp == 0)
{
start_timestamp = gdk_frame_timings_get_frame_time (start);
end_timestamp = gdk_frame_timings_get_frame_time (end);
}
n_frames = end_counter - start_counter;
priv->framerate = ((double) n_frames) * G_USEC_PER_SEC / (end_timestamp - start_timestamp);
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_FRAMERATE]);
if (!priv->benchmark)
return;
interval = gdk_frame_timings_get_refresh_interval (end);
if (interval == 0)
{
interval = guess_refresh_interval (frame_clock);
if (interval == 0)
return;
}
expected_frames = round ((double) (end_timestamp - start_timestamp) / interval);
if (n_frames >= expected_frames)
{
if (priv->last_benchmark_change > 0)
priv->last_benchmark_change *= 2;
else
priv->last_benchmark_change = 1;
}
else if (n_frames + 1 < expected_frames)
{
if (priv->last_benchmark_change < 0)
priv->last_benchmark_change--;
else
priv->last_benchmark_change = -1;
}
else
{
priv->last_benchmark_change = 0;
}
gtk_fishbowl_set_count (fishbowl, MAX (1, (int) priv->count + priv->last_benchmark_change));
}
static gboolean
gtk_fishbowl_tick (GtkWidget *widget,
GdkFrameClock *frame_clock,
@@ -509,9 +588,11 @@ gtk_fishbowl_tick (GtkWidget *widget,
GtkFishbowlChild *child;
GList *l;
gint64 frame_time, elapsed;
gboolean do_update;
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
elapsed = frame_time - priv->last_frame_time;
do_update = frame_time / priv->update_delay != priv->last_frame_time / priv->update_delay;
priv->last_frame_time = frame_time;
/* last frame was 0, so we're just starting to animate */
@@ -550,6 +631,9 @@ gtk_fishbowl_tick (GtkWidget *widget,
gtk_widget_queue_allocate (widget);
if (do_update)
gtk_fishbowl_do_update (fishbowl);
return G_SOURCE_CONTINUE;
}
@@ -574,8 +658,57 @@ gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
priv->last_frame_time = 0;
gtk_widget_remove_tick_callback (GTK_WIDGET (fishbowl), priv->tick_id);
priv->tick_id = 0;
priv->framerate = 0;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_FRAMERATE]);
}
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_ANIMATING]);
}
double
gtk_fishbowl_get_framerate (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->framerate;
}
gint64
gtk_fishbowl_get_update_delay (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->update_delay;
}
void
gtk_fishbowl_set_update_delay (GtkFishbowl *fishbowl,
gint64 update_delay)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (priv->update_delay == update_delay)
return;
priv->update_delay = update_delay;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_UPDATE_DELAY]);
}
void
gtk_fishbowl_set_creation_func (GtkFishbowl *fishbowl,
GtkFishCreationFunc creation_func)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
g_object_freeze_notify (G_OBJECT (fishbowl));
gtk_fishbowl_set_count (fishbowl, 0);
priv->last_benchmark_change = 0;
priv->creation_func = creation_func;
gtk_fishbowl_set_count (fishbowl, 1);
g_object_thaw_notify (G_OBJECT (fishbowl));
}
+12 -1
View File
@@ -32,9 +32,11 @@ G_BEGIN_DECLS
typedef struct _GtkFishbowl GtkFishbowl;
typedef struct _GtkFishbowlClass GtkFishbowlClass;
typedef GtkWidget * (* GtkFishCreationFunc) (void);
struct _GtkFishbowl
{
GtkContainer container;
GtkContainer parent;
};
struct _GtkFishbowlClass
@@ -52,6 +54,15 @@ void gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
gboolean gtk_fishbowl_get_animating (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
gboolean animating);
gboolean gtk_fishbowl_get_benchmark (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_benchmark (GtkFishbowl *fishbowl,
gboolean animating);
double gtk_fishbowl_get_framerate (GtkFishbowl *fishbowl);
gint64 gtk_fishbowl_get_update_delay (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_update_delay (GtkFishbowl *fishbowl,
gint64 update_delay);
void gtk_fishbowl_set_creation_func (GtkFishbowl *fishbowl,
GtkFishCreationFunc creation_func);
G_END_DECLS
+10 -15
View File
@@ -338,21 +338,16 @@
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="label" translatable="yes">Copy to Clipboard</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin">20</property>
<signal name="clicked" handler="copy_to_clipboard"/>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
<property name="width">5</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="label" translatable="yes">Copy to Clipboard</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin">20</property>
<signal name="clicked" handler="copy_to_clipboard"/>
</object>
</child>
<child>
+1
View File
@@ -493,6 +493,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<object class="GtkEntry" id="entry1">
<property name="visible">1</property>
<property name="can_focus">1</property>
<property name="enable-emoji-completion">1</property>
<property name="invisible_char">•</property>
<property name="placeholder-text" translatable="yes">Click icon to change mode</property>
<property name="secondary_icon_name">view-refresh-symbolic</property>
+4
View File
@@ -113,6 +113,10 @@
<title>Index of new symbols in 3.22</title>
<xi:include href="xml/api-index-3.22.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-24" role="3.24">
<title>Index of new symbols in 3.24</title>
<xi:include href="xml/api-index-3.24.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+2
View File
@@ -386,6 +386,7 @@ gdk_window_move
gdk_window_resize
gdk_window_move_resize
gdk_window_scroll
gdk_window_move_to_rect
gdk_window_move_region
gdk_window_flush
gdk_window_has_native
@@ -1270,6 +1271,7 @@ gdk_wayland_device_get_wl_seat
gdk_wayland_display_get_wl_compositor
gdk_wayland_display_get_wl_display
gdk_wayland_display_get_xdg_shell
gdk_wayland_display_query_registry
gdk_wayland_window_get_wl_surface
gdk_wayland_window_set_use_custom_surface
GdkWaylandWindowExported
+53 -58
View File
@@ -4,13 +4,13 @@
]>
<refentry id="chap-css-overview">
<refmeta>
<refentrytitle>GTK+ CSS</refentrytitle>
<refentrytitle>GTK+ CSS Overview</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GTK+ CSS</refname>
<refname>GTK+ CSS Overview</refname>
<refpurpose>
Overview of CSS in GTK+
</refpurpose>
@@ -21,12 +21,6 @@ Overview of CSS in GTK+
Formatting conventions:
We use
U+2011 Non-breaking Hyphen
  U+00A0 No-break Space
to control line breaks in the Name and Value columns.
We use
〈 U+2329 Left-pointing Angle Bracket
〉 U+232A Right-pointing Angle Bracket
@@ -123,7 +117,7 @@ scale[.fine-tune]
<programlisting><![CDATA[
button, entry {
color: #ff00ea;
font: 12px "Comic Sans"
font: 12px "Comic Sans";
}
]]></programlisting>
</example>
@@ -142,8 +136,8 @@ button, entry {
The syntax for @import rules is as follows:
</para>
<literallayout><code>〈import rule〉 = @import [ 〈url〉 | 〈string〉] ;</code>
<code>〈url〉 = url( 〈string〉)</code>
<literallayout><code>〈import rule〉 = @import [ 〈url〉 | 〈string〉 ]</code>
<code>〈url〉 = url( 〈string〉 )</code>
</literallayout>
<example><title>An example for using the @import rule</title>
@@ -187,7 +181,7 @@ button, entry {
<title>Theme labels that are descendants of a window</title>
<programlisting><![CDATA[
window label {
background-color: #898989
background-color: #898989;
}
]]></programlisting>
</example>
@@ -196,7 +190,7 @@ window label {
<title>Theme notebooks, and anything within</title>
<programlisting><![CDATA[
notebook {
background-color: #a939f0
background-color: #a939f0;
}
]]></programlisting>
</example>
@@ -207,7 +201,7 @@ notebook {
combobox,
notebook > entry {
color: @fg_color;
background-color: #1209a2
background-color: #1209a2;
}
]]></programlisting>
</example>
@@ -216,7 +210,7 @@ notebook > entry {
<title>Theme any widget within a GtkBox</title>
<programlisting><![CDATA[
box * {
font: 20px Sans
font: 20px Sans;
}
]]></programlisting>
</example>
@@ -225,7 +219,7 @@ box * {
<title>Theme a label named title-label</title>
<programlisting><![CDATA[
label#title-label {
font: 15px Sans
font: 15px Sans;
}
]]></programlisting>
</example>
@@ -234,7 +228,7 @@ label#title-label {
<title>Theme any widget named main-entry</title>
<programlisting><![CDATA[
#main-entry {
background-color: #f0a810
background-color: #f0a810;
}
]]></programlisting>
</example>
@@ -252,7 +246,7 @@ label#title-label {
<title>Theme the entry of a GtkSpinButton</title>
<programlisting><![CDATA[
spinbutton entry {
color: 900185;
color: #900185;
}
]]></programlisting>
</example>
@@ -358,134 +352,134 @@ checkbutton:indeterminate {
</thead>
<tbody>
<row>
<entry>*</entry>
<entry><phrase role="nowrap">*</phrase></entry>
<entry>any node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#universal-selector">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E</entry>
<entry><phrase role="nowrap">E</phrase></entry>
<entry>any node with name E</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#type-selectors">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E.class</entry>
<entry><phrase role="nowrap">E.class</phrase></entry>
<entry>any E node with the given style class</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#class-html">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E#id</entry>
<entry><phrase role="nowrap">E#id</phrase></entry>
<entry>any E node with the given ID</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#id-selectors">CSS</ulink></entry>
<entry>GTK+ uses the widget name as ID</entry>
</row>
<row>
<entry>E:nthchild(〈nthchild〉)</entry>
<entry><phrase role="nowrap">E:nth-child(〈nth-child〉)</phrase></entry>
<entry>any E node which is the n-th child of its parent node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:nthlastchild(〈nthchild〉)</entry>
<entry><phrase role="nowrap">E:nth-last-child(〈nth-child〉)</phrase></entry>
<entry>any E node which is the n-th child of its parent node, counting from the end</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:firstchild</entry>
<entry><phrase role="nowrap">E:first-child</phrase></entry>
<entry>any E node which is the first child of its parent node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:lastchild</entry>
<entry><phrase role="nowrap">E:last-child</phrase></entry>
<entry>any E node which is the last child of its parent node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:onlychild</entry>
<entry><phrase role="nowrap">E:only-child</phrase></entry>
<entry>any E node which is the only child of its parent node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#structural-pseudos">CSS</ulink></entry>
<entry>Equivalent to E:first-child:last-child</entry>
</row>
<row>
<entry>E:link, E:visited</entry>
<entry><phrase role="nowrap">E:link, E:visited</phrase></entry>
<entry>any E node which represents a hyperlink, not yet visited (:link) or already visited (:visited)</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#link">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_LINK and GTK_STATE_FLAGS_VISITED</entry>
</row>
<row>
<entry>E:active, E:hover, E:focus</entry>
<entry><phrase role="nowrap">E:active, E:hover, E:focus</phrase></entry>
<entry>any E node which is part of a widget with the corresponding state</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#useraction-pseudos">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_ACTIVE, GTK_STATE_FLAG_PRELIGHT and GTK_STATE_FLAGS_FOCUSED; GTK+ also allows E:prelight and E:focused</entry>
</row>
<row>
<entry>E:disabled</entry>
<entry><phrase role="nowrap">E:disabled</phrase></entry>
<entry>any E node which is part of a widget which is disabled</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_INSENSITIVE; GTK+ also allows E:insensitive</entry>
</row>
<row>
<entry>E:checked</entry>
<entry><phrase role="nowrap">E:checked</phrase></entry>
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is checked</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#UIstates">CSS</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_CHECKED</entry>
</row>
<row>
<entry>E:indeterminate</entry>
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is in an inconsistent state</entry>
<entry><phrase role="nowrap">E:indeterminate</phrase></entry>
<entry>any E node which is part of a widget (e.g. radio- or checkbuttons) which is in an indeterminate state</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#indeterminate">CSS3</ulink>,
<ulink url="https://drafts.csswg.org/selectors/#indeterminate">CSS4</ulink></entry>
<entry>Corresponds to GTK_STATE_FLAG_INCONSISTENT; GTK+ also allows E:inconsistent</entry>
</row>
<row>
<entry>E:backdrop, E:selected</entry>
<entry><phrase role="nowrap">E:backdrop, E:selected</phrase></entry>
<entry>any E node which is part of a widget with the corresponding state</entry>
<entry></entry>
<entry>Corresponds to GTK_STATE_FLAG_BACKDROP, GTK_STATE_FLAG_SELECTED</entry>
</row>
<row>
<entry>E:not(〈selector〉)</entry>
<entry><phrase role="nowrap">E:not(〈selector〉)</phrase></entry>
<entry>any E node which does not match the simple selector 〈selector〉</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#negation">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:dir(ltr), E:dir(rtl)</entry>
<entry><phrase role="nowrap">E:dir(ltr), E:dir(rtl)</phrase></entry>
<entry>any E node that has the corresponding text direction</entry>
<entry><ulink url="https://drafts.csswg.org/selectors/#the-dir-pseudo">CSS4</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E:drop(active)</entry>
<entry><phrase role="nowrap">E:drop(active)</phrase></entry>
<entry>any E node that is an active drop target for a current DND operation</entry>
<entry><ulink url="https://drafts.csswg.org/selectors/#drag-pseudos">CSS4</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E F</entry>
<entry><phrase role="nowrap">E F</phrase></entry>
<entry>any F node which is a descendent of an E node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#descendent-combinators">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E > F</entry>
<entry><phrase role="nowrap">E > F</phrase></entry>
<entry>any F node which is a child of an E node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#child-combinators">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E ~ F</entry>
<entry><phrase role="nowrap">E ~ F</phrase></entry>
<entry>any F node which is preceded by an E node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#general-sibling-combinators">CSS</ulink></entry>
<entry></entry>
</row>
<row>
<entry>E + F</entry>
<entry><phrase role="nowrap">E + F</phrase></entry>
<entry>any F node which is immediately preceded by an E node</entry>
<entry><ulink url="https://www.w3.org/TR/css3-selectors/#adjacent-sibling-combinators">CSS</ulink></entry>
<entry></entry>
@@ -514,8 +508,8 @@ checkbutton:indeterminate {
</para>
<literallayout><code>〈color〉 = currentColor | transparent | 〈color name〉 | 〈rgb color〉 | 〈rgba color〉 | 〈hex color〉 | 〈gtk color〉</code>
<code>〈rgb color 〉 = rgb( 〈number〉, 〈number〉, 〈number〉 ) | rgb( 〈percentage〉, 〈percentage〉, 〈percentage〉 )</code>
<code>〈rgba color 〉 = rgba(〈number〉, 〈number〉, 〈number〉, 〈alpha value〉) | rgba( 〈percentage〉, 〈percentage〉, 〈percentage〉, 〈alpha value〉 )</code>
<code>〈rgb color〉 = rgb( 〈number〉, 〈number〉, 〈number〉 ) | rgb( 〈percentage〉, 〈percentage〉, 〈percentage〉 )</code>
<code>〈rgba color〉 = rgba( 〈number〉, 〈number〉, 〈number〉, 〈alpha value〉 ) | rgba( 〈percentage〉, 〈percentage〉, 〈percentage〉, 〈alpha value〉 )</code>
<code>〈hex color〉 = #〈hex digits〉</code>
<code>〈alpha value〉 = 〈number〉</code>, clamped to values between 0 and 1
</literallayout>
@@ -552,7 +546,7 @@ checkbutton:indeterminate {
GTK+ adds several additional ways to specify colors.
</para>
<literallayout><code>〈gtk color〉 = 〈symbolic color〉 | 〈color expression〉| 〈win32 color〉</code>
<literallayout><code>〈gtk color〉 = 〈symbolic color〉 | 〈color expression〉 | 〈win32 color〉</code>
</literallayout>
<para>
@@ -576,7 +570,7 @@ checkbutton:indeterminate {
@define-color bg_color #f9a039;
* {
background-color: @bg_color;
background-color: @bg_color;
}
]]></programlisting>
</example>
@@ -596,14 +590,15 @@ background-color: @bg_color;
number from 0 to 1 and applies that as the opacity of the supplied color.
</para>
<literallayout><code>〈color expression〉 = lighter(〈color〉) | darker(〈color〉) | shade(〈color〉,〈number〉) | alpha(〈color〉,〈number〉) | mix(〈color〉,〈color〉,〈number〉)</code>
<literallayout><code>〈color expression〉 = lighter( 〈color〉 ) | darker( 〈color〉 ) | shade( 〈color〉, 〈number〉 ) |</code>
<code> alpha( 〈color〉, 〈number〉 ) | mix( 〈color〉, 〈color〉, 〈number〉 )</code>
</literallayout>
<para>
On Windows, GTK+ allows to refer to system colors, as follows:
</para>
<literallayout><code>〈win32 color〉 = -gtk-win32-color( 〈name〉, 〈integer〉)</code>
<literallayout><code>〈win32 color〉 = -gtk-win32-color( 〈name〉, 〈integer〉 )</code>
</literallayout>
</refsect2>
@@ -617,17 +612,17 @@ background-color: @bg_color;
</para>
<literallayout><code>〈image〉 = 〈url〉 | 〈crossfade〉 | 〈alternatives〉 | 〈gradient〉 | 〈gtk image〉</code>
<code>〈crossfade〉 = cross-fade( 〈percentage〉, 〈image〉, 〈image〉)</code>
<code>〈alternatives〉 = image([ 〈image〉, ]* [ 〈image〉 | 〈color〉 ])</code>
<code>〈crossfade〉 = cross-fade( 〈percentage〉, 〈image〉, 〈image〉 )</code>
<code>〈alternatives〉 = image([ 〈image〉, ]* [ 〈image〉 | 〈color〉 ] )</code>
<code>〈gradient〉 = 〈linear gradient〉 | 〈radial gradient〉</code>
<code>〈linear gradient〉 = [ linear-gradient | repeating-linear-gradient ] (</code>
<code> [ [ 〈angle〉 | to 〈side or corner〉 ] , ]?</code>
<code> 〈color stops〉 )</code>
<code>〈radial gradient〉 = [ radialgradient | repeatingradialgradient ] (</code>
<code>〈radial gradient〉 = [ radial-gradient | repeating-radial-gradient ] (</code>
<code> [ [ 〈shape〉 || 〈size〉 ] [ at 〈position〉 ]? , | at 〈position〉, ]?</code>
<code> 〈color stops〉 )</code>
<code>〈side or corner〉 = [ left | right ] || [ top | bottom ]</code>
<code>〈color stops〉 = 〈color stop〉 [ , 〈color stop〉]+</code>
<code>〈color stops〉 = 〈color stop〉 [ , 〈color stop〉 ]+</code>
<code>〈color stop〉 = 〈color〉 [ 〈percentage〉 | 〈length〉 ]?</code>
<code>〈shape〉 = circle | ellipse</code>
<code>〈size〉 = 〈extent keyword〉 | 〈length〉 | [ 〈length〉 | 〈percentage〉 ]{1,2}</code>
@@ -848,7 +843,7 @@ arrow.fancy {
CSS, this can be done with the -gtk-scaled syntax.
</para>
<literallayout><code>〈scaled image〉 = -gtk-scaled( 〈image〉[, 〈image〉]* )</code>
<literallayout><code>〈scaled image〉 = -gtk-scaled( 〈image〉[ , 〈image〉 ]* )</code>
</literallayout>
<para>
@@ -867,7 +862,7 @@ arrow {
]]></programlisting>
</example>
<literallayout><code>〈recolored image〉 = -gtk-recolored( 〈url〉[, 〈color palette〉] )</code>
<literallayout><code>〈recolored image〉 = -gtk-recolor( 〈url〉 [ , 〈color palette〉 ] )</code>
</literallayout>
<para>
@@ -893,7 +888,7 @@ arrow {
</para>
<literallayout><code>〈win32 theme part〉 = -gtk-win32-theme-part( 〈name〉, 〈integer〉 〈integer〉</code>
<code> [, [ over( 〈integer〉 〈integer〉 [ , 〈alpha value〉]? ) | margins( 〈integer〉{1,4} ) ] ]* )</code>
<code> [ , [ over( 〈integer〉 〈integer〉 [ , 〈alpha value〉 ]? ) | margins( 〈integer〉{1,4} ) ] ]* )</code>
</literallayout>
</refsect2>
@@ -944,7 +939,7 @@ arrow {
<literallayout><code>〈keyframe rule〉 = @keyframes 〈name〉 { 〈animation rule〉 }</code>
<code>〈animation rule〉 = 〈animation selector〉 { 〈declaration〉* }</code>
<code>〈animation selector〉 = 〈single animation selector〉 [ , 〈single animation selector ]*</code>
<code>〈animation selector〉 = 〈single animation selector〉 [ , 〈single animation selector ]*</code>
<code>〈single animation selector〉 = from | to | 〈percentage〉</code>
</literallayout>
@@ -994,10 +989,10 @@ spinner {
The syntax for @binding-set rules is as follows:
</para>
<literallayout><code>〈binding set rule〉 = @binding-set 〈binding name〉{ [ [ 〈binding〉 | 〈unbinding〉] ; ]* }</code>
<literallayout><code>〈binding set rule〉 = @binding-set 〈binding name〉 { [ [ 〈binding〉 | 〈unbinding〉 ] ; ]* }</code>
<code>〈binding〉 = bind "〈accelerator〉" { 〈signal emission〉* }</code>
<code>〈signal emission〉 = "〈signal name〉" ( [ 〈argument〉[ , 〈argument〉]* ]? }</code>
<code>〈unbinding〉 = unbind "〈accelerator〉" ;</code>
<code>〈signal emission〉 = "〈signal name〉" ( [ 〈argument〉 [ , 〈argument〉 ]* ]? }</code>
<code>〈unbinding〉 = unbind "〈accelerator〉"</code>
</literallayout>
<para>
+148 -150
View File
@@ -4,15 +4,15 @@
]>
<refentry id="chap-css-properties">
<refmeta>
<refentrytitle>GTK+ CSS</refentrytitle>
<refentrytitle>GTK+ CSS Properties</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GTK+ CSS</refname>
<refname>GTK+ CSS Properties</refname>
<refpurpose>
GTK+ CSS Properties
CSS Properties in GTK+
</refpurpose>
</refnamediv>
@@ -21,12 +21,6 @@ GTK+ CSS Properties
Formatting conventions:
We use
U+2011 Non-breaking Hyphen
  U+00A0 No-break Space
to control line breaks in the Name and Value columns.
We use
〈 U+2329 Left-pointing Angle Bracket
〉 U+232A Right-pointing Angle Bracket
@@ -77,11 +71,12 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</para>
<literallayout>
<code>〈win32 theme size〉 = 〈win32 size〉| 〈win32 part size〉</code>
<code>〈win32 theme size〉 = 〈win32 size〉 | 〈win32 part size〉</code>
<code>〈win32 size〉 = -gtk-win32-size ( 〈theme name〉, 〈metric id〉 )</code>
<code>〈win32 part size〉 = [ -gtk-win32-part-width | -gtk-win32-part-height |</code>
<code> -gtk-win32-part-border-top | -gtk-win32-part-border-right |</code>
<code> -gtk-win32-part-border-bottom | -gtk-win32-part-border-left ] ( 〈theme name〉 , 〈integer〉 , 〈integer〉 )</code>
<code> -gtk-win32-part-border-top | -gtk-win32-part-border-right |</code>
<code> -gtk-win32-part-border-bottom | -gtk-win32-part-border-left ]</code>
<code> ( 〈theme name〉 , 〈integer〉 , 〈integer〉 )</code>
</literallayout>
<literallayout><code>〈calc expression〉 = calc( 〈calc sum〉 )</code>
@@ -129,7 +124,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>color</entry>
<entry><phrase role="nowrap">color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>rgba(1,1,1,1)</code></entry>
<entry></entry>
@@ -139,7 +134,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>opacity</entry>
<entry><phrase role="nowrap">opacity</phrase></entry>
<entry><code>〈alpha value〉</code></entry>
<entry><code>1</code></entry>
<entry></entry>
@@ -167,7 +162,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>fontfamily</entry>
<entry><phrase role="nowrap">font-family</phrase></entry>
<entry><code>〈family name〉 [ , 〈family name〉 ]*</code></entry>
<entry>gtk-font-name setting</entry>
<entry></entry>
@@ -177,7 +172,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>fontsize</entry>
<entry><phrase role="nowrap">font-size</phrase></entry>
<entry><code>〈absolute size〉 | 〈relative size〉 | 〈length〉 | 〈percentage〉</code></entry>
<entry>gtk-font-name setting</entry>
<entry></entry>
@@ -187,7 +182,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>fontstyle</entry>
<entry><phrase role="nowrap">font-style</phrase></entry>
<entry><code>normal | oblique | italic</code></entry>
<entry><code>normal</code></entry>
<entry></entry>
@@ -197,7 +192,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>fontvariant</entry>
<entry><phrase role="nowrap">font-variant</phrase></entry>
<entry><code>normal | small-caps</code></entry>
<entry><code>normal</code></entry>
<entry></entry>
@@ -207,7 +202,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>only CSS2 values supported</entry>
</row>
<row>
<entry>fontweight</entry>
<entry><phrase role="nowrap">font-weight</phrase></entry>
<entry><code>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900</code></entry>
<entry><code>normal</code></entry>
<entry></entry>
@@ -217,7 +212,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>normal is synonymous with 400, bold with 700</entry>
</row>
<row>
<entry>fontstretch</entry>
<entry><phrase role="nowrap">font-stretch</phrase></entry>
<entry><code>ultra-condensed | extra-condensed | condensed | semi-condensed | normal | semi-expanded | expanded | extra-expanded | ultra-expanded</code></entry>
<entry><code>normal</code></entry>
<entry></entry>
@@ -226,7 +221,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkdpi</entry>
<entry><phrase role="nowrap">-gtk-dpi</phrase></entry>
<entry><code>〈number〉</code></entry>
<entry>screen resolution</entry>
<entry></entry>
@@ -242,7 +237,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>font</entry>
<entry><phrase role="nowrap">font</phrase></entry>
<entry><code>[ 〈font-style〉 || 〈font-variant〉 || 〈font-weight〉 || 〈font-stretch〉 ]? 〈font-size〉 〈font-family〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/fonts.html#font-shorthand">CSS2</ulink>,
@@ -273,7 +268,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>caret-color</entry>
<entry><phrase role="nowrap">caret-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -282,7 +277,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows an auto value</entry>
</row>
<row>
<entry>-gtk-secondary-caret-color</entry>
<entry><phrase role="nowrap">-gtk-secondary-caret-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -309,7 +304,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>letterspacing</entry>
<entry><phrase role="nowrap">letter-spacing</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -318,7 +313,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>textdecorationline</entry>
<entry><phrase role="nowrap">text-decoration-line</phrase></entry>
<entry><code>none | underline | line-through</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -328,7 +323,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows overline</entry>
</row>
<row>
<entry>textdecorationcolor</entry>
<entry><phrase role="nowrap">text-decoration-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -337,7 +332,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>textdecorationstyle</entry>
<entry><phrase role="nowrap">text-decoration-style</phrase></entry>
<entry><code>solid | double | wavy</code></entry>
<entry><code>solid</code></entry>
<entry></entry>
@@ -346,7 +341,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows dashed and dotted</entry>
</row>
<row>
<entry>textshadow</entry>
<entry><phrase role="nowrap">text-shadow</phrase></entry>
<entry><code>none | 〈shadow〉</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -362,7 +357,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>textdecoration</entry>
<entry><phrase role="nowrap">text-decoration</phrase></entry>
<entry><code>〈text-decoration-line〉 || 〈text-decoration-style〉 || 〈text-decoration-color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/css-text-decor-3/#text-decoration-property">CSS3</ulink></entry>
@@ -390,7 +385,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>gtkiconsource</entry>
<entry><phrase role="nowrap">-gtk-icon-source</phrase></entry>
<entry><code>builtin | 〈image〉 | none</code></entry>
<entry><code>builtin</code></entry>
<entry></entry>
@@ -399,7 +394,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkicontransform</entry>
<entry><phrase role="nowrap">-gtk-icon-transform</phrase></entry>
<entry><code>none | 〈transform〉+</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -408,7 +403,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkiconstyle</entry>
<entry><phrase role="nowrap">-gtk-icon-style</phrase></entry>
<entry><code>requested | regular | symbolic</code></entry>
<entry><code>requested</code></entry>
<entry></entry>
@@ -417,7 +412,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>Determines the preferred style for application-loaded icons</entry>
</row>
<row>
<entry>gtkicontheme</entry>
<entry><phrase role="nowrap">-gtk-icon-theme</phrase></entry>
<entry><code>〈name〉</code></entry>
<entry>current icon theme</entry>
<entry></entry>
@@ -426,7 +421,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>The icon theme to use with -gtk-icontheme(). Since 3.20</entry>
</row>
<row>
<entry>gtkiconpalette</entry>
<entry><phrase role="nowrap">-gtk-icon-palette</phrase></entry>
<entry><code>〈color palette〉</code></entry>
<entry><code>default</code></entry>
<entry></entry>
@@ -435,7 +430,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>Used to recolor symbolic icons (both application-loaded and from -gtk-icontheme()). Since 3.20</entry>
</row>
<row>
<entry>gtkiconshadow</entry>
<entry><phrase role="nowrap">-gtk-icon-shadow</phrase></entry>
<entry><code>none | 〈shadow〉</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -444,7 +439,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkiconeffect</entry>
<entry><phrase role="nowrap">-gtk-icon-effect</phrase></entry>
<entry><code>none | highlight | dim</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -457,7 +452,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</table>
<literallayout><code>〈transform〉 = matrix( 〈number〉 [ , 〈number〉 ]{5} ) | translate( 〈length〉, 〈length〉 ) | translateX( 〈length〉 ) | translateY( 〈length〉 ) |</code>
<code> scale( 〈number〉[ , 〈number〉 ]? ) | scaleX( 〈number〉 ) | scaleY( 〈number〉 ) | rotate( 〈angle〉 ) | skew( 〈angle〉 [ , 〈angle〉 ]? ) |</code>
<code> scale( 〈number〉 [ , 〈number〉 ]? ) | scaleX( 〈number〉 ) | scaleY( 〈number〉 ) | rotate( 〈angle〉 ) | skew( 〈angle〉 [ , 〈angle〉 ]? ) |</code>
<code> skewX( 〈angle〉 ) | skewY( 〈angle〉 )</code>
<code>〈color palette〉 = default | 〈name〉 〈color〉 [ , 〈name〉 〈color〉 ]*</code>
</literallayout>
@@ -495,7 +490,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>minwidth</entry>
<entry><phrase role="nowrap">min-width</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -505,7 +500,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages</entry>
</row>
<row>
<entry>minheight</entry>
<entry><phrase role="nowrap">min-height</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -515,7 +510,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages</entry>
</row>
<row>
<entry>margintop</entry>
<entry><phrase role="nowrap">margin-top</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -525,7 +520,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
<entry>marginright</entry>
<entry><phrase role="nowrap">margin-right</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -535,7 +530,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
<entry>marginbottom</entry>
<entry><phrase role="nowrap">margin-bottom</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -545,7 +540,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
<entry>marginleft</entry>
<entry><phrase role="nowrap">margin-left</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -555,7 +550,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages or auto</entry>
</row>
<row>
<entry>paddingtop</entry>
<entry><phrase role="nowrap">padding-top</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -565,7 +560,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages</entry>
</row>
<row>
<entry>paddingright</entry>
<entry><phrase role="nowrap">padding-right</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -575,7 +570,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages</entry>
</row>
<row>
<entry>paddingbottom</entry>
<entry><phrase role="nowrap">padding-bottom</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -585,7 +580,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows percentages</entry>
</row>
<row>
<entry>paddingleft</entry>
<entry><phrase role="nowrap">padding-left</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -602,7 +597,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>margin</entry>
<entry><phrase role="nowrap">margin</phrase></entry>
<entry><code>〈length〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-margin">CSS2</ulink>,
@@ -610,7 +605,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>padding</entry>
<entry><phrase role="nowrap">padding</phrase></entry>
<entry><code>〈length〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-padding">CSS2</ulink>,
@@ -631,7 +626,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>bordertopwidth</entry>
<entry><phrase role="nowrap">border-top-width</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -641,7 +636,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows other values</entry>
</row>
<row>
<entry>borderrightwidth</entry>
<entry><phrase role="nowrap">border-right-width</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -651,7 +646,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows other values</entry>
</row>
<row>
<entry>borderbottomwidth</entry>
<entry><phrase role="nowrap">border-bottom-width</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -661,17 +656,17 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>CSS allows other values</entry>
</row>
<row>
<entry>borderrightwidth</entry>
<entry><phrase role="nowrap">border-left-width</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
<entry></entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right-width">CSS2</ulink>,
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left-width">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#the-border-width">CSS3</ulink></entry>
<entry>CSS allows other values</entry>
</row>
<row>
<entry>bordertopstyle</entry>
<entry><phrase role="nowrap">border-top-style</phrase></entry>
<entry><code>〈border style〉</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -681,7 +676,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderrightstyle</entry>
<entry><phrase role="nowrap">border-right-style</phrase></entry>
<entry><code>〈border style〉</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -691,7 +686,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderbottomstyle</entry>
<entry><phrase role="nowrap">border-bottom-style</phrase></entry>
<entry><code>〈border style〉</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -701,7 +696,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderleftstyle</entry>
<entry><phrase role="nowrap">border-left-style</phrase></entry>
<entry><code>〈border style〉</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -711,7 +706,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>bordertoprightradius</entry>
<entry><phrase role="nowrap">border-top-right-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -721,7 +716,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderbottomrightradius</entry>
<entry><phrase role="nowrap">border-bottom-right-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -731,7 +726,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderbottomleftradius</entry>
<entry><phrase role="nowrap">border-bottom-left-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -741,7 +736,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>bordertopleftradius</entry>
<entry><phrase role="nowrap">border-top-left-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -751,7 +746,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>bordertopcolor</entry>
<entry><phrase role="nowrap">border-top-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -761,7 +756,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderrightcolor</entry>
<entry><phrase role="nowrap">border-right-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -771,7 +766,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderbottomcolor</entry>
<entry><phrase role="nowrap">border-bottom-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -781,7 +776,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderleftcolor</entry>
<entry><phrase role="nowrap">border-left-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -791,7 +786,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderimagesource</entry>
<entry><phrase role="nowrap">border-image-source</phrase></entry>
<entry><code>〈image〉 | none</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -800,7 +795,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderimagerepeat</entry>
<entry><phrase role="nowrap">border-image-repeat</phrase></entry>
<entry><code>〈border repeat〉{1,2}</code></entry>
<entry><code>stretch</code></entry>
<entry></entry>
@@ -809,7 +804,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderimageslice</entry>
<entry><phrase role="nowrap">border-image-slice</phrase></entry>
<entry><code>[ 〈number〉 | 〈percentage〉 ]{1,4} &amp;&amp; fill?</code></entry>
<entry><code>100%</code></entry>
<entry></entry>
@@ -818,8 +813,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>borderimagewidth</entry>
<entry><code>[ 〈length〉 | 〈number〉 | 〈percentage〉 | auto ]{1,4}</code></entry>
<entry><phrase role="nowrap">border-image-width</phrase></entry>
<entry><code>[ 〈length〉 | 〈number〉 | 〈percentage〉 | auto ]{1,4}</code></entry>
<entry><code>1</code></entry>
<entry></entry>
<entry></entry>
@@ -835,7 +830,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>borderwidth</entry>
<entry><phrase role="nowrap">border-width</phrase></entry>
<entry><code>〈length〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-width">CSS2</ulink>,
@@ -843,7 +838,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>borderstyle</entry>
<entry><phrase role="nowrap">border-style</phrase></entry>
<entry><code>〈border style〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-style">CSS2</ulink>,
@@ -851,14 +846,14 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>bordercolor</entry>
<entry><phrase role="nowrap">border-color</phrase></entry>
<entry><code>〈color〉{1,4}</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-color">CSS3</ulink></entry>
<entry>a 'four sides' shorthand</entry>
</row>
<row>
<entry>bordertop</entry>
<entry><phrase role="nowrap">border-top</phrase></entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-top">CSS2</ulink>,
@@ -866,23 +861,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderleft</entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-left">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderbottom</entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-bottom">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderright</entry>
<entry><phrase role="nowrap">border-right</phrase></entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
@@ -890,7 +869,23 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>border</entry>
<entry><phrase role="nowrap">border-bottom</phrase></entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-bottom">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-bottom">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry><phrase role="nowrap">border-left</phrase></entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-left">CSS2</ulink>,
<ulink url="https://www.w3.org/TR/css3-background/#border-left">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry><phrase role="nowrap">border</phrase></entry>
<entry><code>〈length〉 || 〈border style〉 || 〈color〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#propdef-border-right">CSS2</ulink>,
@@ -898,14 +893,14 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>borderradius</entry>
<entry><code>[ 〈length〉 | 〈percentage〉 ]{1,4} [ / [ 〈length〉 | 〈percentage> ]{1,4} ]?</code></entry>
<entry><phrase role="nowrap">border-radius</phrase></entry>
<entry><code>[ 〈length〉 | 〈percentage〉 ]{1,4} [ / [ 〈length〉 | 〈percentage ]{1,4} ]?</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-radius">CSS3</ulink></entry>
<entry></entry>
</row>
<row>
<entry>borderimage</entry>
<entry><phrase role="nowrap">border-image</phrase></entry>
<entry><code>〈border-image-source〉 || 〈border-image-slice〉 [ / 〈border-image-width〉 | / 〈border-image-width〉? / 〈border-image-outset〉 ]? || 〈border-image-repeat〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/css3-background/#border-image">CSS3</ulink></entry>
@@ -929,7 +924,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>outlinestyle</entry>
<entry><phrase role="nowrap">outline-style</phrase></entry>
<entry><code>none | solid | inset | outset | hidden | dotted | dashed | double | groove | ridge</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -939,7 +934,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>outlinewidth</entry>
<entry><phrase role="nowrap">outline-width</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -949,7 +944,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>outlinecolor</entry>
<entry><phrase role="nowrap">outline-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>currentColor</code></entry>
<entry></entry>
@@ -959,7 +954,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>outlineoffset</entry>
<entry><phrase role="nowrap">outline-offset</phrase></entry>
<entry><code>〈length〉</code></entry>
<entry><code>0px</code></entry>
<entry></entry>
@@ -968,7 +963,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkoutlinetopleftradius</entry>
<entry><phrase role="nowrap">-gtk-outline-top-left-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -977,7 +972,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkoutlinetoprightradius</entry>
<entry><phrase role="nowrap">-gtk-outline-top-right-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -986,7 +981,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkoutlinebottomrightradius</entry>
<entry><phrase role="nowrap">-gtk-outline-bottom-right-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -995,7 +990,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkoutlinebottomleftradius</entry>
<entry><phrase role="nowrap">-gtk-outline-bottom-left-radius</phrase></entry>
<entry><code>〈corner radius〉</code></entry>
<entry><code>0</code></entry>
<entry></entry>
@@ -1011,7 +1006,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>outline</entry>
<entry><phrase role="nowrap">outline</phrase></entry>
<entry><code>〈outline-color〉 || 〈outline-style〉 || 〈outline-width〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/ui.html#propdef-outline">CSS2</ulink>,
@@ -1019,8 +1014,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>gtkoutlineradius</entry>
<entry><code>[ 〈length〉|〈percentage〉 ]{1,4} [ / [〈length〉 | 〈percentage> ]{1,4} ]?</code></entry>
<entry><phrase role="nowrap">-gtk-outline-radius</phrase></entry>
<entry><code>[ 〈length〉 | 〈percentage〉 ]{1,4} [ / [ 〈length〉 | 〈percentage]{1,4} ]?</code></entry>
<entry>see individual properties</entry>
<entry></entry>
<entry></entry>
@@ -1043,7 +1038,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>backgroundcolor</entry>
<entry><phrase role="nowrap">background-color</phrase></entry>
<entry><code>〈color〉</code></entry>
<entry><code>rgba(0,0,0,0)</code></entry>
<entry></entry>
@@ -1053,7 +1048,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>backgroundclip</entry>
<entry><phrase role="nowrap">background-clip</phrase></entry>
<entry><code>〈box〉 [ , 〈box〉 ]*</code></entry>
<entry><code>border-box</code></entry>
<entry></entry>
@@ -1062,7 +1057,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>backgroundorigin</entry>
<entry><phrase role="nowrap">background-origin</phrase></entry>
<entry><code>〈box〉 [ , 〈box〉 ]*</code></entry>
<entry><code>padding-box</code></entry>
<entry></entry>
@@ -1071,7 +1066,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>backgroundsize</entry>
<entry><phrase role="nowrap">background-size</phrase></entry>
<entry><code>〈bg-size〉 [ , 〈bg-size〉 ]*</code></entry>
<entry><code>auto</code></entry>
<entry></entry>
@@ -1080,8 +1075,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>backgroundposition</entry>
<entry><code>〈position〉 [ , 〈position〉 ]*</code></entry>
<entry><phrase role="nowrap">background-position</phrase></entry>
<entry><code>〈position〉 [ , 〈position〉 ]*</code></entry>
<entry><code>0</code></entry>
<entry></entry>
<entry></entry>
@@ -1090,8 +1085,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>backgroundrepeat</entry>
<entry><code>〈bg-repeat 〉[ , 〈bg-repeat〉 ]*</code></entry>
<entry><phrase role="nowrap">background-repeat</phrase></entry>
<entry><code>〈bg-repeat〉 [ , 〈bg-repeat〉 ]*</code></entry>
<entry><code>repeat</code></entry>
<entry></entry>
<entry></entry>
@@ -1100,8 +1095,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>backgroundimage</entry>
<entry><code>〈bg-image〉[ , 〈bg-image〉 ]*</code></entry>
<entry><phrase role="nowrap">background-image</phrase></entry>
<entry><code>〈bg-image〉 [ , 〈bg-image〉 ]*</code></entry>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
@@ -1110,8 +1105,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>not supported: urls without quotes, CSS radial gradients, colors in crossfades</entry>
</row>
<row>
<entry>background-blend-mode</entry>
<entry><code>〈blend-mode〉 [ , 〈blend-mode〉 ]*</code></entry>
<entry><phrase role="nowrap">background-blend-mode</phrase></entry>
<entry><code>〈blend-mode〉 [ , 〈blend-mode〉 ]*</code></entry>
<entry><code>normal</code></entry>
<entry></entry>
<entry></entry>
@@ -1119,8 +1114,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry>only affects multiple backgrounds</entry>
</row>
<row>
<entry>boxshadow</entry>
<entry><code>none | 〈box shadow〉 [ , 〈box shadow〉 ]*</code></entry>
<entry><phrase role="nowrap">box-shadow</phrase></entry>
<entry><code>none | 〈box shadow〉 [ , 〈box shadow〉 ]*</code></entry>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
@@ -1135,7 +1130,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry><para>background</para></entry>
<entry>background</entry>
<entry><code>[ 〈bg-layer〉 , ]* 〈final-bg-layer〉</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background">CSS2</ulink>,
@@ -1152,8 +1147,10 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<code>〈bg-repeat〉 = repeat-x | repeat-y | [ no-repeat | repeat | round | space ]{1,2}</code>
<code>〈bg-image〉 = 〈image〉 | none</code>
<code>〈bg-layer〉 = 〈bg-image〉 || 〈position〉 [ / 〈bg-size〉 ]? || 〈bg-repeat〉 || 〈box〉 || 〈box〉</code>
<code>〈final-bg-layer〉 = 〈bg-image〉 || 〈position〉 [ / 〈bg-size〉 ]? || 〈bg-repeat〉 || 〈box〉 || 〈box〉|| 〈color〉</code>
<code>〈blend-mode〉 = color || color-burn || color-dodge || darken || difference || exclusion || hard-light || hue || lighten || luminosity || multiply || normal || overlay || saturate || screen || soft-light</code>
<code>〈final-bg-layer〉 = 〈bg-image〉 || 〈position〉 [ / 〈bg-size〉 ]? || 〈bg-repeat〉 || 〈box〉 || 〈box〉 || 〈color〉</code>
<code>〈blend-mode〉 = color || color-burn || color-dodge || darken || difference || exclusion ||</code>
<code> hard-light || hue || lighten || luminosity || multiply || normal || overlay ||</code>
<code> saturate || screen || soft-light</code>
<code>〈box shadow〉 = inset? &amp;&amp; 〈length〉{2,4}? &amp;&amp; 〈color〉?</code>
</literallayout>
@@ -1176,7 +1173,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>transitionproperty</entry>
<entry><phrase role="nowrap">transition-property</phrase></entry>
<entry><code>none | all | 〈property name〉 [ , 〈property name〉 ]*</code></entry>
<entry><code>all</code></entry>
<entry></entry>
@@ -1185,7 +1182,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>transitionduration</entry>
<entry><phrase role="nowrap">transition-duration</phrase></entry>
<entry><code>〈time〉 [ , 〈time〉 ]*</code></entry>
<entry><code>0s</code></entry>
<entry></entry>
@@ -1194,8 +1191,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>transitiontimingfunction</entry>
<entry><code>〈singletimingfunction〉[ , 〈singletimingfunction〉 ]*</code></entry>
<entry><phrase role="nowrap">transition-timing-function</phrase></entry>
<entry><code>〈single-timing-function〉 [ , 〈single-timing-function〉 ]*</code></entry>
<entry><code>ease</code></entry>
<entry></entry>
<entry></entry>
@@ -1203,7 +1200,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>transitiondelay</entry>
<entry><phrase role="nowrap">transition-delay</phrase></entry>
<entry><code>〈time〉 [ , 〈time〉 ]*</code></entry>
<entry><code>0s</code></entry>
<entry></entry>
@@ -1219,7 +1216,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>transition</entry>
<entry><phrase role="nowrap">transition</phrase></entry>
<entry><code>〈single-transition〉 [ , 〈single-transition〉 ]*</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/css3-transitions/#transition">CSS3</ulink></entry>
@@ -1230,8 +1227,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</table>
<literallayout><code>〈single-timing-function〉 = ease | linear | ease-in | ease-out | ease-in-out |</code>
<code> step-start | step-end | steps( 〈integer〉 [ , [ start | end ] ]? ) |</code>
<code> cubic-bezier( 〈number〉, 〈number〉, 〈number〉, 〈number〉 )</code>
<code> step-start | step-end | steps( 〈integer〉 [ , [ start | end ] ]? ) |</code>
<code> cubic-bezier( 〈number〉, 〈number〉, 〈number〉, 〈number〉 )</code>
<code>〈single-transition〉 = [ none | 〈property name〉 ] || 〈time〉 || 〈single-transition-timing-function〉 || 〈time〉</code>
</literallayout>
@@ -1245,7 +1242,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>animationname</entry>
<entry><phrase role="nowrap">animation-name</phrase></entry>
<entry><code>〈single-animation-name〉 [ , 〈single-animation-name〉 ]*</code></entry>
<entry><code>none</code></entry>
<entry></entry>
@@ -1254,7 +1251,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>animationduration</entry>
<entry><phrase role="nowrap">animation-duration</phrase></entry>
<entry><code>〈time〉 [ , 〈time〉 ]*</code></entry>
<entry><code>0s</code></entry>
<entry></entry>
@@ -1263,8 +1260,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>animationtimingfunction</entry>
<entry><code>〈singletimingfunction〉 [ , 〈singletimingfunction〉 ]*</code></entry>
<entry><phrase role="nowrap">animation-timing-function</phrase></entry>
<entry><code>〈single-timing-function〉 [ , 〈single-timing-function〉 ]*</code></entry>
<entry><code>ease</code></entry>
<entry></entry>
<entry></entry>
@@ -1272,8 +1269,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>animationiteration-count</entry>
<entry><code>〈singleanimationiterationcount〉 [ , 〈singleanimationiterationcount〉 ]*</code></entry>
<entry><phrase role="nowrap">animation-iteration-count</phrase></entry>
<entry><code>〈single-animation-iteration-count〉 [ , 〈single-animation-iteration-count〉 ]*</code></entry>
<entry><code>1</code></entry>
<entry></entry>
<entry></entry>
@@ -1281,8 +1278,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>animationdirection</entry>
<entry><code>〈singleanimationdirection〉 [ , 〈singleanimationdirection〉 ]*</code></entry>
<entry><phrase role="nowrap">animation-direction</phrase></entry>
<entry><code>〈single-animation-direction〉 [ , 〈single-animation-direction〉 ]*</code></entry>
<entry><code>normal</code></entry>
<entry></entry>
<entry></entry>
@@ -1290,8 +1287,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>animationplaystate</entry>
<entry><code>〈singleanimationplaystate〉 [ , 〈singleanimationplaystate〉 ]*</code></entry>
<entry><phrase role="nowrap">animation-play-state</phrase></entry>
<entry><code>〈single-animation-play-state〉 [ , 〈single-animation-play-state〉 ]*</code></entry>
<entry><code>running</code></entry>
<entry></entry>
<entry></entry>
@@ -1299,7 +1296,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>animationdelay</entry>
<entry><phrase role="nowrap">animation-delay</phrase></entry>
<entry><code>〈time〉 [ , 〈time〉 ]*</code></entry>
<entry><code>0s</code></entry>
<entry></entry>
@@ -1308,8 +1305,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
</row>
<row>
<entry>animationfillmode</entry>
<entry><code>〈singleanimationfillmode〉 [ , 〈singleanimationfillmode〉 ]*</code></entry>
<entry><phrase role="nowrap">animation-fill-mode</phrase></entry>
<entry><code>〈single-animation-fill-mode〉 [ , 〈single-animation-fill-mode〉 ]*</code></entry>
<entry><code>none</code></entry>
<entry></entry>
<entry></entry>
@@ -1324,8 +1321,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>animation</entry>
<entry><code>〈singleanimation〉 [ , 〈singleanimation〉]*</code></entry>
<entry><phrase role="nowrap">animation</phrase></entry>
<entry><code>〈single-animation〉 [ , 〈single-animation〉 ]*</code></entry>
<entry>see individual properties</entry>
<entry><ulink url="https://www.w3.org/TR/css3-animations/#animation">CSS3</ulink></entry>
<entry></entry>
@@ -1340,7 +1337,8 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<code>〈single-animation-play-state〉 = running | paused</code>
<code>〈single-animation-fill-mode〉 = none | forwards | backwards | both</code>
<code>〈single-animation〉 = 〈single-animation-name〉 || 〈time〉 || 〈single-timing-function〉 || 〈time〉 ||</code>
<code> 〈single-animation-iteration-count〉 || 〈single-animation-direction〉 || 〈single-animation-play-state〉 || 〈single-animation-fill-mode〉</code>
<code> 〈single-animation-iteration-count〉 || 〈single-animation-direction〉 ||</code>
<code> 〈single-animation-play-state〉 || 〈single-animation-fill-mode〉</code>
</literallayout>
<table pgwide="1">
@@ -1353,7 +1351,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</thead>
<tbody>
<row>
<entry>gtkkeybindings</entry>
<entry><phrase role="nowrap">-gtk-key-bindings</phrase></entry>
<entry><code>none | 〈binding name〉 [ , 〈binding name〉 ]*</code></entry>
<entry><code>none</code></entry>
<entry></entry>
+13 -13
View File
@@ -450,13 +450,13 @@ example_app_window_class_init (ExampleAppWindowClass *class)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application2/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application2/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>You may have noticed that we used the <literal>_from_resource(<!-- -->)</literal> variant
of the function that sets a template. Now we need to use GLib's resource
functionality to include the ui file in the binary. This is commonly
done by listing all resources in a .gresource.xml file, such as this:
of the function that sets a template. Now we need to use <ulink url="https://developer.gnome.org/gio/stable/GResource.html">GLib's resource functionality</ulink>
to include the ui file in the binary. This is commonly done by listing
all resources in a .gresource.xml file, such as this:
</para>
<informalexample>
@@ -518,7 +518,7 @@ example_app_window_class_init (ExampleAppWindowClass *class)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application3/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>Now we revisit the example_app_window_open() function that
@@ -567,7 +567,7 @@ example_app_window_open (ExampleAppWindow *win,
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application3/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>Note that we did not have to touch the stack switcher
@@ -665,7 +665,7 @@ example_app_class_init (ExampleAppClass *class)
...
</programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application4/exampleapp.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application4/exampleapp.c">full source</ulink>)</para>
</informalexample>
<para>Our preferences menu item does not do anything yet,
@@ -731,7 +731,7 @@ example_app_window_init (ExampleAppWindow *win)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application5/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application5/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>The code to connect the font setting is a little more involved,
@@ -780,7 +780,7 @@ preferences_activated (GSimpleAction *action,
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application6/exampleapp.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application6/exampleapp.c">full source</ulink>)</para>
</informalexample>
<para>After all this work, our application can now show
@@ -866,7 +866,7 @@ example_app_window_init (ExampleAppWindow *win)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application7/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application7/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>With the search bar, our application now looks like this:</para>
@@ -926,7 +926,7 @@ example_app_window_init (ExampleAppWindow *win)
...
]]></programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application8/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application8/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>What our application looks like now:</para>
@@ -989,12 +989,12 @@ example_app_window_init (ExampleAppWindow *win)
...
</programlisting>
<para>(<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c">full source</ulink>)</para>
<para>(<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application9/exampleappwin.c">full source</ulink>)</para>
</informalexample>
<para>We also need a function that counts the lines of the currently
active tab, and updates the @lines label. See the
<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c">full source</ulink>
<ulink url="https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-22/examples/application9/exampleappwin.c">full source</ulink>
if you are interested in the details.</para>
<para>This brings our example application to this appearance:</para>
+4
View File
@@ -494,6 +494,10 @@
<title>Index of new symbols in 3.22</title>
<xi:include href="xml/api-index-3.22.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-24" role="3.24">
<title>Index of new symbols in 3.24</title>
<xi:include href="xml/api-index-3.24.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+7
View File
@@ -1665,6 +1665,11 @@ GtkFontFilterFunc
gtk_font_chooser_set_filter_func
gtk_font_chooser_set_font_map
gtk_font_chooser_get_font_map
gtk_font_chooser_set_level
gtk_font_chooser_get_level
gtk_font_chooser_get_font_features
gtk_font_chooser_set_language
gtk_font_chooser_get_language
<SUBSECTION Standard>
GtkFontChooserIface
@@ -2488,6 +2493,8 @@ gtk_info_bar_get_action_area
gtk_info_bar_get_content_area
gtk_info_bar_get_show_close_button
gtk_info_bar_set_show_close_button
gtk_info_bar_get_revealed
gtk_info_bar_set_revealed
<SUBSECTION Standard>
GTK_TYPE_INFO_BAR
+12
View File
@@ -537,6 +537,18 @@ nevertheless.
</para>
</formalpara>
<formalpara>
<title><envar>GTK_OVERLAY_SCROLLING</envar></title>
<para>
The default value of this environment variable is 1, which means that each
instance of GtkScrolledWindow will choose whether to use overlay or full-
size scrollbars via its own GtkScrolledWindow:overlay-scrolling property,
which defaults to <literal>TRUE</literal>. If this variable is set to 0,
all GtkScrolledWindow instances are made to use full/non-overlay scrollbars.
</para>
</formalpara>
<formalpara>
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
+7 -1
View File
@@ -14,12 +14,18 @@ main (int argc,
GtkBuilder *builder;
GObject *window;
GObject *button;
GError *error = NULL;
gtk_init (&argc, &argv);
/* Construct a GtkBuilder instance and load our UI description */
builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, "builder.ui", NULL);
if (gtk_builder_add_from_file (builder, "builder.ui", &error) == 0)
{
g_printerr ("Error loading file: %s\n", error->message);
g_clear_error (&error);
return 1;
}
/* Connect signal handlers to the constructed widgets. */
window = gtk_builder_get_object (builder, "window");
+1 -1
View File
@@ -1267,7 +1267,7 @@ handle_incoming_connection (GSocketService *service,
}
else
{
request->connection = g_object_ref (connection);
request->connection = G_IO_STREAM (g_object_ref (connection));
}
in = g_io_stream_get_input_stream (request->connection);
-1
View File
@@ -17,7 +17,6 @@ gdk__private__ (void)
gdk_display_set_rendering_mode,
gdk_display_get_debug_updates,
gdk_display_set_debug_updates,
gdk_window_move_to_rect
};
return &table;
+2 -16
View File
@@ -31,14 +31,6 @@ gboolean gdk_display_get_debug_updates (GdkDisplay *display);
void gdk_display_set_debug_updates (GdkDisplay *display,
gboolean debug_updates);
void gdk_window_move_to_rect (GdkWindow *window,
const GdkRectangle *rect,
GdkGravity rect_anchor,
GdkGravity window_anchor,
GdkAnchorHints anchor_hints,
gint rect_anchor_dx,
gint rect_anchor_dy);
typedef struct {
/* add all private functions here, initialize them in gdk-private.c */
gboolean (* gdk_device_grab_info) (GdkDisplay *display,
@@ -64,17 +56,11 @@ typedef struct {
gboolean (* gdk_display_get_debug_updates) (GdkDisplay *display);
void (* gdk_display_set_debug_updates) (GdkDisplay *display,
gboolean debug_updates);
void (* gdk_window_move_to_rect) (GdkWindow *window,
const GdkRectangle *rect,
GdkGravity rect_anchor,
GdkGravity window_anchor,
GdkAnchorHints anchor_hints,
gint rect_anchor_dx,
gint rect_anchor_dy);
} GdkPrivateVTable;
GDK_AVAILABLE_IN_ALL
GdkPrivateVTable * gdk__private__ (void);
gboolean gdk_running_in_sandbox (void);
#endif /* __GDK__PRIVATE_H__ */
+13 -1
View File
@@ -468,6 +468,19 @@ gdk_display_open_default (void)
return display;
}
gboolean
gdk_running_in_sandbox (void)
{
char *path;
gboolean ret;
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
ret = g_file_test (path, G_FILE_TEST_EXISTS);
g_free (path);
return ret;
}
/**
* gdk_display_open_default_libgtk_only:
*
@@ -601,7 +614,6 @@ gdk_init (int *argc, char ***argv)
* management for you.
*/
/**
* gdk_threads_enter:
*
+1 -1
View File
@@ -300,7 +300,7 @@ 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
* @device_manager is associated to, or %NULL. This memory is
* owned by GDK and must not be freed or unreferenced.
*
* Since: 3.0
+2 -2
View File
@@ -166,7 +166,7 @@ gdk_drag_context_get_source_window (GdkDragContext *context)
* gdk_drag_context_get_dest_window:
* @context: a #GdkDragContext
*
* Returns the destination windw for the DND operation.
* Returns the destination window for the DND operation.
*
* Returns: (transfer none): a #GdkWindow
*
@@ -184,7 +184,7 @@ gdk_drag_context_get_dest_window (GdkDragContext *context)
* gdk_drag_context_get_protocol:
* @context: a #GdkDragContext
*
* Returns the drag protocol thats used by this context.
* Returns the drag protocol that is used by this context.
*
* Returns: the drag protocol
*
+2 -2
View File
@@ -1200,7 +1200,7 @@ struct _GdkEventDND {
* @type: the type of the event (%GDK_TOUCHPAD_SWIPE)
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly
* @phase: (type GdkTouchpadGesturePhase): the current phase of the gesture
* @phase: the current phase of the gesture
* @n_fingers: The number of fingers triggering the swipe
* @time: the time of the event in milliseconds
* @x: The X coordinate of the pointer
@@ -1237,7 +1237,7 @@ struct _GdkEventTouchpadSwipe {
* @type: the type of the event (%GDK_TOUCHPAD_PINCH)
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly
* @phase: (type GdkTouchpadGesturePhase): the current phase of the gesture
* @phase: the current phase of the gesture
* @n_fingers: The number of fingers triggering the pinch
* @time: the time of the event in milliseconds
* @x: The X coordinate of the pointer
+5 -5
View File
@@ -477,7 +477,7 @@ gdk_frame_clock_get_timings (GdkFrameClock *frame_clock,
*
* 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
* previous frame. Before any frames have been processed, returns
* %NULL.
* Since: 3.8
*/
@@ -541,10 +541,10 @@ _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
* gdk_frame_clock_get_refresh_info:
* @frame_clock: a #GdkFrameClock
* @base_time: base time for determining a presentaton time
* @refresh_interval_return: a location to store the determined refresh
* interval, or %NULL. A default refresh interval of 1/60th of
* a second will be stored if no history is present.
* @presentation_time_return: a location to store the next
* @refresh_interval_return: (out) (optional): a location to store the
* determined refresh interval, or %NULL. A default refresh interval of
* 1/60th of a second will be stored if no history is present.
* @presentation_time_return: (out): a location to store the next
* candidate presentation time after the given base time.
* 0 will be will be stored if no history is present.
*
+30 -1
View File
@@ -123,6 +123,7 @@ gdk_frame_clock_idle_init (GdkFrameClockIdle *frame_clock_idle)
frame_clock_idle->priv = priv =
gdk_frame_clock_idle_get_instance_private (frame_clock_idle);
priv->frame_time = g_get_monotonic_time (); /* more sane than zero */
priv->freeze_count = 0;
}
@@ -350,9 +351,37 @@ gdk_frame_clock_paint_idle (void *data)
case GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT:
if (priv->freeze_count == 0)
{
priv->frame_time = compute_frame_time (clock_idle);
gint64 frame_interval = FRAME_INTERVAL;
gint64 reset_frame_time;
gint64 smoothest_frame_time;
gint64 frame_time_error;
GdkFrameTimings *prev_timings =
gdk_frame_clock_get_current_timings (clock);
if (prev_timings && prev_timings->refresh_interval)
frame_interval = prev_timings->refresh_interval;
/* We are likely not getting precisely even callbacks in real
* time, particularly if the event loop is busy.
* This is a documented limitation in the precision of
* gdk_threads_add_timeout_full and g_timeout_add_full.
*
* In order to avoid this imprecision from compounding between
* frames and affecting visual smoothness, we correct frame_time
* to more precisely match the even refresh interval of the
* physical display. This also means we proactively avoid (most)
* missed frames before they occur.
*/
smoothest_frame_time = priv->frame_time + frame_interval;
reset_frame_time = compute_frame_time (clock_idle);
frame_time_error = ABS (reset_frame_time - smoothest_frame_time);
if (frame_time_error >= frame_interval)
priv->frame_time = reset_frame_time;
else
priv->frame_time = smoothest_frame_time;
_gdk_frame_clock_begin_frame (clock);
/* Note "current" is different now so timings != prev_timings */
timings = gdk_frame_clock_get_current_timings (clock);
timings->frame_time = priv->frame_time;
+1 -1
View File
@@ -340,7 +340,7 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
/**
* GdkGLContext:shared-context:
*
* The #GdkGLContext that this context is sharing data with, or #NULL
* The #GdkGLContext that this context is sharing data with, or %NULL
*
* Since: 3.16
*/
+2
View File
@@ -277,6 +277,8 @@ gdk_keyval_is_lower (guint keyval)
* Returns the #GdkKeymap attached to the default display.
*
* Returns: (transfer none): the #GdkKeymap attached to the default display.
*
* Deprecated: 3.22: Use gdk_keymap_get_for_display() instead
*/
GdkKeymap*
gdk_keymap_get_default (void)
+1 -1
View File
@@ -80,7 +80,7 @@ struct _GdkKeymapKey
GDK_AVAILABLE_IN_ALL
GType gdk_keymap_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_keymap_get_for_display)
GdkKeymap* gdk_keymap_get_default (void);
GDK_AVAILABLE_IN_ALL
GdkKeymap* gdk_keymap_get_for_display (GdkDisplay *display);
+6 -6
View File
@@ -66,12 +66,12 @@ void gdk_notify_startup_complete_with_id (const gchar* startup_
/* Push and pop error handlers for X errors
*/
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_x11_display_error_trap_push)
void gdk_error_trap_push (void);
/* warn unused because you could use pop_ignored otherwise */
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_x11_display_error_trap_pop)
G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop (void);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_x11_display_error_trap_pop_ignored)
void gdk_error_trap_pop_ignored (void);
@@ -114,13 +114,13 @@ gint gdk_screen_width_mm (void) G_GNUC_CONST;
GDK_DEPRECATED_IN_3_22
gint gdk_screen_height_mm (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_set_double_click_time)
void gdk_set_double_click_time (guint msec);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_beep)
void gdk_beep (void);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_22_FOR(gdk_display_flush)
void gdk_flush (void);
GDK_AVAILABLE_IN_ALL
+3 -3
View File
@@ -32,8 +32,8 @@
*
* GdkMonitor objects represent the individual outputs that are
* associated with a #GdkDisplay. GdkDisplay has APIs to enumerate
* monitors with gdk_display_get_monitors() and to find particular
* monitors with gdk_display_get_primary_monitor() or
* monitors with gdk_display_get_n_monitors() and gdk_display_get_monitor(), and
* to find particular monitors with gdk_display_get_primary_monitor() or
* gdk_display_get_monitor_at_window().
*
* GdkMonitor was introduced in GTK+ 3.22 and supersedes earlier
@@ -267,7 +267,7 @@ gdk_monitor_get_display (GdkMonitor *monitor)
/**
* gdk_monitor_get_geometry:
* @monitor: a #GdkMonitor
* @geometry: (out): a #GdkRectangle to be filled wiht the monitor geometry
* @geometry: (out): a #GdkRectangle to be filled with the monitor geometry
*
* Retrieves the size and position of an individual monitor within the
* display coordinate space. The returned geometry is in ”application pixels”,
+1 -1
View File
@@ -55,7 +55,7 @@ G_DEFINE_BOXED_TYPE (GdkRGBA, gdk_rgba,
* 1.0 for opaque
*
* A #GdkRGBA is used to represent a (possibly translucent)
* color, in a way that is compatible with cairos notion of color.
* color, in a way that is compatible with cairos notion of color.
*/
/**
+5 -1
View File
@@ -115,8 +115,10 @@ gdk_seat_default_grab (GdkSeat *seat,
GdkSeatDefaultPrivate *priv;
guint32 evtime = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
GdkGrabStatus status = GDK_GRAB_SUCCESS;
gboolean was_visible;
priv = gdk_seat_default_get_instance_private (GDK_SEAT_DEFAULT (seat));
was_visible = gdk_window_is_visible (window);
if (prepare_func)
(prepare_func) (seat, window, prepare_func_data);
@@ -163,10 +165,12 @@ gdk_seat_default_grab (GdkSeat *seat,
{
if (capabilities & ~GDK_SEAT_CAPABILITY_KEYBOARD)
gdk_device_ungrab (priv->master_pointer, evtime);
gdk_window_hide (window);
}
}
if (status != GDK_GRAB_SUCCESS && !was_visible)
gdk_window_hide (window);
G_GNUC_END_IGNORE_DEPRECATIONS;
return status;
+9 -3
View File
@@ -32,10 +32,12 @@
/**
* SECTION:selections
* @Short_description: Functions for transfering data via the X selection mechanism
* @Short_description: Functions for transferring data between programs
* @Title: Selections
*
* The X selection mechanism provides a way to transfer arbitrary chunks of
* GDKs selection functions, based on the [X selection mechanism](
* https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html),
* provide a way to transfer arbitrary chunks of
* data between programs. A “selection” is a essentially
* a named clipboard, identified by a string interned as a #GdkAtom. By
* claiming ownership of a selection, an application indicates that it will
@@ -57,7 +59,11 @@
* `gtkselection.h` and programmers should use those functions
* instead of the ones presented here. If you plan to implement selection
* handling directly on top of the functions here, you should refer to the
* X Inter-client Communication Conventions Manual (ICCCM).
* [X Inter-Client Communication Conventions Manual (ICCCM)](
* https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html).
*
* Note that although much of the selection API design is based on that of X,
* it will work on other GDK backends too.
*/
/**
+1 -1
View File
@@ -451,7 +451,7 @@ typedef enum
GDK_SMOOTH_SCROLL_MASK = 1 << 23,
GDK_TOUCHPAD_GESTURE_MASK = 1 << 24,
GDK_TABLET_PAD_MASK = 1 << 25,
GDK_ALL_EVENTS_MASK = 0xFFFFFE
GDK_ALL_EVENTS_MASK = 0x3FFFFFE
} GdkEventMask;
/**
+16
View File
@@ -172,6 +172,16 @@
*/
#define GDK_VERSION_3_22 (G_ENCODE_VERSION (3, 22))
/**
* GDK_VERSION_3_24:
*
* A macro that evaluates to the 3.24 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.24
*/
#define GDK_VERSION_3_24 (G_ENCODE_VERSION (3, 24))
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
*/
@@ -412,5 +422,11 @@
# define GDK_AVAILABLE_IN_3_22 _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_24
# define GDK_AVAILABLE_IN_3_24 GDK_UNAVAILABLE(3, 24)
#else
# define GDK_AVAILABLE_IN_3_24 _GDK_EXTERN
#endif
#endif /* __GDK_VERSION_MACROS_H__ */
+6 -5
View File
@@ -4164,7 +4164,7 @@ static void
gdk_window_process_updates_with_mode (GdkWindow *window,
int recurse_mode)
{
GPtrArray *list = g_ptr_array_new_with_free_func (g_object_unref);
GPtrArray *list;
int i;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -4172,6 +4172,7 @@ gdk_window_process_updates_with_mode (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
list = g_ptr_array_new_with_free_func (g_object_unref);
find_impl_windows_to_update (list, window, recurse_mode);
if (window->impl_window != window)
@@ -6232,8 +6233,7 @@ gdk_window_move_resize (GdkWindow *window,
* Connect to the #GdkWindow::moved-to-rect signal to find out how it was
* actually positioned.
*
* Since: 3.22
* Stability: Private
* Since: 3.24
*/
void
gdk_window_move_to_rect (GdkWindow *window,
@@ -9294,8 +9294,9 @@ proxy_pointer_event (GdkDisplay *display,
serial, non_linear);
_gdk_display_set_window_under_pointer (display, device, pointer_window);
}
else if (source_event->type == GDK_MOTION_NOTIFY ||
source_event->type == GDK_TOUCH_UPDATE)
if (source_event->type == GDK_MOTION_NOTIFY ||
source_event->type == GDK_TOUCH_UPDATE)
{
GdkWindow *event_win;
guint evmask;
+9
View File
@@ -550,6 +550,15 @@ void gdk_window_move_resize (GdkWindow *window,
gint y,
gint width,
gint height);
GDK_AVAILABLE_IN_3_24
void gdk_window_move_to_rect (GdkWindow *window,
const GdkRectangle *rect,
GdkGravity rect_anchor,
GdkGravity window_anchor,
GdkAnchorHints anchor_hints,
gint rect_anchor_dx,
gint rect_anchor_dy);
GDK_AVAILABLE_IN_ALL
void gdk_window_reparent (GdkWindow *window,
GdkWindow *new_parent,
+1
View File
@@ -16,6 +16,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "GdkQuartzNSWindow.h"
#include "gdkquartzwindow.h"
#include "gdkdnd-quartz.h"
+1
View File
@@ -17,6 +17,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "GdkQuartzView.h"
#include "gdkquartzwindow.h"
#include "gdkprivate-quartz.h"
+2 -1
View File
@@ -16,6 +16,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gdkdnd.h"
#include "gdkquartzdnd.h"
#include "gdkprivate-quartz.h"
@@ -27,7 +28,7 @@ G_DEFINE_TYPE (GdkQuartzDragContext, gdk_quartz_drag_context, GDK_TYPE_DRAG_CONT
GdkDragContext *_gdk_quartz_drag_source_context = NULL;
GdkDragContext *
gdk_quartz_drag_source_context ()
gdk_quartz_drag_source_context_libgtk_only ()
{
return _gdk_quartz_drag_source_context;
}
+3
View File
@@ -60,8 +60,11 @@ typedef enum
GDK_AVAILABLE_IN_ALL
GdkOSXVersion gdk_quartz_osx_version (void);
GDK_AVAILABLE_IN_ALL
GdkAtom gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type);
GDK_AVAILABLE_IN_ALL
NSString *gdk_quartz_target_to_pasteboard_type_libgtk_only (const gchar *target);
GDK_AVAILABLE_IN_ALL
NSString *gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom);
G_END_DECLS
+3
View File
@@ -48,6 +48,9 @@ GType gdk_quartz_drag_context_get_type (void);
GDK_AVAILABLE_IN_ALL
id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context);
GDK_AVAILABLE_IN_ALL
GdkDragContext *gdk_quartz_drag_source_context_libgtk_only (void);
G_END_DECLS
#endif /* __GDK_QUARTZ_DRAG_CONTEXT_H__ */
+11 -7
View File
@@ -67,7 +67,7 @@ static void gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen);
static void display_reconfiguration_callback (CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void *userInfo);
static const double dpi = 96.0;
static gint get_mm_from_pixels (NSScreen *screen, int pixels);
G_DEFINE_TYPE (GdkQuartzScreen, gdk_quartz_screen, GDK_TYPE_SCREEN);
@@ -76,10 +76,17 @@ static void
gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
{
GdkScreen *screen = GDK_SCREEN (quartz_screen);
NSDictionary *dd = [[[NSScreen screens] objectAtIndex:0] deviceDescription];
NSSize size = [[dd valueForKey:NSDeviceResolution] sizeValue];
/* Screen resolution is used exclusively to pass to Pango for font
* scaling. There's a long discussion in
* https://bugzilla.gnome.org/show_bug.cgi?id=787867 exploring how
* screen resolution and pangocairo-coretext interact. The summary
* is that MacOS takes care of scaling fonts for Retina screens and
* that while the Apple Documentation goes on about "points" they're
* CSS points (96/in), not typeography points (72/in) and
* pangocairo-coretext needs to default to that scaling factor.
*/
_gdk_screen_set_resolution (screen, size.width);
_gdk_screen_set_resolution (screen, dpi);
gdk_quartz_screen_calculate_layout (quartz_screen);
@@ -335,9 +342,6 @@ static gint
get_mm_from_pixels (NSScreen *screen, int pixels)
{
const float mm_per_inch = 25.4;
NSDictionary *dd = [[[NSScreen screens] objectAtIndex:0] deviceDescription];
NSSize size = [[dd valueForKey:NSDeviceResolution] sizeValue];
float dpi = size.width;
return (pixels / dpi) * mm_per_inch;
}
+6 -3
View File
@@ -23,6 +23,8 @@ noinst_LTLIBRARIES = \
BUILT_SOURCES = \
pointer-gestures-unstable-v1-client-protocol.h \
pointer-gestures-unstable-v1-protocol.c \
xdg-shell-client-protocol.h \
xdg-shell-protocol.c \
xdg-shell-unstable-v6-client-protocol.h \
xdg-shell-unstable-v6-protocol.c \
xdg-foreign-unstable-v1-client-protocol.h \
@@ -80,11 +82,11 @@ libgdkwaylandinclude_HEADERS = \
.SECONDEXPANSION:
define protostability
$(shell echo $1 | sed 's/.*\(\<unstable\>\|\<stable\>\).*/\1/')
$(if $(findstring unstable,$1),unstable,stable)
endef
define protoname
$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
$(shell echo $1 | sed 's/\([a-z\-]\{1,\}\)-[a-z]\{1,\}-v[0-9]\{1,\}/\1/')
endef
%-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
@@ -104,6 +106,7 @@ endef
EXTRA_DIST += \
protocol/gtk-primary-selection.xml \
protocol/gtk-shell.xml
protocol/gtk-shell.xml \
protocol/server-decoration.xml
-include $(top_srcdir)/git.mk
+85 -73
View File
@@ -38,14 +38,20 @@
#include <xkbcommon/xkbcommon.h>
#include <linux/input.h>
#include <sys/time.h>
#include <sys/mman.h>
#if defined(HAVE_DEV_EVDEV_INPUT_H)
#include <dev/evdev/input.h>
#elif defined(HAVE_LINUX_INPUT_H)
#include <linux/input.h>
#endif
#define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */
#ifndef BTN_STYLUS3
#define BTN_STYLUS3 0x149 /* Linux 4.15 */
#endif
typedef struct _GdkWaylandDevicePad GdkWaylandDevicePad;
typedef struct _GdkWaylandDevicePadClass GdkWaylandDevicePadClass;
@@ -413,13 +419,16 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device)
else
{
pointer->cursor_timeout_id = 0;
return TRUE;
return G_SOURCE_REMOVE;
}
if (tablet)
{
if (!tablet->current_tool)
return retval;
{
pointer->cursor_timeout_id = 0;
return G_SOURCE_REMOVE;
}
zwp_tablet_tool_v2_set_cursor (tablet->current_tool->wp_tablet_tool,
pointer->enter_serial,
@@ -434,7 +443,10 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device)
x, y);
}
else
return retval;
{
pointer->cursor_timeout_id = 0;
return G_SOURCE_REMOVE;
}
if (buffer)
{
@@ -456,7 +468,8 @@ gdk_wayland_device_update_window_cursor (GdkDevice *device)
if (next_image_index != pointer->cursor_image_index)
{
if (next_image_delay != pointer->cursor_image_delay)
if (next_image_delay != pointer->cursor_image_delay ||
pointer->cursor_timeout_id == 0)
{
guint id;
@@ -728,6 +741,43 @@ gdk_wayland_device_get_focus (GdkDevice *device)
return NULL;
}
static void
device_maybe_emit_grab_crossing (GdkDevice *device,
GdkWindow *window,
guint32 time)
{
GdkWindow *native = gdk_wayland_device_get_focus (device);
GdkWindow *focus = gdk_window_get_toplevel (window);
if (focus != native)
device_emit_grab_crossing (device, focus, window, GDK_CROSSING_GRAB, time);
}
static GdkWindow*
device_maybe_emit_ungrab_crossing (GdkDevice *device,
guint32 time)
{
GdkDeviceGrabInfo *grab;
GdkWindow *focus = NULL;
GdkWindow *native = NULL;
GdkWindow *prev_focus = NULL;
focus = gdk_wayland_device_get_focus (device);
grab = _gdk_display_get_last_device_grab (gdk_device_get_display (device), device);
if (grab)
{
grab->serial_end = grab->serial_start;
prev_focus = grab->window;
native = grab->native_window;
}
if (focus != native)
device_emit_grab_crossing (device, prev_focus, focus, GDK_CROSSING_UNGRAB, time);
return prev_focus;
}
static GdkGrabStatus
gdk_wayland_device_grab (GdkDevice *device,
GdkWindow *window,
@@ -738,7 +788,6 @@ gdk_wayland_device_grab (GdkDevice *device,
guint32 time_)
{
GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device));
GdkWindow *prev_focus = gdk_wayland_device_get_focus (device);
GdkWaylandPointerData *pointer = GDK_WAYLAND_DEVICE (device)->pointer;
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP &&
@@ -750,14 +799,17 @@ gdk_wayland_device_grab (GdkDevice *device,
window);
}
if (prev_focus != window)
device_emit_grab_crossing (device, prev_focus, window, GDK_CROSSING_GRAB, time_);
device_maybe_emit_grab_crossing (device, window, time_);
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
{
/* Device is a keyboard */
gdk_wayland_window_inhibit_shortcuts (window,
gdk_device_get_seat (device));
if (gdk_window_get_window_type (window) == GDK_WINDOW_TOPLEVEL)
{
gdk_wayland_window_inhibit_shortcuts (window,
gdk_device_get_seat (device));
}
return GDK_GRAB_SUCCESS;
}
else
@@ -792,24 +844,9 @@ gdk_wayland_device_ungrab (GdkDevice *device,
guint32 time_)
{
GdkWaylandPointerData *pointer = GDK_WAYLAND_DEVICE (device)->pointer;
GdkDisplay *display;
GdkDeviceGrabInfo *grab;
GdkWindow *focus, *prev_focus = NULL;
GdkWindow *prev_focus;
display = gdk_device_get_display (device);
grab = _gdk_display_get_last_device_grab (display, device);
if (grab)
{
grab->serial_end = grab->serial_start;
prev_focus = grab->window;
}
focus = gdk_wayland_device_get_focus (device);
if (focus != prev_focus)
device_emit_grab_crossing (device, prev_focus, focus, GDK_CROSSING_UNGRAB, time_);
prev_focus = device_maybe_emit_ungrab_crossing (device, time_);
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
{
@@ -3815,6 +3852,8 @@ tablet_tool_handle_button (void *data,
n_button = GDK_BUTTON_SECONDARY;
else if (button == BTN_STYLUS2)
n_button = GDK_BUTTON_MIDDLE;
else if (button == BTN_STYLUS3)
n_button = 8; /* Back */
else
return;
@@ -3966,7 +4005,7 @@ tablet_pad_ring_handle_angle (void *data,
GdkWaylandTabletPadGroupData *group = data;
GDK_NOTE (EVENTS,
g_message ("tablet pad ring handle angle, %s ring = %p angle = %f",
g_message ("tablet pad ring handle angle, ring = %p angle = %f",
wp_tablet_pad_ring, wl_fixed_to_double (angle)));
group->axis_tmp_info.value = wl_fixed_to_double (angle);
@@ -4724,11 +4763,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
if (wayland_seat->master_pointer &&
capabilities & GDK_SEAT_CAPABILITY_POINTER)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
if (prev_focus != native)
device_emit_grab_crossing (wayland_seat->master_pointer, prev_focus,
native, GDK_CROSSING_GRAB, evtime);
device_maybe_emit_grab_crossing (wayland_seat->master_pointer,
native, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->master_pointer,
@@ -4749,11 +4785,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
if (wayland_seat->touch_master &&
capabilities & GDK_SEAT_CAPABILITY_TOUCH)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->touch_master);
if (prev_focus != native)
device_emit_grab_crossing (wayland_seat->touch_master, prev_focus,
native, GDK_CROSSING_GRAB, evtime);
device_maybe_emit_grab_crossing (wayland_seat->touch_master,
native, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->touch_master,
@@ -4770,11 +4803,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
if (wayland_seat->master_keyboard &&
capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_keyboard);
if (prev_focus != native)
device_emit_grab_crossing (wayland_seat->master_keyboard, prev_focus,
native, GDK_CROSSING_GRAB, evtime);
device_maybe_emit_grab_crossing (wayland_seat->master_keyboard,
native, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->master_keyboard,
@@ -4787,8 +4817,9 @@ gdk_wayland_seat_grab (GdkSeat *seat,
evtime,
FALSE);
/* Inhibit shortcuts if the seat grab is for the keyboard only */
if (capabilities == GDK_SEAT_CAPABILITY_KEYBOARD)
/* Inhibit shortcuts on toplevels if the seat grab is for the keyboard only */
if (capabilities == GDK_SEAT_CAPABILITY_KEYBOARD &&
native->window_type == GDK_WINDOW_TOPLEVEL)
gdk_wayland_window_inhibit_shortcuts (window, seat);
}
@@ -4798,11 +4829,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
for (l = wayland_seat->tablets; l; l = l->next)
{
GdkWaylandTabletData *tablet = l->data;
GdkWindow *prev_focus = gdk_wayland_device_get_focus (tablet->master);
if (prev_focus != native)
device_emit_grab_crossing (tablet->master, prev_focus,
native, GDK_CROSSING_GRAB, evtime);
device_maybe_emit_grab_crossing (tablet->master, native, evtime);
_gdk_display_add_device_grab (display,
tablet->master,
@@ -4836,36 +4864,20 @@ gdk_wayland_seat_ungrab (GdkSeat *seat)
if (wayland_seat->master_pointer)
{
GdkWindow *focus, *prev_focus = NULL;
grab = _gdk_display_get_last_device_grab (display, wayland_seat->master_pointer);
if (grab)
{
grab->serial_end = grab->serial_start;
prev_focus = grab->window;
}
focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
if (focus != prev_focus)
device_emit_grab_crossing (wayland_seat->master_pointer, prev_focus,
focus, GDK_CROSSING_UNGRAB,
GDK_CURRENT_TIME);
device_maybe_emit_ungrab_crossing (wayland_seat->master_pointer,
GDK_CURRENT_TIME);
gdk_wayland_device_update_window_cursor (wayland_seat->master_pointer);
}
if (wayland_seat->master_keyboard)
{
grab = _gdk_display_get_last_device_grab (display, wayland_seat->master_keyboard);
GdkWindow *prev_focus;
if (grab)
{
grab->serial_end = grab->serial_start;
if (grab->window)
gdk_wayland_window_restore_shortcuts (grab->window, seat);
}
prev_focus = device_maybe_emit_ungrab_crossing (wayland_seat->master_keyboard,
GDK_CURRENT_TIME);
if (prev_focus)
gdk_wayland_window_restore_shortcuts (prev_focus, seat);
}
if (wayland_seat->touch_master)
+94 -21
View File
@@ -119,9 +119,28 @@ _gdk_wayland_display_async_roundtrip (GdkWaylandDisplay *display_wayland)
}
static void
xdg_shell_ping (void *data,
struct zxdg_shell_v6 *xdg_shell,
uint32_t serial)
xdg_wm_base_ping (void *data,
struct xdg_wm_base *xdg_wm_base,
uint32_t serial)
{
GdkWaylandDisplay *display_wayland = data;
_gdk_wayland_display_update_serial (display_wayland, serial);
GDK_NOTE (EVENTS,
g_message ("ping, shell %p, serial %u\n", xdg_wm_base, serial));
xdg_wm_base_pong (xdg_wm_base, serial);
}
static const struct xdg_wm_base_listener xdg_wm_base_listener = {
xdg_wm_base_ping,
};
static void
zxdg_shell_v6_ping (void *data,
struct zxdg_shell_v6 *xdg_shell,
uint32_t serial)
{
GdkWaylandDisplay *display_wayland = data;
@@ -133,8 +152,8 @@ xdg_shell_ping (void *data,
zxdg_shell_v6_pong (xdg_shell, serial);
}
static const struct zxdg_shell_v6_listener xdg_shell_listener = {
xdg_shell_ping,
static const struct zxdg_shell_v6_listener zxdg_shell_v6_listener = {
zxdg_shell_v6_ping,
};
static gboolean
@@ -372,7 +391,6 @@ gdk_registry_handle_global (void *data,
{
GdkWaylandDisplay *display_wayland = data;
struct wl_output *output;
gboolean handled = TRUE;
GDK_NOTE (MISC,
g_message ("add global %u, interface %s, version %u", id, interface, version));
@@ -389,14 +407,13 @@ gdk_registry_handle_global (void *data,
wl_registry_bind (display_wayland->wl_registry, id, &wl_shm_interface, 1);
wl_shm_add_listener (display_wayland->shm, &wl_shm_listener, display_wayland);
}
else if (strcmp (interface, "xdg_wm_base") == 0)
{
display_wayland->xdg_wm_base_id = id;
}
else if (strcmp (interface, "zxdg_shell_v6") == 0)
{
display_wayland->xdg_shell =
wl_registry_bind (display_wayland->wl_registry, id,
&zxdg_shell_v6_interface, 1);
zxdg_shell_v6_add_listener (display_wayland->xdg_shell,
&xdg_shell_listener,
display_wayland);
display_wayland->zxdg_shell_v6_id = id;
}
else if (strcmp (interface, "gtk_shell1") == 0)
{
@@ -495,12 +512,9 @@ gdk_registry_handle_global (void *data,
&server_decoration_listener,
display_wayland);
}
else
handled = FALSE;
if (handled)
g_hash_table_insert (display_wayland->known_globals,
GUINT_TO_POINTER (id), g_strdup (interface));
g_hash_table_insert (display_wayland->known_globals,
GUINT_TO_POINTER (id), g_strdup (interface));
process_on_globals_closures (display_wayland);
}
@@ -607,11 +621,32 @@ _gdk_wayland_display_open (const gchar *display_name)
}
}
/* Make sure we have xdg_shell at least */
if (display_wayland->xdg_shell == NULL)
if (display_wayland->xdg_wm_base_id)
{
g_warning ("Wayland compositor does not support xdg_shell interface,"
" not using Wayland display");
display_wayland->shell_variant = GDK_WAYLAND_SHELL_VARIANT_XDG_SHELL;
display_wayland->xdg_wm_base =
wl_registry_bind (display_wayland->wl_registry,
display_wayland->xdg_wm_base_id,
&xdg_wm_base_interface, 1);
xdg_wm_base_add_listener (display_wayland->xdg_wm_base,
&xdg_wm_base_listener,
display_wayland);
}
else if (display_wayland->zxdg_shell_v6_id)
{
display_wayland->shell_variant = GDK_WAYLAND_SHELL_VARIANT_ZXDG_SHELL_V6;
display_wayland->zxdg_shell_v6 =
wl_registry_bind (display_wayland->wl_registry,
display_wayland->zxdg_shell_v6_id,
&zxdg_shell_v6_interface, 1);
zxdg_shell_v6_add_listener (display_wayland->zxdg_shell_v6,
&zxdg_shell_v6_listener,
display_wayland);
}
else
{
g_warning ("The Wayland compositor does not provide any supported shell interface, "
"not using Wayland display");
g_object_unref (display);
return NULL;
@@ -1241,6 +1276,9 @@ open_shared_memory (void)
if (force_shm_open)
{
#if defined (__FreeBSD__)
ret = shm_open (SHM_ANON, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, 0600);
#else
char name[NAME_MAX - 1] = "";
sprintf (name, "/gdk-wayland-%x", g_random_int ());
@@ -1251,6 +1289,7 @@ open_shared_memory (void)
shm_unlink (name);
else if (errno == EEXIST)
continue;
#endif
}
}
while (ret < 0 && errno == EINTR);
@@ -1386,3 +1425,37 @@ gdk_wayland_display_get_selection (GdkDisplay *display)
return display_wayland->selection;
}
/**
* gdk_wayland_display_query_registry:
* @display: a wayland #GdkDisplay
* @interface: global interface to query in the registry
*
* Returns %TRUE if the the interface was found in the display
* wl_registry.global handler.
*
* Returns: %TRUE if the global is offered by the compositor
*
* Since: 3.22.27
**/
gboolean
gdk_wayland_display_query_registry (GdkDisplay *display,
const gchar *global)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
GHashTableIter iter;
gchar *value;
g_return_val_if_fail (GDK_IS_WAYLAND_DISPLAY (display), FALSE);
g_return_val_if_fail (global != NULL, FALSE);
g_hash_table_iter_init (&iter, display_wayland->known_globals);
while (g_hash_table_iter_next (&iter, NULL, (gpointer*) &value))
{
if (strcmp (value, global) == 0)
return TRUE;
}
return FALSE;
}
+14 -2
View File
@@ -29,6 +29,7 @@
#include <wayland-egl.h>
#include <gdk/wayland/tablet-unstable-v2-client-protocol.h>
#include <gdk/wayland/gtk-shell-client-protocol.h>
#include <gdk/wayland/xdg-shell-client-protocol.h>
#include <gdk/wayland/xdg-shell-unstable-v6-client-protocol.h>
#include <gdk/wayland/xdg-foreign-unstable-v1-client-protocol.h>
#include <gdk/wayland/keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h>
@@ -46,13 +47,19 @@
G_BEGIN_DECLS
#define GDK_WAYLAND_MAX_THEME_SCALE 2
#define GDK_WAYLAND_MAX_THEME_SCALE 3
#define GDK_WAYLAND_THEME_SCALES_COUNT GDK_WAYLAND_MAX_THEME_SCALE
#define GDK_ZWP_POINTER_GESTURES_V1_VERSION 1
typedef struct _GdkWaylandSelection GdkWaylandSelection;
typedef enum _GdkWaylandShellVariant
{
GDK_WAYLAND_SHELL_VARIANT_XDG_SHELL,
GDK_WAYLAND_SHELL_VARIANT_ZXDG_SHELL_V6,
} GdkWaylandShellVariant;
struct _GdkWaylandDisplay
{
GdkDisplay parent_instance;
@@ -64,12 +71,17 @@ struct _GdkWaylandDisplay
/* Most recent serial */
guint32 serial;
uint32_t xdg_wm_base_id;
uint32_t zxdg_shell_v6_id;
GdkWaylandShellVariant shell_variant;
/* Wayland fields below */
struct wl_display *wl_display;
struct wl_registry *wl_registry;
struct wl_compositor *compositor;
struct wl_shm *shm;
struct zxdg_shell_v6 *xdg_shell;
struct xdg_wm_base *xdg_wm_base;
struct zxdg_shell_v6 *zxdg_shell_v6;
struct gtk_shell1 *gtk_shell;
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;
+153
View File
@@ -50,6 +50,10 @@ typedef struct {
const gchar *hintstyle;
} GsdXftSettings;
typedef struct {
guint fontconfig_timestamp;
gchar *modules;
} GsdExtSettings;
struct _GdkWaylandScreen
{
@@ -66,6 +70,11 @@ struct _GdkWaylandScreen
GHashTable *settings;
GsdXftSettings xft_settings;
GsdExtSettings dbus_settings;
GDBusProxy *dbus_proxy;
GCancellable *dbus_cancellable;
gulong dbus_setting_change_id;
guint32 shell_capabilities;
};
@@ -77,6 +86,8 @@ struct _GdkWaylandScreenClass
#define OUTPUT_VERSION_WITH_DONE 2
#define GTK_SETTINGS_DBUS_PATH "/org/gtk/Settings"
#define GTK_SETTINGS_DBUS_NAME "org.gtk.Settings"
GType _gdk_wayland_screen_get_type (void);
@@ -87,6 +98,15 @@ gdk_wayland_screen_dispose (GObject *object)
{
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (object);
if (screen_wayland->dbus_proxy && screen_wayland->dbus_setting_change_id > 0)
{
g_signal_handler_disconnect (screen_wayland->dbus_proxy,
screen_wayland->dbus_setting_change_id);
screen_wayland->dbus_setting_change_id = 0;
}
g_cancellable_cancel (screen_wayland->dbus_cancellable);
if (screen_wayland->root_window)
_gdk_window_destroy (screen_wayland->root_window, FALSE);
@@ -98,6 +118,9 @@ gdk_wayland_screen_finalize (GObject *object)
{
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (object);
g_clear_object (&screen_wayland->dbus_proxy);
g_clear_object (&screen_wayland->dbus_cancellable);
if (screen_wayland->root_window)
g_object_unref (screen_wayland->root_window);
@@ -105,6 +128,8 @@ gdk_wayland_screen_finalize (GObject *object)
g_hash_table_destroy (screen_wayland->settings);
g_free (screen_wayland->dbus_settings.modules);
G_OBJECT_CLASS (_gdk_wayland_screen_parent_class)->finalize (object);
}
@@ -653,10 +678,14 @@ gdk_wayland_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
GdkWaylandScreen *wayland_screen = GDK_WAYLAND_SCREEN (screen);
TranslationEntry *entry;
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
if (g_settings_schema_source_get_default () == NULL)
return FALSE;
entry = find_translation_entry_by_setting (name);
if (entry != NULL)
{
@@ -685,6 +714,18 @@ gdk_wayland_screen_get_setting (GdkScreen *screen,
return TRUE;
}
if (strcmp (name, "gtk-fontconfig-timestamp") == 0)
{
g_value_set_uint (value, wayland_screen->dbus_settings.fontconfig_timestamp);
return TRUE;
}
if (strcmp (name, "gtk-modules") == 0)
{
g_value_set_string (value, wayland_screen->dbus_settings.modules);
return TRUE;
}
return FALSE;
}
@@ -822,6 +863,107 @@ gdk_wayland_visual_new (GdkScreen *screen)
return visual;
}
static void
dbus_properties_change_cb (GDBusProxy *proxy,
GVariant *changed_properties,
const gchar* const *invalidated_properties,
gpointer user_data)
{
GdkWaylandScreen *screen_wayland = user_data;
GVariant *value;
gint64 timestamp;
if (g_variant_n_children (changed_properties) <= 0)
return;
value = g_variant_lookup_value (changed_properties,
"FontconfigTimestamp",
G_VARIANT_TYPE_INT64);
if (value != NULL)
{
timestamp = g_variant_get_int64 (value);
timestamp = timestamp / G_TIME_SPAN_SECOND;
if (timestamp > 0 && timestamp <= G_MAXUINT)
screen_wayland->dbus_settings.fontconfig_timestamp = (guint)timestamp;
else if (timestamp > G_MAXUINT)
g_warning ("Could not handle fontconfig update: timestamp out of bound");
notify_setting (GDK_SCREEN (screen_wayland), "gtk-fontconfig-timestamp");
g_variant_unref (value);
}
value = g_variant_lookup_value (changed_properties,
"Modules",
G_VARIANT_TYPE_STRING);
if (value != NULL)
{
g_free (screen_wayland->dbus_settings.modules);
screen_wayland->dbus_settings.modules = g_variant_dup_string (value, NULL);
notify_setting (GDK_SCREEN (screen_wayland), "gtk-modules");
g_variant_unref (value);
}
}
static void
fontconfig_dbus_proxy_open_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
GdkWaylandScreen *screen_wayland = user_data;
GDBusProxy *proxy;
GVariant *value;
gint64 timestamp;
proxy = g_dbus_proxy_new_for_bus_finish (result, NULL);
if (proxy == NULL)
return;
screen_wayland->dbus_proxy = proxy;
screen_wayland->dbus_setting_change_id =
g_signal_connect (screen_wayland->dbus_proxy,
"g-properties-changed",
G_CALLBACK (dbus_properties_change_cb),
screen_wayland);
value = g_dbus_proxy_get_cached_property (screen_wayland->dbus_proxy,
"FontconfigTimestamp");
if (value && g_variant_is_of_type (value, G_VARIANT_TYPE_INT64))
{
timestamp = g_variant_get_int64 (value);
timestamp = timestamp / G_TIME_SPAN_SECOND;
if (timestamp > 0 && timestamp <= G_MAXUINT)
screen_wayland->dbus_settings.fontconfig_timestamp = (guint)timestamp;
else if (timestamp > G_MAXUINT)
g_warning ("Could not handle fontconfig init: timestamp out of bound");
}
if (value != NULL)
g_variant_unref (value);
value = g_dbus_proxy_get_cached_property (screen_wayland->dbus_proxy,
"Modules");
if (value && g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))
{
g_free (screen_wayland->dbus_settings.modules);
screen_wayland->dbus_settings.modules = g_variant_dup_string (value, NULL);
}
if (value != NULL)
g_variant_unref (value);
}
GdkScreen *
_gdk_wayland_screen_new (GdkDisplay *display)
{
@@ -842,6 +984,17 @@ _gdk_wayland_screen_new (GdkDisplay *display)
screen_wayland->width,
screen_wayland->height);
screen_wayland->dbus_cancellable = g_cancellable_new ();
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
GTK_SETTINGS_DBUS_NAME,
GTK_SETTINGS_DBUS_PATH,
GTK_SETTINGS_DBUS_NAME,
screen_wayland->dbus_cancellable,
fontconfig_dbus_proxy_open_cb,
screen_wayland);
init_settings (screen);
return screen;
+26 -7
View File
@@ -61,12 +61,6 @@ struct _StoredSelection
gint fd;
};
struct _DataSourceData
{
GdkWindow *window;
GdkAtom selection;
};
struct _DataOfferData
{
GDestroyNotify destroy_notify;
@@ -119,6 +113,7 @@ struct _GdkWaylandSelection
static void selection_buffer_read (SelectionBuffer *buffer);
static void async_write_data_write (AsyncWriteData *write_data);
static void emit_selection_clear (GdkDisplay *display, GdkAtom selection);
static void
selection_buffer_notify (SelectionBuffer *buffer)
@@ -250,7 +245,7 @@ selection_buffer_read_cb (GObject *object,
if (bytes)
{
finished = g_bytes_get_size (bytes) < get_buffer_size ();
finished = g_bytes_get_size (bytes) == 0;
selection_buffer_append_data (buffer,
g_bytes_get_data (bytes, NULL),
g_bytes_get_size (bytes));
@@ -927,6 +922,7 @@ data_source_cancelled (void *data,
if (context)
gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_ERROR);
emit_selection_clear (display, atom);
gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
gdk_wayland_selection_unset_data_source (display, atom);
}
@@ -1037,6 +1033,7 @@ primary_source_cancelled (void *data,
display = gdk_display_get_default ();
atom = atoms[ATOM_PRIMARY];
emit_selection_clear (display, atom);
gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
gdk_wayland_selection_unset_data_source (display, atom);
}
@@ -1278,6 +1275,28 @@ emit_empty_selection_notify (GdkWindow *requestor,
gdk_event_free (event);
}
static void
emit_selection_clear (GdkDisplay *display,
GdkAtom selection)
{
GdkEvent *event;
GdkWindow *window;
event = gdk_event_new (GDK_SELECTION_CLEAR);
event->selection.selection = selection;
event->selection.time = GDK_CURRENT_TIME;
window = _gdk_wayland_display_get_selection_owner (display, selection);
if (window != NULL)
{
event->selection.window = g_object_ref (window);
event->selection.requestor = g_object_ref (window);
}
gdk_event_put (event);
gdk_event_free (event);
}
void
_gdk_wayland_display_convert_selection (GdkDisplay *display,
GdkWindow *requestor,
+4
View File
@@ -60,6 +60,10 @@ void gdk_wayland_display_set_startup_notification_id (GdkDisp
GDK_AVAILABLE_IN_3_22
gboolean gdk_wayland_display_prefers_ssd (GdkDisplay *display);
GDK_AVAILABLE_IN_3_22
gboolean gdk_wayland_display_query_registry (GdkDisplay *display,
const gchar *global);
G_END_DECLS
#endif /* __GDK_WAYLAND_DISPLAY_H__ */
File diff suppressed because it is too large Load Diff
+2
View File
@@ -54,11 +54,13 @@ libgdk_win32_la_SOURCES = \
gdkproperty-win32.c \
gdkscreen-win32.c \
gdkselection-win32.c \
gdkselection-win32.h \
gdktestutils-win32.c \
gdkwin32cursor.h \
gdkwin32display.h \
gdkwin32displaymanager.h \
gdkwin32dnd.h \
gdkwin32dnd-private.h \
gdkwin32glcontext.h \
gdkwin32.h \
gdkwin32id.c \
+1 -1
View File
@@ -1041,7 +1041,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS;
/* Don't produce any button or motion events while a window is being
* moved or resized, see bug #151090.
*/
if (_modal_operation_in_progress)
if (_modal_operation_in_progress & GDK_WIN32_MODAL_OP_SIZEMOVE_MASK)
{
GDK_NOTE (EVENTS_OR_INPUT, g_print ("... ignored when moving/sizing\n"));
return FALSE;
+51 -8
View File
@@ -551,9 +551,12 @@ inner_clipboard_window_procedure (HWND hwnd,
case WM_DRAWCLIPBOARD:
{
HWND hwnd_owner;
HWND stored_hwnd_owner;
HWND hwnd_opener;
GdkEvent *event;
GdkWindow *owner;
GdkWindow *stored_owner;
GdkWin32Selection *win32_sel = _gdk_win32_selection_get ();
hwnd_owner = GetClipboardOwner ();
@@ -568,14 +571,16 @@ inner_clipboard_window_procedure (HWND hwnd,
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_DND)
{
if (OpenClipboard (hwnd))
if (win32_sel->clipboard_opened_for != INVALID_HANDLE_VALUE ||
OpenClipboard (hwnd))
{
UINT nFormat = 0;
while ((nFormat = EnumClipboardFormats (nFormat)) != 0)
g_print ("%s ", _gdk_win32_cf_to_string (nFormat));
CloseClipboard ();
if (win32_sel->clipboard_opened_for == INVALID_HANDLE_VALUE)
CloseClipboard ();
}
else
{
@@ -590,6 +595,27 @@ inner_clipboard_window_procedure (HWND hwnd,
if (owner == NULL)
owner = gdk_win32_window_foreign_new_for_display (_gdk_display, hwnd_owner);
stored_owner = _gdk_win32_display_get_selection_owner (gdk_display_get_default (),
GDK_SELECTION_CLIPBOARD);
if (stored_owner)
stored_hwnd_owner = GDK_WINDOW_HWND (stored_owner);
else
stored_hwnd_owner = NULL;
if (stored_hwnd_owner != hwnd_owner)
{
if (win32_sel->clipboard_opened_for != INVALID_HANDLE_VALUE)
{
CloseClipboard ();
GDK_NOTE (DND, g_print ("Closed clipboard @ %s:%d\n", __FILE__, __LINE__));
}
win32_sel->clipboard_opened_for = INVALID_HANDLE_VALUE;
_gdk_win32_clear_clipboard_queue ();
}
event = gdk_event_new (GDK_OWNER_CHANGE);
event->owner_change.window = gdk_get_default_root_window ();
event->owner_change.owner = owner;
@@ -686,10 +712,11 @@ gdk_win32_display_request_selection_notification (GdkDisplay *display,
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
gboolean ret = FALSE;
gchar *selection_name = gdk_atom_name (selection);
GDK_NOTE (DND,
g_print ("gdk_display_request_selection_notification (..., %s)",
gdk_atom_name (selection)));
selection_name));
if (selection == GDK_SELECTION_CLIPBOARD ||
selection == GDK_SELECTION_PRIMARY)
@@ -709,6 +736,8 @@ gdk_win32_display_request_selection_notification (GdkDisplay *display,
ret = FALSE;
}
g_free (selection_name);
GDK_NOTE (DND, g_print (" -> %s\n", ret ? "TRUE" : "FALSE"));
return ret;
}
@@ -716,16 +745,30 @@ gdk_win32_display_request_selection_notification (GdkDisplay *display,
static gboolean
gdk_win32_display_supports_clipboard_persistence (GdkDisplay *display)
{
return FALSE;
return TRUE;
}
static void
gdk_win32_display_store_clipboard (GdkDisplay *display,
GdkWindow *clipboard_window,
guint32 time_,
const GdkAtom *targets,
gint n_targets)
GdkWindow *clipboard_window,
guint32 time_,
const GdkAtom *targets,
gint n_targets)
{
GdkEvent tmp_event;
SendMessage (GDK_WINDOW_HWND (clipboard_window), WM_RENDERALLFORMATS, 0, 0);
memset (&tmp_event, 0, sizeof (tmp_event));
tmp_event.selection.type = GDK_SELECTION_NOTIFY;
tmp_event.selection.window = clipboard_window;
tmp_event.selection.send_event = FALSE;
tmp_event.selection.selection = _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_CLIPBOARD_MANAGER);
tmp_event.selection.target = 0;
tmp_event.selection.property = GDK_NONE;
tmp_event.selection.requestor = 0;
tmp_event.selection.time = GDK_CURRENT_TIME;
gdk_event_put (&tmp_event);
}
static gboolean
-1
View File
@@ -73,7 +73,6 @@ struct _GdkWin32Display
/* WGL/OpenGL Items */
guint have_wgl : 1;
guint gl_version;
HDC gl_hdc;
HWND gl_hwnd;
GPtrArray *monitors;
+1333 -473
View File
File diff suppressed because it is too large Load Diff
+125 -51
View File
@@ -56,6 +56,7 @@
#include "gdkdevice-wintab.h"
#include "gdkwin32dnd.h"
#include "gdkdisplay-win32.h"
#include "gdkselection-win32.h"
#include "gdkdndprivate.h"
#include <windowsx.h>
@@ -1736,36 +1737,42 @@ modal_timer_proc (HWND hwnd,
{
int arbitrary_limit = 10;
while (_modal_operation_in_progress &&
while (_modal_operation_in_progress != GDK_WIN32_MODAL_OP_NONE &&
g_main_context_pending (NULL) &&
arbitrary_limit--)
g_main_context_iteration (NULL, FALSE);
}
void
_gdk_win32_begin_modal_call (void)
_gdk_win32_begin_modal_call (GdkWin32ModalOpKind kind)
{
g_assert (!_modal_operation_in_progress);
GdkWin32ModalOpKind was = _modal_operation_in_progress;
g_assert (!(_modal_operation_in_progress & kind));
_modal_operation_in_progress = TRUE;
_modal_operation_in_progress |= kind;
modal_timer = SetTimer (NULL, 0, 10, modal_timer_proc);
if (modal_timer == 0)
WIN32_API_FAILED ("SetTimer");
if (was == GDK_WIN32_MODAL_OP_NONE)
{
modal_timer = SetTimer (NULL, 0, 10, modal_timer_proc);
if (modal_timer == 0)
WIN32_API_FAILED ("SetTimer");
}
}
void
_gdk_win32_end_modal_call (void)
_gdk_win32_end_modal_call (GdkWin32ModalOpKind kind)
{
g_assert (_modal_operation_in_progress);
g_assert (_modal_operation_in_progress & kind);
_modal_operation_in_progress = FALSE;
_modal_operation_in_progress &= ~kind;
if (modal_timer != 0)
if (_modal_operation_in_progress == GDK_WIN32_MODAL_OP_NONE &&
modal_timer != 0)
{
API_CALL (KillTimer, (NULL, modal_timer));
modal_timer = 0;
}
}
}
static VOID CALLBACK
@@ -2280,6 +2287,10 @@ gdk_event_translate (MSG *msg,
int i;
GdkWin32Selection *win32_sel = NULL;
STGMEDIUM *property_change_data;
display = gdk_display_get_default ();
window = gdk_win32_handle_table_lookup (msg->hwnd);
@@ -3139,7 +3150,8 @@ gdk_event_translate (MSG *msg,
case WM_KILLFOCUS:
if (keyboard_grab != NULL &&
!GDK_WINDOW_DESTROYED (keyboard_grab->window))
!GDK_WINDOW_DESTROYED (keyboard_grab->window) &&
(_modal_operation_in_progress & GDK_WIN32_MODAL_OP_DND) == 0)
{
generate_grab_broken_event (device_manager, keyboard_grab->window, TRUE, NULL);
}
@@ -3246,30 +3258,54 @@ gdk_event_translate (MSG *msg,
break;
case WM_ENTERSIZEMOVE:
case WM_ENTERMENULOOP:
if (msg->message == WM_ENTERSIZEMOVE)
_modal_move_resize_window = msg->hwnd;
_gdk_win32_begin_modal_call ();
_modal_move_resize_window = msg->hwnd;
_gdk_win32_begin_modal_call (GDK_WIN32_MODAL_OP_SIZEMOVE_MASK);
break;
case WM_EXITSIZEMOVE:
case WM_EXITMENULOOP:
if (_modal_operation_in_progress)
if (_modal_operation_in_progress & GDK_WIN32_MODAL_OP_SIZEMOVE_MASK)
{
_modal_move_resize_window = NULL;
_gdk_win32_end_modal_call ();
_gdk_win32_end_modal_call (GDK_WIN32_MODAL_OP_SIZEMOVE_MASK);
}
break;
case WM_ENTERMENULOOP:
_gdk_win32_begin_modal_call (GDK_WIN32_MODAL_OP_MENU);
break;
case WM_EXITMENULOOP:
if (_modal_operation_in_progress & GDK_WIN32_MODAL_OP_MENU)
_gdk_win32_end_modal_call (GDK_WIN32_MODAL_OP_MENU);
break;
break;
/*
* Handle WM_CANCELMODE and do nothing in response to it when DnD is
* active. Otherwise pass it to DefWindowProc, which will call ReleaseCapture()
* on our behalf.
* This prevents us from losing mouse capture when alt-tabbing during DnD
* (this includes the feature of Windows Explorer where dragging stuff over
* a window button in the taskbar causes that window to receive focus, i.e.
* keyboardless alt-tabbing).
*/
case WM_CANCELMODE:
if (_modal_operation_in_progress & GDK_WIN32_MODAL_OP_DND)
{
return_val = TRUE;
*ret_valp = 0;
}
break;
case WM_CAPTURECHANGED:
/* Sometimes we don't get WM_EXITSIZEMOVE, for instance when you
select move/size in the menu and then click somewhere without
moving/resizing. We work around this using WM_CAPTURECHANGED. */
if (_modal_operation_in_progress)
if (_modal_operation_in_progress & GDK_WIN32_MODAL_OP_SIZEMOVE_MASK)
{
_modal_move_resize_window = NULL;
_gdk_win32_end_modal_call ();
_gdk_win32_end_modal_call (GDK_WIN32_MODAL_OP_SIZEMOVE_MASK);
}
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
@@ -3425,7 +3461,7 @@ gdk_event_translate (MSG *msg,
}
/* Call modal timer immediate so that we repaint faster after a resize. */
if (_modal_operation_in_progress)
if (_modal_operation_in_progress & GDK_WIN32_MODAL_OP_SIZEMOVE_MASK)
modal_timer_proc (0,0,0,0);
/* Claim as handled, so that WM_SIZE and WM_MOVE are avoided */
@@ -3721,7 +3757,9 @@ gdk_event_translate (MSG *msg,
break;
case WM_DESTROYCLIPBOARD:
if (!_ignore_destroy_clipboard)
win32_sel = _gdk_win32_selection_get ();
if (!win32_sel->ignore_destroy_clipboard)
{
event = gdk_event_new (GDK_SELECTION_CLEAR);
event->selection.window = window;
@@ -3739,12 +3777,29 @@ gdk_event_translate (MSG *msg,
case WM_RENDERFORMAT:
GDK_NOTE (EVENTS, g_print (" %s", _gdk_win32_cf_to_string (msg->wParam)));
if (!(target = g_hash_table_lookup (_format_atom_table, GINT_TO_POINTER (msg->wParam))))
{
GDK_NOTE (EVENTS, g_print (" (target not found)"));
return_val = TRUE;
break;
}
*ret_valp = 0;
return_val = TRUE;
win32_sel = _gdk_win32_selection_get ();
for (target = NULL, i = 0;
i < win32_sel->clipboard_selection_targets->len;
i++)
{
GdkSelTargetFormat target_format = g_array_index (win32_sel->clipboard_selection_targets, GdkSelTargetFormat, i);
if (target_format.format == msg->wParam)
{
target = target_format.target;
win32_sel->property_change_transmute = target_format.transmute;
}
}
if (target == NULL)
{
GDK_NOTE (EVENTS, g_print (" (target not found)"));
break;
}
/* We need to render to clipboard immediately, don't call
* _gdk_win32_append_event()
@@ -3754,45 +3809,62 @@ gdk_event_translate (MSG *msg,
event->selection.send_event = FALSE;
event->selection.selection = GDK_SELECTION_CLIPBOARD;
event->selection.target = target;
event->selection.property = _gdk_selection;
event->selection.property = _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_GDK_SELECTION);
event->selection.requestor = gdk_win32_handle_table_lookup (msg->hwnd);
event->selection.time = msg->time;
property_change_data = g_new0 (STGMEDIUM, 1);
win32_sel->property_change_data = property_change_data;
win32_sel->property_change_format = msg->wParam;
win32_sel->property_change_target_atom = target;
fixup_event (event);
GDK_NOTE (EVENTS, g_print (" (calling _gdk_event_emit)"));
GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
_gdk_event_emit (event);
gdk_event_free (event);
win32_sel->property_change_format = 0;
/* Now the clipboard owner should have rendered */
if (!_delayed_rendering_data)
if (!property_change_data->hGlobal)
{
GDK_NOTE (EVENTS, g_print (" (no _delayed_rendering_data?)"));
}
else
{
if (msg->wParam == CF_DIB)
{
_delayed_rendering_data =
_gdk_win32_selection_convert_to_dib (_delayed_rendering_data,
target);
if (!_delayed_rendering_data)
{
g_warning ("Cannot convert to DIB from delayed rendered image");
break;
}
}
/* The requestor is holding the clipboard, no
* OpenClipboard() is required/possible
*/
GDK_NOTE (DND,
g_print (" SetClipboardData(%s,%p)",
_gdk_win32_cf_to_string (msg->wParam),
_delayed_rendering_data));
property_change_data->hGlobal));
API_CALL (SetClipboardData, (msg->wParam, _delayed_rendering_data));
_delayed_rendering_data = NULL;
API_CALL (SetClipboardData, (msg->wParam, property_change_data->hGlobal));
}
g_clear_pointer (&property_change_data, g_free);
*ret_valp = 0;
return_val = TRUE;
break;
case WM_RENDERALLFORMATS:
*ret_valp = 0;
return_val = TRUE;
win32_sel = _gdk_win32_selection_get ();
if (API_CALL (OpenClipboard, (msg->hwnd)))
{
for (target = NULL, i = 0;
i < win32_sel->clipboard_selection_targets->len;
i++)
{
GdkSelTargetFormat target_format = g_array_index (win32_sel->clipboard_selection_targets, GdkSelTargetFormat, i);
if (target_format.format != 0)
SendMessage (msg->hwnd, WM_RENDERFORMAT, target_format.format, 0);
}
API_CALL (CloseClipboard, ());
}
break;
@@ -3962,16 +4034,18 @@ gdk_event_dispatch (GSource *source,
if (event)
{
GdkWin32Selection *sel_win32 = _gdk_win32_selection_get ();
_gdk_event_emit (event);
gdk_event_free (event);
/* Do drag & drop if it is still pending */
if (_dnd_source_state == GDK_WIN32_DND_PENDING)
if (sel_win32->dnd_source_state == GDK_WIN32_DND_PENDING)
{
_dnd_source_state = GDK_WIN32_DND_DRAGGING;
sel_win32->dnd_source_state = GDK_WIN32_DND_DRAGGING;
_gdk_win32_dnd_do_dragdrop ();
_dnd_source_state = GDK_WIN32_DND_NONE;
sel_win32->dnd_source_state = GDK_WIN32_DND_NONE;
}
}
+31 -16
View File
@@ -215,8 +215,6 @@ _destroy_dummy_gl_context (GdkWGLDummy dummy)
{
if (dummy.hglrc != NULL)
{
if (wglGetCurrentContext () == dummy.hglrc)
wglMakeCurrent (NULL, NULL);
wglDeleteContext (dummy.hglrc);
dummy.hglrc = NULL;
}
@@ -302,6 +300,10 @@ _get_wgl_pfd (HDC hdc,
int pixelAttribs[PIXEL_ATTRIBUTES];
int alpha_idx = 0;
/* Save up the HDC and HGLRC that we are currently using, to restore back to it when we are done here */
HDC hdc_current = wglGetCurrentDC ();
HGLRC hglrc_current = wglGetCurrentContext ();
if (display->hasWglARBmultisample)
{
/* 2 pairs of values needed for multisampling/AA support */
@@ -355,7 +357,10 @@ _get_wgl_pfd (HDC hdc,
best_pf = _gdk_init_dummy_context (&dummy, need_alpha_bits);
if (best_pf == 0 || !wglMakeCurrent (dummy.hdc, dummy.hglrc))
return 0;
{
wglMakeCurrent (hdc_current, hglrc_current);
return 0;
}
wglChoosePixelFormatARB (hdc,
pixelAttribs,
@@ -384,7 +389,8 @@ _get_wgl_pfd (HDC hdc,
}
}
wglMakeCurrent (NULL, NULL);
/* Go back to the HDC that we were using, since we are done with the dummy HDC and GL Context */
wglMakeCurrent (hdc_current, hglrc_current);
_destroy_dummy_gl_context (dummy);
}
else
@@ -447,7 +453,7 @@ _gdk_init_dummy_context (GdkWGLDummy *dummy,
return best_idx;
}
gboolean
static gboolean
_gdk_win32_display_init_gl (GdkDisplay *display,
const gboolean need_alpha_bits)
{
@@ -487,10 +493,10 @@ _gdk_win32_display_init_gl (GdkDisplay *display,
g_print ("WGL API version %d.%d found\n"
" - Vendor: %s\n"
" - Checked extensions:\n"
"\t* WGL_ARB_pixel_format: %s\n",
"\t* WGL_ARB_pixel_format: %s\n"
"\t* WGL_ARB_create_context: %s\n"
"\t* WGL_EXT_swap_control: %s\n"
"\t* WGL_OML_sync_control: %s\n",
"\t* WGL_OML_sync_control: %s\n"
"\t* WGL_ARB_multisample: %s\n",
display_win32->gl_version / 10,
display_win32->gl_version % 10,
@@ -578,11 +584,18 @@ _create_gl_context (HDC hdc,
HGLRC hglrc_base = wglCreateContext (hdc);
gboolean success = TRUE;
/* Save up the HDC and HGLRC that we are currently using, to restore back to it when we are done here */
HDC hdc_current = wglGetCurrentDC ();
HGLRC hglrc_current = wglGetCurrentContext ();
/* if we have no wglCreateContextAttribsARB(), return the legacy context when all is set */
if (*is_legacy && !hasWglARBCreateContext)
{
if (_ensure_legacy_gl_context (hdc, hglrc_base, share))
return hglrc_base;
{
wglMakeCurrent (hdc_current, hglrc_current);
return hglrc_base;
}
success = FALSE;
goto gl_fail;
@@ -632,17 +645,21 @@ _create_gl_context (HDC hdc,
}
gl_fail:
if (!success || hglrc != NULL)
if (!success)
{
wglMakeCurrent (NULL, NULL);
wglDeleteContext (hglrc_base);
return NULL;
}
if (!success)
return NULL;
wglMakeCurrent (hdc_current, hglrc_current);
if (hglrc != NULL)
return hglrc;
{
wglDeleteContext (hglrc_base);
return hglrc;
}
return hglrc_base;
}
@@ -700,6 +717,7 @@ _gdk_win32_gl_context_realize (GdkGLContext *context,
g_set_error_literal (error, GDK_GL_ERROR,
GDK_GL_ERROR_UNSUPPORTED_FORMAT,
_("No available configurations for the given pixel format"));
return FALSE;
}
@@ -800,7 +818,6 @@ _gdk_win32_window_create_gl_context (GdkWindow *window,
hwnd = GDK_WINDOW_HWND (window);
hdc = GetDC (hwnd);
display_win32->gl_hdc = hdc;
display_win32->gl_hwnd = hwnd;
context = g_object_new (GDK_TYPE_WIN32_GL_CONTEXT,
@@ -835,15 +852,13 @@ _gdk_win32_display_make_gl_context_current (GdkDisplay *display,
context_win32 = GDK_WIN32_GL_CONTEXT (context);
if (!wglMakeCurrent (display_win32->gl_hdc, context_win32->hglrc))
if (!wglMakeCurrent (context_win32->gl_hdc, context_win32->hglrc))
{
GDK_NOTE (OPENGL,
g_print ("Making WGL context current failed\n"));
return FALSE;
}
context_win32->gl_hdc = display_win32->gl_hdc;
if (context_win32->is_attached && display_win32->hasWglEXTSwapControl)
{
window = gdk_gl_context_get_window (context);
+3 -33
View File
@@ -41,41 +41,11 @@ HKL _gdk_input_locale;
gboolean _gdk_input_locale_is_ime;
UINT _gdk_input_codepage;
GdkAtom _gdk_selection;
GdkAtom _wm_transient_for;
GdkAtom _targets;
GdkAtom _delete;
GdkAtom _save_targets;
GdkAtom _utf8_string;
GdkAtom _text;
GdkAtom _compound_text;
GdkAtom _text_uri_list;
GdkAtom _text_html;
GdkAtom _image_png;
GdkAtom _image_jpeg;
GdkAtom _image_bmp;
GdkAtom _image_gif;
GdkAtom _local_dnd;
GdkAtom _gdk_win32_dropfiles;
GdkAtom _gdk_ole2_dnd;
UINT _cf_png;
UINT _cf_jfif;
UINT _cf_gif;
UINT _cf_url;
UINT _cf_html_format;
UINT _cf_text_html;
GdkWin32DndState _dnd_target_state = GDK_WIN32_DND_NONE;
GdkWin32DndState _dnd_source_state = GDK_WIN32_DND_NONE;
gint _gdk_input_ignore_wintab = FALSE;
gint _gdk_max_colors = 0;
gboolean _modal_operation_in_progress = FALSE;
GdkWin32ModalOpKind _modal_operation_in_progress = GDK_WIN32_MODAL_OP_NONE;
HWND _modal_move_resize_window = NULL;
gboolean _ignore_destroy_clipboard = FALSE;
HGLOBAL _delayed_rendering_data = NULL;
GHashTable *_format_atom_table = NULL;
/* The singleton selection object pointer */
GdkWin32Selection *_win32_selection = NULL;
+3 -32
View File
@@ -44,6 +44,9 @@
#include <wintab.h>
#include <imm.h>
/* for CFSTR_SHELLIDLIST */
#include <shlobj.h>
static gboolean gdk_synchronize = FALSE;
static gboolean dummy;
@@ -98,38 +101,6 @@ _gdk_win32_windowing_init (void)
GDK_NOTE (EVENTS, g_print ("input_locale:%p, codepage:%d\n",
_gdk_input_locale, _gdk_input_codepage));
_gdk_selection = gdk_atom_intern_static_string ("GDK_SELECTION");
_wm_transient_for = gdk_atom_intern_static_string ("WM_TRANSIENT_FOR");
_targets = gdk_atom_intern_static_string ("TARGETS");
_delete = gdk_atom_intern_static_string ("DELETE");
_save_targets = gdk_atom_intern_static_string ("SAVE_TARGETS");
_utf8_string = gdk_atom_intern_static_string ("UTF8_STRING");
_text = gdk_atom_intern_static_string ("TEXT");
_compound_text = gdk_atom_intern_static_string ("COMPOUND_TEXT");
_text_uri_list = gdk_atom_intern_static_string ("text/uri-list");
_text_html = gdk_atom_intern_static_string ("text/html");
_image_png = gdk_atom_intern_static_string ("image/png");
_image_jpeg = gdk_atom_intern_static_string ("image/jpeg");
_image_bmp = gdk_atom_intern_static_string ("image/bmp");
_image_gif = gdk_atom_intern_static_string ("image/gif");
_local_dnd = gdk_atom_intern_static_string ("LocalDndSelection");
_gdk_win32_dropfiles = gdk_atom_intern_static_string ("DROPFILES_DND");
_gdk_ole2_dnd = gdk_atom_intern_static_string ("OLE2_DND");
/* MS Office 2007, at least, offers images in common file formats
* using clipboard format names like "PNG" and "JFIF". So we follow
* the lead and map the GDK target name "image/png" to the clipboard
* format name "PNG" etc.
*/
_cf_png = RegisterClipboardFormat ("PNG");
_cf_jfif = RegisterClipboardFormat ("JFIF");
_cf_gif = RegisterClipboardFormat ("GIF");
_cf_url = RegisterClipboardFormat ("UniformResourceLocatorW");
_cf_html_format = RegisterClipboardFormat ("HTML Format");
_cf_text_html = RegisterClipboardFormat ("text/html");
_gdk_win32_selection_init ();
}
+1 -4
View File
@@ -766,10 +766,7 @@ prune_monitors (EnumMonitorData *data)
m = g_ptr_array_index (data->monitors, i);
if (m->remove)
{
g_ptr_array_remove_index (data->monitors, i);
continue;
}
g_ptr_array_remove_index (data->monitors, i--);
}
}
+20 -61
View File
@@ -40,6 +40,7 @@
#include <gdk/win32/gdkwin32display.h>
#include <gdk/win32/gdkwin32screen.h>
#include <gdk/win32/gdkwin32keys.h>
#include <gdk/win32/gdkselection-win32.h>
#include "gdkinternals.h"
@@ -296,46 +297,8 @@ extern UINT _gdk_input_codepage;
extern guint _gdk_keymap_serial;
/* GdkAtoms: properties, targets and types */
extern GdkAtom _gdk_selection;
extern GdkAtom _wm_transient_for;
extern GdkAtom _targets;
extern GdkAtom _delete;
extern GdkAtom _save_targets;
extern GdkAtom _utf8_string;
extern GdkAtom _text;
extern GdkAtom _compound_text;
extern GdkAtom _text_uri_list;
extern GdkAtom _text_html;
extern GdkAtom _image_png;
extern GdkAtom _image_jpeg;
extern GdkAtom _image_bmp;
extern GdkAtom _image_gif;
/* DND selections */
extern GdkAtom _local_dnd;
extern GdkAtom _gdk_win32_dropfiles;
extern GdkAtom _gdk_ole2_dnd;
/* Clipboard formats */
extern UINT _cf_png;
extern UINT _cf_jfif;
extern UINT _cf_gif;
extern UINT _cf_url;
extern UINT _cf_html_format;
extern UINT _cf_text_html;
/* OLE-based DND state */
typedef enum {
GDK_WIN32_DND_NONE,
GDK_WIN32_DND_PENDING,
GDK_WIN32_DND_DROPPED,
GDK_WIN32_DND_FAILED,
GDK_WIN32_DND_DRAGGING,
} GdkWin32DndState;
extern GdkWin32DndState _dnd_target_state;
extern GdkWin32DndState _dnd_source_state;
/* The singleton selection object pointer */
GdkWin32Selection *_win32_selection;
void _gdk_win32_dnd_do_dragdrop (void);
void _gdk_win32_ole2_dnd_property_change (GdkAtom type,
@@ -343,8 +306,23 @@ void _gdk_win32_ole2_dnd_property_change (GdkAtom type,
const guchar *data,
gint nelements);
void _gdk_win32_begin_modal_call (void);
void _gdk_win32_end_modal_call (void);
typedef enum {
GDK_WIN32_MODAL_OP_NONE = 0x0,
GDK_WIN32_MODAL_OP_SIZE = 0x1 << 0,
GDK_WIN32_MODAL_OP_MOVE = 0x1 << 1,
GDK_WIN32_MODAL_OP_MENU = 0x1 << 2,
GDK_WIN32_MODAL_OP_DND = 0x1 << 3
} GdkWin32ModalOpKind;
#define GDK_WIN32_MODAL_OP_SIZEMOVE_MASK (GDK_WIN32_MODAL_OP_SIZE | GDK_WIN32_MODAL_OP_MOVE)
/* Non-zero while a modal sizing, moving, or dnd operation is in progress */
extern GdkWin32ModalOpKind _modal_operation_in_progress;
extern HWND _modal_move_resize_window;
void _gdk_win32_begin_modal_call (GdkWin32ModalOpKind kind);
void _gdk_win32_end_modal_call (GdkWin32ModalOpKind kind);
/* Options */
@@ -353,27 +331,8 @@ extern gint _gdk_max_colors;
#define GDK_WIN32_COLORMAP_DATA(cmap) ((GdkColormapPrivateWin32 *) GDK_COLORMAP (cmap)->windowing_data)
/* TRUE while a modal sizing, moving, or dnd operation is in progress */
extern gboolean _modal_operation_in_progress;
extern HWND _modal_move_resize_window;
/* TRUE when we are emptying the clipboard ourselves */
extern gboolean _ignore_destroy_clipboard;
/* Mapping from registered clipboard format id (native) to
* corresponding GdkAtom
*/
extern GHashTable *_format_atom_table;
/* Hold the result of a delayed rendering */
extern HGLOBAL _delayed_rendering_data;
extern GdkCursor *_gdk_win32_grab_cursor;
HGLOBAL _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
GdkAtom target);
/* Convert a pixbuf to an HICON (or HCURSOR). Supports alpha under
* Windows XP, thresholds alpha otherwise.
*/
+34 -104
View File
@@ -137,20 +137,15 @@ _gdk_win32_window_get_property (GdkWindow *window,
}
void
_gdk_win32_window_change_property (GdkWindow *window,
GdkAtom property,
GdkAtom type,
gint format,
GdkPropMode mode,
const guchar *data,
gint nelements)
_gdk_win32_window_change_property (GdkWindow *window,
GdkAtom property,
GdkAtom type,
gint format,
GdkPropMode mode,
const guchar *data,
gint nelements)
{
HGLOBAL hdata;
gint i, size;
guchar *ucptr;
wchar_t *wcptr, *p;
glong wclen;
GError *err = NULL;
GdkWin32Selection *win32_sel = _gdk_win32_selection_get ();
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -161,6 +156,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
GDK_NOTE (DND, {
gchar *prop_name = gdk_atom_name (property);
gchar *type_name = gdk_atom_name (type);
gchar *datastring = _gdk_win32_data_to_string (data, MIN (10, format*nelements/8));
g_print ("gdk_property_change: %p %s %s %s %d*%d bits: %s\n",
GDK_WINDOW_HWND (window),
@@ -171,103 +167,36 @@ _gdk_win32_window_change_property (GdkWindow *window,
(mode == GDK_PROP_MODE_APPEND ? "APPEND" :
"???"))),
format, nelements,
_gdk_win32_data_to_string (data, MIN (10, format*nelements/8)));
datastring);
g_free (datastring);
g_free (prop_name);
g_free (type_name);
});
#ifndef G_DISABLE_CHECKS
/* We should never come here for these types */
g_return_if_fail (type != GDK_TARGET_STRING);
g_return_if_fail (type != _text);
g_return_if_fail (type != _compound_text);
g_return_if_fail (type != _save_targets);
if (property == _gdk_selection &&
format == 8 &&
mode == GDK_PROP_MODE_REPLACE)
if (G_UNLIKELY (type == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_COMPOUND_TEXT) ||
type == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_SAVE_TARGETS)))
{
if (type == _image_bmp && nelements < sizeof (BITMAPFILEHEADER))
{
g_warning ("Clipboard contains invalid bitmap data");
return;
}
if (type == _utf8_string)
{
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, &err);
if (err != NULL)
{
g_warning ("Failed to convert utf8: %s", err->message);
g_clear_error (&err);
return;
}
if (!OpenClipboard (GDK_WINDOW_HWND (window)))
{
WIN32_API_FAILED ("OpenClipboard");
g_free (wcptr);
return;
}
wclen++; /* Terminating 0 */
size = wclen * 2;
for (i = 0; i < wclen; i++)
if (wcptr[i] == '\n' && (i == 0 || wcptr[i - 1] != '\r'))
size += 2;
if (!(hdata = GlobalAlloc (GMEM_MOVEABLE, size)))
{
WIN32_API_FAILED ("GlobalAlloc");
if (!CloseClipboard ())
WIN32_API_FAILED ("CloseClipboard");
g_free (wcptr);
return;
}
ucptr = GlobalLock (hdata);
p = (wchar_t *) ucptr;
for (i = 0; i < wclen; i++)
{
if (wcptr[i] == '\n' && (i == 0 || wcptr[i - 1] != '\r'))
*p++ = '\r';
*p++ = wcptr[i];
}
g_free (wcptr);
GlobalUnlock (hdata);
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_UNICODETEXT,%p)\n",
hdata));
if (!SetClipboardData (CF_UNICODETEXT, hdata))
WIN32_API_FAILED ("SetClipboardData");
if (!CloseClipboard ())
WIN32_API_FAILED ("CloseClipboard");
}
else
{
/* We use delayed rendering for everything else than
* text. We can't assign hdata to the clipboard here as type
* may be "image/png", "image/jpg", etc. In this case
* there's a further conversion afterwards.
*/
GDK_NOTE (DND, g_print ("... delayed rendering\n"));
_delayed_rendering_data = NULL;
if (!(hdata = GlobalAlloc (GMEM_MOVEABLE, nelements > 0 ? nelements : 1)))
{
WIN32_API_FAILED ("GlobalAlloc");
return;
}
ucptr = GlobalLock (hdata);
memcpy (ucptr, data, nelements);
GlobalUnlock (hdata);
_delayed_rendering_data = hdata;
}
g_return_if_fail_warning (G_LOG_DOMAIN,
G_STRFUNC,
"change_property called with a bad type");
return;
}
else if (property == _gdk_ole2_dnd)
#endif
if (property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_GDK_SELECTION) ||
property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_OLE2_DND) ||
property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_LOCAL_DND_SELECTION))
{
/* Will happen only if gdkdnd-win32.c has OLE2 dnd support compiled in */
_gdk_win32_ole2_dnd_property_change (type, format, data, nelements);
_gdk_win32_selection_property_change (win32_sel,
window,
property,
type,
format,
mode,
data,
nelements);
}
else
g_warning ("gdk_property_change: General case not implemented");
@@ -291,9 +220,10 @@ _gdk_win32_window_delete_property (GdkWindow *window,
g_free (prop_name);
});
if (property == _gdk_selection)
if (property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_GDK_SELECTION) ||
property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_OLE2_DND))
_gdk_selection_property_delete (window);
else if (property == _wm_transient_for)
else if (property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_WM_TRANSIENT_FOR))
{
GdkScreen *screen;
File diff suppressed because it is too large Load Diff
+224
View File
@@ -0,0 +1,224 @@
/* GDK - The GIMP Drawing Kit
*
* gdkselection-win32.h: Private Win32 specific selection object
*
* Copyright © 2017 LRN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_SELECTION_WIN32_H__
#define __GDK_SELECTION_WIN32_H__
G_BEGIN_DECLS
#define _gdk_win32_selection_get() (_win32_selection)
#define _gdk_atom_array_index(a, i) (g_array_index (a, GdkAtom, i))
#define _gdk_win32_selection_atom(i) (_gdk_atom_array_index (_gdk_win32_selection_get ()->known_atoms, i))
#define _gdk_cf_array_index(a, i) (g_array_index (a, UINT, i))
#define _gdk_win32_selection_cf(i) (_gdk_cf_array_index (_gdk_win32_selection_get ()->known_clipboard_formats, i))
/* Maps targets to formats or vice versa, depending on the
* semantics of the array that holds these.
* Also remembers whether the data needs to be transmuted.
*/
typedef struct {
gint format;
GdkAtom target;
gboolean transmute;
} GdkSelTargetFormat;
/* We emulate the GDK_SELECTION window properties of windows (as used
* in the X11 backend) by using a hash table from window handles to
* GdkSelProp structs.
*/
typedef struct {
guchar *data;
gsize length;
gint bitness;
GdkAtom target;
} GdkSelProp;
/* OLE-based DND state */
typedef enum {
GDK_WIN32_DND_NONE,
GDK_WIN32_DND_PENDING,
GDK_WIN32_DND_DROPPED,
GDK_WIN32_DND_FAILED,
GDK_WIN32_DND_DRAGGING,
} GdkWin32DndState;
enum _GdkWin32AtomIndex
{
/* GdkAtoms: properties, targets and types */
GDK_WIN32_ATOM_INDEX_GDK_SELECTION = 0,
GDK_WIN32_ATOM_INDEX_CLIPBOARD_MANAGER,
GDK_WIN32_ATOM_INDEX_WM_TRANSIENT_FOR,
GDK_WIN32_ATOM_INDEX_TARGETS,
GDK_WIN32_ATOM_INDEX_DELETE,
GDK_WIN32_ATOM_INDEX_SAVE_TARGETS,
GDK_WIN32_ATOM_INDEX_UTF8_STRING,
GDK_WIN32_ATOM_INDEX_TEXT,
GDK_WIN32_ATOM_INDEX_COMPOUND_TEXT,
GDK_WIN32_ATOM_INDEX_TEXT_URI_LIST,
GDK_WIN32_ATOM_INDEX_TEXT_HTML,
GDK_WIN32_ATOM_INDEX_IMAGE_PNG,
GDK_WIN32_ATOM_INDEX_IMAGE_JPEG,
GDK_WIN32_ATOM_INDEX_IMAGE_BMP,
GDK_WIN32_ATOM_INDEX_IMAGE_GIF,
/* DND selections */
GDK_WIN32_ATOM_INDEX_LOCAL_DND_SELECTION,
GDK_WIN32_ATOM_INDEX_DROPFILES_DND,
GDK_WIN32_ATOM_INDEX_OLE2_DND,
/* Clipboard formats */
GDK_WIN32_ATOM_INDEX_PNG,
GDK_WIN32_ATOM_INDEX_JFIF,
GDK_WIN32_ATOM_INDEX_GIF,
GDK_WIN32_ATOM_INDEX_CF_DIB,
GDK_WIN32_ATOM_INDEX_CFSTR_SHELLIDLIST,
GDK_WIN32_ATOM_INDEX_CF_TEXT,
GDK_WIN32_ATOM_INDEX_CF_UNICODETEXT,
GDK_WIN32_ATOM_INDEX_LAST
};
typedef enum _GdkWin32AtomIndex GdkWin32AtomIndex;
enum _GdkWin32CFIndex
{
GDK_WIN32_CF_INDEX_PNG = 0,
GDK_WIN32_CF_INDEX_JFIF,
GDK_WIN32_CF_INDEX_GIF,
GDK_WIN32_CF_INDEX_UNIFORMRESOURCELOCATORW,
GDK_WIN32_CF_INDEX_CFSTR_SHELLIDLIST,
GDK_WIN32_CF_INDEX_HTML_FORMAT,
GDK_WIN32_CF_INDEX_TEXT_HTML,
GDK_WIN32_CF_INDEX_IMAGE_PNG,
GDK_WIN32_CF_INDEX_IMAGE_JPEG,
GDK_WIN32_CF_INDEX_IMAGE_BMP,
GDK_WIN32_CF_INDEX_IMAGE_GIF,
GDK_WIN32_CF_INDEX_TEXT_URI_LIST,
GDK_WIN32_CF_INDEX_UTF8_STRING,
GDK_WIN32_CF_INDEX_LAST
};
typedef enum _GdkWin32CFIndex GdkWin32CFIndex;
#define GDK_TYPE_WIN32_SELECTION (gdk_win32_selection_get_type ())
#define GDK_WIN32_SELECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_WIN32_SELECTION, GdkWin32Selection))
#define GDK_WIN32_SELECTION_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_WIN32_SELECTION, GdkWin32SelectionClass))
#define GDK_IS_WIN32_SELECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_WIN32_SELECTION))
#define GDK_IS_WIN32_SELECTION_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_WIN32_SELECTION))
#define GDK_WIN32_SELECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_WIN32_SELECTION, GdkWin32SelectionClass))
typedef struct _GdkWin32Selection GdkWin32Selection;
typedef struct _GdkWin32SelectionClass GdkWin32SelectionClass;
/* This object is just a sink to hold all the selection- and dnd-related data
* that otherwise would be in global variables.
*/
struct _GdkWin32Selection
{
GObject *parent_instance;
GHashTable *sel_prop_table;
GdkSelProp *dropfiles_prop;
/* We store the owner of each selection in this table. Obviously, this only
* is valid intra-app, and in fact it is necessary for the intra-app DND to work.
*/
GHashTable *sel_owner_table;
/* GdkAtoms for well-known image formats */
GdkAtom *known_pixbuf_formats;
int n_known_pixbuf_formats;
/* GArray of GdkAtoms for various known Selection and DnD strings.
* Size is guaranteed to be at least GDK_WIN32_ATOM_INDEX_LAST
*/
GArray *known_atoms;
/* GArray of UINTs for various known clipboard formats.
* Size is guaranteed to be at least GDK_WIN32_CF_INDEX_LAST.
*/
GArray *known_clipboard_formats;
GdkWin32DndState dnd_target_state;
GdkWin32DndState dnd_source_state;
/* Holds a reference to the data object for the target drop site.
*/
IDataObject *dnd_data_object_target;
/* Carries DnD target context from idroptarget_*() to convert_selection() */
GdkDragContext *target_drag_context;
/* Carries W32 format ID from idataobject_getdata() to property_change() */
UINT property_change_format;
/* Carries the W32-wrapped data between idataobject_getdata() and property_change() */
LPSTGMEDIUM property_change_data;
/* Carries the transmute field of the GdkSelTargetFormat from from idataobject_getdata() to property_change() */
gboolean property_change_transmute;
/* Carries the target atom from GDK_SELECTION_REQUEST issuer to property_change() */
GdkAtom property_change_target_atom;
/* TRUE when we are emptying the clipboard ourselves */
gboolean ignore_destroy_clipboard;
/* Array of GdkSelTargetFormats describing the targets supported by the clipboard selection */
GArray *clipboard_selection_targets;
/* Same for the DnD selection (applies for both LOCAL and OLE2 DnD) */
GArray *dnd_selection_targets;
/* If TRUE, then we queued a GDK_SELECTION_REQUEST with TARGETS
* target. This field is checked to prevent queueing
* multiple selection requests.
*/
gboolean targets_request_pending;
/* The handle that was given to OpenClipboard().
* NULL is a valid handle,
* INVALID_HANDLE_VALUE means that the clipboard is closed.
*/
HWND clipboard_opened_for;
/* A target-keyed hash table of GArrays of GdkSelTargetFormats describing compatibility formats for a target */
GHashTable *compatibility_formats;
/* A format-keyed hash table of GArrays of GdkAtoms describing compatibility targets for a format */
GHashTable *compatibility_targets;
};
struct _GdkWin32SelectionClass
{
GObjectClass parent_class;
};
GType gdk_win32_selection_get_type (void) G_GNUC_CONST;
void _gdk_win32_clear_clipboard_queue ();
gchar * _gdk_win32_get_clipboard_format_name (UINT fmt,
gboolean *is_predefined);
void _gdk_win32_add_format_to_targets (UINT format,
GArray *array,
GList **list);
gint _gdk_win32_add_target_to_selformats (GdkAtom target,
GArray *array);
void _gdk_win32_selection_property_change (GdkWin32Selection *win32_sel,
GdkWindow *window,
GdkAtom property,
GdkAtom type,
gint format,
GdkPropMode mode,
const guchar *data,
gint nelements);
#endif /* __GDK_SELECTION_WIN32_H__ */
+72
View File
@@ -0,0 +1,72 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2010 Red Hat, Inc.
*
* 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_WIN32_DND_PRIVATE_H__
#define __GDK_WIN32_DND_PRIVATE_H__
#if !defined (__GDKWIN32_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdkwin32.h> can be included directly."
#endif
#include <gdk/gdk.h>
G_BEGIN_DECLS
struct _GdkWin32DragContext
{
GdkDragContext context;
GdkWindow *ipc_window;
GdkWindow *drag_window;
GdkCursor *cursor;
GdkSeat *grab_seat;
GdkDragAction actions;
GdkDragAction current_action;
guint drag_status : 4; /* Current status of drag */
guint drop_failed : 1; /* Whether the drop was unsuccessful */
guint has_image_format : 1;
guint has_text_uri_list : 1;
guint has_shell_id_list : 1;
guint has_unicodetext : 1;
guint has_cf_png : 1;
guint has_cf_dib : 1;
guint has_gif : 1;
guint has_jfif : 1;
guint scale; /* Temporarily caches the HiDPI scale */
gint hot_x; /* Hotspot offset from the top-left of the drag-window, scaled (can be added to GDK space coordinates) */
gint hot_y;
gint last_x; /* Coordinates from last event, in GDK space */
gint last_y;
gint start_x; /* Coordinates of the drag start, in GDK space */
gint start_y;
DWORD last_key_state; /* Key state from last event */
/* Just like context->targets, but an array, and with format IDs
* stored inside.
*/
GArray *droptarget_format_target_map;
};
struct _GdkWin32DragContextClass
{
GdkDragContextClass parent_class;
};
G_END_DECLS
#endif /* __GDK_WIN32_DND_PRIVATE_H__ */
+7
View File
@@ -87,6 +87,13 @@ void gdk_win32_selection_add_targets (GdkWindow *owner,
gint n_targets,
GdkAtom *targets);
#if defined (GTK_COMPILATION) || defined (GDK_COMPILATION)
#define gdk_win32_selection_clear_targets gdk_win32_selection_clear_targets_libgtk_only
GDK_AVAILABLE_IN_ALL
void gdk_win32_selection_clear_targets (GdkDisplay *display,
GdkAtom selection);
#endif
GDK_AVAILABLE_IN_ALL
GdkWindow * gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
HWND anid);
+141 -68
View File
@@ -256,22 +256,48 @@ gdk_window_impl_win32_finalize (GObject *object)
g_free (window_impl->decorations);
if (window_impl->cache_surface)
{
cairo_surface_destroy (window_impl->cache_surface);
window_impl->cache_surface = NULL;
}
if (window_impl->cairo_surface)
{
cairo_surface_destroy (window_impl->cairo_surface);
window_impl->cairo_surface = NULL;
}
g_assert (window_impl->transient_owner == NULL);
g_assert (window_impl->transient_children == NULL);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gdk_win32_get_window_client_area_rect (GdkWindow *window,
gint scale,
RECT *rect)
{
gint x, y, width, height;
gdk_window_get_position (window, &x, &y);
width = gdk_window_get_width (window);
height = gdk_window_get_height (window);
rect->left = x * scale;
rect->top = y * scale;
rect->right = rect->left + width * scale;
rect->bottom = rect->top + height * scale;
}
static void
gdk_win32_window_get_queued_window_rect (GdkWindow *window,
RECT *return_window_rect)
{
gint x, y;
RECT window_rect;
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
gdk_window_get_position (window, &x, &y);
window_rect.left = x * impl->window_scale;
window_rect.top = y * impl->window_scale;
window_rect.right = window_rect.left + gdk_window_get_width (window) * impl->window_scale;
window_rect.bottom = window_rect.top + gdk_window_get_height (window) * impl->window_scale;
gdk_win32_get_window_client_area_rect (window, impl->window_scale, &window_rect);
/* Turn client area into window area */
_gdk_win32_adjust_client_rect (window, &window_rect);
@@ -878,6 +904,14 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
dwExStyle |= WS_EX_TOOLWINDOW;
/* WS_EX_TRANSPARENT means "try draw this window last, and ignore input".
* It's the last part we're after. We don't want DND indicator to accept
* input, because that will make it a potential drop target, and if it's
* under the mouse cursor, this will kill any DND.
*/
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_DND)
dwExStyle |= WS_EX_TRANSPARENT;
klass = RegisterGdkClass (window->window_type, impl->type_hint);
wtitle = g_utf8_to_utf16 (title, -1, NULL, NULL, NULL);
@@ -4774,6 +4808,83 @@ gdk_win32_window_end_move_resize_drag (GdkWindow *window)
context->current_snap = GDK_WIN32_AEROSNAP_STATE_UNDETERMINED;
}
static void
gdk_win32_get_window_size_and_position_from_client_rect (GdkWindow *window,
RECT *window_rect,
SIZE *window_size,
POINT *window_position)
{
GdkWindowImplWin32 *impl;
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
/* Turn client area into window area */
_gdk_win32_adjust_client_rect (window, window_rect);
/* Convert GDK screen coordinates to W32 desktop coordinates */
window_rect->left -= _gdk_offset_x * impl->window_scale;
window_rect->right -= _gdk_offset_x * impl->window_scale;
window_rect->top -= _gdk_offset_y * impl->window_scale;
window_rect->bottom -= _gdk_offset_y * impl->window_scale;
window_position->x = window_rect->left;
window_position->y = window_rect->top;
window_size->cx = window_rect->right - window_rect->left;
window_size->cy = window_rect->bottom - window_rect->top;
}
static void
gdk_win32_update_layered_window_from_cache (GdkWindow *window,
RECT *client_rect)
{
POINT window_position;
SIZE window_size;
BLENDFUNCTION blender;
HDC hdc;
SIZE *window_size_ptr;
POINT source_point = { 0, 0 };
POINT *source_point_ptr;
GdkWindowImplWin32 *impl;
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
gdk_win32_get_window_size_and_position_from_client_rect (window,
client_rect,
&window_size,
&window_position);
blender.BlendOp = AC_SRC_OVER;
blender.BlendFlags = 0;
blender.AlphaFormat = AC_SRC_ALPHA;
blender.SourceConstantAlpha = impl->layered_opacity * 255;
/* Size didn't change, so move immediately, no need to wait for redraw */
/* Strictly speaking, we don't need to supply hdc, source_point and
* window_size here. However, without these arguments
* the window moves but does not update its contents on Windows 7 when
* desktop composition is off. This forces us to provide hdc and
* source_point. window_size is here to avoid the function
* inexplicably failing with error 317.
*/
if (gdk_screen_is_composited (gdk_window_get_screen (window)))
{
hdc = NULL;
window_size_ptr = NULL;
source_point_ptr = NULL;
}
else
{
hdc = cairo_win32_surface_get_dc (impl->cache_surface);
window_size_ptr = &window_size;
source_point_ptr = &source_point;
}
API_CALL (UpdateLayeredWindow, (GDK_WINDOW_HWND (window), NULL,
&window_position, window_size_ptr,
hdc, source_point_ptr,
0, &blender, ULW_ALPHA));
}
void
gdk_win32_window_do_move_resize_drag (GdkWindow *window,
gint x,
@@ -4950,67 +5061,24 @@ gdk_win32_window_do_move_resize_drag (GdkWindow *window,
(rect.left != new_rect.left ||
rect.top != new_rect.top))
{
POINT window_position;
SIZE window_size;
BLENDFUNCTION blender;
HDC hdc;
SIZE *window_size_ptr;
POINT source_point = { 0, 0 };
POINT *source_point_ptr;
context->native_move_resize_pending = FALSE;
_gdk_win32_do_emit_configure_event (window, new_rect);
/* Turn client area into window area */
_gdk_win32_adjust_client_rect (window, &new_rect);
/* Convert GDK screen coordinates to W32 desktop coordinates */
new_rect.left -= _gdk_offset_x * impl->window_scale;
new_rect.right -= _gdk_offset_x * impl->window_scale;
new_rect.top -= _gdk_offset_y * impl->window_scale;
new_rect.bottom -= _gdk_offset_y * impl->window_scale;
window_position.x = new_rect.left;
window_position.y = new_rect.top;
window_size.cx = new_rect.right - new_rect.left;
window_size.cy = new_rect.bottom - new_rect.top;
blender.BlendOp = AC_SRC_OVER;
blender.BlendFlags = 0;
blender.AlphaFormat = AC_SRC_ALPHA;
blender.SourceConstantAlpha = impl->layered_opacity * 255;
/* Size didn't change, so move immediately, no need to wait for redraw */
/* Strictly speaking, we don't need to supply hdc, source_point and
* window_size here. However, without these arguments
* the window moves but does not update its contents on Windows 7 when
* desktop composition is off. This forces us to provide hdc and
* source_point. window_size is here to avoid the function
* inexplicably failing with error 317.
*/
if (impl->layered)
{
if (gdk_screen_is_composited (gdk_window_get_screen (window)))
{
hdc = NULL;
window_size_ptr = NULL;
source_point_ptr = NULL;
}
else
{
hdc = cairo_win32_surface_get_dc (impl->cache_surface);
window_size_ptr = &window_size;
source_point_ptr = &source_point;
}
API_CALL (UpdateLayeredWindow, (GDK_WINDOW_HWND (window), NULL,
&window_position, window_size_ptr,
hdc, source_point_ptr,
0, &blender, ULW_ALPHA));
gdk_win32_update_layered_window_from_cache (window, &new_rect);
}
else
{
SIZE window_size;
POINT window_position;
gdk_win32_get_window_size_and_position_from_client_rect (window,
&new_rect,
&window_size,
&window_position);
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED,
window_position.x, window_position.y,
@@ -5618,11 +5686,20 @@ gdk_win32_window_set_opacity (GdkWindow *window,
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
impl->layered_opacity = opacity;
if (impl->layered)
/* Layered windows have opacity applied elsewhere */
return;
{
if (impl->layered_opacity != opacity)
{
RECT window_rect;
impl->layered_opacity = opacity;
gdk_win32_get_window_client_area_rect (window, impl->window_scale, &window_rect);
gdk_win32_update_layered_window_from_cache (window, &window_rect);
}
return;
}
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
@@ -5804,14 +5881,10 @@ static cairo_surface_t *
gdk_win32_ref_cairo_surface_layered (GdkWindow *window,
GdkWindowImplWin32 *impl)
{
gint x, y, width, height;
gint width, height;
RECT window_rect;
gdk_window_get_position (window, &x, &y);
window_rect.left = x * impl->window_scale;
window_rect.top = y * impl->window_scale;
window_rect.right = window_rect.left + gdk_window_get_width (window) * impl->window_scale;
window_rect.bottom = window_rect.top + gdk_window_get_height (window) * impl->window_scale;
gdk_win32_get_window_client_area_rect (window, impl->window_scale, &window_rect);
/* Turn client area into window area */
_gdk_win32_adjust_client_rect (window, &window_rect);
+4 -4
View File
@@ -29,8 +29,8 @@
#include "gdkkeysyms.h"
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
#define APPEARS_FOCUSED(toplevel) \
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
static void gdk_x11_device_manager_core_finalize (GObject *object);
static void gdk_x11_device_manager_core_constructed (GObject *object);
@@ -842,7 +842,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
if (toplevel->focus_window == original)
return;
had_focus = HAS_FOCUS (toplevel);
had_focus = APPEARS_FOCUSED (toplevel);
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
switch (detail)
@@ -904,7 +904,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
break;
}
if (HAS_FOCUS (toplevel) != had_focus)
if (APPEARS_FOCUSED (toplevel) != had_focus)
{
GdkEvent *event;
+2 -1
View File
@@ -1027,7 +1027,8 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (ev->deviceid));
if (ev->property == gdk_x11_get_xatom_by_name ("Wacom Serial IDs"))
if (device != NULL &&
ev->property == gdk_x11_get_xatom_by_name ("Wacom Serial IDs"))
{
GdkDeviceTool *tool = NULL;
guint serial_id = 0, tool_id = 0;
+20 -7
View File
@@ -1555,7 +1555,6 @@ _gdk_x11_display_open (const gchar *display_name)
gchar *argv[1];
XClassHint *class_hint;
gulong pid;
gint ignore;
gint maj, min;
@@ -1726,11 +1725,15 @@ _gdk_x11_display_open (const gchar *display_name)
if (gdk_sm_client_id)
set_sm_client_id (display, gdk_sm_client_id);
pid = getpid ();
XChangeProperty (display_x11->xdisplay,
display_x11->leader_window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PID"),
XA_CARDINAL, 32, PropModeReplace, (guchar *) & pid, 1);
if (!gdk_running_in_sandbox ())
{
/* if sandboxed, we're likely in a pid namespace and would only confuse the wm with this */
pid_t pid = getpid ();
XChangeProperty (display_x11->xdisplay,
display_x11->leader_window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PID"),
XA_CARDINAL, 32, PropModeReplace, (guchar *) & pid, 1);
}
/* We don't yet know a valid time. */
display_x11->user_time = 0;
@@ -3072,6 +3075,16 @@ gdk_x11_display_get_default_seat (GdkDisplay *display)
seats = gdk_display_list_seats (display);
/* Shortcut only one seat being available.
* This path always triggers for core events, so we can freely use XInput below. */
if (g_list_length (seats) == 1)
{
GdkSeat *seat = seats->data;
g_list_free (seats);
return seat;
}
gdk_x11_display_error_trap_push (display);
result = XIGetClientPointer (GDK_DISPLAY_XDISPLAY (display),
None, &device_id);
@@ -3112,7 +3125,7 @@ gdk_x11_display_get_monitor (GdkDisplay *display,
{
GdkX11Display *x11_display = GDK_X11_DISPLAY (display);
if (0 <= monitor_num || monitor_num < x11_display->monitors->len)
if (0 <= monitor_num && monitor_num < x11_display->monitors->len)
return (GdkMonitor *)x11_display->monitors->pdata[monitor_num];
return NULL;
+3 -1
View File
@@ -2701,7 +2701,7 @@ drag_context_grab (GdkDragContext *context)
g_set_object (&x11_context->grab_seat, seat);
gdk_error_trap_push ();
gdk_x11_display_error_trap_push (gdk_window_get_display (x11_context->ipc_window));
for (i = 0; i < G_N_ELEMENTS (grab_keys); ++i)
{
@@ -2753,6 +2753,8 @@ drag_context_grab (GdkDragContext *context)
}
}
gdk_x11_display_error_trap_pop_ignored (gdk_window_get_display (x11_context->ipc_window));
return TRUE;
}
+4 -4
View File
@@ -32,8 +32,8 @@ static gboolean gdk_event_source_dispatch (GSource *source,
gpointer user_data);
static void gdk_event_source_finalize (GSource *source);
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
#define APPEARS_FOCUSED(toplevel) \
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
struct _GdkEventSource
{
@@ -148,10 +148,10 @@ handle_focus_change (GdkEventCrossing *event)
if (!event->focus || toplevel->has_focus_window)
return;
had_focus = HAS_FOCUS (toplevel);
had_focus = APPEARS_FOCUSED (toplevel);
toplevel->has_pointer_focus = focus_in;
if (HAS_FOCUS (toplevel) != had_focus)
if (APPEARS_FOCUSED (toplevel) != had_focus)
{
GdkEvent *focus_event;
+3
View File
@@ -856,6 +856,9 @@ gdk_x11_screen_init_gl (GdkScreen *screen)
dpy = gdk_x11_display_get_xdisplay (display);
if (!epoxy_has_glx (dpy))
return FALSE;
if (!glXQueryExtension (dpy, &error_base, &event_base))
return FALSE;
-1
View File
@@ -334,7 +334,6 @@ extern const gint _gdk_x11_event_mask_table_size;
#define GDK_WINDOW_SCREEN(win) (gdk_window_get_screen (win))
#define GDK_WINDOW_DISPLAY(win) (GDK_X11_SCREEN (GDK_WINDOW_SCREEN (win))->display)
#define GDK_WINDOW_XROOTWIN(win) (GDK_X11_SCREEN (GDK_WINDOW_SCREEN (win))->xroot_window)
#define GDK_GC_DISPLAY(gc) (GDK_SCREEN_DISPLAY (GDK_GC_X11(gc)->screen))
#define GDK_WINDOW_IS_X11(win) (GDK_IS_WINDOW_IMPL_X11 ((win)->impl))
/* override some macros from gdkx.h with direct-access variants */
+2 -1
View File
@@ -658,7 +658,8 @@ init_randr13 (GdkScreen *screen, gboolean *changed)
XRRModeInfo *xmode = &resources->modes[j];
if (xmode->id == crtc->mode)
{
refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal *xmode->vTotal);
if (xmode->hTotal != 0 && xmode->vTotal != 0)
refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal * xmode->vTotal);
break;
}
}
+22 -19
View File
@@ -902,7 +902,6 @@ setup_toplevel_window (GdkWindow *window,
XID xid = GDK_WINDOW_XID (window);
GdkX11Screen *x11_screen = GDK_X11_SCREEN (GDK_WINDOW_SCREEN (parent));
XSizeHints size_hints;
long pid;
Window leader_window;
set_wm_protocols (window);
@@ -933,12 +932,16 @@ setup_toplevel_window (GdkWindow *window,
/* This will set WM_CLIENT_MACHINE and WM_LOCALE_NAME */
XSetWMProperties (xdisplay, xid, NULL, NULL, NULL, 0, NULL, NULL, NULL);
pid = getpid ();
XChangeProperty (xdisplay, xid,
gdk_x11_get_xatom_by_name_for_display (x11_screen->display, "_NET_WM_PID"),
XA_CARDINAL, 32,
PropModeReplace,
(guchar *)&pid, 1);
if (!gdk_running_in_sandbox ())
{
/* if sandboxed, we're likely in a pid namespace and would only confuse the wm with this */
pid_t pid = getpid ();
XChangeProperty (xdisplay, xid,
gdk_x11_get_xatom_by_name_for_display (x11_screen->display, "_NET_WM_PID"),
XA_CARDINAL, 32,
PropModeReplace,
(guchar *)&pid, 1);
}
leader_window = GDK_X11_DISPLAY (x11_screen->display)->leader_window;
if (!leader_window)
@@ -1147,6 +1150,9 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
if (attributes_mask & GDK_WA_TYPE_HINT)
gdk_window_set_type_hint (window, attributes->type_hint);
if (!window->input_only)
gdk_window_x11_set_background (window, NULL);
gdk_x11_event_source_select_events ((GdkEventSource *) display_x11->event_source,
GDK_WINDOW_XID (window), event_mask,
StructureNotifyMask | PropertyChangeMask);
@@ -2979,17 +2985,8 @@ gdk_window_x11_set_background (GdkWindow *window,
if (pattern == NULL)
{
GdkWindow *parent;
/* X throws BadMatch if the parent has a different depth when
* using ParentRelative */
parent = gdk_window_get_parent (window);
if (parent && window->depth != parent->depth)
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), None);
else
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), ParentRelative);
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), None);
return;
}
@@ -5281,6 +5278,9 @@ emulate_resize_drag (GdkWindow *window,
{
MoveResizeData *mv_resize = get_move_resize_data (GDK_WINDOW_DISPLAY (window), TRUE);
if (mv_resize->moveresize_window != NULL)
return; /* already a drag operation in progress */
mv_resize->is_resize = TRUE;
mv_resize->moveresize_button = button;
mv_resize->resize_edge = edge;
@@ -5311,7 +5311,10 @@ emulate_move_drag (GdkWindow *window,
guint32 timestamp)
{
MoveResizeData *mv_resize = get_move_resize_data (GDK_WINDOW_DISPLAY (window), TRUE);
if (mv_resize->moveresize_window != NULL)
return; /* already a drag operation in progress */
mv_resize->is_resize = FALSE;
mv_resize->device = device;
mv_resize->moveresize_button = button;
+14 -8
View File
@@ -23,6 +23,7 @@ AM_CPPFLAGS = \
$(GTK_BASE_CFLAGS_DEFINES) \
$(GTK_PLAT_CFLAGS_DEFINES) \
-DX11_DATA_PREFIX=\"$(X11_PREFIX)\" \
-DISO_CODES_PREFIX=\"$(ISO_CODES_PREFIX)\" \
-I$(top_builddir) \
-I$(top_builddir)/gtk \
-I$(top_srcdir) \
@@ -468,6 +469,7 @@ gtk_private_h_sources = \
gtkdialogprivate.h \
gtkdndprivate.h \
gtkemojichooser.h \
gtkemojicompletion.h \
gtkentryprivate.h \
gtkeventcontrollerprivate.h \
gtkfilechooserembed.h \
@@ -481,6 +483,7 @@ gtk_private_h_sources = \
gtkfilesystemmodel.h \
gtkfontchooserprivate.h \
gtkfontchooserutils.h \
gtkfontchooserwidgetprivate.h \
gtkgestureprivate.h \
gtkgesturedragprivate.h \
gtkgesturelongpressprivate.h \
@@ -745,6 +748,7 @@ gtk_base_c_sources = \
gtkdrawingarea.c \
gtkeditable.c \
gtkemojichooser.c \
gtkemojicompletion.c \
gtkentry.c \
gtkentrybuffer.c \
gtkentrycompletion.c \
@@ -810,7 +814,6 @@ gtk_base_c_sources = \
gtklockbutton.c \
gtkmain.c \
gtkmagnifier.c \
gtkmarshalers.c \
gtkmenu.c \
gtkmenubar.c \
gtkmenubutton.c \
@@ -847,7 +850,6 @@ gtk_base_c_sources = \
gtkprintsettings.c \
gtkprintutils.c \
gtkprivate.c \
gtkprivatetypebuiltins.c \
gtkprogressbar.c \
gtkprogresstracker.c \
gtkpixelcache.c \
@@ -870,7 +872,6 @@ gtk_base_c_sources = \
gtkrenderbackground.c \
gtkrenderborder.c \
gtkrendericon.c \
gtkresources.c \
gtkrevealer.c \
gtkroundedbox.c \
gtkscale.c \
@@ -946,7 +947,6 @@ gtk_base_c_sources = \
gtktreestore.c \
gtktreeview.c \
gtktreeviewcolumn.c \
gtktypebuiltins.c \
gtkutils.c \
gtkvolumebutton.c \
gtkviewport.c \
@@ -956,7 +956,9 @@ gtk_base_c_sources = \
gtkwindowgroup.c \
gtkwin32draw.c \
gtkwin32theme.c \
gdkpixbufutils.c
gdkpixbufutils.c \
language-names.c \
script-names.c
if USE_QUARTZ
gtk_base_c_sources += \
@@ -1126,10 +1128,11 @@ gtk_built_sources = \
gtkresources.c \
gtk.gresource.xml \
gtktypebuiltins.c \
gtktypefuncs.c \
gtkmarshalers.c \
gtkprivatetypebuiltins.c
nodist_gtk_c_sources += $(gtk_built_sources)
stamp_files = \
stamp-gtkmarshalers.h \
stamp-gtktypebuiltins.h \
@@ -1425,7 +1428,7 @@ gtktypefuncs.c: stamp-gtktypebuiltins.h stamp-gtkprivatetypebuiltins.h $(top_src
sort | uniq | \
$(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; }' >> xgen-gtf \
&& cp xgen-gtf $@ && rm -f xgen-gtf
gtktestutils.c: gtktypefuncs.c
$(srcdir)/gtktestutils.c: gtktypefuncs.c
# target platform:
lib_LTLIBRARIES = libgtk-3.la
@@ -1477,7 +1480,8 @@ gtk_3_FILES = \
$(gtk_base_c_sources) \
$(gtk_os_win32_c_sources) \
$(gtk_use_win32_c_sources) \
$(gtk_dbus_built_sources)
$(gtk_dbus_built_sources) \
$(gtk_built_sources)
gtk_3_EXCLUDES = dummy
gtk_3_HEADERS_DIR = $(gtkincludedir)
@@ -1593,9 +1597,11 @@ Gtk_3_0_gir_SCANNERFLAGS = \
--add-include-path=$(top_builddir)/gdk \
--include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir
Gtk_3_0_gir_INCLUDES = Atk-1.0
Gtk_3_0_gir_C_INCLUDES = gtk/gtk.h gtk/gtk-a11y.h
if USE_X11
Gtk_3_0_gir_SCANNERFLAGS += --add-include-path=$(top_builddir)/gdk/x11
Gtk_3_0_gir_INCLUDES += xlib-2.0
Gtk_3_0_gir_C_INCLUDES += gtk/gtkx.h
endif
Gtk_3_0_gir_CFLAGS = \
$(AM_CPPFLAGS) \
+2 -2
View File
@@ -604,7 +604,7 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
}
else
{
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
atk_object_set_description (priv->icons[GTK_ENTRY_ICON_SECONDARY],
"");
}
}
@@ -1433,7 +1433,7 @@ delete_text_cb (GtkEditable *editable,
g_signal_emit_by_name (accessible,
"text-changed::delete",
start,
end);
end - start);
}
static gboolean
+12 -12
View File
@@ -1226,18 +1226,18 @@ gtk_icon_view_accessible_connect_model_signals (GtkIconView *icon_view)
GObject *obj;
obj = G_OBJECT (icon_view->priv->model);
g_signal_connect_data (obj, "row-changed",
(GCallback) gtk_icon_view_accessible_model_row_changed,
icon_view, NULL, 0);
g_signal_connect_data (obj, "row-inserted",
(GCallback) gtk_icon_view_accessible_model_row_inserted,
icon_view, NULL, G_CONNECT_AFTER);
g_signal_connect_data (obj, "row-deleted",
(GCallback) gtk_icon_view_accessible_model_row_deleted,
icon_view, NULL, G_CONNECT_AFTER);
g_signal_connect_data (obj, "rows-reordered",
(GCallback) gtk_icon_view_accessible_model_rows_reordered,
icon_view, NULL, G_CONNECT_AFTER);
g_signal_connect_object (obj, "row-changed",
G_CALLBACK (gtk_icon_view_accessible_model_row_changed),
icon_view, 0);
g_signal_connect_object (obj, "row-inserted",
G_CALLBACK (gtk_icon_view_accessible_model_row_inserted),
icon_view, G_CONNECT_AFTER);
g_signal_connect_object (obj, "row-deleted",
G_CALLBACK (gtk_icon_view_accessible_model_row_deleted),
icon_view, G_CONNECT_AFTER);
g_signal_connect_object (obj, "rows-reordered",
G_CALLBACK (gtk_icon_view_accessible_model_rows_reordered),
icon_view, G_CONNECT_AFTER);
}
static void
+1 -1
View File
@@ -84,7 +84,7 @@ gtk_label_accessible_link_impl_get_hyperlink (AtkHyperlinkImpl *atk_impl)
{
GtkLabelAccessibleLinkImpl *impl = (GtkLabelAccessibleLinkImpl *)atk_impl;
return g_object_ref (impl->link);
return ATK_HYPERLINK (g_object_ref (impl->link));
}
static void
+6 -6
View File
@@ -92,12 +92,12 @@ gtk_scrolled_window_accessible_initialize (AtkObject *obj,
window = GTK_SCROLLED_WINDOW (data);
g_signal_connect_data (gtk_scrolled_window_get_hscrollbar (window), "notify::visible",
G_CALLBACK (visibility_changed),
obj, NULL, FALSE);
g_signal_connect_data (gtk_scrolled_window_get_vscrollbar (window), "notify::visible",
G_CALLBACK (visibility_changed),
obj, NULL, FALSE);
g_signal_connect_object (gtk_scrolled_window_get_hscrollbar (window), "notify::visible",
G_CALLBACK (visibility_changed),
obj, 0);
g_signal_connect_object (gtk_scrolled_window_get_vscrollbar (window), "notify::visible",
G_CALLBACK (visibility_changed),
obj, 0);
obj->role = ATK_ROLE_SCROLL_PANE;
}

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