Commit Graph

49483 Commits

Author SHA1 Message Date
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