Commit Graph

140 Commits

Author SHA1 Message Date
Carlos Garnacho
0f4a6bfbf8 gtkeventcontrollerlegacy: Make public
And move ::event into it, dropping the GtkWidget::event signal.
2018-10-15 17:39:04 +02:00
Benjamin Otte
f3834138f7 GtkSortListModel: Add 2018-09-16 18:50:17 +02:00
Benjamin Otte
64d97b233b GtkSliceListModel: add 2018-09-16 18:50:17 +02:00
Benjamin Otte
b6acc31d44 GtkMapListModel: add 2018-09-16 18:50:17 +02:00
Benjamin Otte
6d0fe46cba propertylookuplistmodel: Add
This model just takes an object and a property name and recursively
looks it up. In particular, I want it for:

widget, widget.parent, widget.parent.parent, ...
2018-09-16 18:50:17 +02:00
Benjamin Otte
32ec7dec61 gtk: Add GtkFlattenListModel
We can flatten lists of lists into lists now!
2018-09-16 18:50:17 +02:00
Benjamin Otte
4f70f72349 gtk: Add GtkFilterListModel
This is a GListModel implementation that filters the given source model.
2018-09-16 18:50:17 +02:00
Benjamin Otte
dd94129e27 widget: Add gtk_widget_observe_children()
This creates a listmodel that tracks a widget's children. Doing so turns
adding/removing children from O(1) to O(N) though, so use with caution.
2018-09-16 18:50:17 +02:00
Benjamin Otte
573c63973a gtk: Add GtkTreeListModel
This is a GListModel implementation with a neat API that can be used to
implement trees inside GtkListBox.
2018-09-16 18:50:17 +02:00
Matthias Clasen
eed19c9269 Move tools to a subdirectory
A small step towards splitting up gtk/
2018-08-19 03:41:25 +00:00
Matthias Clasen
5ab90f1a80 Add a kwin color picker
This uses the org.kde.kwin.ColorPicker interface.
2018-08-02 20:53:37 -04:00
Matthias Clasen
16171a232a Add a color picker implementation for gnome-shell
This adds a GtkColorPicker implementation that talks
to gnome-shell to get a color.
2018-07-27 14:23:20 -04:00
Matthias Clasen
031b5cad46 Add a color picker implementation for portals
This adds a GtkColorPicker implementation that talks
to the screnshot portal to get a color.
2018-07-27 14:23:20 -04:00
Matthias Clasen
0cc0714312 Add a color picker interface
This will be used in the color chooser, in subsequent commits.
2018-07-27 14:23:19 -04:00
Benjamin Otte
b7ecfbce21 quartz: Remove gtkdnd-quartz.c
It shows up in my git diff calls and is completely broken.
2018-06-10 02:33:53 +02:00
Benjamin Otte
6546ef3459 picture: Introduce
This commit introduces GtkPicture, which is supposed to complement
GtkImage.

GtkImage will be adapted to always display an icon, while
GtkPicture displays regular imagery.
2018-06-10 02:23:02 +02:00
Christian Hergert
613f7609c2 build: fix meson.build when quartz is used
We need access to the variable earlier in the file when the quartz
backend is being setup.
2018-05-04 17:46:08 -07:00
Benjamin Otte
995b29d8db Merge branch 'lrn/meson-intl' into 'master'
Link libgtk to libintl

See merge request GNOME/gtk!113
2018-04-30 12:25:43 +00:00
Matthias Clasen
1104a8fdb7 Add an emoji completion popup
This widget provides entry completion-like functionality
for Emoji codes like 😁 or 💋.
2018-04-23 18:54:43 -04:00
Руслан Ижбулатов
8c3ee6a38d Link libgtk to libintl
GTK does use libintl directly (in gtkmain.c, for example) and thus
needs to be linked to it (if found and/or needed).

Previously we most likely were getting libintl from glib, but
that stopped for some reason. Either way, explicit linking is
the right thing to do here.
2018-04-11 16:49:18 +00:00
Emmanuele Bassi
a2a99d27c9 Simplify the Wayland code generation
Instead of going through an ancillary script to strip away the
`WL_EXPORT` annotation from the generated code, we should bump up the
required version of Wayland, and use the `private-code` argument for
wayland-scanner, which does the right thing for us.
2018-04-11 15:06:43 +01:00
Carlos Garnacho
f0c8e9de4f gtk: Add GtkGestureStylus
This is a GtkGesture done to deal with stylus events from drawing tablets.
Those have a special number of characteristics that extend a regular
pointer, so it makes sense to wrap that.
2018-04-05 19:26:53 +02:00
Carlos Garnacho
1ce79b29e3 gtk: Add GtkEventControllerKey
This event controller is meant to replace usage from key-press/release-event
handlers all through. Optionally it can be set a GtkIMContext, so interaction
is carried by the controller.
2018-04-05 19:26:04 +02:00
Benjamin Otte
7e078cd940 gtk: Remove debug updates
With the soon-to-arrive automatic updates (aka computing invalid region
from render nodes), this will no longer be necessary.
2018-04-05 14:56:38 +02:00
Benjamin Otte
2d10c2568c gtk: Add GtkWidgetPaintable
A GtkWidgetPaintable is a paintable that observes a given GtkWidget and
renders that widget into a paintable.
2018-04-05 14:56:38 +02:00
Chun-wei Fan
464943e5a6 gtk, demos: Fix builds without HarfBuzz and PangoFT
Really exclude the portions in the gtkfontchooserwidget.c that are built
when HarfBuzz and PangoFT2 are built, and update the Meson files to
exclude such sources as well from the main GTK SO/DLL and from the
gtk4-demo program.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-04-02 19:15:18 +08:00
Руслан Ижбулатов
9e76a6055a W32: Link GTK to pangowin32
Needed for pango_win32_font_logfont() from gtkimcontextime.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-04-01 10:35:02 +00:00
Руслан Ижбулатов
48613eca27 Check for freetype2 version when PangoFT is used
Check for freetype2 version, because pangoft works with any version
(pangoft availability does not indicate that ft2 is new enough), unlike
GTK.

On Windows, since pangoft is optional, we check for the presence of
freetype2 .pc file first after finding that we have pangoft, and then
check for FT_Get_Var_Design_Coordinates() manually by looking for the
freetype headers and .lib first, and then looking for the presence of
that symbol, since freetype2's Visual Studio build system does not
generate a .pc file for us.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-03-28 16:14:37 +08:00
Руслан Ижбулатов
b7d7602750 Make wayland bits in meson.build conditional on wayland use
Otherwise the build won't configure due to its inability to find
wayland-scanner program on systems where no such program is availble.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-03-28 15:39:20 +08:00
Benjamin Otte
7fdcc58532 snapshot: Add gtk_snapshot_to_paintable()
This is intended for DND icons
2018-03-26 18:16:36 +02:00
Benjamin Otte
7cf6da60da gtk: Add GtkVideo
GtkVideo is a simple video player widget. It probably needs some more
configurability, but it does its job.
2018-03-18 21:01:23 +01:00
Benjamin Otte
9700a98f48 gtk: Add GtkMediaControls
This is a basic first implementation of controls for a GtkMediaStream,
modeled after Totem's UI.
2018-03-18 21:01:23 +01:00
Matthias Clasen
e4338c4d42 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.
2018-03-18 21:01:23 +01:00
Benjamin Otte
29cccf5e84 gtk: Add GtkMediaFile
GtkMediaFile is an implementation of GtkMediaStream to play back files.

Except it isn't an implementation yet, but only an interface.
2018-03-18 21:01:23 +01:00
Benjamin Otte
4db1a5f5c4 gtk: Add GtkMediaStream
GtkMediaStream is the new base class for playback of audio and video
streams.

It implements GdkPaintable for rendering.
2018-03-18 21:01:23 +01:00
Benjamin Otte
7844320f10 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.
2018-03-16 06:04:44 +01:00
Benjamin Otte
3faa7e04db cssimage: Add GtkCssImagePaintable
This type can hold any GdkPaintable.

Use it to replace GtkCssImageSurface, which used to hold a GdkTexture.
2018-03-16 06:04:44 +01:00
Benjamin Otte
4beeb6173b 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.
2018-03-16 06:04:44 +01:00
Benjamin Otte
a721d8b78f 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.
2018-03-16 06:04:43 +01:00
Tomasz Miąsko
7ba53de1e8 Include gtk/gtk-a11y.h in introspection file.
The gir XML file contains description of types and functions from
gtk/gtk-a11y.h. Indicate that this header should be included in addition
to gtk/gtk.h in applications written in C. #56
2018-03-03 20:51:30 +01:00
Matthias Clasen
15cc20e7b5 Always include platform immodules
No need to load these as gio modules, we just include
them in libgtk.
2018-02-24 21:34:40 -05:00
Matthias Clasen
29bcc38ae6 Convert immodules to use an extension point
Add an extension point called gtk-im-module, which requires
the type GtkIMContext. Simplify the loading by using GIO
infrastructure. Drop the locale filtering for now, I don't
think it is really necessary nowadays.

Convert existing platform modules to gio modules.
Sill to do: Drop the conditional build machinery.
Either always include them, or never.
2018-02-24 21:34:40 -05:00
Matthias Clasen
4a0854484f Merge branch 'tests-set-schema-dir' into 'master'
tests: Make GSETTINGS_SCHEMA_DIR point to the compiled schemas in the build dir

See merge request GNOME/gtk!21
2018-02-19 18:28:00 +00:00
Matthias Clasen
5b4082ac87 Remove gtkmodules.h
We don't use these definitions anymore.

Also clean up the docs wrt to modules.
2018-02-18 09:41:29 -05:00
Christoph Reiter
1253e7bfcb tests: Make GSETTINGS_SCHEMA_DIR point to the compiled schemas in the build dir
With autotools the schemas were compiled into each test suite directory
and the tests set GSETTINGS_SCHEMA_DIR to the test build directory.

With meson's gnome.compile_schemas() we can not define a target directory
so just make sure it is built in the gtk directory and set GSETTINGS_SCHEMA_DIR
to the gtk build directory when running the tests.

This makes the gtk+:gtk suite pass when no gtk is installed on the system.
2018-02-17 09:48:12 +01:00
Emmanuele Bassi
032dabe137 build: Allow using introspection from subprojects
When building dependencies as subprojects we need to tell the
introspection scanner where to find the introspection data; this
means using GIR targets from the subproject.
2018-02-12 14:25:43 +00:00
Emmanuele Bassi
55c9576d83 build: Use GIR targets for built introspection data
Instead of using `--include-uninstalled` in the scanner arguments, we
can tell Meson to use an introspection target, and it'll do the
appropriate thing for us.
2018-02-12 11:42:44 +00:00
Benjamin Otte
cf030e9ffc rbtree: Privatize header
According to meson it's the only private header that doesn't conform to
the *private.h naming.

Fix that.
2018-02-03 16:24:13 +01:00
Benjamin Otte
dfc131c7ec toolpalette: Remove
The widget was basically unmaintained since GTK 3.0 and the only known
user was Glade.
2018-02-03 11:52:37 +01:00
Benjamin Otte
55874470ff gtk: Remove GtkRecentChooser
It's not used any more, recent files are only used by the filtchooser
and that one uses GtkRecentManager directly.
2018-02-02 23:01:31 +01:00