Compare commits

..

383 Commits

Author SHA1 Message Date
Matthias Clasen
1f7ab7c069 3.89.1 2016-11-21 18:36:07 -05:00
Andrew Chadwick
6e197afc44 wintab: fix skipping of odd-numbered devices
Fix a regression introduced in 4ce6d10601
which causes devices with an odd-numbered zero-based index in the list
to be passed over incorrectly. This might present as yet another "device
does not send pressure" bug for ~50% of devices out there.

This commit also closes off another potential segfault for wintab_devices
lists which have an odd length.

https://bugzilla.gnome.org/show_bug.cgi?id=774699
2016-11-21 19:11:09 +01:00
Emmanuele Bassi
7ae83717af Bump the Graphene dependency
The initialization macros for Point, Point3D, Size, and Rectangle have
been modified in Graphene 1.5.1 to allow their use as compound
literals.
2016-11-21 16:24:34 +00:00
Emmanuele Bassi
4cbe079767 Use Graphene init macros for compound literals
The Graphene init macros can now be used for compound literals, which
means we need to update our mixed uses.
2016-11-21 16:21:38 +00:00
Gustavo Noronha Silva
8e5e165f79 Fix off by one in check for GtkRoundedBox containing a rectangle
When checking if a rectangle is contained by the rounded box, the code
will refuse a rectangle which is the exact size as the one backing the
rounded box, since it checks for greater or equal width and height.
Check for greater only instead.

https://bugzilla.gnome.org/show_bug.cgi?id=774114
2016-11-21 10:53:11 -02:00
Balázs Meskó
895fd0e773 Update Hungarian translation 2016-11-21 09:35:08 +00:00
Balázs Meskó
bd73a55f32 Update Hungarian translation 2016-11-21 09:33:59 +00:00
Chun-wei Fan
efd92da101 Visual Studio builds: Rename broadwayd to gtk4-broadwayd
We need to update the solution file and the projects that refer to
broadwayd.
2016-11-21 15:51:21 +08:00
Chun-wei Fan
724e7f48e7 gdk/win32/gdkwindow-win32.c: Fix build
Fix the assignment of ->create_draw_context, in which an underscore is
accidently added.
2016-11-21 15:40:28 +08:00
Chun-wei Fan
18b1305d08 build: Complete renaming of broadwayd to gtk4-broadwayd
The parts where the Visual Studio projects are generated must also be updated
so that 'make dist' will work properly.
2016-11-21 15:09:35 +08:00
Matthias Clasen
a33b551f83 Update for 3.89.1 2016-11-20 08:14:36 -05:00
Matthias Clasen
8a88745186 Some additions to the migration guide 2016-11-20 08:14:19 -05:00
Matthias Clasen
7625beec50 fishbowl: Fix up initial text
Avoid the text changing from "0 fish" to "0 icons" right
after opening the fishbowl demo.
2016-11-20 06:15:19 -05:00
Benjamin Otte
e62a4d8eea API: gdk: Remove ability to render window contents
The functions gdk_pixbuf_get_from_window() and
gdk_cairo_set_source_window() are unreliable and depend on the windowing
system (they work great on X11 and Win32, less so on Quartz and Wayland).

With the switch to new drawing API and OpenGL, we can definitely no
longer support a generic way to snapshot windows.

People should either write windowsystem-specific code or draw their
widgets directly - like with gtk_widget_draw() - if they need to get a
rendering.
2016-11-20 11:47:44 +01:00
Benjamin Otte
84918c7e6f modules: Add a check for GTK3 symbols
This way, we can warn if GTK2 or GTK3 are linked into libgtk4.
2016-11-20 11:44:19 +01:00
Benjamin Otte
78888ade0d tools: Rewrite screenshotting code for shooter
Uses X directly, so bypasses both the need to query the root window and
to draw window contents.
2016-11-20 11:43:09 +01:00
Benjamin Otte
196737a958 reftest: Make screenshot code work without GDK
GDK does not support taking images of GDK windows.
2016-11-20 11:20:34 +01:00
Benjamin Otte
dfd9150a82 build: Don't link against libgtk and libgdk
libgdk is statically linked these days, so if you link against it, all
of its symbols will exist twice: Once in libgtk.so and once in your
binary.
2016-11-20 11:19:32 +01:00
Benjamin Otte
fef2f96add tests: Remove outdated tests
The tests read a nonexisting colorprofile, try to convert stuff read
from the window into it, do things that gdk-pixbuf should test and
then aren't even integrated into the testuite.

Sheesh.
2016-11-20 08:33:13 +01:00
Benjamin Otte
1492175a28 window: Remove unused destroy_draw_context vfunc 2016-11-20 07:27:00 +01:00
Benjamin Otte
cb18752f94 gdk: Make each backend have a custom GdkDrawingContext subclass 2016-11-20 07:19:52 +01:00
Benjamin Otte
1912d992d8 gtk-demo: Allow locking of icon count in fishbowl demo
I'm not sure I'm proud of the hack to get the changing icon into the UI
file without having to write code. But it works.
2016-11-20 05:29:03 +01:00
Benjamin Otte
39bf2ba96f cairorenderer: Record cpu time in the profiler 2016-11-20 05:28:52 +01:00
Benjamin Otte
aa084333c8 inspector: Redo recording list
- Make the rows larger
- Display the elapsed time between renderings
- Display if it was a full or a partial redraw
- Add a toggle button to display profiler info
2016-11-20 05:03:18 +01:00
Benjamin Otte
be237dbb5a inspector: Pass the renderer when recording
... and collect the profiler information from the renderer.
2016-11-20 03:54:43 +01:00
Benjamin Otte
32adb31428 inspector: Record a "start" event whenever we start recording 2016-11-20 03:54:43 +01:00
Matthias Clasen
b404ecf294 Drop deprecated gtk_dialog_get_action_area
Add an internal version for the few places where we still need it,
and drop it from everywhere else.
2016-11-19 21:23:17 -05:00
Matthias Clasen
b0303c539c Make unknown window types fatal
This helps gcc to see that there's no point in warning about
gdk_window being used uninitialized.
2016-11-19 21:23:17 -05:00
Benjamin Otte
b93c26f559 render: Refactor background drawing code
We can query the blend mode inside the paint function.
2016-11-19 21:28:18 +01:00
Benjamin Otte
305ea71b97 inspector Reselect bottom row in recorder
When inserting a new recording and the bottommost row was selected,
select the newly added row. This way, you can observe the ongoing
recording.
2016-11-19 20:58:36 +01:00
Benjamin Otte
38f226b5ce render: Propagate snapshot drawing to box shadows
This decouples actual background drawing from shadow drawing in the
snapshot case.

We also now create seperate nodes for shadows vs for backgrounds.
2016-11-19 20:58:36 +01:00
Benjamin Otte
c45f8b1a25 cssshadows: Reengineer API
This way we have an API to query extents per shadow and I want that in
the next patch.
2016-11-19 20:58:36 +01:00
Benjamin Otte
2745c2502f snapshot: Move GtkSnapshot declaration to gtypes.h 2016-11-19 20:58:36 +01:00
Matthias Clasen
8afb655347 Document gtk_menu_place_on_monitor 2016-11-19 13:51:50 -05:00
Matthias Clasen
fd6d28dd8d Add some things to the sections file
This makes gtk-doc happier.
2016-11-19 13:46:13 -05:00
Matthias Clasen
1bffefce7d Small documentation additions 2016-11-19 13:45:58 -05:00
Matthias Clasen
5170218a1d More work towards a clean doc build
Tell gtk-doc about more private headers.
2016-11-19 13:45:04 -05:00
Matthias Clasen
9bacbb489b Don't confuse gtk-doc
It doesn't like doc comments for non-api.
2016-11-19 13:44:36 -05:00
Matthias Clasen
64a75ec87d Drop docs for no-longer-existing API
Poor gtk-doc gets confused so easily...
2016-11-19 13:36:58 -05:00
Matthias Clasen
2d65156be3 Add gtk_im_context_simple_add_compose_file 2016-11-19 13:30:27 -05:00
Matthias Clasen
b0feee803f Add a since tag 2016-11-19 13:30:02 -05:00
Matthias Clasen
6734f354b4 docs: Add gtk_print_job_set_source_fd 2016-11-19 13:26:49 -05:00
Matthias Clasen
d0f8e324b1 Add gtk_menu_place_on_monitor to the docs 2016-11-19 12:53:13 -05:00
Matthias Clasen
712196c416 Don't confuse gtk-doc
Empty doc comments make gtk-doc complain about undocumented
functions, even though these functions are not supposed to
be documented in the first place.
2016-11-19 12:39:09 -05:00
Matthias Clasen
3dc53dab69 Document ::snapshot vfunc 2016-11-19 12:37:19 -05:00
Matthias Clasen
c9c391bd55 Drop macro wrappers for get_version functions
These are not really useful, and were added long ago
as a clutch for transitioning to the new names.
2016-11-19 12:28:52 -05:00
Matthias Clasen
c418ce0365 testgtk: Stop using gtk_micro_version
This will be going away soon
2016-11-19 12:28:52 -05:00
Matthias Clasen
158afb4ef9 Fix a signature mismatch
The new drawingarea draw func returns void.
2016-11-19 12:28:52 -05:00
Benjamin Otte
9dae0a9b00 widgetnode: We never need widget paths anymore
Backwards compat is not necessary in GTK4.
2016-11-19 18:08:35 +01:00
Matthias Clasen
0d1c54b6cc Remove once again, empty doc comments that break the docs
This is just more breakage from introspection ursurping doc
comments. Somebody needs to find a proper solution before this
is brought back.
2016-11-19 12:02:07 -05:00
Ask Hjorth Larsen
270af15f16 Updated Danish translation 2016-11-19 16:29:44 +01:00
Matthias Clasen
0392acd875 Reduce the text shadow warnings
They make it hard to see other useful information.
2016-11-19 08:05:42 -05:00
Baurzhan Muftakhidinov
76b8adcfbd Update Kazakh translation
(cherry picked from commit 4bc2904dae)
2016-11-19 12:16:13 +00:00
Benjamin Otte
dc634fe6db render: Compute extents correctly
I multiplied matrices the wrong way. Again.
2016-11-19 03:15:51 +01:00
Benjamin Otte
14b746eeaa tests: Remove styleexamples test
It's so outdated it doesn't even do anything useful anymore.

So I'll just assume nobody uses it.
2016-11-19 03:02:46 +01:00
Simon Steinbeiss
a1deb8e459 progressbar: add empty and full classes on trough based on fill-level
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-11-19 03:02:46 +01:00
Benjamin Otte
ca47c75272 tests: Use new drawing area APIs in testcairo 2016-11-19 03:02:46 +01:00
Benjamin Otte
4a604cf927 tests: Use drawing area in testellipsise 2016-11-19 03:02:46 +01:00
Benjamin Otte
915e791586 tests: Use new drawing area APIs 2016-11-19 03:02:46 +01:00
Matthias Clasen
295066dad8 inspector: Show render node properties 2016-11-18 20:59:10 -05:00
Matthias Clasen
aa74d96532 Document newly supported 3d transforms in CSS 2016-11-18 19:34:02 -05:00
Matthias Clasen
7d34229cdd More docs cleanup 2016-11-18 18:54:45 -05:00
Benjamin Otte
dbfc1d72fc csstransform: Handle matrix3d() 2016-11-18 21:44:25 +01:00
Benjamin Otte
ff4b8512be csstransform: Implement 3D scale and transform matrices 2016-11-18 21:44:25 +01:00
Benjamin Otte
ef6d95879f csstransforms: Parse 3D rotations 2016-11-18 21:44:25 +01:00
Benjamin Otte
d52fcd914c csstransform: Convert to use graphene_matrix_t
Pre-work to use 3D-transforms.
2016-11-18 21:44:25 +01:00
Benjamin Otte
fe23c3165e tests: Use a drawing area in motion-compression example 2016-11-18 21:44:25 +01:00
Benjamin Otte
e950d0cd8b tests: Use a drawing area in animated-resizing 2016-11-18 21:44:25 +01:00
Matthias Clasen
0a75bb4353 Work towards a clean docs build
Remove various no-longer-existing functions from the sections
file, and exclude more private headers, etc.
2016-11-18 14:43:34 -05:00
Matthias Clasen
b15bc437a6 Rename broadwayd to gtk4-broadwayd
This was the last unprefixed binary, and it was causing file
conflicts between gtk3 and gtk4.
2016-11-18 13:40:37 -05:00
Olivier Fourdan
36575a4424 gdkwindow: Allow native subsurface for all parents
Under Wayland, a subsurface can have another surface as parent, but
gdk would not allow native windows if the parent is not the root window.

Allow native subsurface for all parent under Wayland, not just for the
root window.

https://bugzilla.gnome.org/show_bug.cgi?id=774475
2016-11-18 13:25:36 -05:00
Carlos Garnacho
665c3a2877 wayland: Keep last scale factor on surfaces after it left all outputs
This can be triggered on workspace switches, and on hidpi results in
the scale factor being reset to 1 while the window is not in the
current workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=774476
2016-11-18 13:24:31 -05:00
Matthias Clasen
f73c5dd8dd docs: Name the 3.90 index properly 2016-11-18 08:14:23 -05:00
Matthias Clasen
5c1af1af04 docs: Ignore gtksnapshotprivate.h 2016-11-18 08:12:20 -05:00
Matthias Clasen
0311a1883c snapshot: Name api parameters consistently
gtk-doc gets upset otherwise.
2016-11-18 07:57:10 -05:00
Matthias Clasen
95c13ee471 Document GtkSnapshot
This is just some initial documentation, more detail needed.
2016-11-18 07:43:39 -05:00
Matthias Clasen
9ecb34b4a0 Add some drawing information the migration guide
Mention snapshot(), and the new GtkDrawingArea API.
2016-11-18 07:43:33 -05:00
Matthias Clasen
3c5dbc2f17 docs: Add GtkDrawingAreaDrawFunc 2016-11-18 06:09:46 -05:00
Benjamin Otte
3ee2138ee7 tests: Use a drawing area in testpopup 2016-11-18 07:24:31 +01:00
Benjamin Otte
f2fb2da8bd tests: Make testtooltips not use the draw signal 2016-11-18 07:22:02 +01:00
Benjamin Otte
a57fe52fc6 tests: Produce load without waiting for draw signal 2016-11-18 07:15:12 +01:00
Benjamin Otte
4a06d22c7d tests: Use drawing area instead of draw signal 2016-11-18 07:14:28 +01:00
Benjamin Otte
cd8d84beb6 testsuite: Don't use draw signal, use a drawing area instead 2016-11-18 06:40:53 +01:00
Benjamin Otte
dd6fb87443 printunixdialog: Use new drawing area API 2016-11-18 06:40:53 +01:00
Benjamin Otte
b0f392534f coloreditor: Don't draw a background on boxes
Boxes know how to draw backgrounds these days.
2016-11-18 06:40:53 +01:00
Benjamin Otte
979b56e86f gtk-demo: Update drawing area usage to new APIs
A few demos are broken because they do input on drawing areas.
2016-11-18 06:40:53 +01:00
Benjamin Otte
5940625e9e drawingarea: Add gtk_drawing_area_set_draw_func() 2016-11-18 06:40:53 +01:00
Benjamin Otte
41d1e1fea8 drawingarea: Add content-width and content-height properties
People should use these instead of gtk_widget_set_size_request().
2016-11-18 06:40:53 +01:00
Benjamin Otte
100ac17505 drawingarea: Clean up
No need to send configure events anymore and this should be a no-window
widget.
2016-11-18 06:40:53 +01:00
Matthias Clasen
585b1d5f67 gsk: Don't leak texture surfaces
gsk_texture_download returns a reference.
2016-11-17 20:30:34 -05:00
Matthias Clasen
39e3b3a483 style context: Don't leak a widget path
Found by valgrind.
2016-11-17 20:22:42 -05:00
Benjamin Otte
efa1c6cbd5 widget: Add a defualt snapshot vfunc
Just to avoid having to do NULL checks when calling
widget_class->snapshot. We were crashing with drawing areas who don't
have a draw or a snapshot vfunc (woot!).
2016-11-18 00:47:56 +01:00
Marek Černocký
f8f2b8144f Updated Czech translation 2016-11-18 00:40:11 +01:00
Benjamin Otte
9a06b0fd5f widget: Fix math screwups in clip calculation
We need so subtract the allocation from the clip to get the clip offset,
not the other way around.

This was screwing in particular with marks on GtkScale, because GtkScale
mark clip computation is broken and always returns (0,0) which makes
scales have a waaaaay too large clip.
But that's another bug.
2016-11-17 23:16:14 +01:00
Benjamin Otte
c162b87ebd gdk: Fix a variable
The passed in surface is the current_paint surface, so I guess this
usage hasn't been noticed.
2016-11-17 22:11:33 +01:00
Matthias Clasen
214eb5860d placeview: Don't leak the file enumerator
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774634
2016-11-17 13:50:25 -05:00
Matthias Clasen
0cec768b54 entry: Fix input window position for icons
This makes the icon in the placesview address entry and
in widget-factory's progress entry work again.
2016-11-17 12:04:35 -05:00
Timm Bäder
957274ed1a tests/styleexamples: Remove gtk_render_extension calls
The function doesn't exist anymore so there's nothing to test.
2016-11-17 16:48:57 +01:00
Timm Bäder
55fda57c44 filechooserwidget: Forward file filter to entry
And in the entry, apply the currently used filter as a second step to
the completion items.

https://bugzilla.gnome.org/show_bug.cgi?id=773007
2016-11-17 15:42:25 +01:00
Timm Bäder
f4929360aa sizerequest: rename _compute_size_for_orientation to _measure
They have the exact same parameters and gtk_widget_measure did
unnecessary work before. Also better stack traces!
2016-11-17 15:42:25 +01:00
Matthias Clasen
fbbd3ccfd7 docs: Fix print-related includes
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774614.
2016-11-17 09:33:30 -05:00
Matthias Clasen
5b3b111260 GtkFileChooser: Make local-only default to FALSE
There is no good reason anymore to default to TRUE, and this
default only makes applications miss out on useful functionality.
2016-11-17 09:06:57 -05:00
Matthias Clasen
2f197ac0c2 Revert "GtkFileChooser: Make local-only default to FALSE"
This reverts commit 0bc79910e0.
2016-11-17 09:05:47 -05:00
Matthias Clasen
0bc79910e0 GtkFileChooser: Make local-only default to FALSE
There is no good reason anymore to default to TRUE, and this
default only makes applications miss out on useful functionality.
2016-11-17 09:02:29 -05:00
Matthias Clasen
77aa562415 gtk-demo: Set local-only to FALSE for the file chooser
No good reason for that.
2016-11-17 08:51:16 -05:00
Ondrej Holy
16bce17168 gtkplacesview: Add example of IPv6 address in guidance
Square brackets are mandatory for IPv6 addresses. Add example of IPv6
address in the guidance to make it obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=756570
2016-11-17 08:15:40 -05:00
Matthias Clasen
21570a57f2 docs: Update an example
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774490
2016-11-17 06:17:11 -05:00
Caolán McNamara
ce36ac93f4 spin entry should be a child of spin context
https://bugzilla.gnome.org/show_bug.cgi?id=774609
2016-11-17 05:55:20 -05:00
Rafael Fontenelle
4ad4275c24 Update Brazilian Portuguese translation
(cherry picked from commit 0103bbf5eb)
2016-11-17 04:21:33 +00:00
Benjamin Otte
ab60cbd86a snapshot: Implement gtk_snapshot_clips_rect()
And use this to cull widgets and gadgets that are completely outside the
clip region.

A potential optimization is to apply this clip region to cairo contexts
created with gtk_snapshot_append_cairo_node(), but for that we'd need to
apply the inverse matrix to the clip region, and that causes rounding
errors.

Plus, I hope that cairo drawing becomes exceedingly rare so it won't be
used for the whole widget factory like today (which might also explain
why no culling happens in the widget factory outside the header bar.
2016-11-17 03:33:50 +01:00
Benjamin Otte
28b32d336f snapshot: Pass the clip region to the snapshot 2016-11-17 02:14:10 +01:00
Benjamin Otte
7493f90662 snapshot: Add GtkSnapshotState
Essentially copies cairo_gstate_t.

This is in preparation for attaching more information to the snapshot.
2016-11-17 01:55:26 +01:00
Benjamin Otte
5dfe788e9e snapshot: Fix graphene misunderstandings
The equivalent to cairo_matrix_multiply (a, b, c) is
graphene_matrix_multiply (c, b, a).

graphene_matrix_multiply (a, b, c) may not be called with b and c being
the same matrix.
2016-11-17 01:05:15 +01:00
Benjamin Otte
6d9725f7fd snapshot: Add infrastructure to snapshot CSS images
Use this infrastructure to render builtin images. Which means from now
on, GtkCheckbutton, GtkSpinner and a few others use snapshots.
2016-11-16 20:51:53 +01:00
Benjamin Otte
c22a9a03f9 renderbackground: Remove unused functions 2016-11-16 19:31:47 +01:00
Benjamin Otte
bcf70e3a03 API: Remove everything relating to "grip"
Grips have long been unused in GTK, so remove all support for them.
This removes the GTK_STYLE_CLASS_GRIP and the special
gtk_render_handle() code for drawing those grips.
2016-11-16 19:27:43 +01:00
Benjamin Otte
56e11f057c API: Remove gtk_render_extension()
This is long-gone drawing API.
2016-11-16 18:36:10 +01:00
Benjamin Otte
48e7f4191f gsktexture: Allow attaching render data to textures
This allows renderers (or anyone really) to attach "render data" to
textures. Only the first render data sticks.

You can gsk_texture_set_render_data() with the key you will use to
look the data up again, and if no data has been set yet, yours will be
set.

You can retrieve this data via gsk_texture_get_render_data() later on.
If your data has been cleared, NULL will be returned.

When gsk_texture_clear_render_data() is called (which the texture will
call when it is finalized), your destory notify will be called and you
have to release your render data.

The GL driver uses this to attach texture ids to GskTextures.
2016-11-16 17:36:33 +01:00
Benjamin Otte
40565fb030 gsk: Rework GskTexture
We do no longer bind textures to a renderer, instead they are a way for
applications to provide texture data.

For now, that's it. We've reverted to uploading it from scratch every
frame.
2016-11-16 17:36:33 +01:00
Piotr Drąg
455ce80ff7 Update Polish translation 2016-11-16 13:08:32 +01:00
Piotr Drąg
6e9ee9e03c Update Polish translation 2016-11-16 11:43:34 +01:00
Benjamin Otte
f728f33382 container: ensure we only append a single node
The snapshot vfuncs must only append at most a single node,
otherwise things are going to break if the widget is the root node.

Unfortunately there is no code that can check this in a generic fashion,
so we'll have to debug this on a case-by-case basis.
2016-11-15 22:39:26 +01:00
Benjamin Otte
2e9ff11c85 snapshot: push/pop mismatch is critical
This is broken code that needs to be fixed right now.
2016-11-15 22:39:05 +01:00
Benjamin Otte
b8710d8962 widget: Remove get_render_node() vfunc 2016-11-15 17:49:19 +01:00
Benjamin Otte
313a708006 snapshot: Convert inspector's RenderNodeView 2016-11-15 17:49:19 +01:00
Benjamin Otte
e2fb970889 container: Remove get_render_node() support API
It's unused now.
2016-11-15 17:49:19 +01:00
Benjamin Otte
e8381f84d6 snapshot: Convert GtkPopover 2016-11-15 17:49:19 +01:00
Benjamin Otte
475cffd7f8 gadget: Remove gtk_css_gadget_get_render_node()
It's unused now that we can snapshot.
2016-11-15 17:49:19 +01:00
Benjamin Otte
ada70f4872 snapshot: Convert GtkIcon 2016-11-15 17:49:19 +01:00
Benjamin Otte
d38cf9fee2 snapshot: Convert GtkExpander 2016-11-15 17:49:19 +01:00
Benjamin Otte
82eb223c58 Revert "GtkFrame: Convert to indirect rendering"
This reverts commit a0b2b3745f.

Frames cannot be rendered by GSK yet, because they do clipping.
2016-11-15 17:49:19 +01:00
Benjamin Otte
9c1da58ad1 snapshot: Convert GtkSeparator 2016-11-15 17:49:19 +01:00
Benjamin Otte
47a82640a8 Revert "Covert GtkOverlay to indirect rendering"
This reverts commit fd4a1cdad6.

GtkOverlay uses clipping and render nodes can't clip yet.
2016-11-15 17:49:19 +01:00
Benjamin Otte
30e0bbeaaa snapshot: convert GtkListBox 2016-11-15 17:49:19 +01:00
Benjamin Otte
150f75af66 snapshot: Convert GtkFlowBox 2016-11-15 17:49:19 +01:00
Benjamin Otte
a2b1aef6bd Revert "paned: Convert to indirect rendering"
This reverts commit ba9193fc81.

Paneds can do indirect rendering yet as we need clipping support first.
2016-11-15 17:49:19 +01:00
Benjamin Otte
dad8703e03 snapshot: Convert GtkSpinner 2016-11-15 17:49:19 +01:00
Benjamin Otte
0cf9f70ccd snapshot: Convert box gadget
Makes spinbuttons have text again!
2016-11-15 17:49:19 +01:00
Benjamin Otte
3a18bed7d7 gsk: Allow creating cairo contexts for 0x0 nodes
This happens in regular code paths for example when trying to render the
empty text string. We don't want to store a surface on the render
node in such a case (so actual rendering isn't slowed down), but we do
want to return a working cairo context that is not in an error state
(so the cairo rendering can continue without error messages).
2016-11-15 17:49:19 +01:00
Benjamin Otte
703d80eac0 window: Unrealize renderer last
We want to unrealize the renderer only after all widgets have been
unrealized. Otherwise, the widgets cannot release rendering resources
like textures.
2016-11-15 17:49:19 +01:00
Benjamin Otte
e253f408e3 rendernode: Unref texture on finalize
Leaking textures is no fun.
2016-11-15 17:49:19 +01:00
Benjamin Otte
4b8b06bb08 image: Invalidate icon helper when unrealizing
This frees up any cached surfaces and textures in the iconhelper,
ensuring that the renderer can release its texture data.
2016-11-15 17:49:19 +01:00
Benjamin Otte
c0aa065ac1 snapshot: Convert GtkImage and GtkIconHelper
Adds a bunch of new APIs to render textures with theming.

FIXME: Cannot draw shadows for textures.
2016-11-15 17:49:19 +01:00
Benjamin Otte
92e6b3a000 snapshot: Port GtkHeaderBar 2016-11-15 17:48:45 +01:00
Benjamin Otte
55de4e7140 snapshot: Convert GtkFixed 2016-11-15 17:48:45 +01:00
Benjamin Otte
9b6dfa83e2 snapshot: Convert GtkComboBox 2016-11-15 17:48:45 +01:00
Benjamin Otte
349f55f2fe snapshot: Convert GtkLabel and GtkAccelLabel
Also adds gtk_snapshot_render_insertion_cursor().
2016-11-15 17:48:45 +01:00
Benjamin Otte
ab47479045 snapshot: Convert GtkButton and subclasses 2016-11-15 17:48:45 +01:00
Benjamin Otte
4c9033b62d snapshot: Port GtkActionBar 2016-11-15 17:48:45 +01:00
Benjamin Otte
8c77b6f7f1 snapshot: Convert GtkButtonBox 2016-11-15 17:48:45 +01:00
Benjamin Otte
cc1b422f64 snapshot: Convert GtkGrid 2016-11-15 17:48:45 +01:00
Benjamin Otte
64e802c441 snapshot: Convert entry and spinbutton 2016-11-15 17:48:45 +01:00
Benjamin Otte
8ac7918e0b snapshot: convert GtkBox 2016-11-15 17:48:45 +01:00
Benjamin Otte
e3b1c9f1cd snapshot: Port to GtkSwitch
Included is the addition of gtk_snapshot_render_layout(), which is meant
to replace gtk_render_layout().
2016-11-15 17:48:45 +01:00
Benjamin Otte
da207c9fdd snapshot: Add a snapshot function to GtkCssCustomGadget 2016-11-15 17:48:45 +01:00
Benjamin Otte
4e06d8f73c snapshot: Add gtk_css_gadget_snapshot()
Including a snpahsot() vfunc, wee!
2016-11-15 17:48:45 +01:00
Benjamin Otte
ae2477b1bc container: Add snapshot() implementation
Note that this implementation does not respect GDK windows at all. If
your widget requires respecting them, you should write your own
snapshot implementation and not chain up.
2016-11-15 17:48:45 +01:00
Benjamin Otte
2cd9e5170e widget: Add more sophisticated detection of rendering method
We now look at which of get_render_mode, draw or snapshot vfuncs is the
latest to have been overwritten in the class tree and then use that one.

This allows GtkContainerClass and GtkBinClass to override all of them
for without screwing things up.
2016-11-15 17:48:45 +01:00
Benjamin Otte
79d2d0e40d snapshot: Add gtk_snapshot_render_background()
and gtk_snapshot_render_frame() to be direct replacements for the
old gtk_render_*() functions.

Use them to replace Cairo usage completely in gtk_window_snapshot().
2016-11-15 17:48:45 +01:00
Benjamin Otte
9006e697fb flowbox: children per line may not be 0 2016-11-15 17:48:45 +01:00
Benjamin Otte
d1fec79c00 snapshot: Completely reengineer API
We now try to emulate cairo_t:

We keep a stack of nodes via push/pop and a transform matrix.

So whenever a new node is added to the snapshot, we transform it
by the current transform matrix and append it to the current node.
2016-11-15 17:48:45 +01:00
Benjamin Otte
956edd83a7 gsk: Add implementation for gsk_render_node_get_transform() 2016-11-15 17:48:45 +01:00
Benjamin Otte
bb9626dc29 window: Implement snapshot() 2016-11-15 17:48:45 +01:00
Benjamin Otte
b1154be1c4 widget: Add GtkWidgetClass.snapshot() vfunc
Does the same thing as the render vfunc, only that it uses a different
prototype.
2016-11-15 17:48:45 +01:00
Benjamin Otte
93cbba6c3e gtk: Add gtk_widget_snapshot()
It's functionally equivalent to gtk_widget_get_render_node() but uses a
GtkSnapshot argument to carry the state.
2016-11-15 17:48:45 +01:00
Carlos Garnacho
f90dcb33f9 gdk: Fix win32 build typo
We've left libgdk-3 behind. Noticed by Andrew Chadwick, spotted
by Emmanuele Bassi.
2016-11-15 17:09:30 +01:00
Marek Cernocky
4c7f907d16 Updated Czech translation 2016-11-15 14:39:46 +01:00
Matthias Clasen
d462c31233 entry: Avoid recursion in gtk_entry_ensure_layout
This was unintentional, and lead to a memory leak.
2016-11-14 15:17:41 -05:00
Lauri Kasanen
8b75268d1c recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-14 14:26:34 -05:00
Matthias Clasen
34e26017e3 appchooser: Plug a memory leak
We were not dropping the reference that the model gives us.

https://bugzilla.gnome.org/show_bug.cgi?id=774352
2016-11-14 14:19:58 -05:00
Andrew Chadwick
83712a48f4 win32: remove an unused func operating on GdkColor
https://bugzilla.gnome.org/show_bug.cgi?id=774347
2016-11-14 14:11:36 -05:00
Matthias Clasen
23354ff6e7 widget-factory: Better progressbar testing
Hook the two top progressbars up to the scale with marks.
Your turn, Lapo.
2016-11-14 08:21:31 -05:00
Olivier Fourdan
03b8a8a880 gtkstack: reorder size_allocate and move_window
Unlike other container widgets, GtkStack would allocate its children
prior to moving its windows, which might prevent further valid size
allocation signals to be emitted.

Re-order the size allocation of child widgets to be performed after
moving the GtkStack windows.

Thanks to Owen for spotting the real issue here.

https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-11-14 12:24:18 +01:00
Olivier Fourdan
4ae1eab3b1 Revert "gdkwindow: configure native windows in move_native_children()"
This reverts commit 9e2b1ad39e.
2016-11-14 12:24:18 +01:00
Olivier Fourdan
5ccc570cca Revert "gdk: Get rid of unused variables"
This reverts commit 7016409e9f.
2016-11-14 12:24:18 +01:00
Matthias Clasen
2520662d13 Allow replacing input file in gtk-builder-tool simplify 2016-11-12 22:33:01 -05:00
Timm Bäder
c944bf7330 Call gtk_widget_set_has_window for missing windowed widgets 2016-11-12 21:48:23 +01:00
Timm Bäder
4e445e8e53 window: Properly propagate for_size=-1 2016-11-12 20:37:30 +01:00
Timm Bäder
0d88fe65ba stack: Use gtk_widget_measure 2016-11-12 20:37:22 +01:00
Timm Bäder
95eed97586 listbox: Use gtk_widget_measure 2016-11-12 20:37:18 +01:00
Timm Bäder
9a0513d911 window: Use gtk_widget_measure 2016-11-12 20:37:14 +01:00
Timm Bäder
997fd3c81e grid: Use gtk_wiget_measure 2016-11-12 20:37:10 +01:00
Timm Bäder
26746c8369 toolitemgroup: Remove style properties
Replace them with their default values
2016-11-12 08:10:02 +01:00
Timm Bäder
fdc0c6426b combobox: Remove appears-as-list style property
Remove all the code handling the appears-as-list=TRUE case.
2016-11-12 08:10:02 +01:00
Timm Bäder
5e06701f53 treeview: Remove style properties
Replace them with the Adwaita default values
2016-11-12 08:09:58 +01:00
Chun-wei Fan
fcd216a409 gdkscreen-win32.c: Also define _WIN32_WINNT
As in the last commit on gdkdisplay-win32.c, we need to define that to be
0x0600 (Vista) or later so that the items needed in the Windows headers be
activated.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 21:06:01 +08:00
Chun-wei Fan
718efc2f59 gdkdisplay-win32.c: Define _WIN32_WINNT
... to be for Vista (0x0600) or later.  This is so that the necessary
items in the Windows headers be activated so that the code will build
properly on mingw-w64, and we already require Vista or later for GTK+.

Thanks Ting-Wei Lan for pointing this out.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 20:58:16 +08:00
Lauri Kasanen
0d364173f6 recent-manager: Add a limit to the list's size
This fixes a DOS where any app can cause all running gtk apps
to use arbitrary amounts of memory.

Originally reported against mate-panel, where running a big slideshow
in eye-of-mate caused increasing RAM usage in mate-panel.

v2: Hardcode the value
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-10 17:09:45 -05:00
Matthias Clasen
3c27774a5d places sidebar: Don't leak a reference
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185
2016-11-10 15:16:05 -05:00
Matthias Clasen
5e19e06dcc Fix a copy-paste error
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185#c3
2016-11-10 15:07:08 -05:00
Matthias Clasen
547970b0bc headerbar: Don't leak widgets
We were not properly freeing separators that we end up
not using.

https://bugzilla.gnome.org/show_bug.cgi?id=774066
2016-11-10 15:03:35 -05:00
Matthias Clasen
c7d119614f spinbutton: Fix some gadget handling issues
We were not adding the down_button gadget to the parent,
and we were not unreffing the button gadgets.

https://bugzilla.gnome.org/show_bug.cgi?id=774046
2016-11-10 14:46:21 -05:00
Massimo Valentini
8121860251 GdkGLContext: chain finalize handler
https://bugzilla.gnome.org/show_bug.cgi?id=773979
2016-11-10 14:34:31 -05:00
Thibaut Girka
641b42f9f5 Fix loading cached compose tables
https://bugzilla.gnome.org/show_bug.cgi?id=773916
2016-11-10 14:32:59 -05:00
Gustavo Noronha Silva
942e904bcc cssshadowvalue: scale the blur surface by the same factor as the target
Making sure the surfaces are using the same scale factor makes it more
likely a fast path will be used when pixman gets involved, as pointed
out by Benjamin Otte.

https://bugzilla.gnome.org/show_bug.cgi?id=772075
2016-11-10 16:47:13 -02:00
Carlos Garcia Campos
c836be0508 printing: Do not truncate job names in GtkPrintOperation
We are currently truncating job names to 255 bytes, because that's the
maximum allowed length of job-name attribute in CUPS. This is a CUPS
limitation that GtkPrintOperation shouldn't need to know, and it
shouldn't affect other backends, that might have other limitations or
even no limitation at all. This has another side effect, that what you
set as GtkPrintOperation:job-name could be different to what you get if
the property is truncated, this is not documented in
gtk_print_operation_set_job_name(). So, I think the job name should be
truncated by the CUPS backend, right before setting the job-name
attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=774097
2016-11-10 16:57:30 +01:00
Matthias Clasen
7b2313a6df Avoid criticals in gtk_image_get_render_node
These nodes can be NULL, we need to handle that.
2016-11-10 08:26:37 -05:00
Florian Müllner
38a8e4ee7c wayland: Set startup ID from GApplication platform data
The GApplication platform data may contain a startup ID that on X11
is used to set the startup notification ID when activated. Do the
same on the wayland backend to make startup notifications work for
DBus-activated applications where the DESKTOP_STARTUP_ID environment
variable is not set.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-09 14:18:14 -05:00
Florian Müllner
d163aba030 gdkdisplay-wayland: Add API to set startup notification ID
For wayland clients, the startup notification ID is currently only set
from the DESKTOP_STARTUP_ID environment variable. As that variable is
only set for clients launched via exec(), startup completion is not
indicated correctly for DBus-activated applications unless an explicit
ID is specified - usually that is not the case, as the default handling
uses gdk_notify_startup_complete().
To address this, we need API to set the startup notification ID from GTK
as we have on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-09 14:18:14 -05:00
Benjamin Otte
1259a489f2 iconhelper: Add support for GskTexture
... and use that in GtkImage.
2016-11-08 20:31:34 +01:00
Benjamin Otte
09359197a7 gsk: Implement textures for the Cairo renderer 2016-11-08 20:31:34 +01:00
Benjamin Otte
46eb2c1be9 gsk: Add GskTexture 2016-11-08 20:31:34 +01:00
Marek Cernocky
71aeb8075b Updated Czech translation 2016-11-08 12:38:32 +01:00
Piotr Drąg
7c55830d02 Update POTFILES.skip 2016-11-08 10:08:14 +01:00
Benjamin Otte
c16a7d96b8 range: Don't leak pointers to discarded gadgets 2016-11-08 02:32:40 +01:00
Benjamin Otte
46b9b07a11 reftests: Add reftest for the last 2 fixes
Makes sure that the clipping we do when pushing a group is at the
correct place and in particular doesn't influence shadows.
2016-11-08 02:32:39 +01:00
Benjamin Otte
a54db5adcd render: Draw shadows outside of potential push_group() call
Before, the shadows were clipped.
2016-11-08 02:32:29 +01:00
Benjamin Otte
f9da4f0270 render: Clip the correct rectangle
We translated before.
2016-11-08 02:32:29 +01:00
Lapo Calamandrei
8d212ae5c2 Adwaita: tweak radial-gradient()'s
radial-gradient()'s are behaving, hence simplify the css.
2016-11-07 23:15:56 +01:00
Matthias Clasen
5b8646c6e8 Update the migration guide
Mention the demise of -gtk-gradient, and explain that CSS syntax
works fine for this now.
2016-11-07 16:00:05 -05:00
Matthias Clasen
2a5a94b260 css: Improve spec compliance of the radial gradient parser
The spec says:
"If <shape> is omitted, the ending shape defaults to a circle if the <size>
is a single <length>, and to an ellipse otherwise."

Make it so.
2016-11-07 15:40:21 -05:00
Matthias Clasen
fa7d77d407 Revert "Update the CSS docs for the demise of define-color"
This reverts commit 12d9451b1c.
2016-11-07 15:05:37 -05:00
Matthias Clasen
a1e03346d9 Revert "Update the migration guide"
This reverts commit b868164381.
2016-11-07 15:05:28 -05:00
Matthias Clasen
b868164381 Update the migration guide
Mention some removed CSS extensions.
2016-11-07 14:59:23 -05:00
Matthias Clasen
12d9451b1c Update the CSS docs for the demise of define-color 2016-11-07 14:49:46 -05:00
Matthias Clasen
1410031e57 Drop support for symbolic colors
-gtk-gradient was the last internal user of this code, so
we can drop it now.
2016-11-07 14:46:41 -05:00
Matthias Clasen
069c5e48d4 Update CSS docs to reflect the demise of -gtk-gradient 2016-11-07 14:46:41 -05:00
Matthias Clasen
d674e9c8fa Drop support for -gtk-gradient
The standard CSS radial-gradient can be used instead, and Adwaita
and HighContrast have been ported over.
2016-11-07 14:46:41 -05:00
Matthias Clasen
aceba7484f css: Avoid a crash while parsing radial gradients
has_size does not imply that sizes[0] is != NULL.
2016-11-07 14:46:15 -05:00
Lapo Calamandrei
5af1e87f59 HC: use radial-gradient() in place of -gtk-gradient(). 2016-11-07 18:22:28 +01:00
Lapo Calamandrei
c4a4fe32ea Adwaita: no more -gtk-gradient(), really
the undershoot is drawn with a radial-gradient now.
2016-11-07 18:12:42 +01:00
Chun-wei Fan
e470567fd0 gdkprivate-win32.h: Complete removal of attributes_mask
We removed this parameter from the function declaration, but not the
prototype.  Fix that.
2016-11-07 14:37:32 +08:00
Benjamin Otte
b04e25f29b gdk: gdk_window_new() is not called for foreign windows
So we can remove the special cases that were used for them.
2016-11-07 03:15:00 +01:00
Benjamin Otte
d2c26c471c gdk: Remove attributes_mask from gdk_window_new()
The only remaining values were always treated as 0, so we just hardcode
them to 0.
2016-11-07 01:33:43 +01:00
Benjamin Otte
9fe8b1e112 API: gdk: Remove gdk_window_new()
It's finally no longer public API.
2016-11-07 01:12:47 +01:00
Benjamin Otte
3b93773add API: gdk: Add gdk_window_new_temp()
Your one stop shop for all those nasty hidden input-only windows.
2016-11-07 01:03:17 +01:00
Benjamin Otte
24d0baec38 API: gdk: Add gdk_window_new_popup()
... and use it.
2016-11-06 23:47:56 +01:00
Benjamin Otte
13d8ac83ee range: Use gdk_window_new_input() 2016-11-06 23:46:44 +01:00
Benjamin Otte
0e93e39e74 tests: Remove subsurface test
It did lots of ubsupported things (like creating subsurfaces on every
platform).
2016-11-06 22:03:45 +01:00
Benjamin Otte
b30afff511 API: wayland: Add gdk_wayland_window_new_subsurface()
... and use it instead of gdk_window_new().
2016-11-06 21:36:43 +01:00
Benjamin Otte
87f07bac6b API: gdk: Add gdk_window_new_toplevel()
... and use it in GTK.
2016-11-06 17:40:59 +01:00
Benjamin Otte
7a6cab14eb gdkwindow: Remove GdkWindowAttr.type_hint
Instead, let the callers call gdk_window_set_type_hint(). Which is
surprsingly what every backend did.
2016-11-06 16:22:21 +01:00
Benjamin Otte
e0600346e2 scrolledwindow: Turn into no-window widget 2016-11-06 15:50:26 +01:00
Benjamin Otte
b7619a2603 x11: Set override_redirect on input-only windows
b9955cfff1 broke this.
2016-11-06 15:43:06 +01:00
Benjamin Otte
b7a72224e1 listbox: Turn into no-window widget 2016-11-06 14:52:56 +01:00
Benjamin Otte
2f8df5237f flowbox: Turn into no-window widget 2016-11-06 14:41:07 +01:00
John Ralls
2c642dd654 Update gdk-quartz functions for the demise of GdkDeviceManager. 2016-11-05 15:08:59 -07:00
John Ralls
2b53583e80 Remove screen height and width functions from gdk-quartz.
Since they were previously deleted from gdk.
2016-11-05 15:08:59 -07:00
John Ralls
5416db16f3 Add some new function prototypes to gtkquartz.h.
Fixes compile errors (-Werror,-Wmissing-prototypes).
2016-11-05 15:08:59 -07:00
John Ralls
a45f96e9cb Update GdkOSXVersion enum with the last 4 MacOS releases. 2016-11-05 15:08:59 -07:00
John Ralls
832f5b892c Framework Carbon required for building against MacOSX10.12.sdk.
Should be harmless elsewhere.
2016-11-05 15:08:59 -07:00
Lapo Calamandrei
f4c6994e57 Adwaita: no more -gtk-gradient()
the only place where it was used was the `needs attention` dot
which is now drawn using radial-gradient().
2016-11-05 16:16:37 +01:00
Timm Bäder
a5b967ed31 menu: Properly clip child menuitems
Now that GtkMenu isn't a windowed widget anymore, we have to
differentiate between the (0, 0) of the cairo_t and the position of
priv0->view_window.
2016-11-05 13:39:41 +01:00
Timm Bäder
96f382e5b0 tests/popupat: Remove references to noexistent widgets 2016-11-05 13:39:41 +01:00
Timm Bäder
fdc24c7505 entry: Fix coordinates after rendernode conversion
Ease the transition by removing the text_area and frame vfuncs which are
unused inside GTK+.
2016-11-05 11:56:37 +01:00
Timm Bäder
f483d931ec spinbutton: Convert to indirect rendering 2016-11-05 11:56:36 +01:00
Timm Bäder
932b9acb39 Revert "Revert "Convert GtkEntry to indirect rendering""
This reverts commit f4fa111e32.
2016-11-05 11:56:36 +01:00
Timm Bäder
3b970f4555 button: Remove _get_event_window 2016-11-05 11:56:36 +01:00
Timm Bäder
846cf681e8 Remove gtk_widget_set_mapped
Let all the remaining callers chain up.
2016-11-05 11:56:36 +01:00
Timm Bäder
34626eaa16 notebook: use gesture for clicks
Instead of GtkWidget's buton-press-event/button-release-event
2016-11-05 11:56:33 +01:00
Gábor Kelemen
a47fb1c451 Update Hungarian translation 2016-11-05 09:30:58 +00:00
Piotr Drąg
ff75f1c929 Update POTFILES.skip 2016-11-05 08:51:34 +01:00
Benjamin Otte
079f0427cb fixed: Port to GskRenderNode
The fishbowl demo uses this.
2016-11-05 03:35:46 +01:00
Benjamin Otte
2e284451ff gtk-demo: Add fishbowl demo 2016-11-05 03:35:46 +01:00
Benjamin Otte
a659bbecb9 win32: Remove unused headers 2016-11-05 03:35:36 +01:00
Benjamin Otte
9707f4d3b3 API: gdk: Remove title from gdk_window_new()
Use gdk_window_set_title() afterwards instead.
2016-11-05 03:32:27 +01:00
Benjamin Otte
b9955cfff1 API: gdk: Remove override_redirect flag from GdkWindowAttr
When you want an override-redirect window, you create it that way by
creating a GDK_WINDOW_TEMP window.
2016-11-05 03:32:27 +01:00
Benjamin Otte
33e7a7898f API: gdk: Remove gdk_window_set_override_redirect()
When you want an override-redirect window, you create it that way.
Changing that behavior is not supported anywhere (but on X of course).
2016-11-05 03:32:27 +01:00
Philip Withnall
1dbdbecd39 gtkstylecontext: Clarify memory allocation behaviour of getters
It wasn’t clear that gtk_style_context_get[_valist]() behave like
g_object_get() — i.e. pointer-based types are returned newly-allocated.
Clarify that.

https://bugzilla.gnome.org/show_bug.cgi?id=773954
2016-11-05 00:25:25 +00:00
Matthias Clasen
f4fa111e32 Revert "Convert GtkEntry to indirect rendering"
This reverts commit 3656c9f94c.

Still causes to many unresolved drawing issues.
2016-11-04 13:22:48 -04:00
Matthias Clasen
338534fb8d Fix up the fullscreen_on_monitor support
I didn't pay attention, and forgot to port this code to the
new monitor apis.
2016-11-04 12:41:51 -04:00
Georges Basile Stavracas Neto
8507083928 levelbar: update css nodes even when no offset value is found
GtkLevelBar supports adding custom offsets as style classes, and they
are applied whenever the :value property matches. The current code,
however, only updates any CSS nodes when an offset is found, causing
it to not update when a discrete value changes but no custom offset
is added.

Fix that by always updating the CSS nodes.

https://bugzilla.gnome.org/show_bug.cgi?id=773799
2016-11-04 12:38:21 -04:00
Rui Matos
b8fc4c246a gdkwindow-x11: Add support for gdk_window_fullscreen_on_monitor
This way we can recommend that applications use the
fullscreen_on_monitor() API on both X and Wayland otherwise they'd
have to keep a path for each backend to achieve this functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=773857
2016-11-04 12:10:43 -04:00
Matthias Clasen
2c26f0cae4 Complete the privatization of GtkTextAttributes
This was not quite complete, as gtktextattributes.h was still
being included in public headers.

https://bugzilla.gnome.org/show_bug.cgi?id=773903
2016-11-04 12:05:52 -04:00
Руслан Ижбулатов
e75878f976 W32: Fix malformed svg file
https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-04 13:36:34 +00:00
Chun-wei Fan
6abd65c83b GDK-Win32/4.0: Enable HiDPI support for Windows
This enables HiDPI support for GTK+ on Windows, so that the
fonts and window look better on HiDPI displays.  Notes for the current
work:

-The DPI awareness enabling can be disabled if and only if an application
 manifest is not embedded in the app to enable DPI awareness AND a user
 compatibility setting is not set to limit DPI awareness for the app, via
 the envvar GDK_WIN32_DISABLE_HIDPI.  The app manifest/user setting for
 DPI awareness will always win against the envvar, and so the HiDPI items
 will be always setup in such scenarios, unless DPI awareness is disabled.

-Both automatic detection for the scaling factor and setting the scale
 factor using the GDK_SCALE envvar are supported, where the envvar takes
 precedence, which will therefore disable automatic scaling when
 resolution changes.

-We now default to a per-system DPI awareness model, which means that we
 do not handle WM_DPICHANGED, unless one sets the
 GDK_WIN32_PER_MONITOR_HIDPI envvar, where notes for it are in the
 following point.

-Automatic scaling during WM_DISPLAYCHANGE is handled (DPI setting change of
 current monitor) is now supported.  WM_DPICHANGED is handled as well,
 except that the window positioning during the change of scaling still
 needs to be refined, a change in GDK itself may be required for this.

-I am unable to test the wintab items because I don't have such devices
 around.

https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-04 18:14:48 +08:00
Chun-wei Fan
3baa4a9741 gdkscreen-win32.c: Remove leftovers of removal of visual APIs
There were some more items that ought to be removed.  Remove them.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-04 17:28:12 +08:00
Balázs Meskó
9898085149 Update Hungarian translation 2016-11-04 06:18:55 +00:00
Benjamin Otte
4b88b81e67 x11: Init no-multihead monitor without root window
Previous code gave warnings because the root window wasn't initialized
yet.
2016-11-04 00:33:13 +01:00
Benjamin Otte
7c474c689a wayland: Remove all mentions of visuals 2016-11-04 00:17:57 +01:00
Benjamin Otte
77a9e90cb9 mir: Remove all mentions of visuals 2016-11-04 00:15:52 +01:00
Benjamin Otte
8040d78c04 broadway: Remove all mentions of visuals 2016-11-04 00:15:07 +01:00
Benjamin Otte
31a0933fe9 quartz: Remove all mentions of visuals 2016-11-04 00:10:43 +01:00
Benjamin Otte
ec06a717ce win32: Remove all mentions of visuals 2016-11-04 00:08:03 +01:00
Benjamin Otte
4585af5719 gdk: Remove visual APIs from GdkScreen
gdk_screen_list_visuals(), gdk_screen_get_system_visual() and
gdk_screen_get_rgba_visual() are gone now.
2016-11-04 00:02:37 +01:00
Benjamin Otte
fe08641205 x11: Maointin window visuals without GdkVisual
That way, we don't need a GdkScreen to create a GdkWindow anymore.
2016-11-03 23:54:39 +01:00
Benjamin Otte
b741d32262 x11: Remove unused hash table
We were neatly populating it, but nobody ever looked at it.
2016-11-03 22:47:42 +01:00
Benjamin Otte
0192f93689 x11: Replace gdk_display_get_window_visual()
... with functions that don't use GdkVisual.

A small step towards getting rid of GdkVisual.
2016-11-03 22:40:36 +01:00
Benjamin Otte
6c6359df4f menubar: We don't need an input window
Input is handled by the menuitems completely.
2016-11-03 21:29:07 +01:00
Benjamin Otte
d8d8059ee1 x11: Use X11 variables instead of GDK variables
This way, we avoid GdkVisual usage.
2016-11-03 20:33:33 +01:00
Benjamin Otte
4ebcb6fd1e x11: Remove unused complexity
With all Windows having the same visual, there's only ever one visual we
need to check.
2016-11-03 20:33:33 +01:00
Benjamin Otte
a178258a2a docs: Remove vfunc that doesn't exist anymore 2016-11-03 20:33:33 +01:00
Lapo Calamandrei
993f867744 Adwaita: correctly style headerbars in a stack
corners are correctly rounded now. Stacked splitted headerbars are
not supported yet though.
2016-11-03 14:04:32 -04:00
Ernestas Kulik
3885e85f77 popover: pop down when pressing escape
Simply hiding the popover may introduce inconsistencies in application
behavior, since popping up/down is the usual use case.

https://bugzilla.gnome.org/show_bug.cgi?id=773885
2016-11-03 15:46:04 +02:00
Matthias Clasen
5c18bf79a1 Add a testcase for stacked headerbars
This currently has some theming issues.
This example is for Lapo to work those out.
2016-11-03 08:32:31 -04:00
Chun-wei Fan
e982f31800 configure.ac: Remove gdk/win32/rc/gdk.rc
This needs to be removed, which was forgotten.  Sorry.
2016-11-03 18:07:43 +08:00
Chun-wei Fan
53077f15d8 autotools: Update MSVC gir build script generation
Now that GTK+ is built as a single DLL, and the .lib that is built is
gtk-4.lib, we need to update the autotools sections in generating the
NMake Makefile snippets so that we can have the correct commands and flags
for building the .gir files, which will all now link to gtk-4-vsXX.dll (or
so).
2016-11-03 18:00:03 +08:00
Chun-wei Fan
e4c5ce4cc3 Visual Studio builds: Use gtk-4.lib for the .lib file
As with the autotools builds, use gtk-4 as the name of the .lib file that
is produced from the build.

Actually this is already done with GTK-3.x with the autotools builds,
but this update is not done there as gtk-3.0.lib/gdk-3.0.lib/gailutil-3.0.lib
was used for such a long time that changing it there might have caused
trouble for people there.
2016-11-03 17:46:32 +08:00
Chun-wei Fan
493ad0cad4 Visual Studio builds: Build GTK+ as a monolithic DLL
Update the project configs to build GDK/GSK as a static lib and include
them into the GTK+ DLL as a monolithic DLL, which is in line with what is
done in the autotools builds, since the code changes needed for Windows
builds for a monolithic build are now in place.
2016-11-03 17:37:49 +08:00
Chun-wei Fan
abef8d4860 Windows: Update code for monolithic GTK DLL
Now that the autotools build folded the GDK/GSK bits into the main GTK+
DLL, there are some updates that need to be done for this.  We need to:

-Fold the DllMain() of GDK-Win32 into the main GTK+ DllMain(), as we need
 the HINSTANCE to register the window.  We can't have two DllMain()'s in a
 single DLL.
-Remove the GDK rc(.in) files, as that is not used anymore.  Make the GTK+
 .rc(.in) file load the gtk.ico GTK+ logo file instead so that we still
 get the GTK+ logo for the application icon by default.  Update the
 autotools build files as well.
-Revert commit b9f9980 as LRN pointed out in comment 25 in bug 773299, as
 GTK+ is now a monolithic DLL, and we ought not to export this private
 function.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-03 16:55:35 +08:00
Olivier Fourdan
2324b96a32 wayland: check valid pending cairo surface
gdk_wayland_window_attach_image() is normally called from
gdk_window_end_paint() to notify the compositor of newly staged drawing.

If any of the drawing code inadvertently dispatches the wayland event
loop (for instance with a gdk_flush() call), then it's possible that by
the time gdk_window_end_paint() is called, the staged drawing is already
destroyed.

This commit bypasses the attach_image call in scenarios where the staged
drawing is prematurely dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=773274
2016-11-03 08:50:34 +01:00
Benjamin Otte
c9a313a125 revealer: Port to no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
acd801000c textview: Convert to no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
6c3d1fba78 iconview: Turn into no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
7e9796568d colorplane: Port to be a no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
0508526658 colorswatch: Readd accidentally removed call 2016-11-03 01:15:08 +01:00
Benjamin Otte
d818f3fcd4 viewport: Turn into no-window widget
While doing so, get rid of the GdkWindow instead of keeping it.
2016-11-02 22:00:29 +01:00
Benjamin Otte
bb8b24da47 menu: Don't set widget->window
Instead, create an input window for the menubar and omit the window for
the menu itself.
2016-11-02 22:00:29 +01:00
Timm Bäder
633a93f418 widget: Remove outdated comment
gtk_widget_override_color is no more.
2016-11-02 18:40:00 +01:00
Timm Bäder
a7efe10ef8 widget: Remove unused visibility-notify-event 2016-11-02 18:40:00 +01:00
Timm Bäder
773c16076b widget: Remove state-flags leftovers 2016-11-02 18:40:00 +01:00
Benjamin Otte
6dddf0447e css: Fix radial-gradient() color stop computation
The copy/paste from the linear gradient code had an error.
2016-11-02 15:19:49 +01:00
Chun-wei Fan
2d7df8e66a gdk/win32: Complete gdk_screen_is_composited() removal
Commit d249e77 (API: screen: Remove gdk_screen_is_composited()) attempted
to update the GDK-Win32 for the removal of the API, but some parts were
missed.  This updates the code so that things continue to build and run.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-02 15:37:10 +08:00
Chun-wei Fan
b9f9980bb4 gsk: Export gsk_render_node_get_bounds()
gtk/inspector/rendernodeview.c calls this private function from GSK, so we
need to ensure that this function is exported so that GTK+ can link
properly on compilers that do not support automatic exporting.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-02 15:26:02 +08:00
Benjamin Otte
32a5729d18 gtk: Chain up in realize()
... instead of copy/paste from gtk_widget_real_realize.
2016-11-02 07:16:08 +01:00
Benjamin Otte
b0a5e8764c widget: Insist on widgets calling gtk_widget_set_has_window()
This way, we can grep the code for the bad widgets that set this to
TRUE and fix them.
2016-11-02 06:54:57 +01:00
Benjamin Otte
5e07a31d2b gtk: Call gtk_widget_set_has_window() on every widget
Even if we just set it to the value it already had.
2016-11-02 06:54:57 +01:00
Benjamin Otte
8ea1157d38 treeview: Don't use gtk_widget_get_allocaton()
Use gtk_widget_get_allocated_width()/height() instead.
2016-11-02 06:54:57 +01:00
Chun-wei Fan
21b061b0dd demos/application: Call the right program
We need to update the call to gtk4-application-demo, plus include the
correct icon file for this.
2016-11-02 12:23:41 +08:00
Matthias Clasen
2d14217cd7 inspector: Cosmetic improvements to the recorder 2016-11-01 22:06:25 -04:00
Juan Pablo Ugarte
c607d51890 Use GLSL version 110 for OpenGL 2 shaders.
According to docs and Intel legacy drivers,
GLSL version 130 is for GL 3.0 not GL 2.0/2.1

Validated files with reference compiler from
https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
2016-11-01 15:42:46 -03:00
Matthias Clasen
793f843b08 check button: Update for new box gadget functionality
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
18f321df94 expander: Update for new box gadget functionality
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
953c7ba6be box gadget: Implement get_render_node vfunc
This implements get_render_node in the obvious way.
2016-11-01 14:29:25 -04:00
Matthias Clasen
68cc1412e5 container: Add a private api for render node propagation
Add a function that propagates a render node for a single
child. This will be used in the box gadget to handle widgets.
2016-11-01 14:29:25 -04:00
Matthias Clasen
30a56acc7d gadget: Add a get_render_node vfunc
This will let us do box gadgets like we do containers.
2016-11-01 14:29:25 -04:00
Matthias Clasen
3656c9f94c Convert GtkEntry to indirect rendering
Warning! This unveils some positioning issue with the secondary icon.
2016-11-01 14:29:25 -04:00
Matthias Clasen
6ed58cfd50 Fix the build
testgtk.c had some dead code referring to GdkColor. Drop it.
2016-11-01 14:11:25 -04:00
Matthias Clasen
7a2537866b Drop GdkColor
It is deprecated and no longer used.
2016-11-01 13:58:11 -04:00
Matthias Clasen
35209f098b Stop supporting GdkColor in text buffer serialization
GdkColor is going away soon.
2016-11-01 13:58:10 -04:00
Matthias Clasen
17a061b8da Drop the settings color parser
We have no color-valued settings anymore.
2016-11-01 13:58:10 -04:00
Matthias Clasen
6e178aede2 Use GdkRGBA for text attributes
Now that GtkTextAttributes is private, we can clean this struct
up a bit. The first step is to switch from GdkColor to GdkRGBA,
and adapt all users.
2016-11-01 13:58:10 -04:00
Matthias Clasen
e6d5a3dce2 Drop GtkTextAttributes from the docs 2016-11-01 13:58:10 -04:00
Matthias Clasen
745c348ff8 Make GtkTextAttributes private
This is a problematic struct, and giving direct access to it
has kept us from making improvements to GtkTextView. Drop it
from the public API, together with the auxiliary APIs. If
it turns out that this functionality is needed, we should add
individual getters.
2016-11-01 13:58:10 -04:00
Benjamin Otte
72a9c53262 inspector: Add a button to clear all recordings
Clears the recordings list, and even better: Frees all your memory.
2016-11-01 18:34:40 +01:00
Benjamin Otte
e02ff7c064 inspector: Collect statistics for unclassable types
I want to know how many GskRenderNodes I have!
2016-11-01 18:34:40 +01:00
Benjamin Otte
3741e6906e inspector: Require toggling on/off of recording
This way, we don't eat up all your memory every time you start the
inspector.
2016-11-01 18:34:40 +01:00
Benjamin Otte
4673318028 inspector: Add list of render nodes to recorder
And make it possible to view the actually selected node in the view.
2016-11-01 18:34:40 +01:00
Benjamin Otte
4265c0e5b0 inspector: Next step in the recorder view
We now record all render operations and display them.

Warning: This is very brute force, you can't clear the recordings or
turn recording off. And this thing easily records 25MB per recorded
frame, so be careful to not run out of memory and get your browser
killed. ;)
2016-11-01 18:34:40 +01:00
Benjamin Otte
e6f711a94a inspector: Add more infrastructure
This one introduces the Recording object which is essentially a single
instance of something that happened.
The RenderRecording is an instance of an actual rendering operation.
2016-11-01 18:34:40 +01:00
Benjamin Otte
98a500a434 inspector: Add outline for a new "recorder" tab 2016-11-01 18:34:40 +01:00
Sébastien Wilmet
59a9eda5ae docs: fix typos in GtkMenuShell 2016-11-01 18:28:09 +01:00
Benjamin Otte
4129b70b96 rendernode: Remove the renderer from the rendernode 2016-11-01 16:32:26 +01:00
Benjamin Otte
a0e63b8a07 rendernode: Require passing a renderer to get_draw_context()
This is in preparation of making render nodes independent of the
renderer, so that they can be rendered multiple times with different
renderers.
2016-11-01 16:32:26 +01:00
Benjamin Otte
e201c4dc92 gsk: Remove gsk_render_node_get_scale_factor()
Scale factors belong to the renderers, not the nodes. The nodes should
just use whatever scale factor the renderer tells them to when
rendering.
2016-11-01 16:32:26 +01:00
Benjamin Otte
3d8b00600e gdkgl: Change prototype of function
The function does not upload a cairo surface, it uploads pixel data.

So don't take a cairo surface as an argument, take pixel data.
2016-11-01 16:32:26 +01:00
Emmanuele Bassi
02c615cc34 gsk: Use the appropriate GLSL version
The GLSL versions are:

  OpenGL 2.1: #version 110
  OpenGL 3.0: #version 130
  OpenGL 3.2: #version 150

  OpenGLES 2.0: #version 100
  OpenGLES 3.0: #version 300 es

So we need to check the version of the GdkGLContext if we want use the
appropriate version, especially for legacy OpenGL contexts, which can be
both 3.x and 2.x.
2016-11-01 15:00:31 +00:00
Marek Černocký
3c1f72671a Updated Czech translation 2016-11-01 09:48:00 +01:00
Benjamin Otte
e96c485afa widget: Create render node with correct bounds
We want a render node where (0,0) is the top left of the widget.
However, we need to account for the clip origin not matching the
allocation origin.
2016-11-01 03:59:37 +01:00
Benjamin Otte
8854279e2a treeview: Clip before translating
We want to clip invalidations to the bin window, not the treeview
itself.
2016-11-01 03:51:48 +01:00
Benjamin Otte
b40aeb7ab4 treeview: Clip to bin window size when drawing bin window
This ensures that the drawing does not extend the actually drawn area.

It also ensures that our math is sane, because the math assumes the clip
area cannot extend the window. After all, before GTK4 it always was like
that.

Fixes a bunch of drawing bugs when the clip area does indeed extend too
far.
2016-11-01 03:51:48 +01:00
Benjamin Otte
b3e5c31b08 rendernode: Transform cairo_t to correct coordinates
We want to have the coordinate system of the created cairo surface to be
identical to the coordinate system of the node's bounds. For that, we
need to translate the cairo surface by the bounds' origin.
2016-11-01 03:42:35 +01:00
Benjamin Otte
f4c4ab6ab1 rendernode: Use ceilf() on the size of the cairo surface
Bounds sizes are floats, so round up to the next integer so we end up
with enough space to draw.
2016-11-01 03:40:01 +01:00
Timm Bäder
ee4ba18d5e stack: Don't underallocate child in interpolate-size case
In that case, we can't just rely on the stack allocation being big
enough. Especially, the child can actually be bigger than the current
stack allocation, so take that into account when positioning it.
2016-10-31 19:29:36 +01:00
Timm Bäder
8dce94c47a stack: Redraw last_visible_surface if child allocation changes
So the widget is properly aligned.
2016-10-31 19:29:36 +01:00
Timm Bäder
212f8a6c7b builderparser: Order string comparisons after frequency
The typical UI file has a lot more <property> tags than it has
<requested> or <interface> tags, etc. so order the string comparisons
according to this expected case.
2016-10-31 19:29:36 +01:00
Timm Bäder
938598032c builderparser: Save tag type instead of tag name
So we can save a few string comparisons
2016-10-31 19:29:36 +01:00
Timm Bäder
e3a3a66370 builderparser: Don't needlessly copy requested object names 2016-10-31 19:29:36 +01:00
Timm Bäder
f415a8bc84 builderparser: stack-allocate ParserData
No reason for it to be heap-allocated, it won't survive this function
call anyway.
2016-10-31 19:29:36 +01:00
Timm Bäder
ba9193fc81 paned: Convert to indirect rendering 2016-10-31 19:29:35 +01:00
Timm Bäder
679b515170 popover: convert to indirect rendering 2016-10-31 19:29:35 +01:00
Timm Bäder
2f2ff773ae separator: Convert to indirect rendering 2016-10-31 19:28:28 +01:00
Timm Bäder
c261d890ad widget: Remove damage-event 2016-10-31 19:28:28 +01:00
Timm Bäder
c25a5606d1 widget: remove show-help 2016-10-31 19:28:28 +01:00
Timm Bäder
5071206d60 widget: Remove app-paintable 2016-10-31 19:28:28 +01:00
Emmanuele Bassi
567f6373c8 build: Clean the uninstalled introspection GIR files
We need to remove them from the build when cleaning them.

Additionally, this automatically adds them to the Git ignore file.
2016-10-31 16:30:10 +00:00
Emmanuele Bassi
a203b8cc28 gsk: Use GskRenderer.create_cairo_surface()
GskRenderNode should ask the renderer for a Cairo surface when creating
a drawing context.
2016-10-31 16:28:09 +00:00
Emmanuele Bassi
50a5deb8e3 gsk: Add internal Renderer.create_cairo_surface()
We need an overridable entry point for GskRenderer to create Cairo
surfaces.

Implementations of GskRenderer can override create_cairo_surface() to
create efficient surfaces, possibly with zero copies involved, depending
on the GDK backend.
2016-10-31 16:26:50 +00:00
Juan Pablo Ugarte
50056d804b gdk/Makefile.am: fixed glsl resources extra dist files.
Use the same wildcard partern used to generate gdk.gresource.xml to include files in EXTRA_DIST var.
2016-10-31 10:15:05 -03:00
Timm Bäder
d7df491656 button: show() the image in gtk_button_new_from_icon_name 2016-10-31 12:23:27 +01:00
Timm Bäder
3ae14630a3 tests: Don't add wigets to a GtkInvisible
It's not a GtkContainer.
2016-10-31 12:20:41 +01:00
Timm Bäder
6488dde4fd box: Use measure() to measure child sizes 2016-10-31 12:20:41 +01:00
Timm Bäder
76ff53193a box: Mark out params of _query_packing as (optional) 2016-10-31 12:20:41 +01:00
Timm Bäder
a829929a41 sidebarrow: Use GtkButton:icon-name 2016-10-31 12:20:41 +01:00
Timm Bäder
3154d3f258 box: Remove unused private API 2016-10-31 12:20:41 +01:00
Timm Bäder
86e94d0e0f dialog: Let GtkButton manage its style classes
A button created using gtk_button_new_with_label will already have the
text-button style class applied.
2016-10-31 12:20:41 +01:00
Timm Bäder
01723fa02f filechooser: Use GtkButton's icon-name property 2016-10-31 12:20:41 +01:00
Rico Tzschichholz
5147ea96e0 gsk: Fix return annotation for gsk_render_node_get_name() 2016-10-30 07:58:05 +01:00
Piotr Drąg
e455843bbb Update POTFILES.in 2016-10-29 21:32:56 +02:00
Benjamin Otte
def62a9dda API: rendernode: Add gsk_render_node_get_name()
Make the debug string available to public API.
2016-10-29 18:10:26 +02:00
Benjamin Otte
d028667fc6 display: Actually initialize variables
Forgot to add this in d249e77bcb.
2016-10-29 18:10:26 +02:00
Lapo Calamandrei
5bb5213486 Adwaita: add more padding to popover menus...
...since Timm removed that from the actual code.
2016-10-29 17:34:49 +02:00
Lapo Calamandrei
91723bfcfc Revert "Adwaita: add more padding to popovers"
Padding should be added back to menu popover only...
This reverts commit 670948586a.
2016-10-29 17:33:26 +02:00
Lapo Calamandrei
da1348edb4 Adwaita: no rounded corners for solid-csd. 2016-10-29 17:18:58 +02:00
Lapo Calamandrei
670948586a Adwaita: add more padding to popovers
...since Timm stole some.
2016-10-29 17:14:07 +02:00
Benjamin Otte
73cd739e19 API: widget: Remove gtk_widget_is_composited()
We don't need to clutter our API with functions that are easily
available elsewhere and effectively unused.
2016-10-29 04:49:47 +02:00
Benjamin Otte
d249e77bcb API: screen: Remove gdk_screen_is_composited()
Switch code to use gdk_display_is_composited() instead.

The new code also doesn't use a vfunc to query the property but rather
requires the backend to call set_composited()/set_rgba() to change the
value.
2016-10-29 04:49:47 +02:00
Benjamin Otte
a334316d5e API: widget: Remove GtkWidget::composited-changed signal
Nobody uses it.

If you need the functionality, listen to display changes on
your widget and then connect to the display's notify::composited.
2016-10-29 04:49:47 +02:00
Benjamin Otte
b69328eb74 inspector: Use the new APIs when displaying information 2016-10-29 04:49:47 +02:00
Benjamin Otte
42d8142cc7 API: gdk: Add gdk_display_is_rgba() and gdk_display_is_composited()
Also add properties for those two properties.

The first property is equivalent to checking if an RGBA visual exists,
the 2nd is equivalent to gdk_screen_is_composited().
2016-10-29 04:49:47 +02:00
Timm Bäder
b2a0105234 frame: Get the render node from the gadget
So we get a proper css background etc. applied.
2016-10-28 19:33:47 +02:00
Timm Bäder
5c99f7a670 Fix clip of more windowed widgets 2016-10-28 19:33:47 +02:00
Timm Bäder
acbdd5c8f2 Fix clip position of windowed widgets 2016-10-28 17:56:51 +02:00
439 changed files with 18378 additions and 19309 deletions

126
NEWS
View File

@@ -1,3 +1,129 @@
Overview of Changes in GTK+ 3.89.1
==================================
This release marks the first snapshot of development leading to GTK+ 4,
it is unstable and expected to change drastically.
Do not use it in production.
GTK+ 3.89 is parallel-installable with the stable GTK+ 3.22.x releases.
The API documentation contains an initial migration guide for porting
from GTK+ 3 to GTK+ 4.
Detailed changes:
* GSK has been integrated. Widgets are now rendered into
GskRenderNodes, which then get drawn using GL
* GTK+ now installs a single shared library, libgtk.so, which includes
GDK and GSK as well
* All installed binaries now use a consistent gtk4- prefix to avoid conflicts
* Dropped APIs:
- all APIs that have been deprecated in GTK+ 3
- (almost) all widget style properties
- offscreen windows
- -gtk-gradient in CSS
- gdk_pixbuf_get_from_window and gdk_cairo_set_source_window
* Changed APIs:
- GtkCssProvider load functions lost their GError argument
* New APIs:
- GMenu items can now have a text-direction attribute
- GtkShortcutsShortcut supports single-finger swipe gestures
- gdk_display_is_rgba and gdk_display_is_composited
- New GtkButton API to construct image buttons:
gtk_button_new_from_icon_name
gtk_button_set_icon_name
- New GdkWindow constructors replacing gdk_window_new:
gdk_window_new_toplevel
gdk_window_new_popup
gdk_window_new_temp
gdk_window_new_child
gdk_window_new_input
gdk_wayland_window_new_subsurface
- gtk_widget_measure replaces gtk_widget_get_preferred_...
- gtk_widget_snapshot replaces gtk_widget_render
- gtk_drawing_area_set_draw_func replaces the ::draw signal
* New examples in gtk4-demo:
- Gestures
- Fishbowl
* GtkInspector now has a frame recorder which shows detailed information
about the widget to render node conversion
* Hi-DPI is now supported with the Windows backend
* gtk-builder-tool can now replace the input file
* Bugs fixed:
756570 gtkplacesview no longer provides guidance on address formats
767713 Fullscreen in wayland is buggy
768531 wayland: Startup notification doesn't work on some apps (eg. gnome-terminal)...
771205 Buttons with circular style class have a suddenly clipped shadow at the bottom
771320 [Wayland] Maps widget is displayed at wrong position inside gnome-contacts
771694 GtkSourceView completion popup window not shown, no grabbed seat found
772075 GTK+ uses a lot more CPU under Wayland than under X11
772345 placesviewrow: busy_spinner when visible offsets the rest of the widgets on the row
772348 placesviewrow: busy_spinner when visible offsets the rest of the widgets on the row
772683 Usage of FALSE instead of gint in glarea demo
772695 Show the keyboard shortcuts from left to right even in RTL
772770 [GtkShortcutsWindow] Support for single-finger swipe gestures
772859 Fix memory leaks in implementations of common widgets
772922 GtkMenu: Try using gdk_window_move_to_rect() more often
772926 shortcutswindow: working version of set_section_name()
773007 GtkFilechooser gives completion for non-matching extensions
773082 overlay: Document availability of properties
773113 tests: fix clipboard test by loading correct icon
773180 Don't second-guess whether our GDK GL context is GLES
773246 Typo in css color definitions documentation
773299 Ensure GTK+-4.x builds and works on Windows (MSVC in particular)
773474 Color chooser dialog opened with show-editor=TRUE has black header bar
773587 recent-manager: Add a limit to the list's size
773799 GtkLevelBar doesn't update blocks on discrete mode
773857 gdkwindow-x11: Add support for gdk_window_fullscreen_on_monitor
773885 pop down GtkPopover on pressing escape
773903 Gtk+4: gtk.h and gtktextiter.h include private gtktextattributes.h
773916 GtkComposeTable caches broken: using a same ~/.XCompose does not work twice in a row
773954 gtkstylecontext: Clarify memory allocation behaviour of getters
773979 GdkGLContext does not chain finalize handler
774046 GtkSpinButton does not always unref priv->{up,down}_button
774066 GtkHeaderBar does not unref all GtkBox and GtkSeparator it creates
774097 GtkPrintOperation should not truncate job names
774114 Window shadows are repainted even if only the contents of the window change
774185 GtkPlacesSidebar does not unref itsel as many times as it references
774347 Fails to build: unknown type name GdkColor
774352 GtkAppChooserWidget does not unref all GAppInfo it references
774475 wayland: gtk+ prevents using subsurfaces if the parent is not root
774476 surfaces with no outputs get scale factor reset
774490 Deprecated example for modify color or font
774609 small fix to foreign drawing spinbutton demo
774614 Wrong #include in Print docs
774634 GtkPlacesView does not unref all GDaemonFileEnumerator it references
774695 GtkProgressbar needs full and empty classes
774699 wintab: list iteration regression causes odd-indexed devices to be ignored during...
* Translation updates
Brazilian Portuguese
Catalan
Czech
Danish
French
German
Greek
Hungarian
Kazakh
Lithuanian
Polish
=======================================================================
Overview of Changes in GTK+ 3.22.1
==================================

View File

@@ -28,10 +28,10 @@ def main(argv):
base_pc.setup(argv, gdk_parser)
atk_min_ver = '2.15.1'
cairo_min_ver = '1.14.0'
cairo_min_ver = '1.15.2'
gdk_pixbuf_min_ver = '2.30.0'
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi'
glib_min_ver = '2.45.8'
glib_min_ver = '2.49.4'
epoxy_min_ver = '1.0'
graphene_min_ver = '1.2'
@@ -54,46 +54,29 @@ def main(argv):
'cairo >= ' + cairo_min_ver + ' ' + \
'cairo-gobject >= ' + cairo_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_EXTRA_CFLAGS@': '',
'gdk-4': 'gdk-4.0'}
gsk_pc_replace_items = {'@GSK_PACKAGES@': pkg_required_packages, + ' ' + \
'graphene-1.0 >= ' + graphene_min_ver
'@GSK_PRIVATE_PACKAGES@': 'epoxy >= ' + epoxy_min_ver,
'@GSK_EXTRA_LIBS@': '',
'@GSK_EXTRA_CFLAGS@': '',
'gsk-4': 'gsk-4.0'}
gtk_pc_replace_items = {'@host@': gdk_args.host,
'@GTK_BINARY_VERSION@': '4.0.0',
'@GDK_PACKAGES@': gio_package + ' ' + \
'pangowin32 pangocairo' + ' ' + \
pkg_required_packages,
'@GSK_PACKAGES@': pkg_required_packages + ' ' + \
'graphene-1.0 >= ' + graphene_min_ver,
'@GTK_PACKAGES@': 'atk >= ' + atk_min_ver + ' ' + \
pkg_required_packages + ' ' + \
gio_package,
'@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
'@GSK_PRIVATE_PACKAGES@': 'epoxy >= ' + epoxy_min_ver,
'@GTK_PRIVATE_PACKAGES@': 'atk',
'@GDK_EXTRA_CFLAGS@': '',
'@GSK_EXTRA_CFLAGS@': '',
'@GTK_EXTRA_CFLAGS@': '',
'@GTK_EXTRA_LIBS@': '',
'@GTK_EXTRA_CFLAGS@': '',
'gtk-4': 'gtk-4.0'}
'@GDK_EXTRA_LIBS@': gdk_win32_sys_libs + broadway_extra_libs,
'@GSK_EXTRA_LIBS@': '',
'@GTK_EXTRA_LIBS@': ''}
pkg_replace_items.update(base_pc.base_replace_items)
gdk_pc_replace_items.update(pkg_replace_items)
gtk_pc_replace_items.update(pkg_replace_items)
# Generate gdk-4.0.pc
replace_multi(base_pc.top_srcdir + '/gdk-4.0.pc.in',
base_pc.srcdir + '/gdk-4.0.pc',
gdk_pc_replace_items)
# Generate gsk-4.0.pc
replace_multi(base_pc.top_srcdir + '/gsk-4.0.pc.in',
base_pc.srcdir + '/gsk-4.0.pc',
gsk_pc_replace_items)
# Generate gtk+-4.0.pc
replace_multi(base_pc.top_srcdir + '/gtk+-4.0.pc.in',
base_pc.srcdir + '/gtk+-4.0.pc',

View File

@@ -5,14 +5,14 @@ GENERATED_ITEMS = \
gdk4-win32.vcxproj.filters \
gdk4-broadway.vcxproj \
gdk4-broadway.vcxproj.filters \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk-4.vcxproj \
gdk-4.vcxproj.filters \
gsk-4.vcxproj \
gsk-4.vcxproj.filters \
gtk-4.vcxproj \
gtk-4.vcxproj.filters \
gtk4-broadwayd.vcxproj \
gtk4-broadwayd.vcxproj.filters \
gtk4-demo.vcxproj \
gtk4-demo.vcxproj.filters \
gtk4-demo-application.vcxproj \
@@ -38,14 +38,14 @@ EXTRA_DIST += \
gdk4-win32.vcxproj.filtersin \
gdk4-broadway.vcxprojin \
gdk4-broadway.vcxproj.filtersin \
broadwayd.vcxprojin \
broadwayd.vcxproj.filtersin \
gdk-4.vcxprojin \
gdk-4.vcxproj.filtersin \
gsk-4.vcxprojin \
gsk-4.vcxproj.filtersin \
gtk-4.vcxprojin \
gtk-4.vcxproj.filtersin \
gtk4-broadwayd.vcxprojin \
gtk4-broadwayd.vcxproj.filtersin \
gtk4-builder-tool.vcxproj \
gtk4-builder-tool.vcxproj.filters \
gtk4-encode-symbolic-svg.vcxproj \
@@ -63,7 +63,7 @@ EXTRA_DIST += \
gtk4-install.vcxproj \
gtk4-install.vcxproj.filters \
gtk4-build-defines.props \
gtk4-copy-gdk-broadway.props \
gtk4-copy-gtk-broadway.props \
gtk4-gen-srcs.props \
gtk4-ignore-broadway.props \
gtk4-install.propsin \

View File

@@ -14,9 +14,6 @@
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gdk\win32\rc\gdk.rc"><Filter>Resource Files</Filter></ResourceCompile>
</ItemGroup>
<ItemGroup>
#include "gdk-4.vs12.sourcefiles.filters"
<ClCompile Include="..\..\..\gdk\gdkkeynames.c"><Filter>Source Files</Filter></ClCompile>

View File

@@ -41,46 +41,46 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
@@ -89,35 +89,35 @@
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-ignore-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-ignore-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-ignore-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-ignore-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-copy-gdk-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-copy-gdk-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-copy-gdk-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-copy-gdk-broadway.props" />
<Import Project="gtk4-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
@@ -143,15 +143,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">
<ClCompile>
@@ -166,15 +157,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -186,17 +168,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">
<ClCompile>
@@ -208,17 +179,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@@ -233,15 +193,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">
<ClCompile>
@@ -256,15 +207,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -276,17 +218,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">
<ClCompile>
@@ -298,35 +229,11 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gdk\win32\rc\gdk.rc" />
</ItemGroup>
<ItemGroup>
#include "gdk-4.vs12.sourcefiles"
<ClCompile Include="..\..\..\gdk\gdkkeynames.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk4-broadway.vcxproj">
<Project>{1df4c475-4472-4ee4-ac2b-3ab5a4c1a453}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gdk4-win32.vcxproj">
<Project>{aba7685a-7cbb-4626-b5e5-6eeea5b489ef}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -25,24 +25,24 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
@@ -85,15 +85,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -105,17 +96,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@@ -130,15 +110,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -150,17 +121,6 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gsk\gskenumtypes.c.template">
@@ -195,12 +155,6 @@
<ItemGroup>
#include "gsk-4.vs12.sourcefiles"
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -6,7 +6,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk4-win32", "gdk4-win32.vc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk4-broadway", "gdk4-broadway.vcxproj", "{1DF4C475-4472-4EE4-AC2B-3AB5A4C1A453}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "broadwayd", "broadwayd.vcxproj", "{E9687D21-E214-4A0C-9EB4-8B38EBB783E5}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk4-broadwayd", "gtk4-broadwayd.vcxproj", "{E9687D21-E214-4A0C-9EB4-8B38EBB783E5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-4", "gdk-4.vcxproj", "{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}"
EndProject
@@ -138,14 +138,14 @@ Global
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release|Win32.Build.0 = Release|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release|x64.ActiveCfg = Release|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release|x64.Build.0 = Release|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|x64.Build.0 = Debug|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|Win32.Build.0 = Release|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|x64.ActiveCfg = Release|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|x64.Build.0 = Release|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|Win32.ActiveCfg = Debug_Broadway|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|Win32.Build.0 = Debug_Broadway|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|x64.ActiveCfg = Debug_Broadway|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Debug_Broadway|x64.Build.0 = Debug_Broadway|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|Win32.ActiveCfg = Release_Broadway|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
{BDAE6DE2-6BCC-4107-94F0-DA12214A02DE}.Debug|Win32.ActiveCfg = Debug|Win32
{BDAE6DE2-6BCC-4107-94F0-DA12214A02DE}.Debug|Win32.Build.0 = Debug|Win32
{BDAE6DE2-6BCC-4107-94F0-DA12214A02DE}.Debug|x64.ActiveCfg = Debug|x64

View File

@@ -5,20 +5,36 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_Broadway|Win32">
<Configuration>Debug_Broadway</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_Broadway|x64">
<Configuration>Debug_Broadway</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
<WholeProgramOptimization>true</WholeProgramOptimization>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_Broadway|Win32">
<Configuration>Release_Broadway</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
<WholeProgramOptimization>true</WholeProgramOptimization>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_Broadway|x64">
<Configuration>Release_Broadway</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{95A4B53D-2773-4406-A2C1-8FD2840BBAD8}</ProjectGuid>
@@ -26,17 +42,12 @@
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
@@ -46,31 +57,78 @@
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-gen-srcs.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-gen-srcs.props" />
<Import Project="gtk4-ignore-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-gen-srcs.props" />
<Import Project="gtk4-copy-gtk-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-gen-srcs.props" />
<Import Project="gtk4-ignore-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-copy-gtk-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-ignore-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-copy-gtk-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-ignore-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk4-copy-gtk-broadway.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -88,7 +146,30 @@
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
@@ -108,7 +189,29 @@
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
@@ -133,7 +236,30 @@
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
@@ -153,7 +279,29 @@
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
@@ -176,6 +324,18 @@
<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 Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\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>
@@ -190,6 +350,18 @@
<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 Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\libgtk4.manifest.in">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Manifest...</Message>
@@ -204,10 +376,24 @@
<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\libgtk4.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">..\..\..\gtk\libgtk4.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">..\..\..\gtk\libgtk4.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">..\..\..\gtk\libgtk4.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\gtk\libgtk4.manifest;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc" />
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc">
<AdditionalIncludeDirectories>..\..\..\gdk\win32\rc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
#include "gtk-4.vs12.sourcefiles"
@@ -231,6 +417,14 @@
<Manifest Include="..\..\..\gtk\libgtk4.manifest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk4-broadway.vcxproj">
<Project>{1df4c475-4472-4ee4-ac2b-3ab5a4c1a453}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gdk4-win32.vcxproj">
<Project>{aba7685a-7cbb-4626-b5e5-6eeea5b489ef}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

View File

@@ -15,6 +15,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
#include "broadwayd.vs12.sourcefiles.filters"
#include "gtk4-broadwayd.vs12.sourcefiles.filters"
</ItemGroup>
</Project>

View File

@@ -163,7 +163,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
#include "broadwayd.vs12.sourcefiles"
#include "gtk4-broadwayd.vs12.sourcefiles"
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gtk4-prebuild.vcxproj">

View File

@@ -14,7 +14,7 @@
<GtkGdkCommonLibs>imm32.lib</GtkGdkCommonLibs>
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GdkAdditionalLibs)</GtkAdditionalLibs>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk4builddefinesprops</_PropertySheetDisplayName>

View File

@@ -166,10 +166,6 @@
<ClCompile Include="..\..\..\gtk\gtk-builder-tool.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-4.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

View File

@@ -1,7 +1,7 @@
<?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="gtk4-build-defines.props" />
<Import Project="gtk4-gen-srcs.props" />
</ImportGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk4copygdkbroadwayprops</_PropertySheetDisplayName>
@@ -13,36 +13,22 @@
<PostBuildEvent>
<Command>
if "$(Configuration)" == "Release" goto END
if "$(Configuration)" == "Debug" goto END
if "$(Configuration)" == "Release_Broadway" goto DoRelease
if "$(Configuration)" == "Debug_Broadway" goto DoDebug
:DoRelease
mkdir .\Release\$(Platform)\bin
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gtk-$(ApiVersion).lib .\Release\$(Platform)\bin\
goto END
:DoDebug
mkdir .\Debug\$(Platform)\bin
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Debug\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Debug\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll .\Debug\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gtk-$(ApiVersion).lib .\Debug\$(Platform)\bin\
goto END
:END
</Command>
</PostBuildEvent>

View File

@@ -158,10 +158,6 @@
#include "gtk4-demo-application.vs12.sourcefiles"
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-4.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

View File

@@ -172,10 +172,6 @@
#include "gtk4-demo.vs12.sourcefiles"
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-4.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

View File

@@ -166,8 +166,8 @@
<ClCompile Include="..\..\..\gtk\encodesymbolic.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ProjectReference Include="gtk-4.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>

View File

@@ -162,10 +162,6 @@
#include "gtk4-icon-browser.vs12.sourcefiles"
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-4.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

View File

@@ -1,7 +1,7 @@
<?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="gtk4-build-defines.props" />
<Import Project="gtk4-gen-srcs.props" />
</ImportGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk4ignorebroadwayprops</_PropertySheetDisplayName>
@@ -11,7 +11,7 @@
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
<Link>
<AdditionalDependencies>$(OutDir)\gdk4-win32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(OutDir)\gsk-4.lib;$(OutDir)\gdk-4.lib;$(OutDir)\gdk4-win32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/EXPORT:gdk_win32_display_manager_get_type</AdditionalOptions>
</Link>
</ItemDefinitionGroup>

View File

@@ -9,18 +9,11 @@
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\lib\pkgconfig
copy "$(BinDir)\$(GtkDllPrefix)gdk-4$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-4$(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)gsk-4$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gsk-4$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gsk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\$(GtkDllPrefix)gtk-4$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gtk-4$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gtk-$(ApiVersionShort).lib" $(CopyDir)\lib
copy "$(BinDir)\gtk4-demo.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk4-demo.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk4-demo-application.exe" $(CopyDir)\bin
@@ -44,12 +37,9 @@ 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)gsk-4$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gsk-4$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gsk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-4$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-4$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gtk-$(ApiVersionShort).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gtk4-demo.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk4-demo.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk4-demo-application.exe $(CopyDir)\bin
@@ -68,12 +58,9 @@ copy .\Release\$(Platform)\bin\gtk4-builder-tool.pdb $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_DEBUG
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gsk-4$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gsk-4$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gsk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-4$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-4$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersionShort).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gtk4-demo.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk4-demo.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk4-demo-application.exe $(CopyDir)\bin
@@ -91,9 +78,8 @@ copy .\Debug\$(Platform)\bin\gtk4-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
copy ..\gdk-4.0.pc $(CopyDir)\lib\pkgconfig
copy ..\gsk-4.0.pc $(CopyDir)\lib\pkgconfig
copy "..\gtk+-4.0.pc" $(CopyDir)\lib\pkgconfig
copy "..\gtk+-4.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-win32-4.0.pc"
</GtkDoInstallBin>
<GtkDoInstall>
echo off
@@ -131,7 +117,7 @@ $(CopyDir)\bin\gtk4-update-icon-cache.exe --ignore-theme-index --force "$(CopyDi
</GtkPostInstall>
<GenerateGtkPC>$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-4.0.pc;..\gsk-4.0.pc;..\gtk+-4.0.pc</GtkPCFiles>
<GtkPCFiles>..\gtk+-4.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk4installsprops</_PropertySheetDisplayName>

View File

@@ -217,14 +217,6 @@
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gsk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-eb2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk4-demo.vcxproj">
<Project>{bdae6de2-6bcc-4107-94f0-da12214a02de}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
@@ -233,6 +225,10 @@
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk4-broadwayd.vcxproj">
<Project>{e9687d21-e214-4a0c-9eb4-8b38ebb783e5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk4-demo-application.vcxproj">
<Project>{be6b4973-c6ff-4c8f-8e97-a47793c50f44}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
@@ -241,10 +237,6 @@
<Project>{343333c4-d46c-4c97-a986-959cca6f1de0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="broadwayd.vcxproj">
<Project>{e9687d21-e214-4a0c-9eb4-8b38ebb783e5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk4-encode-symbolic-svg.vcxproj">
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

View File

@@ -166,10 +166,6 @@
<ClCompile Include="..\..\..\gtk\gtk-query-settings.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-4.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-4.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

View File

@@ -4,7 +4,8 @@
<VSVer>12</VSVer>
<GlibEtcInstallRoot>$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
<CopyDir>..\..\..\..\vs$(VSVer)\$(Platform)</CopyDir>
<ApiVersion>4.0</ApiVersion>
<ApiVersionShort>4</ApiVersionShort>
<ApiVersion>$(ApiVersionShort).0</ApiVersion>
<GtkVersion>@GTK_VERSION@</GtkVersion>
<GtkLibtoolCompatibleDllPrefix>lib</GtkLibtoolCompatibleDllPrefix>
<GtkLibtoolCompatibleDllSuffix>.0-0</GtkLibtoolCompatibleDllSuffix>
@@ -28,6 +29,9 @@
<BuildMacro Include="CopyDir">
<Value>$(CopyDir)</Value>
</BuildMacro>
<BuildMacro Include="ApiVersionShort">
<Value>$(ApiVersionShort)</Value>
</BuildMacro>
<BuildMacro Include="ApiVersion">
<Value>$(ApiVersion)</Value>
</BuildMacro>

View File

@@ -29,12 +29,12 @@ EXTRA_DIST += \
gtk4-icon-browser.vcxproj.filters \
gtk4-install.vcxproj \
gtk4-install.vcxproj.filters \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gtk4-broadwayd.vcxproj \
gtk4-broadwayd.vcxproj.filters \
gdk4-broadway.vcxproj \
gdk4-broadway.vcxproj.filters \
gtk4-build-defines.props \
gtk4-copy-gdk-broadway.props \
gtk4-copy-gtk-broadway.props \
gtk4-gen-srcs.props \
gtk4-ignore-broadway.props \
gtk4-install.props \

View File

@@ -10,7 +10,7 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [89])
m4_define([gtk_micro_version], [0])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -64,7 +64,7 @@ m4_define([wayland_protocols_required_version], [1.7])
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([graphene_required_version], [1.2])
m4_define([graphene_required_version], [1.5.1])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
ATK_REQUIRED_VERSION=atk_required_version
@@ -404,7 +404,7 @@ if test "x$enable_quartz_backend" = xyes; then
backend_immodules="$backend_immodules,quartz"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_QUARTZ"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa -framework Carbon"
DISABLE_ON_QUARTZ='%'
AM_CONDITIONAL(USE_QUARTZ, true)
if test "x$quartz_relocation" = xyes; then
@@ -1999,7 +1999,6 @@ gdk/broadway/Makefile
gdk/x11/Makefile
gdk/win32/Makefile
gdk/win32/rc/Makefile
gdk/win32/rc/gdk.rc
gdk/quartz/Makefile
gdk/wayland/Makefile
gdk/mir/Makefile

View File

@@ -27,6 +27,7 @@ demos_base = \
event_axes.c \
expander.c \
filtermodel.c \
fishbowl.c \
foreigndrawing.c \
gestures.c \
glarea.c \

View File

@@ -212,7 +212,7 @@ activate_about (GSimpleAction *action,
"comments", "Program to demonstrate GTK+ functions.",
"authors", authors,
"documenters", documentors,
"logo-icon-name", "gtk3-demo",
"logo-icon-name", "gtk4-demo",
"title", "About GTK+ Code Demos",
NULL);
}

View File

@@ -63,10 +63,10 @@ do_application_demo (GtkWidget *toplevel)
const gchar *command;
GError *error = NULL;
if (g_file_test ("./gtk3-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk3-demo-application" APP_EXTENSION;
if (g_file_test ("./gtk4-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk4-demo-application" APP_EXTENSION;
else
command = "gtk3-demo-application";
command = "gtk4-demo-application";
if (!g_spawn_command_line_async (command, &error))
{

View File

@@ -15,15 +15,15 @@ static GtkWidget *frame;
/* draw callback for the drawing area
*/
static gboolean
draw_callback (GtkWidget *widget,
cairo_t *cr,
gpointer data)
static void
draw_function (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
gdk_cairo_set_source_rgba (cr, &color);
cairo_paint (cr);
return TRUE;
}
static void
@@ -87,11 +87,9 @@ do_colorsel (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
da = gtk_drawing_area_new ();
g_signal_connect (da, "draw", G_CALLBACK (draw_callback), NULL);
/* set a minimum size */
gtk_widget_set_size_request (da, 200, 200);
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 200);
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (da), 200);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_function, NULL, NULL);
gtk_container_add (GTK_CONTAINER (frame), da);

View File

@@ -51,22 +51,17 @@ css_text_changed (GtkTextBuffer *buffer,
gtk_style_context_reset_widgets (gdk_screen_get_default ());
}
static gboolean
drawing_area_draw (GtkWidget *widget,
cairo_t *cr)
static void
drawing_area_draw (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (da));
gtk_render_background (context, cr,
0, 0,
gtk_widget_get_allocated_width (widget),
gtk_widget_get_allocated_height (widget));
gtk_render_frame (context, cr,
0, 0,
gtk_widget_get_allocated_width (widget),
gtk_widget_get_allocated_height (widget));
return FALSE;
gtk_render_background (context, cr, 0, 0, width, height);
gtk_render_frame (context, cr, 0, 0, width, height);
}
static void
@@ -105,8 +100,9 @@ do_css_multiplebgs (GtkWidget *do_widget)
child = gtk_drawing_area_new ();
gtk_widget_set_name (child, "canvas");
g_signal_connect (child, "draw",
G_CALLBACK (drawing_area_draw), NULL);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (child),
drawing_area_draw,
NULL, NULL);
gtk_container_add (GTK_CONTAINER (container), child);
child = gtk_button_new ();

View File

@@ -94,6 +94,9 @@
<file>zoom_in_cursor.png</file>
<file>zoom_out_cursor.png</file>
</gresource>
<gresource prefix="/fishbowl">
<file>fishbowl.ui</file>
</gresource>
<gresource prefix="/iconview">
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
@@ -150,6 +153,7 @@
<file>event_axes.c</file>
<file>expander.c</file>
<file>filtermodel.c</file>
<file>fishbowl.c</file>
<file>flowbox.c</file>
<file>foreigndrawing.c</file>
<file>font_features.c</file>

View File

@@ -50,15 +50,15 @@ scribble_configure_event (GtkWidget *widget,
}
/* Redraw the screen from the surface */
static gboolean
scribble_draw (GtkWidget *widget,
cairo_t *cr,
gpointer data)
static void
scribble_draw (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
cairo_set_source_surface (cr, surface, 0, 0);
cairo_paint (cr);
return FALSE;
}
/* Draw a rectangle on the screen */
@@ -136,12 +136,14 @@ scribble_motion_notify_event (GtkWidget *widget,
}
static gboolean
checkerboard_draw (GtkWidget *da,
cairo_t *cr,
gpointer data)
static void
checkerboard_draw (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
gint i, j, xcount, ycount, width, height;
gint i, j, xcount, ycount;
#define CHECK_SIZE 10
#define SPACING 2
@@ -154,8 +156,6 @@ checkerboard_draw (GtkWidget *da,
*/
xcount = 0;
width = gtk_widget_get_allocated_width (da);
height = gtk_widget_get_allocated_height (da);
i = SPACING;
while (i < width)
{
@@ -180,11 +180,6 @@ checkerboard_draw (GtkWidget *da,
i += CHECK_SIZE + SPACING;
++xcount;
}
/* return TRUE because we've handled this event, so no
* further processing is required.
*/
return TRUE;
}
static void
@@ -233,14 +228,11 @@ do_drawingarea (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
da = gtk_drawing_area_new ();
/* set a minimum size */
gtk_widget_set_size_request (da, 100, 100);
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (da), 100);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), checkerboard_draw, NULL, NULL);
gtk_container_add (GTK_CONTAINER (frame), da);
g_signal_connect (da, "draw",
G_CALLBACK (checkerboard_draw), NULL);
/*
* Create the scribble area
*/
@@ -255,15 +247,13 @@ do_drawingarea (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
da = gtk_drawing_area_new ();
/* set a minimum size */
gtk_widget_set_size_request (da, 100, 100);
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (da), 100);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), scribble_draw, NULL, NULL);
gtk_container_add (GTK_CONTAINER (frame), da);
/* Signals used to handle backing surface */
g_signal_connect (da, "draw",
G_CALLBACK (scribble_draw), NULL);
g_signal_connect (da,"configure-event",
G_CALLBACK (scribble_configure_event), NULL);

341
demos/gtk-demo/fishbowl.c Normal file
View File

@@ -0,0 +1,341 @@
/* Benchmark/Fishbowl
*
* This demo models the fishbowl demos seen on the web in a GTK way.
* It's also a neat little tool to see how fast your computer (or
* your GTK version) is.
*/
#include <gtk/gtk.h>
char **icon_names = NULL;
gsize n_icon_names = 0;
GtkWidget *allow_changes;
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)];
}
#define N_STATS 5
#define STATS_UPDATE_TIME G_USEC_PER_SEC
typedef struct _Stats Stats;
struct _Stats {
gint64 last_stats;
gint64 last_frame;
gint last_suggestion;
guint frame_counter_max;
guint stats_index;
guint frame_counter[N_STATS];
guint item_counter[N_STATS];
};
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 gint64
do_stats (GtkWidget *widget,
GtkWidget *info_label,
gint *suggested_change)
{
Stats *stats;
gint64 frame_time, elapsed;
stats = get_stats (widget);
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
elapsed = frame_time - stats->last_frame;
if (stats->last_stats + STATS_UPDATE_TIME < frame_time)
{
char *new_label;
guint i, n_frames;
n_frames = 0;
for (i = 0; i < N_STATS; i++)
{
n_frames += stats->frame_counter[i];
}
new_label = g_strdup_printf ("%u icons - %.1f fps",
stats->item_counter[stats->stats_index],
(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);
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]);
}
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;
}
else
{
if (suggested_change)
*suggested_change = 0;
}
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]);
return elapsed;
}
static void
stats_update (GtkWidget *widget,
gint n_items)
{
Stats *stats;
stats = get_stats (widget);
g_assert ((gint) stats->item_counter[stats->stats_index] + n_items > 0);
stats->item_counter[stats->stats_index] += n_items;
}
typedef struct _FishData FishData;
struct _FishData {
double x;
double y;
double x_speed;
double y_speed;
};
static FishData *
get_fish_data (GtkWidget *fish)
{
static GQuark fish_quark = 0;
FishData *data;
if (G_UNLIKELY (fish_quark == 0))
fish_quark = g_quark_from_static_string ("fish");
data = g_object_get_qdata (G_OBJECT (fish), fish_quark);
if (data == NULL)
{
data = g_new0 (FishData, 1);
g_object_set_qdata_full (G_OBJECT (fish), fish_quark, data, g_free);
data->x = 10;
data->y = 10;
data->x_speed = g_random_double_range (1, 200);
data->y_speed = g_random_double_range (1, 200);
}
return data;
}
static void
add_fish (GtkWidget *bowl,
guint n_fish)
{
GtkWidget *new_fish;
guint i;
for (i = 0; i < n_fish; i++)
{
new_fish = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()),
GTK_ICON_SIZE_DIALOG);
gtk_widget_show (new_fish);
gtk_fixed_put (GTK_FIXED (bowl),
new_fish,
10, 10);
}
stats_update (bowl, n_fish);
}
static void
remove_fish (GtkWidget *bowl,
guint n_fish)
{
GList *list, *children;
guint i;
children = gtk_container_get_children (GTK_CONTAINER (bowl));
g_assert (n_fish < g_list_length (children));
list = children;
for (i = 0; i < n_fish; i++)
{
gtk_container_remove (GTK_CONTAINER (bowl), list->data);
list = list->next;
}
g_list_free (children);
stats_update (bowl, - (gint) n_fish);
{
Stats *stats = get_stats (bowl);
children = gtk_container_get_children (GTK_CONTAINER (bowl));
g_assert (stats->item_counter[stats->stats_index] == g_list_length (children));
g_list_free (children);
}
}
static void
move_one_fish (GtkWidget *fish,
gpointer elapsedp)
{
GtkWidget *fixed = gtk_widget_get_parent (fish);
FishData *data = get_fish_data (fish);
gint64 elapsed = *(gint64 *) elapsedp;
data->x += data->x_speed * ((double) elapsed / G_USEC_PER_SEC);
data->y += data->y_speed * ((double) elapsed / G_USEC_PER_SEC);
if (data->x <= 0)
{
data->x = 0;
data->x_speed = - g_random_double_range (1, 200) * (data->x_speed > 0 ? 1 : -1);
}
else if (data->x > gtk_widget_get_allocated_width (fixed) - gtk_widget_get_allocated_width (fish))
{
data->x = gtk_widget_get_allocated_width (fixed) - gtk_widget_get_allocated_width (fish);
data->x_speed = - g_random_double_range (1, 200) * (data->x_speed > 0 ? 1 : -1);
}
if (data->y <= 0)
{
data->y = 0;
data->y_speed = - g_random_double_range (1, 200) * (data->y_speed > 0 ? 1 : -1);
}
else if (data->y > gtk_widget_get_allocated_height (fixed) - gtk_widget_get_allocated_height (fish))
{
data->y = gtk_widget_get_allocated_height (fixed) - gtk_widget_get_allocated_height (fish);
data->y_speed = - g_random_double_range (1, 200) * (data->y_speed > 0 ? 1 : -1);
}
gtk_fixed_move (GTK_FIXED (fixed), fish, data->x, data->y);
}
static gboolean
move_fish (GtkWidget *bowl,
GdkFrameClock *frame_clock,
gpointer info_label)
{
gint64 elapsed;
gint suggested_change = 0;
elapsed = do_stats (bowl,
info_label,
!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (allow_changes)) ? &suggested_change : NULL);
gtk_container_foreach (GTK_CONTAINER (bowl), move_one_fish, &elapsed);
if (suggested_change > 0)
add_fish (bowl, suggested_change);
else if (suggested_change < 0)
remove_fish (bowl, - suggested_change);
return G_SOURCE_CONTINUE;
}
GtkWidget *
do_fishbowl (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
if (!window)
{
GtkBuilder *builder;
GtkWidget *bowl, *info_label;
builder = gtk_builder_new_from_resource ("/fishbowl/fishbowl.ui");
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"));
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))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
return window;
}

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.6 -->
<object class="GtkWindow" id="window">
<property name="title" translatable="yes">Fishbowl</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<child>
<object class="GtkLabel" id="info_label">
<property name="visible">True</property>
<property name="label">0 icons - 0 fps</property>
</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="icon-name">changes-allow</property>
<property name="relief">none</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="changes_prevent">
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">True</property>
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">False</property>
<property name="icon-name">changes-prevent</property>
<property name="relief">none</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkFixed" id="bowl">
<property name="visible">True</property>
</object>
</child>
</object>
</interface>

View File

@@ -10,11 +10,14 @@
#include <stdlib.h>
#include <string.h>
static gboolean
draw_color (GtkWidget *drawingarea,
cairo_t *cr,
const char *color_name)
static void
draw_color (GtkDrawingArea *drawingarea,
cairo_t *cr,
int width,
int height,
gpointer data)
{
const char *color_name = data;
GdkRGBA rgba;
if (gdk_rgba_parse (&rgba, color_name))
@@ -22,8 +25,6 @@ draw_color (GtkWidget *drawingarea,
gdk_cairo_set_source_rgba (cr, &rgba);
cairo_paint (cr);
}
return FALSE;
}
static GtkWidget *
@@ -33,8 +34,9 @@ color_swatch_new (const gchar *color)
button = gtk_button_new ();
area = gtk_drawing_area_new ();
g_signal_connect (area, "draw", G_CALLBACK (draw_color), (gpointer) color);
gtk_widget_set_size_request (area, 24, 24);
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (area), 24);
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (area), 24);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (area), draw_color, (gpointer) color, NULL);
gtk_container_add (GTK_CONTAINER (button), area);
gtk_widget_show_all (button);

View File

@@ -836,7 +836,7 @@ draw_spinbutton (GtkWidget *widget,
/* This information is taken from the GtkSpinButton docs, see "CSS nodes" */
spin_context = get_style (NULL, "spinbutton.horizontal:focus");
entry_context = get_style (NULL, "entry:focus");
entry_context = get_style (spin_context, "entry:focus");
up_context = get_style (spin_context, "button.up:focus:active");
down_context = get_style (spin_context, "button.down:focus");
@@ -881,16 +881,18 @@ draw_spinbutton (GtkWidget *widget,
g_object_unref (spin_context);
}
static gboolean
draw_cb (GtkWidget *widget,
cairo_t *cr)
static void
draw_func (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
gint panewidth, width, height;
GtkWidget *widget = GTK_WIDGET (da);
gint panewidth;
gint x, y;
width = gtk_widget_get_allocated_width (widget);
panewidth = width / 2;
height = gtk_widget_get_allocated_height (widget);
cairo_rectangle (cr, 0, 0, width, height);
cairo_set_source_rgb (cr, 0.9, 0.9, 0.9);
@@ -944,8 +946,6 @@ draw_cb (GtkWidget *widget,
y += height + 10;
draw_combobox (widget, cr, 10 + panewidth, y, panewidth - 20, TRUE, &height);
return FALSE;
}
GtkWidget *
@@ -968,13 +968,12 @@ do_foreigndrawing (GtkWidget *do_widget)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_container_add (GTK_CONTAINER (window), box);
da = gtk_drawing_area_new ();
gtk_widget_set_size_request (da, 400, 400);
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 400);
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (da), 400);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_func, NULL, NULL);
gtk_widget_set_hexpand (da, TRUE);
gtk_widget_set_vexpand (da, TRUE);
gtk_widget_set_app_paintable (da, TRUE);
gtk_container_add (GTK_CONTAINER (box), da);
g_signal_connect (da, "draw", G_CALLBACK (draw_cb), NULL);
}
if (!gtk_widget_get_visible (window))

View File

@@ -60,20 +60,18 @@ zoom_scale_changed (GtkGestureZoom *gesture,
gtk_widget_queue_draw (widget);
}
static gboolean
drawing_area_draw (GtkWidget *widget,
cairo_t *cr)
static void
drawing_area_draw (GtkDrawingArea *area,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
if (swipe_x != 0 || swipe_y != 0)
{
cairo_save (cr);
cairo_set_line_width (cr, 6);
cairo_move_to (cr, allocation.width / 2,
allocation.height / 2);
cairo_move_to (cr, width / 2, height / 2);
cairo_rel_line_to (cr, swipe_x, swipe_y);
cairo_set_source_rgba (cr, 1, 0, 0, 0.5);
cairo_stroke (cr);
@@ -87,9 +85,7 @@ drawing_area_draw (GtkWidget *widget,
gdouble angle, scale;
cairo_get_matrix (cr, &matrix);
cairo_matrix_translate (&matrix,
allocation.width / 2,
allocation.height / 2);
cairo_matrix_translate (&matrix, width / 2, height / 2);
cairo_save (cr);
@@ -116,8 +112,8 @@ drawing_area_draw (GtkWidget *widget,
if (long_pressed)
{
cairo_save (cr);
cairo_arc (cr, allocation.width / 2,
allocation.height / 2,
cairo_arc (cr,
width / 2, height / 2,
50, 0, 2 * G_PI);
cairo_set_source_rgba (cr, 0, 1, 0, 0.5);
@@ -125,8 +121,6 @@ drawing_area_draw (GtkWidget *widget,
cairo_restore (cr);
}
return TRUE;
}
GtkWidget *
@@ -150,8 +144,9 @@ do_gestures (GtkWidget *do_widget)
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK | GDK_TOUCH_MASK);
g_signal_connect (drawing_area, "draw",
G_CALLBACK (drawing_area_draw), NULL);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (drawing_area),
drawing_area_draw,
NULL, NULL);
/* Swipe */
gesture = gtk_gesture_swipe_new (drawing_area);

View File

@@ -50,6 +50,7 @@ do_pickers (GtkWidget *do_widget)
gtk_widget_set_hexpand (label, TRUE);
picker = gtk_file_chooser_button_new ("Pick a File",
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (picker), FALSE);
gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1);
gtk_grid_attach (GTK_GRID (table), picker, 1, 2, 1, 1);

View File

@@ -75,15 +75,15 @@ load_pixbufs (GError **error)
}
/* Expose callback for the drawing area */
static gint
draw_cb (GtkWidget *widget,
cairo_t *cr,
gpointer data)
static void
draw_func (GtkDrawingArea *area,
cairo_t *cr,
int width,
int height,
gpointer data)
{
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
cairo_paint (cr);
return TRUE;
}
#define CYCLE_TIME 3000000 /* 3 seconds */
@@ -204,14 +204,13 @@ do_pixbufs (GtkWidget *do_widget)
}
else
{
gtk_widget_set_size_request (window, back_width, back_height);
frame = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, back_width, back_height);
da = gtk_drawing_area_new ();
g_signal_connect (da, "draw",
G_CALLBACK (draw_cb), NULL);
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), back_width);
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (da), back_height);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_func, NULL, NULL);
gtk_container_add (GTK_CONTAINER (window), da);

View File

@@ -88,10 +88,12 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
return attrs;
}
static gboolean
rotated_text_draw (GtkWidget *widget,
cairo_t *cr,
gpointer data)
static void
rotated_text_draw (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
#define RADIUS 150
#define N_WORDS 5
@@ -106,15 +108,12 @@ rotated_text_draw (GtkWidget *widget,
PangoAttrList *attrs;
double device_radius;
int width, height;
int i;
/* Create a cairo context and set up a transformation matrix so that the user
* space coordinates for the centered square where we draw are [-RADIUS, RADIUS],
* [-RADIUS, RADIUS].
* We first center, then change the scale. */
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
device_radius = MIN (width, height) / 2.;
cairo_translate (cr,
device_radius + (width - 2 * device_radius) / 2,
@@ -128,7 +127,7 @@ rotated_text_draw (GtkWidget *widget,
cairo_set_source (cr, pattern);
/* Create a PangoContext and set up our shape renderer */
context = gtk_widget_create_pango_context (widget);
context = gtk_widget_create_pango_context (GTK_WIDGET (da));
pango_cairo_context_set_shape_renderer (context,
fancy_shape_renderer,
NULL, NULL);
@@ -164,8 +163,6 @@ rotated_text_draw (GtkWidget *widget,
g_object_unref (layout);
g_object_unref (context);
cairo_pattern_destroy (pattern);
return FALSE;
}
GtkWidget *
@@ -199,8 +196,9 @@ do_rotated_text (GtkWidget *do_widget)
gtk_style_context_add_class (gtk_widget_get_style_context (drawing_area),
GTK_STYLE_CLASS_VIEW);
g_signal_connect (drawing_area, "draw",
G_CALLBACK (rotated_text_draw), NULL);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (drawing_area),
rotated_text_draw,
NULL, NULL);
/* And a label */
label = gtk_label_new (text);

View File

@@ -7,10 +7,12 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
static gboolean
draw_text (GtkWidget *da,
cairo_t *cr,
gpointer data)
static void
draw_text (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
cairo_pattern_t *pattern;
PangoLayout *layout;
@@ -18,7 +20,7 @@ draw_text (GtkWidget *da,
cairo_save (cr);
layout = gtk_widget_create_pango_layout (da, "Pango power!\nPango power!\nPango power!");
layout = gtk_widget_create_pango_layout (GTK_WIDGET (da), "Pango power!\nPango power!\nPango power!");
desc = pango_font_description_from_string ("sans bold 34");
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
@@ -27,9 +29,7 @@ draw_text (GtkWidget *da,
pango_cairo_layout_path (cr, layout);
g_object_unref (layout);
pattern = cairo_pattern_create_linear (0.0, 0.0,
gtk_widget_get_allocated_width (da),
gtk_widget_get_allocated_height (da));
pattern = cairo_pattern_create_linear (0.0, 0.0, width, height);
cairo_pattern_add_color_stop_rgb (pattern, 0.0, 1.0, 0.0, 0.0);
cairo_pattern_add_color_stop_rgb (pattern, 0.2, 1.0, 0.0, 0.0);
cairo_pattern_add_color_stop_rgb (pattern, 0.3, 1.0, 1.0, 0.0);
@@ -49,8 +49,6 @@ draw_text (GtkWidget *da,
cairo_stroke (cr);
cairo_restore (cr);
return TRUE;
}
GtkWidget *
@@ -72,8 +70,7 @@ do_textmask (GtkWidget *do_widget)
da = gtk_drawing_area_new ();
gtk_container_add (GTK_CONTAINER (window), da);
g_signal_connect (da, "draw",
G_CALLBACK (draw_text), NULL);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_text, NULL, NULL);
}
if (!gtk_widget_get_visible (window))

View File

@@ -567,7 +567,6 @@ do_toolpalette (GtkWidget *do_widget)
/* ===== passive DnD dest ===== */
contents = gtk_drawing_area_new ();
gtk_widget_set_app_paintable (contents, TRUE);
g_object_connect (contents,
"signal::draw", canvas_draw, NULL,
@@ -594,7 +593,6 @@ do_toolpalette (GtkWidget *do_widget)
/* ===== interactive DnD dest ===== */
contents = gtk_drawing_area_new ();
gtk_widget_set_app_paintable (contents, TRUE);
g_object_connect (contents,
"signal::draw", canvas_draw, NULL,

View File

@@ -1589,6 +1589,16 @@ scale_format_value (GtkScale *scale, gdouble value)
return g_strdup_printf ("%0.*f", 1, value);
}
static void
adjustment3_value_changed (GtkAdjustment *adj, GtkProgressBar *pbar)
{
double fraction;
fraction = gtk_adjustment_get_value (adj) / (gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj));
gtk_progress_bar_set_fraction (pbar, fraction);
}
static void
activate (GApplication *app)
{
@@ -1861,6 +1871,12 @@ activate (GApplication *app)
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
g_object_set_data (G_OBJECT (widget), "decrease_button", widget2);
adj = (GtkAdjustment *)gtk_builder_get_object (builder, "adjustment3");
widget = (GtkWidget *)gtk_builder_get_object (builder, "progressbar1");
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "progressbar2");
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget);
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget2);
gtk_widget_show_all (GTK_WIDGET (window));
g_object_unref (builder);

View File

@@ -103,8 +103,9 @@
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
<property name="lower">0</property>
<property name="upper">4</property>
<property name="value">1</property>
<property name="value">2</property>
<property name="step_increment">1</property>
<property name="page_increment">1</property>
</object>

View File

@@ -53,7 +53,6 @@
<reference>
<title>Deprecated</title>
<xi:include href="xml/colors.xml" />
<xi:include href="xml/gdkdevicemanager.xml" />
</reference>

View File

@@ -114,6 +114,8 @@ gdk_display_put_event
gdk_display_has_pending
gdk_display_set_double_click_time
gdk_display_set_double_click_distance
gdk_display_is_rgba
gdk_display_is_composited
gdk_display_supports_cursor_color
gdk_display_supports_cursor_alpha
gdk_display_get_default_cursor_size
@@ -176,13 +178,9 @@ gdk_display_manager_get_type
<TITLE>GdkScreen</TITLE>
GdkScreen
gdk_screen_get_default
gdk_screen_get_system_visual
gdk_screen_get_rgba_visual
gdk_screen_is_composited
gdk_screen_get_root_window
gdk_screen_get_display
gdk_screen_get_number
gdk_screen_list_visuals
gdk_screen_get_toplevel_windows
gdk_screen_get_n_monitors
gdk_screen_get_primary_monitor
@@ -215,28 +213,9 @@ gdk_screen_get_type
<SECTION>
<TITLE>Pixbufs</TITLE>
<FILE>pixbufs</FILE>
gdk_pixbuf_get_from_window
gdk_pixbuf_get_from_surface
</SECTION>
<SECTION>
<TITLE>Colors</TITLE>
<FILE>colors</FILE>
GdkColor
gdk_color_copy
gdk_color_free
gdk_color_parse
gdk_color_equal
gdk_color_hash
gdk_color_to_string
<SUBSECTION Standard>
GDK_TYPE_COLOR
<SUBSECTION Private>
gdk_color_get_type
</SECTION>
<SECTION>
<TITLE>RGBA Colors</TITLE>
<FILE>rgba_colors</FILE>
@@ -295,9 +274,9 @@ GdkGravity
GdkAnchorHints
GdkWindowEdge
GdkWindowTypeHint
GdkWindowAttr
GdkWindowAttributesType
gdk_window_new
gdk_window_new_toplevel
gdk_window_new_popup
gdk_window_new_temp
gdk_window_new_child
gdk_window_new_input
gdk_window_destroy
@@ -378,7 +357,6 @@ gdk_window_get_frame_clock
<SUBSECTION>
gdk_window_set_user_data
gdk_window_set_override_redirect
gdk_window_set_accept_focus
gdk_window_get_accept_focus
gdk_window_set_focus_on_map
@@ -559,7 +537,6 @@ gdk_cairo_get_clip_rectangle
gdk_cairo_get_drawing_context
gdk_cairo_set_source_rgba
gdk_cairo_set_source_pixbuf
gdk_cairo_set_source_window
gdk_cairo_rectangle
gdk_cairo_region
gdk_cairo_region_create_from_surface
@@ -1194,6 +1171,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_window_new_subsurface
gdk_wayland_window_get_wl_surface
gdk_wayland_window_set_use_custom_surface
GdkWaylandWindowExported

View File

@@ -54,7 +54,6 @@ GskBlendMode
gsk_render_node_set_blend_mode
GskScalingFilter
gsk_render_node_set_scaling_filters
gsk_render_node_get_scale_factor
gsk_render_node_set_name
gsk_value_set_render_node
gsk_value_take_render_node

View File

@@ -31,37 +31,49 @@ IGNORE_HFILES = \
gtkapplicationprivate.h \
gtkbindingsprivate.h \
gtkbitmaskprivate.h \
gtkboxgadgetprivate.h \
gtkboxprivate.h \
gtkbuilderprivate.h \
gtkbuiltiniconprivate.h \
gtkbuttonprivate.h \
gtkcairoblurprivate.h \
gtkcellareaboxcontextprivate.h \
gtkcheckbuttonprivate.h \
gtkclipboardprivate.h \
gtkcolorchooserprivate.h \
gtkcoloreditorprivate.h \
gtkcolorplaneprivate.h \
gtkcolorscaleprivate.h \
gtkcolorswatchprivate.h \
gtkcolorutils.h \
gtkcomboboxprivate.h \
gtkcomposetable.h \
gtkcontainerprivate.h \
gtkcssanimatedstyleprivate.h \
gtkcssanimationprivate.h \
gtkcssarrayvalueprivate.h \
gtkcssbgsizevalueprivate.h \
gtkcssbordervalueprivate.h \
gtkcsscalcvalueprivate.h \
gtkcsscolorvalueprivate.h \
gtkcsscornervalueprivate.h \
gtkcsscustomgadgetprivate.h \
gtkcsscustompropertyprivate.h \
gtkcssdimensionvalueprivate.h \
gtkcsseasevalueprivate.h \
gtkcssenginevalueprivate.h \
gtkcssenumvalueprivate.h \
gtkcssgadgetprivate.h \
gtkcssiconthemevalueprivate.h \
gtkcssimagebuiltinprivate.h \
gtkcssimagecrossfadeprivate.h \
gtkcssimagefallbackprivate.h \
gtkcssimagegradientprivate.h \
gtkcssimageiconthemeprivate.h \
gtkcssimagelinearprivate.h \
gtkcssimageradialprivate.h \
gtkcssimageprivate.h \
gtkcssimagerecolorprivate.h \
gtkcssimagescaledprivate.h \
gtkcssimagesurfaceprivate.h \
gtkcssimageurlprivate.h \
@@ -73,8 +85,10 @@ IGNORE_HFILES = \
gtkcsslookupprivate.h \
gtkcssmatcherprivate.h \
gtkcssnodeprivate.h \
gtkcssnodestylecacheprivate.h \
gtkcssnodedeclarationprivate.h \
gtkcssnumbervalueprivate.h \
gtkcsspalettevalueprivate.h \
gtkcsspathnodeprivate.h \
gtkcssparserprivate.h \
gtkcsspositionvalueprivate.h \
@@ -88,6 +102,7 @@ IGNORE_HFILES = \
gtkcssshorthandpropertyprivate.h\
gtkcssstaticstyleprivate.h \
gtkcssstringvalueprivate.h \
gtkcssstylechangeprivate.h \
gtkcssstylefuncsprivate.h \
gtkcssstyleprivate.h \
gtkcssstylepropertyprivate.h \
@@ -99,9 +114,13 @@ IGNORE_HFILES = \
gtkcssunsetvalueprivate.h \
gtkcssvalueprivate.h \
gtkcsswidgetnodeprivate.h \
gtkcsswin32sizevalueprivate.h \
gtkdebugupdatesprivate.h \
gtkdialogprivate.h \
gtkdndprivate.h \
gtkentryprivate.h \
gtkeventcontrollerprivate.h \
gtkfilechoosernativeprivate.h \
gtkfilechooserprivate.h \
gtkfilechooserwidgetprivate.h \
gtkfontchooserprivate.h \
@@ -116,9 +135,13 @@ IGNORE_HFILES = \
gtkgesturezoomprivate.h \
gtkheaderbarprivate.h \
gtkhslaprivate.h \
gtkiconprivate.h \
gtkiconhelperprivate.h \
gtkiconthemeprivate.h \
gtkiconviewprivate.h \
gtkimagedefinitionprivate.h \
gtkimageprivate.h \
gtkimcontextsimpleprivate.h \
gtkimmoduleprivate.h \
gtklabelprivate.h \
gtklockbuttonprivate.h \
@@ -138,6 +161,7 @@ IGNORE_HFILES = \
gtkprinter-private.h \
gtkprintoperation-private.h \
gtkprivate.h \
gtkprogresstrackerprivate.h \
gtkrangeprivate.h \
gtkrecentchooserprivate.h \
gtkrenderbackgroundprivate.h \
@@ -154,25 +178,31 @@ IGNORE_HFILES = \
gtksearchentryprivate.h \
gtkselectionprivate.h \
gtksettingsprivate.h \
gtkshortcutsshortcutprivate.h \
gtkshortcutswindowprivate.h \
gtksidebarrowprivate.h \
gtksizegroup-private.h \
gtksizerequestcacheprivate.h \
gtksnapshotprivate.h \
gtkstyleanimationprivate.h \
gtkstylecascadeprivate.h \
gtkstylecontextprivate.h \
gtkstylepropertyprivate.h \
gtkstyleproviderprivate.h \
gtktextattributes.h \
gtktextattributesprivate.h \
gtktextchildprivate.h \
gtktexthandleprivate.h \
gtktextiterprivate.h \
gtktextmarkprivate.h \
gtktexttagprivate.h \
gtktextviewprivate.h \
gtktogglebuttonprivate.h \
gtktoolbarprivate.h \
gtktoolpaletteprivate.h \
gtktooltipprivate.h \
gtktooltipwindowprivate.h \
gtkutilsprivate.h \
gtktreeprivate.h \
gtkwidgetprivate.h \
gtkwin32themeprivate.h \
@@ -219,6 +249,8 @@ IGNORE_HFILES = \
gtkprinteroption.h \
gtkprinteroptionset.h \
gtkprinteroptionwidget.h \
gtkprinter-private.h \
gtkprintoperation-portal.h \
gtkprint-win32.h \
gtkprintutils.h \
gtkprivate.h \
@@ -246,7 +278,10 @@ IGNORE_HFILES = \
gtktreedatalist.h \
gtktreemenu.h \
gtktypebuiltins.h \
gtkwidgetpathprivate.h \
gtkwindow-decorate.h \
gtkwin32drawprivate.h \
gtkwin32themeprivate.h \
xdgmime \
xembed.h
@@ -277,7 +312,6 @@ MKHTML_OPTIONS="--path=\"$(abs_srcdir):$(top_srcdir)/examples\""
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
broadway.xml \
broadwayd.xml \
building.sgml \
compiling.sgml \
css-overview.xml \
@@ -285,6 +319,7 @@ content_files = \
drawing-model.xml \
getting_started.xml \
glossary.xml \
gtk4-broadwayd.xml \
gtk4-demo-application.xml \
gtk4-demo.xml \
gtk4-icon-browser.xml \
@@ -485,17 +520,17 @@ EXTRA_DIST += version.xml.in gtk4.types.in
########################################################################
man_MANS = \
gtk4-query-immodules.1 \
gtk4-update-icon-cache.1 \
gtk4-encode-symbolic-svg.1 \
gtk4-launch.1 \
gtk4-broadwayd.1 \
gtk4-builder-tool.1 \
gtk4-demo.1 \
gtk4-demo-application.1 \
gtk4-widget-factory.1 \
gtk4-encode-symbolic-svg.1 \
gtk4-icon-browser.1 \
broadwayd.1 \
gtk4-builder-tool.1 \
gtk4-query-settings.1
gtk4-launch.1 \
gtk4-query-immodules.1 \
gtk4-query-settings.1 \
gtk4-update-icon-cache.1 \
gtk4-widget-factory.1
if ENABLE_MAN

View File

@@ -682,7 +682,6 @@ button {
Gradients are images that smoothly fades from one color to another. CSS
provides ways to specify repeating and non-repeating linear and radial
gradients. Radial gradients can be circular, or axis-aligned ellipses.
In addition to CSS gradients, GTK+ has its own -gtk-gradient extensions.
</para>
<para>
@@ -734,76 +733,9 @@ label {
GTK+ extends the CSS syntax for images and also uses it for specifying icons.
</para>
<literallayout><code>〈gtk image〉 = 〈gtk gradient〉 | 〈themed icon〉 | 〈scaled image〉 | 〈recolored image〉 | 〈win32 theme part〉</code>
<literallayout><code>〈gtk image〉 = 〈themed icon〉 | 〈scaled image〉 | 〈recolored image〉 | 〈win32 theme part〉</code>
</literallayout>
<para>
GTK+ supports an alternative syntax for linear and radial gradients (which
was implemented before CSS gradients were supported).
</para>
<literallayout><code>〈gtk gradient〉 = 〈gtk linear gradient〉 | 〈gtk radial gradient〉</code>
<code>〈gtk linear gradient〉 = -gtk-gradient(linear,</code>
<code> [ 〈x position〉 〈y position〉 , ]{2}</code>
<code> 〈gtk color stops〉 )</code>
<code>〈gtk radial gradient〉 = -gtk-gradient(radial,</code>
<code> [ 〈x position〉 〈y position〉 , 〈radius〉 , ]{2}</code>
<code> 〈gtk color stops〉 )</code>
<code>〈x position〉 = left | right | center | 〈number〉</code>
<code>〈y position〉 = top | bottom | center | 〈number〉</code>
<code>〈radius 〉 = 〈number〉</code>
<code>〈gtk color stops〉 = 〈gtk color stop〉 [ , 〈gtk color stop〉 ]+</code>
<code>〈gtk color stop〉 = color-stop( 〈number〉 , 〈color〉 ) | from( 〈color〉 ) | to( 〈color〉 )</code>
</literallayout>
<para>
The numbers used to specify x and y positions, radii, as well as the
positions of color stops, must be between 0 and 1. The keywords for for
x and y positions (left, right, top, bottom, center), map to numeric
values of 0, 1 and 0.5 in the obvious way. Color stops using the from() and
to() syntax are abbreviations for color-stop with numeric positions of
0 and 1, respectively.
</para>
<example>
<title>Linear gradients</title>
<programlisting><![CDATA[
button {
background-image: -gtk-gradient (linear,
left top, right bottom,
from(@yellow), to(@blue));
}
label {
background-image: -gtk-gradient (linear,
0 0, 0 1,
color-stop(0, @yellow),
color-stop(0.2, @blue),
color-stop(1, #0f0));
}
]]></programlisting>
</example>
<example>
<title>Radial gradients</title>
<programlisting><![CDATA[
button {
background-image: -gtk-gradient (radial,
center center, 0,
center center, 1,
from(@yellow), to(@green));
}
label {
background-image: -gtk-gradient (radial,
0.4 0.4, 0.1,
0.6 0.6, 0.7,
color-stop(0, #f00),
color-stop(0.1, $a0f),
color-stop(0.2, @yellow),
color-stop(1, @green));
}
]]></programlisting>
</example>
<para>
GTK+ has extensive support for loading icons from icon themes. It is
accessible from CSS with the -gtk-icontheme syntax.

View File

@@ -456,9 +456,15 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
</tgroup>
</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> skewX( 〈angle〉 ) | skewY( 〈angle〉 )</code>
<literallayout><code>〈transform〉 = matrix( 〈number〉 [ , 〈number〉 ]{5} ) |</code>
<code> matrix3d( 〈number〉 [ , 〈number〉 ]{15} ) |</code>
<code> translate( 〈length〉, 〈length〉 ) | translate3d( 〈length〉, 〈length〉, 〈length〉 ) |</code>
<code> translateX( 〈length〉 ) | translateY( 〈length〉 ) | translateZ( 〈length〉 ) |</code>
<code> scale( 〈number〉[ , 〈number〉 ]? ) | scale3d( 〈number〉, 〈number〉, 〈number〉) |</code>
<code> scaleX( 〈number〉 ) | scaleY( 〈number〉 ) | scaleZ( 〈number〉 ) |</code>
<code> rotate( 〈angle〉 ) | rotate3d( 〈number〉, 〈number〉, 〈number〉, 〈angle〉 ) |</code>
<code> rotateX( 〈angle〉 ) | rotateY( 〈angle〉 ) | rotateZ( 〈angle〉 ) |</code>
<code> skew( 〈angle〉 [ , 〈angle〉 ]? ) | skewX( 〈angle〉 ) | skewY( 〈angle〉 )</code>
<code>〈color palette〉 = default | 〈name〉 〈color〉 [ , 〈name〉 〈color〉 ]*</code>
</literallayout>
@@ -1107,7 +1113,7 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
<entry></entry>
<entry><ulink url="http://www.w3.org/TR/2011/REC-CSS2-20110607/colors.html#propdef-background-image">CSS2</ulink>,
<ulink url="http://www.w3.org/TR/css3-background/#background-image">CSS3</ulink></entry>
<entry>not supported: urls without quotes, CSS radial gradients, colors in crossfades</entry>
<entry>not supported: urls without quotes, colors in crossfades</entry>
</row>
<row>
<entry>background-blend-mode</entry>

View File

@@ -259,6 +259,7 @@
<xi:include href="xml/gtktooltip.xml" />
<xi:include href="xml/gtkviewport.xml" />
<xi:include href="xml/gtkaccessible.xml" />
<xi:include href="xml/gtksnapshot.xml" />
</chapter>
<chapter id="AbstractObjects">
@@ -363,7 +364,7 @@
<xi:include href="gtk4-builder-tool.xml" />
<xi:include href="gtk4-launch.xml" />
<xi:include href="gtk4-query-settings.xml" />
<xi:include href="broadwayd.xml" />
<xi:include href="gtk4-broadwayd.xml" />
</part>
<part id="platform-support">
@@ -437,6 +438,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-90" role="3.90">
<title>Index of new symbols in 3.90</title>
<xi:include href="xml/api-index-3.90.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>

View File

@@ -2,10 +2,10 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="broadwayd">
<refentry id="gtk4-broadwayd">
<refentryinfo>
<title>broadwayd</title>
<title>gtk4-broadwayd</title>
<productname>GTK+</productname>
<authorgroup>
<author>
@@ -17,19 +17,19 @@
</refentryinfo>
<refmeta>
<refentrytitle>broadwayd</refentrytitle>
<refentrytitle>gtk4-broadwayd</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>
<refnamediv>
<refname>broadwayd</refname>
<refname>gtk4-broadwayd</refname>
<refpurpose>Broadway display server</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>broadwayd</command>
<command>gtk4-broadwayd</command>
<arg choice="opt">--port <replaceable>PORT</replaceable></arg>
<arg choice="opt">--address <replaceable>ADDRESS</replaceable></arg>
<arg choice="opt">--unixsocket <replaceable>ADDRESS</replaceable></arg>
@@ -39,15 +39,15 @@
<refsect1><title>Description</title>
<para>
<command>broadwayd</command> is a display server for the Broadway
<command>gtk4-broadwayd</command> is a display server for the Broadway
GDK backend. It allows multiple GTK+ applications to display their
windows in the same web browser, by connecting to broadwayd.
windows in the same web browser, by connecting to gtk4-broadwayd.
</para>
<para>
When using broadwayd, specify the display number to use, prefixed
When using gtk4-broadwayd, specify the display number to use, prefixed
with a colon, similar to X. The default display number is 0.
<programlisting>
broadwayd :5
gtk4-broadwayd :5
</programlisting>
Then point your web browser at <literal>http://127.0.0.1:8085</literal>.
Start your applications like this:

View File

@@ -57,7 +57,8 @@
<varlistentry>
<term><option>simplify</option></term>
<listitem><para>Simplifies the .ui file by removing properties that
are set to their default values and write the resulting XML to stdout.</para></listitem>
are set to their default values and write the resulting XML to stdout,
or back to the input file.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>enumerate</option></term>
@@ -71,6 +72,16 @@
</variablelist>
</refsect1>
<refsect1><title>Simplify Options</title>
<para>The <option>simplify</option> command accepts the following options:</para>
<variablelist>
<varlistentry>
<term><option>--replace</option></term>
<listitem><para>Write the content back to the .ui file instead of stdout.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1><title>Preview Options</title>
<para>The <option>preview</option> command accepts the following options:</para>
<variablelist>

View File

@@ -250,24 +250,6 @@ GtkAssistantPrivate
gtk_assistant_get_type
</SECTION>
<SECTION>
<FILE>gtkarrow</FILE>
<TITLE>GtkArrow</TITLE>
GtkArrow
gtk_arrow_new
gtk_arrow_set
<SUBSECTION Standard>
GTK_ARROW
GTK_IS_ARROW
GTK_TYPE_ARROW
GTK_ARROW_CLASS
GTK_IS_ARROW_CLASS
GTK_ARROW_GET_CLASS
<SUBSECTION Private>
GtkArrowPrivate
gtk_arrow_get_type
</SECTION>
<SECTION>
<FILE>gtkaspectframe</FILE>
<TITLE>GtkAspectFrame</TITLE>
@@ -514,28 +496,15 @@ gtk_button_new
gtk_button_new_with_label
gtk_button_new_with_mnemonic
gtk_button_new_from_icon_name
gtk_button_pressed
gtk_button_released
gtk_button_clicked
gtk_button_enter
gtk_button_leave
gtk_button_set_relief
gtk_button_get_relief
gtk_button_get_label
gtk_button_set_label
gtk_button_get_use_underline
gtk_button_set_use_underline
gtk_button_set_focus_on_click
gtk_button_get_focus_on_click
gtk_button_set_alignment
gtk_button_get_alignment
gtk_button_set_image
gtk_button_get_image
gtk_button_set_image_position
gtk_button_get_image_position
gtk_button_set_always_show_image
gtk_button_get_always_show_image
gtk_button_get_event_window
gtk_button_set_icon_name
gtk_button_get_icon_name
<SUBSECTION Standard>
GTK_BUTTON
@@ -641,8 +610,6 @@ gtk_check_menu_item_get_type
GtkColorButton
gtk_color_button_new
gtk_color_button_new_with_rgba
gtk_color_button_set_rgba
gtk_color_button_get_rgba
gtk_color_button_set_title
gtk_color_button_get_title
<SUBSECTION Standard>
@@ -657,64 +624,6 @@ gtk_color_button_get_type
GtkColorButtonPrivate
</SECTION>
<SECTION>
<FILE>gtkcolorsel</FILE>
<TITLE>GtkColorSelection</TITLE>
GtkColorSelection
GtkColorSelectionClass
gtk_color_selection_new
gtk_color_selection_set_has_opacity_control
gtk_color_selection_get_has_opacity_control
gtk_color_selection_set_has_palette
gtk_color_selection_get_has_palette
gtk_color_selection_get_current_alpha
gtk_color_selection_set_current_alpha
gtk_color_selection_get_current_color
gtk_color_selection_set_current_color
gtk_color_selection_get_previous_alpha
gtk_color_selection_set_previous_alpha
gtk_color_selection_get_previous_color
gtk_color_selection_set_previous_color
gtk_color_selection_get_current_rgba
gtk_color_selection_set_current_rgba
gtk_color_selection_get_previous_rgba
gtk_color_selection_set_previous_rgba
gtk_color_selection_is_adjusting
gtk_color_selection_palette_from_string
gtk_color_selection_palette_to_string
GtkColorSelectionChangePaletteFunc
gtk_color_selection_set_change_palette_with_screen_hook
GtkColorSelectionChangePaletteWithScreenFunc
<SUBSECTION Standard>
GTK_COLOR_SELECTION
GTK_IS_COLOR_SELECTION
GTK_TYPE_COLOR_SELECTION
GTK_COLOR_SELECTION_CLASS
GTK_IS_COLOR_SELECTION_CLASS
GTK_COLOR_SELECTION_GET_CLASS
<SUBSECTION Private>
GtkColorSelectionPrivate
gtk_color_selection_get_type
</SECTION>
<SECTION>
<FILE>gtkcolorseldlg</FILE>
<TITLE>GtkColorSelectionDialog</TITLE>
GtkColorSelectionDialog
gtk_color_selection_dialog_new
gtk_color_selection_dialog_get_color_selection
<SUBSECTION Standard>
GTK_COLOR_SELECTION_DIALOG
GTK_IS_COLOR_SELECTION_DIALOG
GTK_TYPE_COLOR_SELECTION_DIALOG
GTK_COLOR_SELECTION_DIALOG_CLASS
GTK_IS_COLOR_SELECTION_DIALOG_CLASS
GTK_COLOR_SELECTION_DIALOG_GET_CLASS
<SUBSECTION Private>
GtkColorSelectionDialogPrivate
gtk_color_selection_dialog_get_type
</SECTION>
<SECTION>
<FILE>gtkcombobox</FILE>
<TITLE>GtkComboBox</TITLE>
@@ -748,10 +657,6 @@ gtk_combo_box_popdown
gtk_combo_box_get_popup_accessible
gtk_combo_box_get_row_separator_func
gtk_combo_box_set_row_separator_func
gtk_combo_box_set_add_tearoffs
gtk_combo_box_get_add_tearoffs
gtk_combo_box_set_title
gtk_combo_box_get_title
gtk_combo_box_set_button_sensitivity
gtk_combo_box_get_button_sensitivity
gtk_combo_box_get_has_entry
@@ -805,7 +710,6 @@ gtk_combo_box_text_get_type
<TITLE>GtkContainer</TITLE>
GtkContainer
GtkContainerClass
GTK_IS_RESIZE_CONTAINER
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID
gtk_container_add
gtk_container_remove
@@ -820,7 +724,6 @@ gtk_container_get_focus_vadjustment
gtk_container_set_focus_vadjustment
gtk_container_get_focus_hadjustment
gtk_container_set_focus_hadjustment
gtk_container_resize_children
gtk_container_child_type
gtk_container_child_get
gtk_container_child_set
@@ -873,8 +776,6 @@ gtk_dialog_get_widget_for_response
gtk_dialog_get_action_area
gtk_dialog_get_content_area
gtk_dialog_get_header_bar
<SUBSECTION>
gtk_alternative_dialog_button_order
<SUBSECTION Standard>
GTK_DIALOG
@@ -893,6 +794,12 @@ gtk_dialog_get_type
<TITLE>GtkDrawingArea</TITLE>
GtkDrawingArea
gtk_drawing_area_new
gtk_drawing_area_get_content_width
gtk_drawing_area_set_content_width
gtk_drawing_area_get_content_height
gtk_drawing_area_set_content_height
GtkDrawingAreaDrawFunc
gtk_drawing_area_set_draw_func
<SUBSECTION Standard>
GTK_DRAWING_AREA
GTK_IS_DRAWING_AREA
@@ -942,7 +849,6 @@ gtk_entry_set_buffer
gtk_entry_set_text
gtk_entry_get_text
gtk_entry_get_text_length
gtk_entry_get_text_area
gtk_entry_set_visibility
gtk_entry_get_visibility
gtk_entry_set_invisible_char
@@ -1221,6 +1127,10 @@ gtk_file_chooser_select_file
gtk_file_chooser_set_current_folder_file
gtk_file_chooser_set_file
gtk_file_chooser_unselect_file
gtk_file_chooser_add_choice
gtk_file_chooser_remove_choice
gtk_file_chooser_set_choice
gtk_file_chooser_get_choice
<SUBSECTION Standard>
GTK_FILE_CHOOSER
GTK_IS_FILE_CHOOSER
@@ -1648,6 +1558,7 @@ gtk_im_context_get_type
GtkIMContextSimple
gtk_im_context_simple_new
gtk_im_context_simple_add_table
gtk_im_context_simple_add_compose_file
GTK_MAX_COMPOSE_LEN
<SUBSECTION Standard>
GTK_IM_CONTEXT_SIMPLE
@@ -1832,11 +1743,9 @@ gtk_menu_set_accel_group
gtk_menu_get_accel_group
gtk_menu_set_accel_path
gtk_menu_get_accel_path
gtk_menu_set_title
gtk_menu_get_title
gtk_menu_set_monitor
gtk_menu_get_monitor
gtk_menu_get_tearoff_state
gtk_menu_place_on_monitor
gtk_menu_set_reserve_toggle_size
gtk_menu_get_reserve_toggle_size
<SUBSECTION>
@@ -1844,7 +1753,6 @@ gtk_menu_popdown
gtk_menu_reposition
gtk_menu_get_active
gtk_menu_set_active
gtk_menu_set_tearoff_state
gtk_menu_attach_to_widget
gtk_menu_detach
gtk_menu_get_attach_widget
@@ -1924,8 +1832,6 @@ GtkMenuItemClass
gtk_menu_item_new
gtk_menu_item_new_with_label
gtk_menu_item_new_with_mnemonic
gtk_menu_item_set_right_justified
gtk_menu_item_get_right_justified
gtk_menu_item_get_label
gtk_menu_item_set_label
gtk_menu_item_get_use_underline
@@ -2147,6 +2053,7 @@ GTK_IS_PANED_CLASS
GTK_PANED_GET_CLASS
<SUBSECTION Private>
GtkPanedPrivate
gtk_paned_get_type
</SECTION>
@@ -2295,11 +2202,9 @@ gtk_range_set_upper_stepper_sensitivity
gtk_range_get_upper_stepper_sensitivity
gtk_range_get_flippable
gtk_range_set_flippable
gtk_range_get_min_slider_size
gtk_range_get_range_rect
gtk_range_get_slider_range
gtk_range_get_slider_size_fixed
gtk_range_set_min_slider_size
gtk_range_set_slider_size_fixed
<SUBSECTION Standard>
@@ -2747,8 +2652,6 @@ gtk_rc_property_parse_flags
gtk_rc_property_parse_requisition
gtk_rc_property_parse_border
gtk_settings_reset_property
GtkIMPreeditStyle
GtkIMStatusStyle
<SUBSECTION Standard>
GtkSettingsClass
GTK_IS_SETTINGS
@@ -2908,24 +2811,6 @@ GtkLevelBarPrivate
gtk_level_bar_get_type
</SECTION>
<SECTION>
<FILE>gtktearoffmenuitem</FILE>
<TITLE>GtkTearoffMenuItem</TITLE>
GtkTearoffMenuItem
GtkTearoffMenuItemClass
gtk_tearoff_menu_item_new
<SUBSECTION Standard>
GTK_TEAROFF_MENU_ITEM
GTK_IS_TEAROFF_MENU_ITEM
GTK_TYPE_TEAROFF_MENU_ITEM
GTK_TEAROFF_MENU_ITEM_CLASS
GTK_IS_TEAROFF_MENU_ITEM_CLASS
GTK_TEAROFF_MENU_ITEM_GET_CLASS
<SUBSECTION Private>
GtkTearoffMenuItemPrivate
gtk_tearoff_menu_item_get_type
</SECTION>
<SECTION>
<FILE>gtktextbuffer</FILE>
<TITLE>GtkTextBuffer</TITLE>
@@ -3064,7 +2949,6 @@ gtk_text_iter_inside_sentence
gtk_text_iter_is_cursor_position
gtk_text_iter_get_chars_in_line
gtk_text_iter_get_bytes_in_line
gtk_text_iter_get_attributes
gtk_text_iter_get_language
gtk_text_iter_is_end
gtk_text_iter_is_start
@@ -3157,13 +3041,6 @@ gtk_text_tag_get_priority
gtk_text_tag_set_priority
gtk_text_tag_event
gtk_text_tag_changed
GtkTextAttributes
GtkTextAppearance
gtk_text_attributes_new
gtk_text_attributes_copy
gtk_text_attributes_copy_values
gtk_text_attributes_unref
gtk_text_attributes_ref
<SUBSECTION Standard>
GTK_TEXT_TAG
GTK_IS_TEXT_TAG
@@ -3171,11 +3048,9 @@ GTK_TYPE_TEXT_TAG
GTK_TEXT_TAG_CLASS
GTK_IS_TEXT_TAG_CLASS
GTK_TEXT_TAG_GET_CLASS
GTK_TYPE_TEXT_ATTRIBUTES
<SUBSECTION Private>
GtkTextTagPrivate
gtk_text_tag_get_type
gtk_text_attributes_get_type
</SECTION>
<SECTION>
@@ -3276,7 +3151,6 @@ gtk_text_view_set_tabs
gtk_text_view_get_tabs
gtk_text_view_set_accepts_tab
gtk_text_view_get_accepts_tab
gtk_text_view_get_default_attributes
gtk_text_view_im_context_filter_keypress
gtk_text_view_reset_im_context
gtk_text_view_set_input_purpose
@@ -3307,30 +3181,6 @@ gtk_text_child_anchor_get_type
GtkTextBTree
</SECTION>
<SECTION>
<FILE>gtktoggleaction</FILE>
<TITLE>GtkToggleAction</TITLE>
GtkToggleAction
gtk_toggle_action_new
gtk_toggle_action_toggled
gtk_toggle_action_set_active
gtk_toggle_action_get_active
gtk_toggle_action_set_draw_as_radio
gtk_toggle_action_get_draw_as_radio
<SUBSECTION Standard>
GTK_TYPE_TOGGLE_ACTION
GTK_TOGGLE_ACTION
GTK_TOGGLE_ACTION_CLASS
GTK_IS_TOGGLE_ACTION
GTK_IS_TOGGLE_ACTION_CLASS
GTK_TOGGLE_ACTION_GET_CLASS
GtkToggleActionClass
<SUBSECTION Private>
gtk_toggle_action_get_type
GtkToggleActionPrivate
</SECTION>
<SECTION>
<FILE>gtktogglebutton</FILE>
<TITLE>GtkToggleButton</TITLE>
@@ -4146,7 +3996,6 @@ gtk_cell_view_set_model
gtk_cell_view_get_model
gtk_cell_view_set_displayed_row
gtk_cell_view_get_displayed_row
gtk_cell_view_set_background_color
gtk_cell_view_set_background_rgba
gtk_cell_view_set_draw_sensitive
gtk_cell_view_get_draw_sensitive
@@ -4601,6 +4450,30 @@ GTK_VOLUME_BUTTON_GET_CLASS
gtk_volume_button_get_type
</SECTION>
<SECTION>
<FILE>gtksnapshot</FILE>
<TITLE>GtkSnapshot</TITLE>
GtkSnapshot
gtk_snapshot_get_renderer
gtk_snapshot_push
gtk_snapshot_push_node
gtk_snapshot_push_cairo_node
gtk_snapshot_pop
gtk_snapshot_set_transform
gtk_snapshot_transform
gtk_snapshot_translate_2d
gtk_snapshot_append_node
gtk_snapshot_append
gtk_snapshot_append_cairo_node
gtk_snapshot_clips_rect
gtk_snapshot_render_background
gtk_snapshot_render_frame
gtk_snapshot_render_focus
gtk_snapshot_render_layout
gtk_snapshot_render_insertion_cursor
gtk_snapshot_render_icon
</SECTION>
<SECTION>
<FILE>gtkwidget</FILE>
<TITLE>GtkWidget</TITLE>
@@ -4609,7 +4482,6 @@ GtkWidgetClass
GtkCallback
GtkRequisition
GtkAllocation
GtkWidgetHelpType
gtk_widget_new
gtk_widget_destroy
gtk_widget_in_destruction
@@ -4662,16 +4534,9 @@ gtk_widget_set_device_enabled
gtk_widget_get_device_enabled
gtk_widget_get_toplevel
gtk_widget_get_ancestor
gtk_widget_get_visual
gtk_widget_set_visual
gtk_widget_is_ancestor
gtk_widget_translate_coordinates
gtk_widget_hide_on_delete
gtk_widget_set_style
gtk_widget_ensure_style
gtk_widget_get_style
gtk_widget_reset_rc_styles
gtk_widget_get_default_style
gtk_widget_set_direction
GtkTextDirection
gtk_widget_get_direction
@@ -4679,21 +4544,6 @@ gtk_widget_set_default_direction
gtk_widget_get_default_direction
gtk_widget_shape_combine_region
gtk_widget_input_shape_combine_region
gtk_widget_path
gtk_widget_class_path
gtk_widget_override_background_color
gtk_widget_override_color
gtk_widget_override_font
gtk_widget_override_symbolic_color
gtk_widget_override_cursor
gtk_widget_modify_style
gtk_widget_get_modifier_style
gtk_widget_modify_fg
gtk_widget_modify_bg
gtk_widget_modify_text
gtk_widget_modify_base
gtk_widget_modify_font
gtk_widget_modify_cursor
gtk_widget_create_pango_context
gtk_widget_get_pango_context
gtk_widget_set_font_options
@@ -4701,22 +4551,17 @@ gtk_widget_get_font_options
gtk_widget_set_font_map
gtk_widget_get_font_map
gtk_widget_create_pango_layout
gtk_widget_render_icon
gtk_widget_render_icon_pixbuf
gtk_widget_queue_draw_area
gtk_widget_queue_draw_region
gtk_widget_set_app_paintable
gtk_widget_set_redraw_on_allocate
gtk_widget_mnemonic_activate
gtk_widget_class_install_style_property
gtk_widget_class_find_style_property
gtk_widget_class_list_style_properties
gtk_widget_region_intersect
gtk_widget_send_focus_change
gtk_widget_style_get
gtk_widget_style_get_property
gtk_widget_style_get_valist
gtk_widget_style_attach
gtk_widget_class_set_accessible_type
gtk_widget_class_set_accessible_role
gtk_widget_get_accessible
@@ -4739,7 +4584,6 @@ gtk_widget_get_no_show_all
gtk_widget_list_mnemonic_labels
gtk_widget_add_mnemonic_label
gtk_widget_remove_mnemonic_label
gtk_widget_is_composited
gtk_widget_error_bell
gtk_widget_keynav_failed
gtk_widget_get_tooltip_markup
@@ -4764,7 +4608,6 @@ gtk_widget_get_allocated_baseline
gtk_widget_get_allocated_size
gtk_widget_get_clip
gtk_widget_set_clip
gtk_widget_get_app_paintable
gtk_widget_get_can_default
gtk_widget_set_can_default
gtk_widget_get_can_focus
@@ -4775,7 +4618,6 @@ gtk_widget_get_has_window
gtk_widget_set_has_window
gtk_widget_get_sensitive
gtk_widget_is_sensitive
GtkStateType
gtk_widget_get_visible
gtk_widget_is_visible
gtk_widget_set_visible
@@ -4786,7 +4628,6 @@ gtk_widget_has_default
gtk_widget_has_focus
gtk_widget_has_visible_focus
gtk_widget_has_grab
gtk_widget_has_rc_style
gtk_widget_is_drawable
gtk_widget_is_toplevel
gtk_widget_set_window
@@ -4796,7 +4637,6 @@ gtk_widget_set_support_multidevice
gtk_widget_get_support_multidevice
gtk_widget_set_realized
gtk_widget_get_realized
gtk_widget_set_mapped
gtk_widget_get_mapped
gtk_widget_device_is_shadowed
gtk_widget_get_modifier_mask
@@ -4896,7 +4736,6 @@ GtkWindowClass
GtkWindowType
gtk_window_new
gtk_window_set_title
gtk_window_set_wmclass
gtk_window_set_resizable
gtk_window_get_resizable
gtk_window_add_accel_group
@@ -4905,8 +4744,6 @@ gtk_window_activate_focus
gtk_window_activate_default
gtk_window_set_modal
gtk_window_set_default_size
gtk_window_set_default_geometry
gtk_window_set_geometry_hints
gtk_window_set_gravity
gtk_window_get_gravity
GtkWindowPosition
@@ -4985,10 +4822,7 @@ gtk_window_get_group
gtk_window_has_group
gtk_window_get_window_type
gtk_window_move
gtk_window_parse_geometry
gtk_window_reshow_with_initial_size
gtk_window_resize
gtk_window_resize_to_geometry
gtk_window_set_default_icon_list
gtk_window_set_default_icon
gtk_window_set_default_icon_from_file
@@ -5109,11 +4943,6 @@ gtk_get_micro_version
gtk_get_binary_age
gtk_get_interface_age
gtk_check_version
gtk_major_version
gtk_minor_version
gtk_micro_version
gtk_binary_age
gtk_interface_age
<SUBSECTION>
GTK_MAJOR_VERSION
@@ -5178,8 +5007,6 @@ GTK_STYLE_PROVIDER_PRIORITY_THEME
GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
GTK_STYLE_PROVIDER_PRIORITY_USER
gtk_style_provider_get_icon_factory
gtk_style_provider_get_style
gtk_style_provider_get_style_property
<SUBSECTION Standard>
GTK_TYPE_STYLE_PROVIDER
@@ -5228,7 +5055,6 @@ GTK_STYLE_CLASS_ERROR
GTK_STYLE_CLASS_EXPANDER
GTK_STYLE_CLASS_FRAME
GTK_STYLE_CLASS_FLAT
GTK_STYLE_CLASS_GRIP
GTK_STYLE_CLASS_HEADER
GTK_STYLE_CLASS_HIGHLIGHT
GTK_STYLE_CLASS_HORIZONTAL
@@ -5315,13 +5141,10 @@ gtk_style_context_get_border_color
gtk_style_context_get_border
gtk_style_context_get_padding
gtk_style_context_get_margin
gtk_style_context_get_font
gtk_style_context_state_is_running
gtk_style_context_lookup_color
gtk_style_context_remove_provider
gtk_style_context_remove_provider_for_screen
gtk_style_context_reset_widgets
gtk_style_context_set_background
gtk_style_context_restore
gtk_style_context_save
gtk_style_context_set_junction_sides
@@ -5351,7 +5174,6 @@ gtk_render_background
gtk_render_background_get_clip
gtk_render_check
gtk_render_expander
gtk_render_extension
gtk_render_focus
gtk_render_frame
gtk_render_frame_gap
@@ -5421,47 +5243,6 @@ gtk_css_provider_error_quark
gtk_css_section_get_type
</SECTION>
<SECTION>
<FILE>gtksymboliccolor</FILE>
<TITLE>GtkSymbolicColor</TITLE>
GtkSymbolicColor
gtk_symbolic_color_new_literal
gtk_symbolic_color_new_name
gtk_symbolic_color_new_shade
gtk_symbolic_color_new_alpha
gtk_symbolic_color_new_mix
gtk_symbolic_color_new_win32
gtk_symbolic_color_ref
gtk_symbolic_color_unref
gtk_symbolic_color_resolve
gtk_symbolic_color_to_string
<SUBSECTION Standard>
GTK_TYPE_SYMBOLIC_COLOR
<SUBSECTION Private>
gtk_symbolic_color_get_type
</SECTION>
<SECTION>
<FILE>gtkgradient</FILE>
<TITLE>GtkGradient</TITLE>
GtkGradient
gtk_gradient_new_linear
gtk_gradient_new_radial
gtk_gradient_add_color_stop
gtk_gradient_ref
gtk_gradient_unref
gtk_gradient_resolve
gtk_gradient_resolve_for_context
gtk_gradient_to_string
<SUBSECTION Standard>
GTK_TYPE_GRADIENT
gtk_gradient_get_type
</SECTION>
<SECTION>
<FILE>gtkselection</FILE>
<TITLE>Selections</TITLE>
@@ -5585,7 +5366,6 @@ GtkTargetFlags
GtkDragResult
<SUBSECTION Destination Side>
gtk_drag_dest_set
gtk_drag_dest_set_proxy
gtk_drag_dest_unset
gtk_drag_dest_find_target
gtk_drag_dest_get_target_list
@@ -5601,7 +5381,6 @@ gtk_drag_get_source_widget
gtk_drag_highlight
gtk_drag_unhighlight
<SUBSECTION Source Side>
gtk_drag_begin
gtk_drag_begin_with_coordinates
gtk_drag_cancel
gtk_drag_set_icon_widget
@@ -5641,7 +5420,6 @@ gtk_binding_entry_add_signal
gtk_binding_entry_add_signal_from_string
gtk_binding_entry_skip
gtk_binding_entry_remove
gtk_binding_set_add_path
</SECTION>
<SECTION>
@@ -5808,7 +5586,7 @@ GtkPrintOperationPrivate
<SECTION>
<INCLUDE>gtk/gtkprintunixdialog.h</INCLUDE>
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkprintunixdialog</FILE>
<TITLE>GtkPrintUnixDialog</TITLE>
GtkPrintUnixDialog
@@ -6155,7 +5933,7 @@ gtk_print_context_get_type
<SECTION>
<INCLUDE>gtk/gtkprintjob.h</INCLUDE>
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkprintjob</FILE>
<TITLE>GtkPrintJob</TITLE>
GtkPrintJob
@@ -6166,6 +5944,7 @@ gtk_print_job_get_printer
gtk_print_job_get_title
gtk_print_job_get_status
gtk_print_job_set_source_file
gtk_print_job_set_source_fd
gtk_print_job_get_surface
gtk_print_job_send
gtk_print_job_set_track_print_status
@@ -6206,7 +5985,7 @@ gtk_print_job_get_type
<SECTION>
<INCLUDE>gtk/gtkpagesetupunixdialog.h</INCLUDE>
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
<FILE>gtkpagesetupunixdialog</FILE>
<TITLE>GtkPageSetupUnixDialog</TITLE>
GtkPageSetupUnixDialog
@@ -6255,7 +6034,7 @@ gtk_mount_operation_get_parent
gtk_mount_operation_set_screen
gtk_mount_operation_get_screen
gtk_show_uri
gtk_show_uri_on_parent
gtk_show_uri_on_window
<SUBSECTION Standard>
GTK_IS_MOUNT_OPERATION
GTK_IS_MOUNT_OPERATION_CLASS
@@ -6895,8 +6674,6 @@ gtk_popover_set_constrain_to
gtk_popover_get_constrain_to
gtk_popover_set_modal
gtk_popover_get_modal
gtk_popover_set_transitions_enabled
gtk_popover_get_transitions_enabled
gtk_popover_set_default_widget
gtk_popover_get_default_widget
<SUBSECTION Standard>
@@ -7264,6 +7041,7 @@ GTK_GET_SHORTCUTS_WINDOW_CLASS
<SUBSECTION Private>
GtkShortcutsWindowClass
gtk_shortcuts_window_get_type
GTK_SHORTCUTS_WINDOW_GET_CLASS
</SECTION>
<SECTION>
@@ -7279,6 +7057,7 @@ GTK_GET_SHORTCUTS_SECTION_CLASS
<SUBSECTION Private>
GtkShortcutsSectionClass
gtk_shortcuts_section_get_type
GTK_SHORTCUTS_SECTION_GET_CLASS
</SECTION>
<SECTION>
@@ -7294,6 +7073,7 @@ GTK_GET_SHORTCUTS_GROUP_CLASS
<SUBSECTION Private>
GtkShortcutsGroupClass
gtk_shortcuts_group_get_type
GTK_SHORTCUTS_GROUP_GET_CLASS
</SECTION>
<SECTION>
@@ -7310,4 +7090,26 @@ GTK_GET_SHORTCUTS_SHORTCUT_CLASS
<SUBSECTION Private>
GtkShortcutsShortcutClass
gtk_shortcuts_shortcut_get_type
gtk_shortcuts_shortcut_update_accel
GTK_SHORTCUTS_SHORTCUT_GET_CLASS
</SECTION>
<SECTION>
<FILE>gtkshortcutlabel</FILE>
GtkShortcutLabel
gtk_shortcut_label_new
gtk_shortcut_label_get_accelerator
gtk_shortcut_label_get_disabled_text
gtk_shortcut_label_set_accelerator
gtk_shortcut_label_set_disabled_text
<SUBSECTION Private>
GtkShortcutLabelClass
gtk_shortcut_label_get_type
GTK_TYPE_SHORTCUT_LABEL
GTK_SHORTCUT_LABEL
GTK_SHORTCUT_LABEL_CLASS
GTK_SHORTCUT_LABEL_GET_CLASS
GTK_IS_SHORTCUT_LABEL
GTK_IS_SHORTCUT_LABEL_CLASS
</SECTION>

View File

@@ -52,6 +52,14 @@
</para>
</section>
<section>
<title>Do not use widget style properties</title>
<para>
Style properties do not exist in GTK+ 4. You should stop using them in
your custom CSS.
</para>
</section>
<section>
<title>Review your window creation flags</title>
<para>
@@ -98,6 +106,14 @@
</para>
</section>
<section>
<title>Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_window()</title>
<para>
These functions are not supported in GTK+ 4. Instead, either use backend-specific
APIs, or render your widgets using gtk_widget_render().
</para>
</section>
</section>
<section>
@@ -110,6 +126,17 @@
have been either impossible or impractical.
</para>
<section>
<title>Adapt to GdkWindow API changes</title>
<para>
The gdk_window_new() function has been replaced by a number of more
specialized constructors: gdk_window_new_toplevel(), gdk_window_new_popup(),
gdk_window_new_temp(), gdk_window_new_child(), gdk_window_new_input(),
gdk_wayland_window_new_subsurface(). Use the appropriate ones to create
your windows.
</para>
</section>
<section>
<title>Adapt to GtkStyleContext API changes</title>
<para>
@@ -121,6 +148,15 @@
</para>
</section>
<section>
<title>Adapt to GtkCssProvider API changes</title>
<para>
In GTK+ 4, the various #GtkCssProvider load functions have lost
their #GError argument. If you want to handle CSS loading errors,
use the #GtkCssProvider::parsing-error signal instead.
</para>
</section>
<section>
<title>Stop using GtkContainer::border-width</title>
<para>
@@ -133,7 +169,7 @@
<section>
<title>Adapt to GtkWidget's size request changes</title>
<para>
GTK+3 used five different virtual functions in GtkWidget to
GTK+ 3 used five different virtual functions in GtkWidget to
implement size requisition, namely the gtk_widget_get_preferred_width()
family of functions. To simplify widget implementations, GTK+4 uses
only one virtual function, GtkWidgetClass::measure() that widgets
@@ -141,6 +177,43 @@
</para>
</section>
<section>
<title>Don't use -gtk-gradient in your CSS</title>
<para>
GTK+ now supports standard CSS syntax for both linear and radial
gradients, just use those.
</para>
</section>
<section>
<title>Use gtk_widget_measure</title>
<para>
gtk_widget_measure replaces the various gtk_widget_get_preferred_ functions
for querying sizes.
</para>
</section>
<section>
<title>Adapt to drawing model changes</title>
<para>
This area has seen the most radical changes in the transition from GTK+ 3
to GTK+ 4. Widgets no longer use a draw() function to render their contents
to a cairo surface. Instead, they have a snapshot() function that creates
one or more GskRenderNodes to represent their content. Third-party widgets
that use a draw() function or a #GtkWidget::draw signal handler for custom
drawing will need to be converted to use gtk_snapshot_append_cairo_node().
</para>
<para>
The auxiliary #GtkSnapshot object has APIs to help with creating render
nodes.
</para>
<para>
If you are using a #GtkDrawingArea for custom drawing, you need to switch
to using gtk_drawing_area_set_draw_func() to set a draw function. This is
pretty much a direct replacement for a #GtkWidget::draw signal handler.
</para>
</section>
</section>
</chapter>

View File

@@ -570,7 +570,7 @@ RGBA drawing capabilities.
Note that the presence of an RGBA visual is no guarantee that the
window will actually appear transparent on screen. On X11, this
requires a compositing manager to be running. See
gtk_widget_is_composited() for a way to find out if the alpha
gdk_display_is_composited() for a way to find out if the alpha
channel will be respected.
</para>
</answer>

View File

@@ -148,13 +148,10 @@ displays after the widget is created with gtk_text_view_set_buffer().
<para>
There are two ways to affect text attributes in #GtkTextView.
You can change the default attributes for a given #GtkTextView, and you can
apply tags that change the attributes for a region of text. For text features
that come from the theme &mdash; such as font and foreground color &mdash; use
standard #GtkWidget functions such as gtk_widget_modify_font() or
gtk_widget_override_color(). For other attributes there are dedicated methods on
#GtkTextView such as gtk_text_view_set_tabs().
The way to affect text attributes in #GtkTextView is to
apply tags that change the attributes for a region of text.
For text features that come from the theme &mdash; such as font and
foreground color &mdash; use CSS to override their default values.
<informalexample><programlisting>
GtkWidget *view;
@@ -163,6 +160,8 @@ gtk_widget_override_color(). For other attributes there are dedicated methods on
PangoFontDescription *font_desc;
GdkRGBA rgba;
GtkTextTag *tag;
GtkCssProvider *provider;
GtkStyleContext *context;
view = gtk_text_view_new (<!-- -->);
@@ -170,14 +169,18 @@ gtk_widget_override_color(). For other attributes there are dedicated methods on
gtk_text_buffer_set_text (buffer, "Hello, this is some text", -1);
/* Change default font throughout the widget */
font_desc = pango_font_description_from_string ("Serif 15");
gtk_widget_modify_font (view, font_desc);
pango_font_description_free (font_desc);
/* Change default color throughout the widget */
gdk_rgba_parse ("green", &amp;rgba);
gtk_widget_override_color (view, GTK_STATE_FLAG_NORMAL, &amp;rgba);
/* Change default font and color throughout the widget */
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider,
"textview {"
" font: 15 serif;"
" color: green;"
"}",
-1);
context = gtk_widget_get_style_context (view);
gtk_style_context_add_provider (context,
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
/* Change left margin throughout the widget */
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);

View File

@@ -1,6 +1,7 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gdkx.h>
#include <cairo-xlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/wait.h>
@@ -136,9 +137,10 @@ static GdkPixbuf *
take_window_shot (Window child,
DecorationType decor)
{
GdkWindow *window, *root_window;
cairo_surface_t *surface;
XWindowAttributes attrs;
Window xid;
gint x_orig, y_orig;
Display *dpy;
gint x = 0, y = 0;
gint width, height;
@@ -150,35 +152,39 @@ take_window_shot (Window child,
else
xid = child;
window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), xid);
root_window = gdk_screen_get_root_window (gdk_window_get_screen (window));
dpy = gdk_x11_display_get_xdisplay (gdk_display_get_default ());
XGetWindowAttributes (dpy, xid, &attrs);
width = gdk_window_get_width (window);
height = gdk_window_get_height (window);
gdk_window_get_origin (window, &x_orig, &y_orig);
width = attrs.width;
height = attrs.height;
if (x_orig < 0)
if (attrs.x < 0)
{
x = - x_orig;
width = width + x_orig;
x_orig = 0;
x = - attrs.x;
width = width + attrs.x;
}
if (y_orig < 0)
if (attrs.y < 0)
{
y = - y_orig;
height = height + y_orig;
y_orig = 0;
y = - attrs.y;
height = height + attrs.y;
}
if (x_orig + width > gdk_window_get_width (root_window))
width = gdk_window_get_width (root_window) - x_orig;
if (attrs.x + x + width > WidthOfScreen (DefaultScreenOfDisplay (dpy)))
width = WidthOfScreen (DefaultScreenOfDisplay (dpy)) - attrs.x - x;
if (y_orig + height > gdk_window_get_height (root_window))
height = gdk_window_get_height (root_window) - y_orig;
if (attrs.y + y + height > HeightOfScreen (DefaultScreenOfDisplay (dpy)))
height = HeightOfScreen (DefaultScreenOfDisplay (dpy)) - attrs.y - y;
tmp = gdk_pixbuf_get_from_window (window,
x, y, width, height);
surface = cairo_xlib_surface_create (dpy,
xid,
attrs.visual,
attrs.width,
attrs.height);
tmp = gdk_pixbuf_get_from_surface (surface,
x, y,
width, height);
cairo_surface_destroy (surface);
if (tmp != NULL)
{
@@ -203,8 +209,8 @@ take_window_shot (Window child,
static GList *toplevels;
static guint shot_id;
static gboolean
static gboolean
window_is_csd (GdkWindow *window)
{
gboolean set;

View File

@@ -798,7 +798,6 @@ create_page_setup_dialog (void)
settings);
info = new_widget_info ("pagesetupdialog", widget, ASIS);
gtk_widget_set_app_paintable (info->window, FALSE);
info->include_decorations = TRUE;
return info;

View File

@@ -92,12 +92,8 @@ gdk_public_h_sources = \
gdkvisual.h \
gdkwindow.h
deprecated_h_sources = \
deprecated/gdkcolor.h
gdk_h_sources = \
$(gdk_public_h_sources) \
$(deprecated_h_sources)
$(gdk_public_h_sources)
gdk_private_headers = \
gdk-private.h \
@@ -124,11 +120,7 @@ gdk_private_headers = \
gdkvisualprivate.h \
gdkx.h
deprecated_c_sources = \
deprecated/gdkcolor.c
gdk_c_sources = \
$(deprecated_c_sources) \
gdk-private.c \
gdk.c \
gdkapplaunchcontext.c \
@@ -211,8 +203,6 @@ endif # USE_QUARTZ
if USE_WIN32
libgdk_4_la_LIBADD += win32/libgdk-win32.la
libgdk_4_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o
libgdk_4_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o
endif # USE_WIN32
if USE_BROADWAY
@@ -340,7 +330,7 @@ w32_introspection_files = \
win32/gdkwindow-win32.c
if OS_WIN32
GdkWin32-noinst-4.0.gir: libgdk-3.la Gdk-noinst-4.0.gir Makefile
GdkWin32-noinst-4.0.gir: libgdk-4.la Gdk-noinst-4.0.gir Makefile
GdkWin32_noinst_4_0_gir_SCANNERFLAGS = \
--identifier-prefix=Gdk \
--c-include="gdk/gdkwin32.h" \
@@ -355,7 +345,7 @@ endif # OS_WIN32
noinst_DATA = $(INTROSPECTION_GIRS)
CLEANFILES += $(gir_DATA)
CLEANFILES += $(INTROSPECTION_GIRS)
endif # HAVE_INTROSPECTION
@@ -444,29 +434,20 @@ stamp-gc-h: $(top_builddir)/config.status
#
# Resources
#
glsl_sources := $(wildcard $(srcdir)/resources/glsl/*.glsl)
gdk.gresource.xml: Makefile.am
$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
echo "<gresources>" >> $@; \
echo " <gresource prefix='/org/gtk/libgdk'>" >> $@; \
for f in $(srcdir)/resources/glsl/*.glsl; do \
for f in $(glsl_sources); do \
n=`basename $$f`; \
echo " <file alias='glsl/$$n'>resources/glsl/$$n</file>" >> $@; \
done; \
echo " </gresource>" >> $@; \
echo "</gresources>" >> $@;
glsl_sources = \
resources/glsl/gl3-texture-2d.fs.glsl \
resources/glsl/gl3-texture-2d.vs.glsl \
resources/glsl/gl3-texture-rect.fs.glsl \
resources/glsl/gl3-texture-rect.vs.glsl \
resources/glsl/gl2-texture-2d.fs.glsl \
resources/glsl/gl2-texture-2d.fs.glsl \
resources/glsl/gl2-texture-rect.vs.glsl \
resources/glsl/gl2-texture-rect.vs.glsl \
resources/glsl/gles2-texture.fs.glsl \
resources/glsl/gles2-texture.vs.glsl
EXTRA_DIST += $(glsl_sources)
CLEANFILES += gdk.gresource.xml
@@ -510,20 +491,20 @@ INTROSPECTION_INTERMEDIATE_ITEMS = \
$(top_builddir)/build/win32/GdkWin32_4_0_gir_list
Gdk_4_0_gir_MSVC_FILES = $(introspection_files)
Gdk_4_0_gir_MSVC_EXPORT_PACKAGES = $(Gdk_4_0_gir_EXPORT_PACKAGES)
Gdk_4_0_gir_MSVC_INCLUDE_GIRS = $(Gdk_4_0_gir_INCLUDES)
Gdk_4_0_gir_MSVC_LIBS = gdk-4.0
Gdk_4_0_gir_MSVC_EXPORT_PACKAGES = $(Gdk_noinst_4_0_gir_EXPORT_PACKAGES)
Gdk_4_0_gir_MSVC_INCLUDE_GIRS = $(Gdk_noinst_4_0_gir_INCLUDES)
Gdk_4_0_gir_MSVC_LIBS = gtk-4
Gdk_4_0_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS)
Gdk_4_0_gir_MSVC_SCANNERFLAGS = $(Gdk_4_0_gir_SCANNERFLAGS)
Gdk_4_0_gir_MSVC_SCANNERFLAGS = $(Gdk_noinst_4_0_gir_SCANNERFLAGS)
GdkWin32_4_0_gir_MSVC_FILES = $(w32_introspection_files)
GdkWin32_4_0_gir_MSVC_INCLUDE_GIRS = $(GdkWin32_4_0_gir_INCLUDES)
GdkWin32_4_0_gir_MSVC_INCLUDE_GIRS = $(GdkWin32_noinst_4_0_gir_INCLUDES)
GdkWin32_4_0_gir_MSVC_LIBS = $(Gdk_4_0_gir_MSVC_LIBS)
GdkWin32_4_0_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS)
GdkWin32_4_0_gir_MSVC_SCANNERFLAGS = \
--identifier-prefix=Gdk \
--c-include="gdk/gdkwin32.h" \
--include-uninstalled=./Gdk-noinst-4.0.gir
--include-uninstalled=./Gdk-4.0.gir
include $(top_srcdir)/build/Makefile.msvc-introspection

View File

@@ -20,7 +20,7 @@ LDADDS = $(GDK_DEP_LIBS) -lrt
noinst_LTLIBRARIES = libgdk-broadway.la
bin_PROGRAMS = broadwayd
bin_PROGRAMS = gtk4-broadwayd
libgdkinclude_HEADERS = \
gdkbroadway.h
@@ -29,8 +29,7 @@ libgdkbroadwayinclude_HEADERS = \
gdkbroadwaydisplay.h \
gdkbroadwaywindow.h \
gdkbroadwaycursor.h \
gdkbroadwaymonitor.h \
gdkbroadwayvisual.h
gdkbroadwaymonitor.h
EXTRA_DIST += toarray.pl
@@ -62,6 +61,8 @@ libgdk_broadway_la_SOURCES = \
gdkdisplay-broadway.c \
gdkdisplay-broadway.h \
gdkdnd-broadway.c \
gdkdrawingcontext-broadway.c \
gdkdrawingcontext-broadway.h \
gdkeventsource.c \
gdkeventsource.h \
gdkglobals-broadway.c \
@@ -73,7 +74,6 @@ libgdk_broadway_la_SOURCES = \
gdkscreen-broadway.h \
gdkselection-broadway.c \
gdktestutils-broadway.c \
gdkvisual-broadway.c \
gdkwindow-broadway.c \
gdkwindow-broadway.h \
gdkprivate-broadway.h \
@@ -86,7 +86,7 @@ libgdk_broadway_la_LIBADD = \
$(NULL)
endif
broadwayd_SOURCES = \
gtk4_broadwayd_SOURCES = \
broadway-protocol.h \
broadwayd.c \
broadway-server.h \
@@ -97,9 +97,9 @@ broadwayd_SOURCES = \
broadway-output.c
if OS_WIN32
broadwayd_LDADD = $(GDK_DEP_LIBS) -lws2_32
gtk4_broadwayd_LDADD = $(GDK_DEP_LIBS) -lws2_32
else
broadwayd_LDADD = $(GDK_DEP_LIBS) @SHM_LIBS@
gtk4_broadwayd_LDADD = $(GDK_DEP_LIBS) @SHM_LIBS@
endif
MAINTAINERCLEANFILES = $(broadway_built_sources)
@@ -108,7 +108,7 @@ EXTRA_DIST += $(broadway_built_sources)
BUILT_SOURCES = $(broadway_built_sources)
# ------------------- MSVC Build Items ----------------
MSVCPROJS = gdk4-broadway broadwayd
MSVCPROJS = gdk4-broadway gtk4-broadwayd
gdk4_broadway_FILES = $(libgdk_broadway_la_SOURCES)
gdk4_broadway_EXCLUDES = dummy
@@ -118,14 +118,14 @@ gdk4_broadway_HEADERS_INST = $(libgdkbroadwayinclude_HEADERS)
gdk4_broadway_HEADERS_EXCLUDES = dummy
broadwayd_FILES = $(broadwayd_SOURCES)
broadwayd_EXCLUDES = dummy
gtk4_broadwayd_FILES = $(gtk4_broadwayd_SOURCES)
gtk4_broadwayd_EXCLUDES = dummy
include $(top_srcdir)/build/Makefile.msvcproj
dist-hook: \
$(top_builddir)/build/win32/vs12/gdk4-broadway.vcxproj \
$(top_builddir)/build/win32/vs12/broadwayd.vcxproj \
$(top_builddir)/build/win32/vs12/gtk4-broadwayd.vcxproj \
$(top_builddir)/build/win32/vs12/gdk4-broadway.vs12.headers
-include $(top_srcdir)/git.mk

View File

@@ -449,7 +449,7 @@ main (int argc, char *argv[])
{
if (*argv[1] != ':')
{
g_printerr ("Usage broadwayd [:DISPLAY]\n");
g_printerr ("Usage gtk4-broadwayd [:DISPLAY]\n");
exit (1);
}
display = argv[1];

View File

@@ -33,7 +33,6 @@
#include <gdk/broadway/gdkbroadwaywindow.h>
#include <gdk/broadway/gdkbroadwaycursor.h>
#include <gdk/broadway/gdkbroadwaymonitor.h>
#include <gdk/broadway/gdkbroadwayvisual.h>
#undef __GDKBROADWAY_H_INSIDE__

View File

@@ -1,46 +0,0 @@
/* gdkbroadwayvisual.h
*
* Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
*
* 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_BROADWAY_VISUAL_H__
#define __GDK_BROADWAY_VISUAL_H__
#include <gdk/gdk.h>
G_BEGIN_DECLS
#define GDK_TYPE_BROADWAY_VISUAL (gdk_broadway_visual_get_type ())
#define GDK_BROADWAY_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisual))
#define GDK_BROADWAY_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisualClass))
#define GDK_IS_BROADWAY_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_VISUAL))
#define GDK_IS_BROADWAY_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_VISUAL))
#define GDK_BROADWAY_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisualClass))
#ifdef GDK_COMPILATION
typedef struct _GdkBroadwayVisual GdkBroadwayVisual;
#else
typedef GdkVisual GdkBroadwayVisual;
#endif
typedef struct _GdkBroadwayVisualClass GdkBroadwayVisualClass;
GDK_AVAILABLE_IN_ALL
GType gdk_broadway_visual_get_type (void);
G_END_DECLS
#endif /* __GDK_BROADWAY_VISUAL_H__ */

View File

@@ -101,8 +101,6 @@ _gdk_broadway_display_open (const gchar *display_name)
_gdk_broadway_display_init_dnd (display);
_gdk_broadway_screen_setup (broadway_display->screens[0]);
if (display_name == NULL)
display_name = g_getenv ("BROADWAY_DISPLAY");

View File

@@ -1,5 +1,5 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2011 Benjamin Otte <otte@gnome.org>
/* GDK - The GIMP Drawing Kit
* Copyright 2016 Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -15,19 +15,19 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_SYMBOLIC_COLOR_PRIVATE_H__
#define __GTK_SYMBOLIC_COLOR_PRIVATE_H__
#include "config.h"
#include "gtk/deprecated/gtksymboliccolor.h"
#include "gtk/gtkcssparserprivate.h"
#include "gtk/gtkcssvalueprivate.h"
#include "gdkdrawingcontext-broadway.h"
G_BEGIN_DECLS
G_DEFINE_TYPE (GdkBroadwayDrawingContext, gdk_broadway_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
GtkSymbolicColor * _gtk_css_symbolic_value_new (GtkCssParser *parser);
static void
gdk_broadway_drawing_context_class_init (GdkBroadwayDrawingContextClass *klass)
{
}
GtkCssValue * _gtk_symbolic_color_get_css_value (GtkSymbolicColor *symbolic);
static void
gdk_broadway_drawing_context_init (GdkBroadwayDrawingContext *self)
{
}
G_END_DECLS
#endif /* __GTK_SYMBOLIC_COLOR_PRIVATE_H__ */

View File

@@ -0,0 +1,48 @@
/* GDK - The GIMP Drawing Kit
*
* 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_BROADWAY_DRAWING_CONTEXT_H__
#define __GDK_BROADWAY_DRAWING_CONTEXT_H__
#include "gdk/gdkdrawingcontextprivate.h"
G_BEGIN_DECLS
#define GDK_TYPE_BROADWAY_DRAWING_CONTEXT (gdk_broadway_drawing_context_get_type ())
#define GDK_BROADWAY_DRAWING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_BROADWAY_DRAWING_CONTEXT, GdkBroadwayDrawingContext))
#define GDK_IS_BROADWAY_DRAWING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_BROADWAY_DRAWING_CONTEXT))
#define GDK_BROADWAY_DRAWING_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_DRAWING_CONTEXT, GdkBroadwayDrawingContextClass))
#define GDK_IS_BROADWAY_DRAWING_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_DRAWING_CONTEXT))
#define GDK_BROADWAY_DRAWING_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_DRAWING_CONTEXT, GdkBroadwayDrawingContextClass))
typedef struct _GdkBroadwayDrawingContext GdkBroadwayDrawingContext;
typedef struct _GdkBroadwayDrawingContextClass GdkBroadwayDrawingContextClass;
struct _GdkBroadwayDrawingContext
{
GdkDrawingContext parent_instance;
};
struct _GdkBroadwayDrawingContextClass
{
GdkDrawingContextClass parent_instance;
};
GType gdk_broadway_drawing_context_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GDK_BROADWAY_DRAWING_CONTEXT_H__ */

View File

@@ -36,7 +36,6 @@
#include "gdkdisplay-broadway.h"
#include "gdkbroadwaycursor.h"
#include "gdkbroadwayvisual.h"
#include "gdkbroadwaywindow.h"
void _gdk_broadway_resync_windows (void);
@@ -90,15 +89,12 @@ gboolean _gdk_keymap_key_is_modifier (GdkKeymap *keymap,
guint keycode);
void _gdk_broadway_screen_events_init (GdkScreen *screen);
GdkVisual *_gdk_broadway_screen_get_system_visual (GdkScreen * screen);
GList *_gdk_broadway_screen_list_visuals (GdkScreen *screen);
void _gdk_broadway_screen_size_changed (GdkScreen *screen,
BroadwayInputScreenResizeNotify *msg);
void _gdk_broadway_events_got_input (BroadwayInputMsg *message);
void _gdk_broadway_screen_init_root_window (GdkScreen *screen);
void _gdk_broadway_screen_init_visuals (GdkScreen *screen);
void _gdk_broadway_display_init_dnd (GdkDisplay *display);
GdkDisplay * _gdk_broadway_display_open (const gchar *display_name);
void _gdk_broadway_display_queue_events (GdkDisplay *display);
@@ -127,8 +123,7 @@ void _gdk_broadway_display_create_window_impl (GdkDisplay *display,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask);
GdkWindowAttr *attributes);
gboolean _gdk_broadway_display_set_selection_owner (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,

View File

@@ -99,27 +99,13 @@ static void
gdk_broadway_screen_finalize (GObject *object)
{
GdkBroadwayScreen *broadway_screen = GDK_BROADWAY_SCREEN (object);
gint i;
if (broadway_screen->root_window)
g_object_unref (broadway_screen->root_window);
/* Visual Part */
for (i = 0; i < broadway_screen->nvisuals; i++)
g_object_unref (broadway_screen->visuals[i]);
g_free (broadway_screen->visuals);
G_OBJECT_CLASS (gdk_broadway_screen_parent_class)->finalize (object);
}
static GdkVisual *
gdk_broadway_screen_get_rgba_visual (GdkScreen *screen)
{
GdkBroadwayScreen *broadway_screen = GDK_BROADWAY_SCREEN (screen);
return broadway_screen->rgba_visual;
}
GdkScreen *
_gdk_broadway_screen_new (GdkDisplay *display,
gint screen_number)
@@ -131,29 +117,11 @@ _gdk_broadway_screen_new (GdkDisplay *display,
broadway_screen = GDK_BROADWAY_SCREEN (screen);
broadway_screen->display = display;
_gdk_broadway_screen_init_visuals (screen);
_gdk_broadway_screen_init_root_window (screen);
return screen;
}
/*
* It is important that we first request the selection
* notification, and then setup the initial state of
* is_composited to avoid a race condition here.
*/
void
_gdk_broadway_screen_setup (GdkScreen *screen)
{
}
static gboolean
gdk_broadway_screen_is_composited (GdkScreen *screen)
{
return TRUE;
}
static gboolean
gdk_broadway_screen_get_setting (GdkScreen *screen,
const gchar *name,
@@ -178,10 +146,6 @@ gdk_broadway_screen_class_init (GdkBroadwayScreenClass *klass)
screen_class->get_display = gdk_broadway_screen_get_display;
screen_class->get_root_window = gdk_broadway_screen_get_root_window;
screen_class->is_composited = gdk_broadway_screen_is_composited;
screen_class->get_setting = gdk_broadway_screen_get_setting;
screen_class->get_rgba_visual = gdk_broadway_screen_get_rgba_visual;
screen_class->get_system_visual = _gdk_broadway_screen_get_system_visual;
screen_class->list_visuals = _gdk_broadway_screen_list_visuals;
}

View File

@@ -23,7 +23,6 @@
#define __GDK_BROADWAY_SCREEN_H__
#include <gdk/gdkscreenprivate.h>
#include <gdk/gdkvisual.h>
#include "gdkprivate-broadway.h"
G_BEGIN_DECLS
@@ -46,16 +45,6 @@ struct _GdkBroadwayScreen
GdkDisplay *display;
GdkWindow *root_window;
/* Visual Part */
GdkVisual **visuals;
gint nvisuals;
GdkVisual *system_visual;
GdkVisual *rgba_visual;
gint available_depths[7];
gint navailable_depths;
GdkVisualType available_types[6];
gint navailable_types;
};
struct _GdkBroadwayScreenClass
@@ -68,7 +57,6 @@ struct _GdkBroadwayScreenClass
GType gdk_broadway_screen_get_type (void);
GdkScreen * _gdk_broadway_screen_new (GdkDisplay *display,
gint screen_number);
void _gdk_broadway_screen_setup (GdkScreen *screen);
G_END_DECLS

View File

@@ -1,137 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* 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/>.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include "gdkvisualprivate.h"
#include "gdkprivate-broadway.h"
#include "gdkscreen-broadway.h"
#include "gdkinternals.h"
struct _GdkBroadwayVisual
{
GdkVisual visual;
};
struct _GdkBroadwayVisualClass
{
GObjectClass parent_class;
};
G_DEFINE_TYPE (GdkBroadwayVisual, gdk_broadway_visual, GDK_TYPE_VISUAL)
static void
gdk_broadway_visual_finalize (GObject *object)
{
G_OBJECT_CLASS (gdk_broadway_visual_parent_class)->finalize (object);
}
static void
gdk_broadway_visual_class_init (GdkBroadwayVisualClass *visual_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (visual_class);
object_class->finalize = gdk_broadway_visual_finalize;
}
static void
gdk_broadway_visual_init (GdkBroadwayVisual *visual)
{
}
void
_gdk_broadway_screen_init_visuals (GdkScreen *screen)
{
GdkBroadwayScreen *broadway_screen;
GdkVisual **visuals;
int nvisuals;
g_return_if_fail (GDK_IS_SCREEN (screen));
broadway_screen = GDK_BROADWAY_SCREEN (screen);
nvisuals = 2;
visuals = g_new (GdkVisual *, nvisuals);
visuals[0] = g_object_new (GDK_TYPE_BROADWAY_VISUAL, NULL);
visuals[0]->screen = screen;
visuals[0]->type = GDK_VISUAL_TRUE_COLOR;
visuals[0]->depth = 32;
visuals[0]->byte_order = (G_BYTE_ORDER == G_LITTLE_ENDIAN) ? GDK_LSB_FIRST : GDK_MSB_FIRST;
visuals[0]->red_mask = 0xff0000;
visuals[0]->green_mask = 0xff00;
visuals[0]->blue_mask = 0xff;
visuals[0]->colormap_size = 256;
visuals[0]->bits_per_rgb = 8;
visuals[1] = g_object_new (GDK_TYPE_BROADWAY_VISUAL, NULL);
visuals[1]->screen = screen;
visuals[1]->type = GDK_VISUAL_TRUE_COLOR;
visuals[1]->depth = 24;
visuals[1]->byte_order = (G_BYTE_ORDER == G_LITTLE_ENDIAN) ? GDK_LSB_FIRST : GDK_MSB_FIRST;
visuals[1]->red_mask = 0xff0000;
visuals[1]->green_mask = 0xff00;
visuals[1]->blue_mask = 0xff;
visuals[1]->colormap_size = 256;
visuals[1]->bits_per_rgb = 8;
broadway_screen->system_visual = visuals[1];
broadway_screen->rgba_visual = visuals[0];
broadway_screen->navailable_depths = 2;
broadway_screen->available_depths[0] = 32;
broadway_screen->available_depths[1] = 24;
broadway_screen->navailable_types = 1;
broadway_screen->available_types[0] = GDK_VISUAL_TRUE_COLOR;
broadway_screen->visuals = visuals;
broadway_screen->nvisuals = nvisuals;
}
GdkVisual *
_gdk_broadway_screen_get_system_visual (GdkScreen * screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
return ((GdkVisual *) GDK_BROADWAY_SCREEN (screen)->system_visual);
}
GList *
_gdk_broadway_screen_list_visuals (GdkScreen *screen)
{
GList *list;
GdkBroadwayScreen *broadway_screen;
guint i;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
broadway_screen = GDK_BROADWAY_SCREEN (screen);
list = NULL;
for (i = 0; i < broadway_screen->nvisuals; ++i)
list = g_list_append (list, broadway_screen->visuals[i]);
return list;
}

View File

@@ -33,6 +33,7 @@
#include "gdkwindow.h"
#include "gdkwindowimpl.h"
#include "gdkdisplay-broadway.h"
#include "gdkdrawingcontext-broadway.h"
#include "gdkprivate-broadway.h"
#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
@@ -256,8 +257,7 @@ _gdk_broadway_display_create_window_impl (GdkDisplay *display,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask)
GdkWindowAttr *attributes)
{
GdkWindowImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
@@ -785,13 +785,6 @@ gdk_window_broadway_input_shape_combine_region (GdkWindow *window,
{
}
static void
gdk_broadway_window_set_override_redirect (GdkWindow *window,
gboolean override_redirect)
{
}
static void
gdk_broadway_window_set_accept_focus (GdkWindow *window,
gboolean accept_focus)
@@ -1297,29 +1290,13 @@ static void
create_moveresize_window (MoveResizeData *mv_resize,
guint32 timestamp)
{
GdkWindowAttr attributes;
gint attributes_mask;
GdkGrabStatus status;
GdkSeat *seat;
GdkDevice *pointer;
g_assert (mv_resize->moveresize_emulation_window == NULL);
attributes.x = -100;
attributes.y = -100;
attributes.width = 10;
attributes.height = 10;
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_ONLY;
attributes.override_redirect = TRUE;
attributes.event_mask = 0;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR;
mv_resize->moveresize_emulation_window =
gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (mv_resize->display)),
&attributes,
attributes_mask);
mv_resize->moveresize_emulation_window = gdk_window_new_temp (mv_resize->display);
gdk_window_show (mv_resize->moveresize_emulation_window);
@@ -1534,6 +1511,16 @@ gdk_broadway_get_last_seen_time (GdkWindow *window)
return _gdk_broadway_server_get_last_seen_time (GDK_BROADWAY_DISPLAY (display)->server);
}
static GdkDrawingContext *
gdk_broadway_window_create_draw_context (GdkWindow *window,
const cairo_region_t *region)
{
return g_object_new (GDK_TYPE_BROADWAY_DRAWING_CONTEXT,
"window", window,
"clip", region,
NULL);
}
static void
gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
{
@@ -1580,7 +1567,6 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
impl_class->set_startup_id = gdk_broadway_window_set_startup_id;
impl_class->set_transient_for = gdk_broadway_window_set_transient_for;
impl_class->get_frame_extents = gdk_broadway_window_get_frame_extents;
impl_class->set_override_redirect = gdk_broadway_window_set_override_redirect;
impl_class->set_accept_focus = gdk_broadway_window_set_accept_focus;
impl_class->set_focus_on_map = gdk_broadway_window_set_focus_on_map;
impl_class->set_icon_list = gdk_broadway_window_set_icon_list;
@@ -1613,4 +1599,5 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
impl_class->change_property = _gdk_broadway_window_change_property;
impl_class->delete_property = _gdk_broadway_window_delete_property;
impl_class->get_drag_protocol = _gdk_broadway_window_get_drag_protocol;
impl_class->create_draw_context = gdk_broadway_window_create_draw_context;
}

View File

@@ -1,202 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* 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/>.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include "gdkcolor.h"
#include "gdkscreen.h"
#include "gdkinternals.h"
#include <time.h>
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/**
* SECTION:colors
* @Short_description: Manipulation of colors
* @Title: Colors
*
* A #GdkColor represents a color.
*
* When working with cairo, it is often more convenient
* to use a #GdkRGBA instead, and #GdkColor has been
* deprecated in favor of #GdkRGBA.
*/
/**
* gdk_color_copy:
* @color: a #GdkColor
*
* Makes a copy of a #GdkColor.
*
* The result must be freed using gdk_color_free().
*
* Returns: a copy of @color
*
* Deprecated: 3.14: Use #GdkRGBA
*/
GdkColor*
gdk_color_copy (const GdkColor *color)
{
GdkColor *new_color;
g_return_val_if_fail (color != NULL, NULL);
new_color = g_slice_new (GdkColor);
*new_color = *color;
return new_color;
}
/**
* gdk_color_free:
* @color: a #GdkColor
*
* Frees a #GdkColor created with gdk_color_copy().
*
* Deprecated: 3.14: Use #GdkRGBA
*/
void
gdk_color_free (GdkColor *color)
{
g_return_if_fail (color != NULL);
g_slice_free (GdkColor, color);
}
/**
* gdk_color_hash:
* @color: a #GdkColor
*
* A hash function suitable for using for a hash
* table that stores #GdkColors.
*
* Returns: The hash function applied to @color
*
* Deprecated: 3.14: Use #GdkRGBA
*/
guint
gdk_color_hash (const GdkColor *color)
{
return ((color->red) +
(color->green << 11) +
(color->blue << 22) +
(color->blue >> 6));
}
/**
* gdk_color_equal:
* @colora: a #GdkColor
* @colorb: another #GdkColor
*
* Compares two colors.
*
* Returns: %TRUE if the two colors compare equal
*
* Deprecated: 3.14: Use #GdkRGBA
*/
gboolean
gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb)
{
g_return_val_if_fail (colora != NULL, FALSE);
g_return_val_if_fail (colorb != NULL, FALSE);
return ((colora->red == colorb->red) &&
(colora->green == colorb->green) &&
(colora->blue == colorb->blue));
}
G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
gdk_color_copy,
gdk_color_free)
/**
* gdk_color_parse:
* @spec: the string specifying the color
* @color: (out): the #GdkColor to fill in
*
* Parses a textual specification of a color and fill in the
* @red, @green, and @blue fields of a #GdkColor.
*
* The string can either one of a large set of standard names
* (taken from the X11 `rgb.txt` file), or it can be a hexadecimal
* value in the form “\#rgb” “\#rrggbb”, “\#rrrgggbbb” or
* “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits of
* the red, green, and blue components of the color, respectively.
* (White in the four forms is “\#fff”, “\#ffffff”, “\#fffffffff”
* and “\#ffffffffffff”).
*
* Returns: %TRUE if the parsing succeeded
*
* Deprecated: 3.14: Use #GdkRGBA
*/
gboolean
gdk_color_parse (const gchar *spec,
GdkColor *color)
{
PangoColor pango_color;
if (pango_color_parse (&pango_color, spec))
{
color->red = pango_color.red;
color->green = pango_color.green;
color->blue = pango_color.blue;
return TRUE;
}
else
return FALSE;
}
/**
* gdk_color_to_string:
* @color: a #GdkColor
*
* Returns a textual specification of @color in the hexadecimal
* form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits
* representing the red, green and blue components respectively.
*
* The returned string can be parsed by gdk_color_parse().
*
* Returns: a newly-allocated text string
*
* Since: 2.12
*
* Deprecated: 3.14: Use #GdkRGBA
*/
gchar *
gdk_color_to_string (const GdkColor *color)
{
PangoColor pango_color;
g_return_val_if_fail (color != NULL, NULL);
pango_color.red = color->red;
pango_color.green = color->green;
pango_color.blue = color->blue;
return pango_color_to_string (&pango_color);
}

View File

@@ -1,87 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* 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/>.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __GDK_COLOR_H__
#define __GDK_COLOR_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#include <cairo.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkversionmacros.h>
G_BEGIN_DECLS
/**
* GdkColor:
* @pixel: For allocated colors, the pixel value used to
* draw this color on the screen. Not used anymore.
* @red: The red component of the color. This is
* a value between 0 and 65535, with 65535 indicating
* full intensity
* @green: The green component of the color
* @blue: The blue component of the color
*
* A #GdkColor is used to describe a color,
* similar to the XColor struct used in the X11 drawing API.
*
* Deprecated: 3.14: Use #GdkRGBA
*/
struct _GdkColor
{
guint32 pixel;
guint16 red;
guint16 green;
guint16 blue;
};
#define GDK_TYPE_COLOR (gdk_color_get_type ())
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_get_type)
GType gdk_color_get_type (void) G_GNUC_CONST;
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_copy)
GdkColor *gdk_color_copy (const GdkColor *color);
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_free)
void gdk_color_free (GdkColor *color);
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_hash)
guint gdk_color_hash (const GdkColor *color);
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_equal)
gboolean gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_parse)
gboolean gdk_color_parse (const gchar *spec,
GdkColor *color);
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_to_string)
gchar * gdk_color_to_string (const GdkColor *color);
G_END_DECLS
#endif /* __GDK_COLOR_H__ */

View File

@@ -63,10 +63,6 @@
#include <gdk/gdkvisual.h>
#include <gdk/gdkwindow.h>
#ifndef GDK_DISABLE_DEPRECATED
#include <gdk/deprecated/gdkcolor.h>
#endif
#include <gdk/gdk-autocleanup.h>
#undef __GDK_H_INSIDE__

View File

@@ -323,40 +323,6 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
cairo_surface_destroy (surface);
}
/**
* gdk_cairo_set_source_window:
* @cr: a cairo context
* @window: a #GdkWindow
* @x: X coordinate of location to place upper left corner of @window
* @y: Y coordinate of location to place upper left corner of @window
*
* Sets the given window as the source pattern for @cr.
*
* The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
* so that the origin of @window is @x, @y. The window contains all its
* subwindows when rendering.
*
* Note that the contents of @window are undefined outside of the
* visible part of @window, so use this function with care.
*
* Since: 2.24
*/
void
gdk_cairo_set_source_window (cairo_t *cr,
GdkWindow *window,
gdouble x,
gdouble y)
{
cairo_surface_t *surface;
g_return_if_fail (cr != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
surface = _gdk_window_ref_cairo_surface (window);
cairo_set_source_surface (cr, surface, x, y);
cairo_surface_destroy (surface);
}
/*
* _gdk_cairo_surface_extents:
* @surface: surface to measure

View File

@@ -23,7 +23,6 @@
#endif
#include <gdk/gdkversionmacros.h>
#include <gdk/deprecated/gdkcolor.h>
#include <gdk/gdkrgba.h>
#include <gdk/gdkdrawingcontext.h>
#include <gdk/gdkpixbuf.h>
@@ -43,11 +42,6 @@ void gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
gdouble pixbuf_x,
gdouble pixbuf_y);
GDK_AVAILABLE_IN_ALL
void gdk_cairo_set_source_window (cairo_t *cr,
GdkWindow *window,
gdouble x,
gdouble y);
GDK_AVAILABLE_IN_ALL
void gdk_cairo_rectangle (cairo_t *cr,

View File

@@ -24,6 +24,7 @@
#include "gdkdisplay.h"
#include "gdkdisplayprivate.h"
#include "gdkintl.h"
#include "gdk-private.h"
#include "gdkdeviceprivate.h"
@@ -66,6 +67,15 @@
* gdk_display_get_device_manager().
*/
enum
{
PROP_0,
PROP_COMPOSITED,
PROP_RGBA,
LAST_PROP
};
static GParamSpec *props[LAST_PROP] = { NULL, };
enum {
OPENED,
@@ -89,6 +99,29 @@ static guint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (GdkDisplay, gdk_display, G_TYPE_OBJECT)
static void
gdk_display_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GdkDisplay *display = GDK_DISPLAY (object);
switch (prop_id)
{
case PROP_COMPOSITED:
g_value_set_boolean (value, gdk_display_is_composited (display));
break;
case PROP_RGBA:
g_value_set_boolean (value, gdk_display_is_rgba (display));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
gdk_display_real_make_default (GdkDisplay *display)
{
@@ -156,6 +189,7 @@ gdk_display_class_init (GdkDisplayClass *class)
object_class->finalize = gdk_display_finalize;
object_class->dispose = gdk_display_dispose;
object_class->get_property = gdk_display_get_property;
class->get_app_launch_context = gdk_display_real_get_app_launch_context;
class->window_type = GDK_TYPE_WINDOW;
@@ -168,6 +202,38 @@ gdk_display_class_init (GdkDisplayClass *class)
class->get_primary_monitor = gdk_display_real_get_primary_monitor;
/**
* GdkDisplay:composited:
*
* %TRUE if the display properly composits the alpha channel.
* See gdk_display_is_composited() for details.
*
* Since: 3.90
*/
props[PROP_COMPOSITED] =
g_param_spec_boolean ("composited",
P_("Composited"),
P_("Composited"),
TRUE,
G_PARAM_READABLE);
/**
* GdkDisplay:rgba:
*
* %TRUE if the display supports an alpha channel. See gdk_display_is_rgba()
* for details.
*
* Since: 3.90
*/
props[PROP_RGBA] =
g_param_spec_boolean ("rgba",
P_("RGBA"),
P_("RGBA"),
TRUE,
G_PARAM_READABLE);
g_object_class_install_properties (object_class, LAST_PROP, props);
/**
* GdkDisplay::opened:
* @display: the object on which the signal is emitted
@@ -324,6 +390,9 @@ gdk_display_init (GdkDisplay *display)
(GDestroyNotify) g_free);
display->rendering_mode = _gdk_rendering_mode;
display->composited = TRUE;
display->rgba = TRUE;
}
static void
@@ -1862,16 +1931,14 @@ _gdk_display_create_window_impl (GdkDisplay *display,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask)
GdkWindowAttr *attributes)
{
GDK_DISPLAY_GET_CLASS (display)->create_window_impl (display,
window,
real_parent,
screen,
event_mask,
attributes,
attributes_mask);
attributes);
}
GdkWindow *
@@ -2068,6 +2135,94 @@ gdk_display_set_rendering_mode (GdkDisplay *display,
display->rendering_mode = mode;
}
/**
* gdk_display_is_composited:
* @display: a #GdkDisplay
*
* Returns whether windows can reasonably be expected to have
* their alpha channel drawn correctly on the screen. Check
* gdk_display_is_rgba() for wether the display supports an
* alpha channel.
*
* On X11 this function returns whether a compositing manager is
* compositing on @display.
*
* On modern displays, this value is always %TRUE.
*
* Returns: Whether windows with RGBA visuals can reasonably be
* expected to have their alpha channels drawn correctly on the screen.
*
* Since: 3.90
**/
gboolean
gdk_display_is_composited (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return display->composited;
}
void
gdk_display_set_composited (GdkDisplay *display,
gboolean composited)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
if (display->composited == composited)
return;
display->composited = composited;
g_object_notify_by_pspec (G_OBJECT (display), props[PROP_COMPOSITED]);
}
/**
* gdk_display_is_rgba:
* @display: a #GdkDisplay
*
* Returns wether windows on this @display are created with an
* alpha channel.
*
* Even if a %TRUE is returned, it is possible that the
* windows alpha channel wont be honored when displaying the
* window on the screen: in particular, for X an appropriate
* windowing manager and compositing manager must be running to
* provide appropriate display. Use gdk_display_is_composited()
* to check if that is the case.
*
* For setting an overall opacity for a top-level window, see
* gdk_window_set_opacity().
*
* On modern displays, this value is always %TRUE.
*
* Returns: %TRUE if windows are created with an alpha channel or
* %FALSE if the display does not support this functionality.
*
* Since: 3.90
**/
gboolean
gdk_display_is_rgba (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return display->rgba;
}
void
gdk_display_set_rgba (GdkDisplay *display,
gboolean rgba)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
if (display->rgba == rgba)
return;
display->rgba = rgba;
g_object_notify_by_pspec (G_OBJECT (display), props[PROP_RGBA]);
}
void
gdk_display_add_seat (GdkDisplay *display,
GdkSeat *seat)

View File

@@ -65,6 +65,11 @@ void gdk_display_close (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
gboolean gdk_display_is_closed (GdkDisplay *display);
GDK_AVAILABLE_IN_3_90
gboolean gdk_display_is_composited (GdkDisplay *display);
GDK_AVAILABLE_IN_3_90
gboolean gdk_display_is_rgba (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
GdkEvent* gdk_display_get_event (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL

View File

@@ -123,6 +123,9 @@ struct _GdkDisplay
guint has_gl_extension_texture_non_power_of_two : 1;
guint has_gl_extension_texture_rectangle : 1;
guint rgba : 1;
guint composited : 1;
GdkRenderingMode rendering_mode;
GList *seats;
@@ -192,8 +195,7 @@ struct _GdkDisplayClass
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask);
GdkWindowAttr *attributes);
GdkKeymap * (*get_keymap) (GdkDisplay *display);
void (*push_error_trap) (GdkDisplay *display);
@@ -321,13 +323,17 @@ void _gdk_display_create_window_impl (GdkDisplay *display
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask);
GdkWindowAttr *attributes);
GdkWindow * _gdk_display_create_window (GdkDisplay *display);
gboolean gdk_display_make_gl_context_current (GdkDisplay *display,
GdkGLContext *context);
void gdk_display_set_rgba (GdkDisplay *display,
gboolean rgba);
void gdk_display_set_composited (GdkDisplay *display,
gboolean composited);
void gdk_display_add_seat (GdkDisplay *display,
GdkSeat *seat);
void gdk_display_remove_seat (GdkDisplay *display,

View File

@@ -741,10 +741,8 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
gdk_window_get_unscaled_size (window, NULL, &unscaled_window_height);
sx = sy = 1;
cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
cairo_surface_get_device_offset (surface,
&device_x_offset, &device_y_offset);
cairo_surface_get_device_scale (surface, &sx, &sy);
cairo_surface_get_device_offset (surface, &device_x_offset, &device_y_offset);
glGenTextures (1, &texture_id);
if (use_texture_rectangle)
@@ -780,7 +778,12 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
e.height *= sy;
image = cairo_surface_map_to_image (surface, &e);
gdk_gl_context_upload_texture (paint_context, image, e.width, e.height, target);
gdk_gl_context_upload_texture (paint_context,
cairo_image_surface_get_data (image),
e.width,
e.height,
cairo_image_surface_get_stride (image),
target);
cairo_surface_unmap_image (surface, image);
@@ -855,7 +858,12 @@ gdk_cairo_surface_upload_to_gl (cairo_surface_t *surface,
rect.height = height;
tmp = cairo_surface_map_to_image (surface, &rect);
gdk_gl_context_upload_texture (context, tmp, rect.width, rect.height, target);
gdk_gl_context_upload_texture (context,
cairo_image_surface_get_data (tmp),
rect.width,
rect.height,
cairo_image_surface_get_stride (tmp),
target);
cairo_surface_unmap_image (surface, tmp);
}

View File

@@ -154,6 +154,7 @@ gdk_gl_context_finalize (GObject *gobject)
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
g_clear_pointer (&priv->paint_data, g_free);
G_OBJECT_CLASS (gdk_gl_context_parent_class)->finalize (gobject);
}
static void
@@ -237,9 +238,10 @@ gdk_gl_context_get_property (GObject *gobject,
void
gdk_gl_context_upload_texture (GdkGLContext *context,
cairo_surface_t *image_surface,
const guchar *data,
int width,
int height,
int stride,
guint texture_target)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
@@ -253,21 +255,19 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
(priv->use_es && (priv->gl_version >= 30 || priv->has_unpack_subimage)))
{
glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
glPixelStorei (GL_UNPACK_ROW_LENGTH, cairo_image_surface_get_stride (image_surface) / 4);
glPixelStorei (GL_UNPACK_ROW_LENGTH, stride / 4);
if (priv->use_es)
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE,
cairo_image_surface_get_data (image_surface));
data);
else
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
cairo_image_surface_get_data (image_surface));
data);
glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
}
else
{
GLvoid *data = cairo_image_surface_get_data (image_surface);
int stride = cairo_image_surface_get_stride (image_surface);
int i;
if (priv->use_es)
@@ -275,14 +275,14 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
for (i = 0; i < height; i++)
glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, (unsigned char*) data + (i * stride));
glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, data + (i * stride));
}
else
{
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
for (i = 0; i < height; i++)
glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (unsigned char*) data + (i * stride));
glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data + (i * stride));
}
}
}

View File

@@ -77,9 +77,10 @@ void gdk_gl_context_set_is_legacy (GdkGLContext
gboolean is_legacy);
void gdk_gl_context_upload_texture (GdkGLContext *context,
cairo_surface_t *image_surface,
const guchar *data,
int width,
int height,
int stride,
guint texture_target);
GdkGLContextPaintData * gdk_gl_context_get_paint_data (GdkGLContext *context);
gboolean gdk_gl_context_use_texture_rectangle (GdkGLContext *context);

View File

@@ -41,6 +41,7 @@ G_BEGIN_DECLS
/* Debugging support */
typedef struct _GdkEventFilter GdkEventFilter;
typedef struct _GdkWindowAttr GdkWindowAttr;
typedef enum {
GDK_EVENT_FILTER_REMOVED = 1 << 0
@@ -147,6 +148,17 @@ struct _GdkEventPrivate
typedef struct _GdkWindowPaint GdkWindowPaint;
struct _GdkWindowAttr
{
gint event_mask;
gint x, y;
gint width;
gint height;
GdkWindowWindowClass wclass;
GdkWindowType window_type;
GdkWindowTypeHint type_hint;
};
struct _GdkWindow
{
GObject parent_instance;
@@ -410,6 +422,8 @@ void gdk_cairo_set_drawing_context (cairo_t *cr,
cairo_surface_t *
_gdk_window_ref_cairo_surface (GdkWindow *window);
GdkWindow* gdk_window_new (GdkWindow *parent,
GdkWindowAttr *attributes);
void _gdk_window_destroy (GdkWindow *window,
gboolean foreign_destroy);
void _gdk_window_clear_update_area (GdkWindow *window);

View File

@@ -41,92 +41,6 @@
* #GdkWindows and cairo surfaces.
*/
/**
* gdk_pixbuf_get_from_window:
* @window: Source window
* @src_x: Source X coordinate within @window
* @src_y: Source Y coordinate within @window
* @width: Width in pixels of region to get
* @height: Height in pixels of region to get
*
* Transfers image data from a #GdkWindow and converts it to an RGB(A)
* representation inside a #GdkPixbuf. In other words, copies
* image data from a server-side drawable to a client-side RGB(A) buffer.
* This allows you to efficiently read individual pixels on the client side.
*
* This function will create an RGB pixbuf with 8 bits per channel with
* the size specified by the @width and @height arguments scaled by the
* scale factor of @window. The pixbuf will contain an alpha channel if
* the @window contains one.
*
* If the window is off the screen, then there is no image data in the
* obscured/offscreen regions to be placed in the pixbuf. The contents of
* portions of the pixbuf corresponding to the offscreen region are undefined.
*
* If the window youre obtaining data from is partially obscured by
* other windows, then the contents of the pixbuf areas corresponding
* to the obscured regions are undefined.
*
* If the window is not mapped (typically because its iconified/minimized
* or not on the current workspace), then %NULL will be returned.
*
* If memory cant be allocated for the return value, %NULL will be returned
* instead.
*
* (In short, there are several ways this function can fail, and if it fails
* it returns %NULL; so check the return value.)
*
* Returns: (nullable) (transfer full): A newly-created pixbuf with a
* reference count of 1, or %NULL on error
*/
GdkPixbuf *
gdk_pixbuf_get_from_window (GdkWindow *src,
gint src_x,
gint src_y,
gint width,
gint height)
{
cairo_surface_t *surface;
cairo_surface_t *copy;
cairo_t *cr;
GdkPixbuf *dest;
int scale;
g_return_val_if_fail (GDK_IS_WINDOW (src), NULL);
g_return_val_if_fail (gdk_window_is_viewable (src), NULL);
surface = _gdk_window_ref_cairo_surface (src);
scale = gdk_window_get_scale_factor (src);
/* We do not know what happened to this surface outside of GDK.
* Especially for foreign windows, they will have been modified
* by external applications.
* So be on the safe side and:
*/
cairo_surface_mark_dirty (surface);
if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA)
copy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width * scale, height * scale);
else
copy = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width * scale, height * scale);
cairo_surface_set_device_scale (copy, scale, scale);
cr = cairo_create (copy);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface (cr, surface, -src_x, -src_y);
cairo_paint (cr);
cairo_destroy (cr);
dest = gdk_pixbuf_get_from_surface (copy, 0, 0, width * scale, height * scale);
cairo_surface_destroy (copy);
cairo_surface_destroy (surface);
return dest;
}
static cairo_format_t
gdk_cairo_format_for_content (cairo_content_t content)
{
@@ -244,8 +158,7 @@ convert_no_alpha (guchar *dest_data,
*
* Transfers image data from a #cairo_surface_t and converts it to an RGB(A)
* representation inside a #GdkPixbuf. This allows you to efficiently read
* individual pixels from cairo surfaces. For #GdkWindows, use
* gdk_pixbuf_get_from_window() instead.
* individual pixels from cairo surfaces.
*
* This function will create an RGB pixbuf with 8 bits per channel.
* The pixbuf will contain an alpha channel if the @surface contains one.

View File

@@ -36,13 +36,6 @@
G_BEGIN_DECLS
GDK_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_get_from_window (GdkWindow *window,
gint src_x,
gint src_y,
gint width,
gint height);
GDK_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
gint src_x,

View File

@@ -40,10 +40,7 @@
* combines several physical monitors (see gdk_screen_get_n_monitors()).
*
* GdkScreen is used throughout GDK and GTK+ to specify which screen
* the top level windows are to be displayed on. it is also used to
* query the screen specification and default settings such as
* the default visual (gdk_screen_get_system_visual()), the dimensions
* of the physical monitors (gdk_screen_get_monitor_geometry()), etc.
* the top level windows are to be displayed on.
*/
@@ -65,7 +62,6 @@ enum
enum
{
SIZE_CHANGED,
COMPOSITED_CHANGED,
MONITORS_CHANGED,
LAST_SIGNAL
};
@@ -93,25 +89,6 @@ gdk_screen_class_init (GdkScreenClass *klass)
G_PARAM_READWRITE|G_PARAM_STATIC_NAME|
G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB));
/**
* GdkScreen::composited-changed:
* @screen: the object on which the signal is emitted
*
* The ::composited-changed signal is emitted when the composited
* status of the screen changes
*
* Since: 2.10
*/
signals[COMPOSITED_CHANGED] =
g_signal_new (g_intern_static_string ("composited-changed"),
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkScreenClass, composited_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
/**
* GdkScreen::monitors-changed:
* @screen: the object on which the signal is emitted
@@ -302,106 +279,6 @@ gdk_screen_get_root_window (GdkScreen *screen)
return GDK_SCREEN_GET_CLASS (screen)->get_root_window (screen);
}
/**
* gdk_screen_list_visuals:
* @screen: the relevant #GdkScreen.
*
* Lists the available visuals for the specified @screen.
* A visual describes a hardware image data format.
* For example, a visual might support 24-bit color, or 8-bit color,
* and might expect pixels to be in a certain format.
*
* Call g_list_free() on the return value when youre finished with it.
*
* Returns: (transfer container) (element-type GdkVisual):
* a list of visuals; the list must be freed, but not its contents
*
* Since: 2.2
**/
GList *
gdk_screen_list_visuals (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
return GDK_SCREEN_GET_CLASS (screen)->list_visuals (screen);
}
/**
* gdk_screen_get_system_visual:
* @screen: a #GdkScreen.
*
* Get the systems default visual for @screen.
* This is the visual for the root window of the display.
* The return value should not be freed.
*
* Returns: (transfer none): the system visual
*
* Since: 2.2
**/
GdkVisual *
gdk_screen_get_system_visual (GdkScreen * screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
return GDK_SCREEN_GET_CLASS (screen)->get_system_visual (screen);
}
/**
* gdk_screen_get_rgba_visual:
* @screen: a #GdkScreen
*
* Gets a visual to use for creating windows with an alpha channel.
* The windowing system on which GTK+ is running
* may not support this capability, in which case %NULL will
* be returned. Even if a non-%NULL value is returned, its
* possible that the windows alpha channel wont be honored
* when displaying the window on the screen: in particular, for
* X an appropriate windowing manager and compositing manager
* must be running to provide appropriate display.
*
* This functionality is not implemented in the Windows backend.
*
* For setting an overall opacity for a top-level window, see
* gdk_window_set_opacity().
*
* Returns: (nullable) (transfer none): a visual to use for windows
* with an alpha channel or %NULL if the capability is not
* available.
*
* Since: 2.8
**/
GdkVisual *
gdk_screen_get_rgba_visual (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
return GDK_SCREEN_GET_CLASS (screen)->get_rgba_visual (screen);
}
/**
* gdk_screen_is_composited:
* @screen: a #GdkScreen
*
* Returns whether windows with an RGBA visual can reasonably
* be expected to have their alpha channel drawn correctly on
* the screen.
*
* On X11 this function returns whether a compositing manager is
* compositing @screen.
*
* Returns: Whether windows with RGBA visuals can reasonably be
* expected to have their alpha channels drawn correctly on the screen.
*
* Since: 2.10
**/
gboolean
gdk_screen_is_composited (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
return GDK_SCREEN_GET_CLASS (screen)->is_composited (screen);
}
/**
* gdk_screen_get_setting:
* @screen: the #GdkScreen where the setting is located

View File

@@ -41,20 +41,11 @@ G_BEGIN_DECLS
GDK_AVAILABLE_IN_ALL
GType gdk_screen_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkVisual * gdk_screen_get_system_visual (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GdkVisual * gdk_screen_get_rgba_visual (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
gboolean gdk_screen_is_composited (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GdkWindow * gdk_screen_get_root_window (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GdkDisplay * gdk_screen_get_display (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GList * gdk_screen_list_visuals (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
GList * gdk_screen_get_toplevel_windows (GdkScreen *screen);

View File

@@ -58,10 +58,6 @@ struct _GdkScreenClass
void (* get_monitor_workarea) (GdkScreen *screen,
gint monitor_num,
GdkRectangle *dest);
GList * (* list_visuals) (GdkScreen *screen);
GdkVisual * (* get_system_visual) (GdkScreen *screen);
GdkVisual * (* get_rgba_visual) (GdkScreen *screen);
gboolean (* is_composited) (GdkScreen *screen);
gboolean (* get_setting) (GdkScreen *screen,
const gchar *name,
GValue *value);

View File

@@ -129,7 +129,6 @@ typedef struct _GdkAtom *GdkAtom;
#define GDK_NONE _GDK_MAKE_ATOM (0)
/* Forward declarations of commonly used types */
typedef struct _GdkColor GdkColor;
typedef struct _GdkRGBA GdkRGBA;
typedef struct _GdkCursor GdkCursor;
typedef struct _GdkVisual GdkVisual;

View File

@@ -1113,33 +1113,15 @@ sync_native_window_stack_position (GdkWindow *window)
}
}
/**
* gdk_window_new: (constructor)
* @parent: (allow-none): a #GdkWindow, or %NULL to create the window as a child of
* the default root window for the default display.
* @attributes: attributes of the new window
* @attributes_mask: (type GdkWindowAttributesType): mask indicating which
* fields in @attributes are valid
*
* Creates a new #GdkWindow using the attributes from
* @attributes. See #GdkWindowAttr and #GdkWindowAttributesType for
* more details. Note: to use this on displays other than the default
* display, @parent must be specified.
*
* Returns: (transfer full): the new #GdkWindow
**/
GdkWindow*
gdk_window_new (GdkWindow *parent,
GdkWindowAttr *attributes,
gint attributes_mask)
GdkWindowAttr *attributes)
{
GdkWindow *window;
GdkScreen *screen;
GdkDisplay *display;
int x, y;
gboolean native;
GdkEventMask event_mask;
GdkWindow *real_parent;
g_return_val_if_fail (attributes != NULL, NULL);
@@ -1163,31 +1145,14 @@ gdk_window_new (GdkWindow *parent,
window = _gdk_display_create_window (display);
/* Windows with a foreign parent are treated as if they are children
* of the root window, except for actual creation.
*/
real_parent = parent;
if (GDK_WINDOW_TYPE (parent) == GDK_WINDOW_FOREIGN)
parent = gdk_screen_get_root_window (screen);
window->parent = parent;
window->accept_focus = TRUE;
window->focus_on_map = TRUE;
window->event_compression = TRUE;
if (attributes_mask & GDK_WA_X)
x = attributes->x;
else
x = 0;
if (attributes_mask & GDK_WA_Y)
y = attributes->y;
else
y = 0;
window->x = x;
window->y = y;
window->x = attributes->x;
window->y = attributes->y;
window->width = (attributes->width > 1) ? (attributes->width) : (1);
window->height = (attributes->height > 1) ? (attributes->height) : (1);
window->alpha = 255;
@@ -1255,19 +1220,24 @@ gdk_window_new (GdkWindow *parent,
if (window->parent->window_type == GDK_WINDOW_ROOT)
native = TRUE; /* Always use native windows for toplevels */
#ifdef GDK_WINDOWING_WAYLAND
if (window->window_type == GDK_WINDOW_SUBSURFACE)
native = TRUE; /* Always use native windows for subsurfaces as well */
#endif
if (native)
{
event_mask = get_native_event_mask (window);
/* Create the impl */
_gdk_display_create_window_impl (display, window, real_parent, screen, event_mask, attributes, attributes_mask);
_gdk_display_create_window_impl (display, window, parent, screen, event_mask, attributes);
window->impl_window = window;
parent->impl_window->native_children = g_list_prepend (parent->impl_window->native_children, window);
/* This will put the native window topmost in the native parent, which may
* be wrong wrt other native windows in the non-native hierarchy, so restack */
if (!_gdk_window_has_impl (real_parent))
if (!_gdk_window_has_impl (parent))
sync_native_window_stack_position (window);
}
else
@@ -1295,6 +1265,109 @@ gdk_window_new (GdkWindow *parent,
return window;
}
/**
* gdk_window_new_toplevel: (constructor)
* @display: the display to create the window on
* @event_mask: event mask (see gdk_window_set_events())
* @width: width of new window
* @height: height of new window
*
* Creates a new toplevel window. The window will be managed by the window
* manager.
*
* Returns: (transfer full): the new #GdkWindow
*
* Since: 3.90
**/
GdkWindow *
gdk_window_new_toplevel (GdkDisplay *display,
gint event_mask,
gint width,
gint height)
{
GdkWindowAttr attr;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
attr.event_mask = event_mask;
attr.wclass = GDK_INPUT_OUTPUT;
attr.x = 0;
attr.y = 0;
attr.width = width;
attr.height = height;
attr.window_type = GDK_WINDOW_TOPLEVEL;
return gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (display)),
&attr);
}
/**
* gdk_window_new_popup: (constructor)
* @display: the display to create the window on
* @event_mask: event mask (see gdk_window_set_events())
* @position: position of the window on screen
*
* Creates a new toplevel popup window. The window will bypass window
* management.
*
* Returns: (transfer full): the new #GdkWindow
*
* Since: 3.90
**/
GdkWindow *
gdk_window_new_popup (GdkDisplay *display,
gint event_mask,
const GdkRectangle *position)
{
GdkWindowAttr attr;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (position != NULL, NULL);
attr.event_mask = event_mask;
attr.wclass = GDK_INPUT_OUTPUT;
attr.x = position->x;
attr.y = position->y;
attr.width = position->width;
attr.height = position->height;
attr.window_type = GDK_WINDOW_TEMP;
return gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (display)),
&attr);
}
/**
* gdk_window_new_temp: (constructor)
* @display: the display to create the window on
*
* Creates a new toplevel temporary window. The window will be
* situated off-screen and not handle output.
*
* You most likely do not want to use this function.
*
* Returns: (transfer full): the new #GdkWindow
*
* Since: 3.90
**/
GdkWindow *
gdk_window_new_temp (GdkDisplay *display)
{
GdkWindowAttr attr;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
attr.event_mask = 0;
attr.wclass = GDK_INPUT_ONLY;
attr.x = -100;
attr.y = -100;
attr.width = 10;
attr.height = 10;
attr.window_type = GDK_WINDOW_TEMP;
return gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (display)),
&attr);
}
/**
* gdk_window_new_child: (constructor)
* @parent: the parent window
@@ -1324,7 +1397,7 @@ gdk_window_new_child (GdkWindow *parent,
attr.height = position->height;
attr.window_type = GDK_WINDOW_CHILD;
return gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
return gdk_window_new (parent, &attr);
}
/**
@@ -1356,7 +1429,7 @@ gdk_window_new_input (GdkWindow *parent,
attr.height = position->height;
attr.window_type = GDK_WINDOW_CHILD;
return gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
return gdk_window_new (parent, &attr);
}
static gboolean
@@ -1673,7 +1746,7 @@ gdk_window_ensure_native (GdkWindow *window)
window, parent,
screen,
get_native_event_mask (window),
NULL, 0);
NULL);
new_impl = window->impl;
parent->impl_window->native_children =
@@ -2819,7 +2892,6 @@ gdk_window_begin_draw_frame (GdkWindow *window,
const cairo_region_t *region)
{
GdkDrawingContext *context;
GdkWindowImplClass *impl_class;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
@@ -2834,18 +2906,7 @@ gdk_window_begin_draw_frame (GdkWindow *window,
if (gdk_window_has_native (window) && gdk_window_is_toplevel (window))
gdk_window_begin_paint_internal (window, region);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
if (impl_class->create_draw_context != NULL)
{
context = impl_class->create_draw_context (window, region);
}
else
{
context = g_object_new (GDK_TYPE_DRAWING_CONTEXT,
"window", window,
"clip", region,
NULL);
}
context = GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_draw_context (window, region);
/* Do not take a reference, to avoid creating cycles */
window->drawing_context = context;
@@ -2872,8 +2933,6 @@ void
gdk_window_end_draw_frame (GdkWindow *window,
GdkDrawingContext *context)
{
GdkWindowImplClass *impl_class;
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (GDK_IS_DRAWING_CONTEXT (context));
@@ -2884,17 +2943,14 @@ gdk_window_end_draw_frame (GdkWindow *window,
"gdk_window_end_draw_frame().", window);
return;
}
g_return_if_fail (window->drawing_context == context);
if (gdk_window_has_native (window) && gdk_window_is_toplevel (window))
gdk_window_end_paint_internal (window);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
if (impl_class->destroy_draw_context != NULL)
impl_class->destroy_draw_context (window, context);
else
g_object_unref (context);
window->drawing_context = NULL;
g_object_unref (context);
}
/*< private >
@@ -3119,62 +3175,6 @@ _gdk_window_ref_cairo_surface (GdkWindow *window)
}
}
#if 0
/**
* gdk_cairo_create:
* @window: a #GdkWindow
*
* Creates a Cairo context for drawing to @window.
*
* Note that calling cairo_reset_clip() on the resulting #cairo_t will
* produce undefined results, so avoid it at all costs.
*
* Typically, this function is used to draw on a #GdkWindow out of the paint
* cycle of the toolkit; this should be avoided, as it breaks various assumptions
* and optimizations.
*
* If you are drawing on a native #GdkWindow in response to a %GDK_EXPOSE event
* you should use gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context()
* instead. GTK will automatically do this for you when drawing a widget.
*
* Returns: A newly created Cairo context. Free with
* cairo_destroy() when you are done drawing.
*
* Since: 2.8
*
* Deprecated: 3.22: Use gdk_window_begin_draw_frame() and
* gdk_drawing_context_get_cairo_context() instead
**/
cairo_t *
gdk_cairo_create (GdkWindow *window)
{
cairo_region_t *region;
cairo_surface_t *surface;
cairo_t *cr;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
surface = _gdk_window_ref_cairo_surface (window);
cr = cairo_create (surface);
region = gdk_window_get_current_paint_region (window);
gdk_cairo_region (cr, region);
cairo_region_destroy (region);
cairo_clip (cr);
/* Assign a drawing context, if one is set; if gdk_cairo_create()
* is called outside of a frame drawing then this is going to be
* NULL.
*/
gdk_cairo_set_drawing_context (cr, window->drawing_context);
cairo_surface_destroy (surface);
return cr;
}
#endif
/* Code for dirty-region queueing
*/
static GSList *update_windows = NULL;
@@ -5318,23 +5318,6 @@ gdk_window_move_resize_toplevel (GdkWindow *window,
_gdk_synthesize_crossing_events_for_geometry_change (window);
}
static void
configure_native_child (GdkWindow *window)
{
GdkEvent *event;
event = gdk_event_new (GDK_CONFIGURE);
event->configure.window = g_object_ref (window);
event->configure.send_event = FALSE;
event->configure.x = window->x;
event->configure.y = window->y;
event->configure.width = window->width;
event->configure.height = window->height;
gdk_event_put (event);
gdk_event_free (event);
}
static void
move_native_children (GdkWindow *private)
@@ -5355,10 +5338,7 @@ move_native_children (GdkWindow *private)
child->width, child->height);
}
else
{
configure_native_child (child);
move_native_children (child);
}
move_native_children (child);
}
}
@@ -5373,6 +5353,7 @@ gdk_window_move_resize_internal (GdkWindow *window,
cairo_region_t *old_region, *new_region;
GdkWindowImplClass *impl_class;
gboolean expose;
int old_abs_x, old_abs_y;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -5430,6 +5411,9 @@ gdk_window_move_resize_internal (GdkWindow *window,
window->height = height;
}
old_abs_x = window->abs_x;
old_abs_y = window->abs_y;
recompute_visible_regions (window, FALSE);
if (gdk_window_has_impl (window))
@@ -5442,7 +5426,8 @@ gdk_window_move_resize_internal (GdkWindow *window,
window->x, window->y,
window->width, window->height);
}
else
else if (old_abs_x != window->abs_x ||
old_abs_y != window->abs_y)
move_native_children (window);
if (expose)
@@ -9144,9 +9129,8 @@ gdk_window_set_urgency_hint (GdkWindow *window,
* gdk_window_move_resize().
*
* Note that on X11, this effect has no effect on windows
* of type %GDK_WINDOW_TEMP or windows where override redirect
* has been turned on via gdk_window_set_override_redirect()
* since these windows are not resizable by the user.
* of type %GDK_WINDOW_TEMP since these windows are not resizable
* by the user.
*
* Since you cant count on the windowing system doing the
* constraints for programmatic resizes, you should generally
@@ -9292,28 +9276,6 @@ gdk_window_get_frame_extents (GdkWindow *window,
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->get_frame_extents (window, rect);
}
/**
* gdk_window_set_override_redirect:
* @window: a toplevel #GdkWindow
* @override_redirect: %TRUE if window should be override redirect
*
* An override redirect window is not under the control of the window manager.
* This means it wont have a titlebar, wont be minimizable, etc. - it will
* be entirely under the control of the application. The window manager
* cant see the override redirect window at all.
*
* Override redirect should only be used for short-lived temporary
* windows, such as popup menus. #GtkMenu uses an override redirect
* window in its implementation, for example.
*
**/
void
gdk_window_set_override_redirect (GdkWindow *window,
gboolean override_redirect)
{
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->set_override_redirect (window, override_redirect);
}
/**
* gdk_window_set_accept_focus:
* @window: a toplevel #GdkWindow
@@ -9996,10 +9958,6 @@ gdk_window_begin_move_drag (GdkWindow *window,
* with alpha, or use gtk_widget_set_opacity() to set an overall opacity
* for your widgets.
*
* For child windows this function only works for non-native windows.
*
* For setting up per-pixel alpha topelevels, see gdk_screen_get_rgba_visual().
*
* Support for non-toplevel windows was added in 3.8.
*
* Since: 2.12

View File

@@ -38,7 +38,6 @@
G_BEGIN_DECLS
typedef struct _GdkGeometry GdkGeometry;
typedef struct _GdkWindowAttr GdkWindowAttr;
typedef struct _GdkWindowRedirect GdkWindowRedirect;
/**
@@ -83,30 +82,6 @@ typedef enum
GDK_WINDOW_SUBSURFACE
} GdkWindowType;
/**
* GdkWindowAttributesType:
* @GDK_WA_TITLE: Honor the title field
* @GDK_WA_X: Honor the X coordinate field
* @GDK_WA_Y: Honor the Y coordinate field
* @GDK_WA_NOREDIR: Honor the override_redirect field
* @GDK_WA_TYPE_HINT: Honor the type_hint field
*
* Used to indicate which fields in the #GdkWindowAttr struct should be honored.
* For example, if you filled in the “title” and “x” fields of #GdkWindowAttr,
* pass “@GDK_WA_X | @GDK_WA_TITLE” to gdk_window_new(). Fields in
* #GdkWindowAttr not covered by a bit in this enum are required; for example,
* the @width/@height, @wclass, and @window_type fields are required, they have
* no corresponding flag in #GdkWindowAttributesType.
*/
typedef enum
{
GDK_WA_TITLE = 1 << 1,
GDK_WA_X = 1 << 2,
GDK_WA_Y = 1 << 3,
GDK_WA_NOREDIR = 1 << 4,
GDK_WA_TYPE_HINT = 1 << 5
} GdkWindowAttributesType;
/* Size restriction enumeration.
*/
/**
@@ -321,36 +296,6 @@ typedef enum
GDK_FULLSCREEN_ON_ALL_MONITORS
} GdkFullscreenMode;
/**
* GdkWindowAttr:
* @title: title of the window (for toplevel windows)
* @event_mask: event mask (see gdk_window_set_events())
* @x: X coordinate relative to parent window (see gdk_window_move())
* @y: Y coordinate relative to parent window (see gdk_window_move())
* @width: width of window
* @height: height of window
* @wclass: #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible
* window that receives events)
* @window_type: type of window
* @cursor: cursor for the window (see gdk_window_set_cursor())
* @override_redirect: %TRUE to bypass the window manager
* @type_hint: a hint of the function of the window
*
* Attributes to use for a newly-created window.
*/
struct _GdkWindowAttr
{
gchar *title;
gint event_mask;
gint x, y;
gint width;
gint height;
GdkWindowWindowClass wclass;
GdkWindowType window_type;
gboolean override_redirect;
GdkWindowTypeHint type_hint;
};
/**
* GdkGeometry:
* @min_width: minimum width of window (or -1 to use requisition, with
@@ -471,10 +416,17 @@ struct _GdkWindowClass
*/
GDK_AVAILABLE_IN_ALL
GType gdk_window_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkWindow* gdk_window_new (GdkWindow *parent,
GdkWindowAttr *attributes,
gint attributes_mask);
GDK_AVAILABLE_IN_3_90
GdkWindow * gdk_window_new_toplevel (GdkDisplay *display,
gint event_mask,
int width,
int height);
GDK_AVAILABLE_IN_3_90
GdkWindow * gdk_window_new_popup (GdkDisplay *display,
gint event_mask,
const GdkRectangle *position);
GDK_AVAILABLE_IN_3_90
GdkWindow * gdk_window_new_temp (GdkDisplay *display);
GDK_AVAILABLE_IN_3_90
GdkWindow * gdk_window_new_child (GdkWindow *parent,
gint event_mask,
@@ -538,9 +490,6 @@ GDK_AVAILABLE_IN_ALL
void gdk_window_set_user_data (GdkWindow *window,
gpointer user_data);
GDK_AVAILABLE_IN_ALL
void gdk_window_set_override_redirect (GdkWindow *window,
gboolean override_redirect);
GDK_AVAILABLE_IN_ALL
gboolean gdk_window_get_accept_focus (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
void gdk_window_set_accept_focus (GdkWindow *window,

View File

@@ -186,8 +186,6 @@ struct _GdkWindowImplClass
GdkWindow *parent);
void (* get_frame_extents) (GdkWindow *window,
GdkRectangle *rect);
void (* set_override_redirect) (GdkWindow *window,
gboolean override_redirect);
void (* set_accept_focus) (GdkWindow *window,
gboolean accept_focus);
void (* set_focus_on_map) (GdkWindow *window,
@@ -309,8 +307,6 @@ struct _GdkWindowImplClass
GdkDrawingContext *(* create_draw_context) (GdkWindow *window,
const cairo_region_t *region);
void (* destroy_draw_context) (GdkWindow *window,
GdkDrawingContext *context);
};
/* Interface Functions */

View File

@@ -24,6 +24,7 @@ libgdk_mir_la_SOURCES = \
gdkmircursor.c \
gdkmirdevicemanager.c \
gdkmirdisplay.c \
gdkmirdrawingcontext.c \
gdkmireventsource.c \
gdkmirglcontext.c \
gdkmirkeyboard.c \

View File

@@ -83,7 +83,7 @@ GdkCursor *_gdk_mir_cursor_new_for_name (GdkDisplay *display, const gchar *name)
const gchar *_gdk_mir_cursor_get_name (GdkCursor *cursor);
GdkWindowImpl *_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window, GdkWindowAttr *attributes, gint attributes_mask);
GdkWindowImpl *_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window);
void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state);
@@ -95,6 +95,8 @@ void _gdk_mir_window_impl_set_cursor_state (GdkMirWindowImpl *impl, gdouble x, g
void _gdk_mir_window_impl_get_cursor_state (GdkMirWindowImpl *impl, gdouble *x, gdouble *y, gboolean *cursor_inside, guint *button_state);
GdkDrawingContext *gdk_mir_drawing_context_new (GdkWindow *window, const cairo_region_t *region);
GdkMirEventSource *_gdk_mir_display_get_event_source (GdkDisplay *display);
GdkMirEventSource *_gdk_mir_event_source_new (GdkDisplay *display);

View File

@@ -393,8 +393,7 @@ gdk_mir_display_create_window_impl (GdkDisplay *display,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask)
GdkWindowAttr *attributes)
{
//g_printerr ("gdk_mir_display_create_window_impl");
//g_printerr (" window=%p", window);
@@ -404,7 +403,7 @@ gdk_mir_display_create_window_impl (GdkDisplay *display,
if (attributes->wclass == GDK_INPUT_OUTPUT)
{
window->impl = _gdk_mir_window_impl_new (display, window, attributes, attributes_mask);
window->impl = _gdk_mir_window_impl_new (display, window);
window->impl_window = window;
}
else /* attributes->wclass == GDK_INPUT_ONLY */

View File

@@ -0,0 +1,63 @@
/* GDK - The GIMP Drawing Kit
* Copyright 2016 Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#define GDK_TYPE_MIR_DRAWING_CONTEXT (gdk_mir_drawing_context_get_type ())
#define GDK_MIR_DRAWING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_MIR_DRAWING_CONTEXT, GdkMirDrawingContext))
#define GDK_IS_MIR_DRAWING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_MIR_DRAWING_CONTEXT))
#define GDK_MIR_DRAWING_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_DRAWING_CONTEXT, GdkMirDrawingContextClass))
#define GDK_IS_MIR_DRAWING_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_DRAWING_CONTEXT))
#define GDK_MIR_DRAWING_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_DRAWING_CONTEXT, GdkMirDrawingContextClass))
typedef struct _GdkMirDrawingContext GdkMirDrawingContext;
typedef struct _GdkMirDrawingContextClass GdkMirDrawingContextClass;
struct _GdkMirDrawingContext
{
GdkDrawingContext parent_instance;
};
struct _GdkMirDrawingContextClass
{
GdkDrawingContextClass parent_instance;
};
GType gdk_mir_drawing_context_get_type (void) G_GNUC_CONST;
G_DEFINE_TYPE (GdkMirDrawingContext, gdk_mir_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
static void
gdk_mir_drawing_context_class_init (GdkMirDrawingContextClass *klass)
{
}
static void
gdk_mir_drawing_context_init (GdkMirDrawingContext *self)
{
}
GdkDrawingContext *
gdk_mir_drawing_context_new (GdkWindow *window,
const cairo_region_t *region)
{
return g_object_new (GDK_TYPE_MIR_DRAWING_CONTEXT,
"window", window,
"clip", region,
NULL);
}

View File

@@ -19,7 +19,6 @@
#include "gdkscreenprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkvisualprivate.h"
#include "gdkinternals.h"
#include "gdkmir.h"
@@ -48,8 +47,6 @@ struct GdkMirScreen
/* Current monitor configuration */
MirDisplayConfiguration *display_config;
GdkVisual *visual;
GdkWindow *root_window;
};
@@ -166,7 +163,6 @@ gdk_mir_screen_finalize (GObject *object)
mir_connection_set_display_config_change_callback (get_connection (screen), NULL, NULL);
mir_display_config_destroy (screen->display_config);
g_clear_object (&screen->visual);
g_clear_object (&screen->root_window);
G_OBJECT_CLASS (gdk_mir_screen_parent_class)->finalize (object);
@@ -250,7 +246,6 @@ gdk_mir_screen_get_root_window (GdkScreen *screen)
s->root_window = _gdk_display_create_window (s->display);
s->root_window->impl_window = s->root_window;
s->root_window->visual = s->visual;
s->root_window->window_type = GDK_WINDOW_ROOT;
s->root_window->depth = VISUAL_DEPTH;
s->root_window->x = 0;
@@ -260,7 +255,7 @@ gdk_mir_screen_get_root_window (GdkScreen *screen)
s->root_window->width = width;
s->root_window->height = height;
s->root_window->viewable = TRUE;
s->root_window->impl = _gdk_mir_window_impl_new (s->display, s->root_window, NULL, 0);
s->root_window->impl = _gdk_mir_window_impl_new (s->display, s->root_window);
return s->root_window;
}
@@ -390,35 +385,6 @@ gdk_mir_screen_get_monitor_workarea (GdkScreen *screen,
gdk_mir_screen_get_monitor_geometry (screen, monitor_num, dest);
}
static GList *
gdk_mir_screen_list_visuals (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_list_visuals\n");
return g_list_append (NULL, GDK_MIR_SCREEN (screen)->visual);
}
static GdkVisual *
gdk_mir_screen_get_system_visual (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_system_visual\n");
return GDK_MIR_SCREEN (screen)->visual;
}
static GdkVisual *
gdk_mir_screen_get_rgba_visual (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_get_rgba_visual\n");
return GDK_MIR_SCREEN (screen)->visual;
}
static gboolean
gdk_mir_screen_is_composited (GdkScreen *screen)
{
//g_printerr ("gdk_mir_screen_is_composited\n");
/* We're always composited */
return TRUE;
}
static gboolean
gdk_mir_screen_get_setting (GdkScreen *screen,
const gchar *name,
@@ -689,10 +655,6 @@ gdk_mir_screen_get_monitor_scale_factor (GdkScreen *screen,
static void
gdk_mir_screen_init (GdkMirScreen *screen)
{
screen->visual = g_object_new (GDK_TYPE_VISUAL, NULL);
screen->visual->screen = GDK_SCREEN (screen);
screen->visual->type = VISUAL_TYPE;
screen->visual->depth = VISUAL_DEPTH;
}
static void
@@ -717,10 +679,6 @@ gdk_mir_screen_class_init (GdkMirScreenClass *klass)
screen_class->get_monitor_plug_name = gdk_mir_screen_get_monitor_plug_name;
screen_class->get_monitor_geometry = gdk_mir_screen_get_monitor_geometry;
screen_class->get_monitor_workarea = gdk_mir_screen_get_monitor_workarea;
screen_class->list_visuals = gdk_mir_screen_list_visuals;
screen_class->get_system_visual = gdk_mir_screen_get_system_visual;
screen_class->get_rgba_visual = gdk_mir_screen_get_rgba_visual;
screen_class->is_composited = gdk_mir_screen_is_composited;
screen_class->get_setting = gdk_mir_screen_get_setting;
screen_class->get_monitor_scale_factor = gdk_mir_screen_get_monitor_scale_factor;
}

View File

@@ -166,19 +166,13 @@ get_default_title (void)
}
GdkWindowImpl *
_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window, GdkWindowAttr *attributes, gint attributes_mask)
_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window)
{
GdkMirWindowImpl *impl = g_object_new (GDK_TYPE_MIR_WINDOW_IMPL, NULL);
impl->display = display;
if (attributes && attributes_mask & GDK_WA_TITLE)
impl->title = g_strdup (attributes->title);
else
impl->title = g_strdup (get_default_title ());
if (attributes && attributes_mask & GDK_WA_TYPE_HINT)
impl->type_hint = attributes->type_hint;
impl->title = g_strdup (get_default_title ());
impl->pending_spec_update = TRUE;
@@ -1174,13 +1168,6 @@ gdk_mir_window_impl_get_frame_extents (GdkWindow *window,
//g_printerr ("gdk_mir_window_impl_get_frame_extents window=%p\n", window);
}
static void
gdk_mir_window_impl_set_override_redirect (GdkWindow *window,
gboolean override_redirect)
{
//g_printerr ("gdk_mir_window_impl_set_override_redirect window=%p\n", window);
}
static void
gdk_mir_window_impl_set_accept_focus (GdkWindow *window,
gboolean accept_focus)
@@ -1805,7 +1792,6 @@ gdk_mir_window_impl_class_init (GdkMirWindowImplClass *klass)
impl_class->set_startup_id = gdk_mir_window_impl_set_startup_id;
impl_class->set_transient_for = gdk_mir_window_impl_set_transient_for;
impl_class->get_frame_extents = gdk_mir_window_impl_get_frame_extents;
impl_class->set_override_redirect = gdk_mir_window_impl_set_override_redirect;
impl_class->set_accept_focus = gdk_mir_window_impl_set_accept_focus;
impl_class->set_focus_on_map = gdk_mir_window_impl_set_focus_on_map;
impl_class->set_icon_list = gdk_mir_window_impl_set_icon_list;
@@ -1846,5 +1832,6 @@ gdk_mir_window_impl_class_init (GdkMirWindowImplClass *klass)
impl_class->set_opaque_region = gdk_mir_window_impl_set_opaque_region;
impl_class->set_shadow_width = gdk_mir_window_impl_set_shadow_width;
impl_class->create_gl_context = gdk_mir_window_impl_create_gl_context;
impl_class->create_draw_context = gdk_mir_drawing_context_new;
impl_class->invalidate_for_new_frame = gdk_mir_window_impl_invalidate_for_new_frame;
}

View File

@@ -575,13 +575,12 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
GdkDeviceManager *device_manager;
GdkEvent *event;
GdkWindow *window;
if (current_context)
g_object_unref (current_context);
current_context = g_object_new (GDK_TYPE_QUARTZ_DRAG_CONTEXT, NULL);
update_context_from_dragging_info (sender);
@@ -589,9 +588,8 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
current_context->display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
gdk_drag_context_set_device (current_context,
gdk_device_manager_get_client_pointer (device_manager));
gdk_seat_get_pointer (gdk_display_get_default_seat (current_context->display)));
event = gdk_event_new (GDK_DRAG_ENTER);
event->dnd.window = g_object_ref (window);

View File

@@ -30,6 +30,8 @@ libgdk_quartz_la_SOURCES = \
gdkdevicemanager-core-quartz.h \
gdkdisplay-quartz.c \
gdkdisplaymanager-quartz.c \
gdkdrawingcontext-quartz.c \
gdkdrawingcontext-quartz.h \
gdkdnd-quartz.c \
gdkdnd-quartz.h \
gdkevents-quartz.c \
@@ -46,7 +48,6 @@ libgdk_quartz_la_SOURCES = \
gdkselection-quartz.c \
gdktestutils-quartz.c \
gdkutils-quartz.c \
gdkvisual-quartz.c \
gdkwindow-quartz.c \
gdkwindow-quartz.h \
xcursors.h
@@ -64,7 +65,6 @@ libgdkquartzinclude_HEADERS = \
gdkquartzkeys.h \
gdkquartzscreen.h \
gdkquartzutils.h \
gdkquartzvisual.h \
gdkquartzwindow.h

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