Timm Bäder [Mon, 19 Mar 2018 07:18:45 +0000 (08:18 +0100)]
inspector: Use the attach widget as menu parent object
Fixes #101
Timm Bäder [Mon, 19 Mar 2018 07:08:31 +0000 (08:08 +0100)]
Revert "gl renderer: Limit texture node size to clip"
This reverts commit
0234e8e2c94ff6b0c6f4dfcd0c940910a97eca11.
This broke partially clipped-away nodes when they are being transformed,
e.g. by a rotation
Timm Bäder [Sun, 18 Mar 2018 21:00:01 +0000 (22:00 +0100)]
gldriver: Name driver instances 'self'
Timm Bäder [Sun, 18 Mar 2018 19:51:05 +0000 (20:51 +0100)]
progressbar: Remove priv pointer
Timm Bäder [Sun, 18 Mar 2018 13:00:20 +0000 (14:00 +0100)]
progressbar: Remove snapshot implementation
Timm Bäder [Sun, 18 Mar 2018 12:52:55 +0000 (13:52 +0100)]
levelbar: Remove priv pointer
Timm Bäder [Sat, 17 Mar 2018 19:29:36 +0000 (20:29 +0100)]
switch: Avoid a gtk_widget_get_clip call
Since we get the correct clip anyway from the gtk_widget_size_allocate
call above.
Timm Bäder [Sat, 17 Mar 2018 14:45:35 +0000 (15:45 +0100)]
grid: Remove child list
Save the child info using g_object_set_qdata and just use the widget's
built-in child list for everthing else. This is especially simple for
GtkGrid since it has never supported reordering its child widgets.
Timm Bäder [Sat, 17 Mar 2018 14:07:50 +0000 (15:07 +0100)]
paned: Remove priv pointer
Timm Bäder [Sat, 17 Mar 2018 13:59:19 +0000 (14:59 +0100)]
container: Don't use forall() in compute_expand
Use the widget list instead, which saves some code.
Timm Bäder [Sat, 17 Mar 2018 13:54:23 +0000 (14:54 +0100)]
container: Don't use forall() in get_request_mode
We can just use the widget child list, which save some code.
Rico Tzschichholz [Mon, 19 Mar 2018 19:31:15 +0000 (20:31 +0100)]
texture: Fix documentation block of gdk_texture_download
Daniel Boles [Mon, 19 Mar 2018 15:13:04 +0000 (15:13 +0000)]
gdkrgba: Add a missing apostrophe in a doc comment
Quentin Glidic [Thu, 6 Jul 2017 14:31:46 +0000 (16:31 +0200)]
gtkimcontextsimple.c: Use X11_DATA_PREFIX only on X11
Unlike what commit
d01ea18dc3a9acc98fc133ddb53ddc838e4e18f9 says, X11 is
not a requirement for Wayland, so a Wayland-only build is possible. We
just use the same logic as other non-X11 platforms.
https://bugzilla.gnome.org/show_bug.cgi?id=784615
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Benjamin Otte [Sun, 18 Mar 2018 23:26:29 +0000 (00:26 +0100)]
mediafile: Improve error message
We are using media plugins these days, so this is not a compile-time
issue.
Benjamin Otte [Sun, 18 Mar 2018 23:25:17 +0000 (00:25 +0100)]
video: Add gtk_video_get_file()
That function was missing.
Rico Tzschichholz [Sun, 18 Mar 2018 20:47:10 +0000 (21:47 +0100)]
gtk: Fix some g-i annotations warnings
Piotr Drąg [Sun, 18 Mar 2018 20:12:29 +0000 (21:12 +0100)]
Update POTFILES.in
Benjamin Otte [Sun, 18 Mar 2018 02:20:02 +0000 (03:20 +0100)]
mediastream: Add gtk_media_stream_realize/unrealize()
This allows widget to attach their streams to GdkWindow(s)
The idea is to allow attaching a stream to windowing system(s) so the
stream can make use of its resources, in particular GL contexts.
I am however unsure what to attach to:
- GtkWindow
- GdkWindow
- GtkWidget
- GskRenderer
Each of these provide advantages and disadvantages.
So I'm very much open to better suggestions.
Benjamin Otte [Sun, 4 Mar 2018 14:03:26 +0000 (15:03 +0100)]
build: Make GStreamer backend the default
Instead of compiling without media backend by default, we now use the
GStreamer backend.
This means that CI now requires gstreamer support.
Benjamin Otte [Mon, 5 Mar 2018 01:15:29 +0000 (02:15 +0100)]
gtk-demo: Add a simple video player example
For now, it's impossible to unfullscreen. Somebody should figure out a
way to do this.
Benjamin Otte [Fri, 2 Mar 2018 00:56:31 +0000 (01:56 +0100)]
gtk: Add a GStreamer implementation of GtkMediaFile
Benjamin Otte [Tue, 27 Feb 2018 02:58:52 +0000 (03:58 +0100)]
demos: Round up the paintable demos with a media stream
Benjamin Otte [Tue, 27 Feb 2018 02:09:33 +0000 (03:09 +0100)]
demos: Add an animated paintable demo
This builds on the paintable demo.
Benjamin Otte [Tue, 27 Feb 2018 01:28:55 +0000 (02:28 +0100)]
gtk-demo: Add paintable demo
Benjamin Otte [Sat, 24 Feb 2018 22:57:52 +0000 (23:57 +0100)]
demos: Add a video benchmark to widgetbowl demo
Benjamin Otte [Sat, 17 Feb 2018 23:33:17 +0000 (00:33 +0100)]
gtk-demo: Add a video example (with controls) to the images demo
Benjamin Otte [Thu, 1 Mar 2018 03:52:27 +0000 (04:52 +0100)]
gtk: Add GtkVideo
GtkVideo is a simple video player widget. It probably needs some more
configurability, but it does its job.
Benjamin Otte [Mon, 26 Feb 2018 00:32:01 +0000 (01:32 +0100)]
gtk: Add GtkMediaControls
This is a basic first implementation of controls for a GtkMediaStream,
modeled after Totem's UI.
Benjamin Otte [Tue, 27 Feb 2018 22:19:17 +0000 (23:19 +0100)]
gtk: Add ffmpeg implementation of GtkMediaFile
This adds a module using ffmpeg to implement the GtkMediaFile interface.
Matthias Clasen [Thu, 1 Mar 2018 20:46:16 +0000 (21:46 +0100)]
mediafile: Turn into an extension point
This way, we can support external libraries providing implementations of
GtkMediaFile.
We also add a media backend called 'nomedia' that can be enabled to not
compile any support for GtkMediaFile. This is useful when people want to
statically compile GTK into an application that does not use media.
For now, this option is the default.
We also support a new environment variable GTK_MEDIA that allows
selecting the implementation to use.
GTK_MEDIA=help can be used to get info about the available
implementations.
Benjamin Otte [Tue, 27 Feb 2018 16:01:50 +0000 (17:01 +0100)]
gtk: Add GtkMediaFile
GtkMediaFile is an implementation of GtkMediaStream to play back files.
Except it isn't an implementation yet, but only an interface.
Benjamin Otte [Tue, 27 Feb 2018 22:22:26 +0000 (23:22 +0100)]
gtk: Add GtkMediaStream
GtkMediaStream is the new base class for playback of audio and video
streams.
It implements GdkPaintable for rendering.
Rico Tzschichholz [Sun, 18 Mar 2018 19:52:46 +0000 (20:52 +0100)]
texture: Fix compilation by avoiding to include not-yet available headers
Benjamin Otte [Sun, 18 Mar 2018 18:21:33 +0000 (19:21 +0100)]
snapshot: Turn into GObject
This makes GdkSnapshot the base class for GtkSnapshot and hopefully
stops confusing bindings.
C code should see no difference to before.
Benjamin Otte [Sun, 18 Mar 2018 18:20:46 +0000 (19:20 +0100)]
testsuite: Update C++ keywords test to GTK 3.0.0
Benjamin Otte [Sun, 18 Mar 2018 18:08:28 +0000 (19:08 +0100)]
build: Fix printbackends
There's no "auto" option anymore, so remove checks for that option.
Benjamin Otte [Sun, 18 Mar 2018 15:55:15 +0000 (16:55 +0100)]
gltexture: Rename variable
Makes docs build happy.
Benjamin Otte [Sun, 18 Mar 2018 04:14:52 +0000 (05:14 +0100)]
texture: Expose subclasses as subclasses
This is necessary so that bidnings work properly and don't make
gdk_gl_texture_release() a function on GdkTexture.
It also allows code to identify what type of texture they are dealing
with.
Finally, we can now decide to add getters later without screwing
anything up, if we want to allow people to access GL textures directly.
Benjamin Otte [Sun, 18 Mar 2018 03:48:06 +0000 (04:48 +0100)]
gdk: Add GDK_MEMORY_DEFAULT
This is the default memory format.
I added it because it is way better than including a private header and
using GDK_MEMORY_CAIRO_FORMAT_ARGB32.
Benjamin Otte [Sun, 18 Mar 2018 03:38:49 +0000 (04:38 +0100)]
gdk: Remove gdk_texture_new_from_data()
Use gdk_memory_texture_new() instead.
Daniel Boles [Sat, 17 Mar 2018 15:39:36 +0000 (15:39 +0000)]
SpinButton: Desensitise +/- buttons as appropriate
The logic for this in 3 got lost in the move from gadgets to widgets. We
must update the sensitivities when :wrap, :value, or the bounds change.
Close: https://gitlab.gnome.org/GNOME/gtk/issues/88
Timm Bäder [Sat, 17 Mar 2018 13:13:42 +0000 (14:13 +0100)]
snapshot: Fix some indentation
Timm Bäder [Sat, 17 Mar 2018 10:36:00 +0000 (11:36 +0100)]
container: Fix scroll adjustment coordinates
Timm Bäder [Sat, 17 Mar 2018 10:21:47 +0000 (11:21 +0100)]
testgtk: Remove alpha widgets demo
This used to test that "windowed widgets" and "non-windowed widgets"
handle alpha correctly, but none of the mentioned widgets are windowed
at all anymore. For the rest, this is more easily and dynamically
testable by simply using the inspector.
Timm Bäder [Sat, 17 Mar 2018 10:20:49 +0000 (11:20 +0100)]
testgtk: GtkSpinButton is not a GtkEntry anymore
Timm Bäder [Sat, 17 Mar 2018 10:13:23 +0000 (11:13 +0100)]
layout: Fix scrolling
We accidentally dropped the code that takes the adjustments into account
at some point.
Timm Bäder [Sat, 17 Mar 2018 10:09:33 +0000 (11:09 +0100)]
layout: remove map implementation
gtk_widget_real_map already maps all the child widgets.
Timm Bäder [Sat, 17 Mar 2018 09:59:49 +0000 (10:59 +0100)]
container: Remove focus widget sorting code
The more general version of this code lives in gtkwidgetfocus.s now.
Timm Bäder [Sat, 17 Mar 2018 09:58:06 +0000 (10:58 +0100)]
window: Use widget facilities to sort focus menubars
Timm Bäder [Sat, 17 Mar 2018 09:43:09 +0000 (10:43 +0100)]
menubar: Use GtkWidget focusing facilities
Timm Bäder [Sat, 17 Mar 2018 09:30:10 +0000 (10:30 +0100)]
radibutton: Use focusing facilities from GtkWidget
Instead of the ones from GtkContainer which will hopefully soon go away.
Timm Bäder [Sat, 17 Mar 2018 08:54:22 +0000 (09:54 +0100)]
container: Only do custom focus management if a focus chain is set
Otherwise, the process should be the same one we use in GtkWidget.
Timm Bäder [Sat, 17 Mar 2018 08:53:35 +0000 (09:53 +0100)]
container: Rename parent_class to gtk_container_parent_class
To match the name we have everywhere else.
Timm Bäder [Sat, 17 Mar 2018 07:20:03 +0000 (08:20 +0100)]
widget: Fix a few typos in cursor documentation
Timm Bäder [Fri, 16 Mar 2018 20:33:56 +0000 (21:33 +0100)]
popover: Remove an unneeded local variable
Timm Bäder [Fri, 16 Mar 2018 20:30:31 +0000 (21:30 +0100)]
magnifier: Clip child node to magnifier size
It's still broken in several other ways, but now one less.
Timm Bäder [Fri, 16 Mar 2018 16:58:14 +0000 (17:58 +0100)]
Fix a few get_allocated_width/height usages
Timm Bäder [Fri, 16 Mar 2018 08:40:57 +0000 (09:40 +0100)]
widgetbowl: Add a proper description
Instead of the copy/pasted one from the fishbowl demo.
Daniel Boles [Fri, 16 Mar 2018 22:11:58 +0000 (22:11 +0000)]
Notebook: Don’t show raw underline/markup in popup
If @menu_label == NULL, we create a default page->menu_label. This took
@tab_label.get_label() and passed that to page->menu_label.set_text().
This is wrong because we set the plain text of the menu_label from the
rich text of @tab_label. So, if @tab_label used mnemonics or markup, our
menu_label got the raw underline or markup tags shown in it as raw text.
As we call set_text() on the menu Label, the fix is to be symmetric: use
@tab_label’s get_text() as source, as that strips underlines and markup.
It’s not worth making the default Label ‘inherit’ :use-underline/markup;
that’s a slippery slope, and users wanting such things can just create a
fully fledged GtkLabel to pass as @menu_label to suppress the default.
https://bugzilla.gnome.org/show_bug.cgi?id=705509
Benjamin Otte [Fri, 16 Mar 2018 04:30:35 +0000 (05:30 +0100)]
selection: Remove surface APIs
Benjamin Otte [Fri, 16 Mar 2018 03:50:26 +0000 (04:50 +0100)]
cellrendererpixbuf: Store the texture in the iconhelper paintable
That's kinda weird but allows us to delete the texture case from
GtkIconHelper and GTK_IMAGE_TEXTURE from the GtkImageType enum.
And it doesn't cause any other problems because the cell renderer
can't deal with paintables - otherwise it would mirror GtkImage and have
a "paintable" property instead.
Benjamin Otte [Fri, 16 Mar 2018 03:29:42 +0000 (04:29 +0100)]
image: Remove gtk_image_set_texture()
gtk_image_get_paintable() is a perfect replacement, so use that one.
Benjamin Otte [Thu, 15 Mar 2018 17:48:44 +0000 (18:48 +0100)]
image: Add gtk_image_set_can_shrink()
Images with that value set will request a 0x0 minimum size and scale
down their contents.
Benjamin Otte [Thu, 15 Mar 2018 17:10:01 +0000 (18:10 +0100)]
image: Add gtk_image_set_keep_aspect_ratio()
If set, the image will draw its contents while keeping their aspect
ratio. That means empty areas show up on the top/bottom or left/right.
Also move the special-case snapshotting code for icons to
GtkIconHelper. That's where it belongs.
Benjamin Otte [Thu, 15 Mar 2018 08:40:52 +0000 (09:40 +0100)]
iconhelper: Implement GdkPaintable
This only implements the vfuncs, but does not actually emit signals
yet.
It's also not useed for anything other than snapshot() so far, this
will come in later commits.
Benjamin Otte [Thu, 15 Mar 2018 02:47:19 +0000 (03:47 +0100)]
icontheme: Remove surface support
It's not used anymore.
Benjamin Otte [Thu, 15 Mar 2018 02:01:58 +0000 (03:01 +0100)]
image: Don't handle surfaces anymore
Lots of special cases that are no longer needed because no code uses
surfaces.
Also remove the GdkCellRendererPixbuf:surface property.
Benjamin Otte [Thu, 15 Mar 2018 01:59:03 +0000 (02:59 +0100)]
tests: Port from surface to texture
Benjamin Otte [Thu, 15 Mar 2018 01:53:17 +0000 (02:53 +0100)]
dragsource: Replace gtk_drag_source_set_icon_surface()
... with gtk_drag_source_set_icon_paintable().
Benjamin Otte [Thu, 15 Mar 2018 01:36:13 +0000 (02:36 +0100)]
inspector: Use Textures for images in the property view
Benjamin Otte [Wed, 14 Mar 2018 04:21:56 +0000 (05:21 +0100)]
cellrendererpixbuf: Put pixbufs into textures
... instead of going via surfaces.
A side effect is that the pixbuf property is no longer readable because
we have no good way to get the pixbuf back out of the texture, but I
don't think this matters a lot.
If people want to read the pixbuf property, we need to add some code to
make that work.
Benjamin Otte [Wed, 14 Mar 2018 03:45:25 +0000 (04:45 +0100)]
image: Load resources and files into textures
Instead of loading them into surfaces (which we want to get rid of), we
load into textures.
In fact, we introduce a new paintable subclass called a GtkScaler that
takes care of tracking scaling.
This also ideally gets rid of an extra conversion once renderers learn
to render textures directly.
Benjamin Otte [Wed, 14 Mar 2018 03:38:18 +0000 (04:38 +0100)]
iconhelper: Handle texture scale again
We will need that in the next commits.
Benjamin Otte [Wed, 14 Mar 2018 00:56:30 +0000 (01:56 +0100)]
iconhelper: Turn into a GObject
Benjamin Otte [Tue, 27 Feb 2018 00:55:03 +0000 (01:55 +0100)]
iconhelper: Rework to allow resizing of paintables
GtkImage will now allow paintables to be rendered to the full image and
the image will be sized according to CSS rules for image sizing.
Benjamin Otte [Tue, 27 Feb 2018 00:01:26 +0000 (01:01 +0100)]
iconhelper: Rename function
There are no more icon sizes, this is now the default size we render at.
This naming change is kinda relevant because of CSS terminology.
Benjamin Otte [Mon, 26 Feb 2018 19:51:38 +0000 (20:51 +0100)]
paintable: Add gdk_paintable_compute_concrete_size()
Do the CSS size computation routine. This will be used elsewhere soon.
Benjamin Otte [Fri, 16 Mar 2018 02:38:50 +0000 (03:38 +0100)]
tooltips: Make icon a paintable
Benjamin Otte [Fri, 16 Mar 2018 02:32:05 +0000 (03:32 +0100)]
entry: Make icons a paintable
Benjamin Otte [Sun, 18 Feb 2018 04:27:59 +0000 (05:27 +0100)]
dnd: Make dnd icon API take a paintable
... instead of a texture.
Benjamin Otte [Sun, 18 Feb 2018 04:05:40 +0000 (05:05 +0100)]
aboutdialog: Make logo a paintable
No reason to limit this to textures anymore.
Benjamin Otte [Wed, 28 Feb 2018 00:15:00 +0000 (01:15 +0100)]
cssimage: Implement dynamicity for cross-fades
Benjamin Otte [Sat, 17 Feb 2018 23:14:48 +0000 (00:14 +0100)]
css: Implement dynamic values for array values
This makes animated background-images work.
Benjamin Otte [Sat, 17 Feb 2018 19:29:25 +0000 (20:29 +0100)]
cssimage: Add GtkCssImagePaintable
This type can hold any GdkPaintable.
Use it to replace GtkCssImageSurface, which used to hold a GdkTexture.
Benjamin Otte [Sat, 17 Feb 2018 19:31:14 +0000 (20:31 +0100)]
cssimage: Add gtk_css_image_is_invalid()
Use that instead of hacks to guess when an image is considered invalid
according to https://drafts.csswg.org/css-images-4/#invalid-image
Also add a GtkCssImageInvalid that implements the behavior of invalid
images according to the CSS spec so thjat image implementations can
refer to that image.
Benjamin Otte [Sat, 17 Feb 2018 15:43:21 +0000 (16:43 +0100)]
build: Switch order of subdirectories
This makes demos be compiled/linked before tests. And that means that
while hacking, I can already run widget-factory when the tests are
still linking.
Benjamin Otte [Fri, 16 Feb 2018 09:50:49 +0000 (10:50 +0100)]
image: Implement support for paintables
This includes adding support to GtkImageDefintion and GtkIconHelper.
Only GtkImage handles support for signals from the paintable.
Benjamin Otte [Fri, 16 Feb 2018 08:09:35 +0000 (09:09 +0100)]
iconhelper: transition to GdkPaintable
This is in preparation for accepting the image type paintable.
It's a bit incovenient because we need more code to track width/height
ourselves (as the paintable no longer does it for us), but it's not too
hard.
GtkIconHelper does not track invalidations on the paintable.
Benjamin Otte [Fri, 16 Feb 2018 07:41:48 +0000 (08:41 +0100)]
texture: Implement GdkPaintable
This is kind of evil because we need to link to GTK to be able to
snapshot, but I hope nobody notices.
Benjamin Otte [Fri, 16 Feb 2018 05:30:48 +0000 (06:30 +0100)]
snapshot: "Inherit" from GdkSnapshot
This is a neat trick to get around the circularity between GDK, GSK and
GTK that we inherit with the GdkPaintable interface.
GdkPaintable uses GtkSnapshot
GtkSnapshot creates GskRenderNodes
GskRenderNodes use GdkTextures
GdkTexture will soon implement GdkPaintable
This causes a loop that spans GDK, GSK and GTK and this is the easiest
way to resolve it without breaking bindings (at least that's the idea).
Benjamin Otte [Fri, 16 Feb 2018 04:32:32 +0000 (05:32 +0100)]
gdk: Add GdkPaintable
Benjamin Otte [Tue, 13 Feb 2018 07:22:34 +0000 (08:22 +0100)]
css: Implement support for dynamic values
This adds a new GtkStyleAnimation called GtkCssDynamic (for lack of a
better name) that is spawned whenever at least one dynamic value is part
of the GtkCssStyle.
Benjamin Otte [Tue, 13 Feb 2018 06:04:21 +0000 (07:04 +0100)]
cssimage: Implement dynamic values
No image actually implements it yet, but this is the plumbing.
Benjamin Otte [Tue, 13 Feb 2018 04:55:33 +0000 (05:55 +0100)]
css: Introduce the idea of dynamic values
Dynamic values are values that change their contents with the current
(monotonic) time.
This just introduces the GtkCssValue API for it.
Benjamin Otte [Tue, 13 Mar 2018 15:53:31 +0000 (16:53 +0100)]
vulkan: Our data is premultiplied, don't pretend it isn't
If the backend can't do premultiplied alpha, better make the backend treat
Benjamin Otte [Thu, 15 Mar 2018 02:50:44 +0000 (03:50 +0100)]
css: Remove ability to query css images as cairo patterns
Nobody's doing that. And CSS Images are no longer using Cairo anyway.
If we wanted to support querying them (hint: we don't) we should be
using GdkPaintable.
Benjamin Otte [Tue, 13 Mar 2018 19:04:21 +0000 (20:04 +0100)]
aboutdialog: The default icons are textures these days
Benjamin Otte [Sun, 4 Mar 2018 18:47:56 +0000 (19:47 +0100)]
demos: Unbreak icon for fishbowl demo
351559fcfae1996143e4c1702aa9fc174c6c345f was to eager in simplifying
things.
Benjamin Otte [Fri, 16 Mar 2018 05:04:02 +0000 (06:04 +0100)]
css: Fix compiler warning
...