Commit Graph

4778 Commits

Author SHA1 Message Date
Matthias Clasen
db8276f470 Merge branch 'wip/baedert/widget-add-style-class' into 'master'
widget: Add style class API

See merge request GNOME/gtk!1366
2020-01-29 09:46:36 +00:00
Emmanuele Bassi
058f82d03d Add gtk-doc as a subproject
We rely on a specific minimum version of gtk-doc to be able to build the
GTK API reference for the new API. In order to be able to use gtk-doc as
a subproject, though, we need to use a recent version of Meson.
2020-01-29 09:39:21 +01:00
Timm Bäder
a7b34df6af widget: Add style class API
Add GtkWidget API for adding and removing style classes, as well as
checking whether a widget has a style class applied.

Everyone has to go through GtkStyleContext for this these days but with
GtkStyleContext eventually going away, it makse sense for GtkWidget to
have API for this.
2020-01-29 09:36:48 +01:00
Benjamin Otte
632fab0ca7 stylecontext: Get rid of gtk_style_context_get()
... and replace all the calls to it with
gtk_style_context_peek_property().

All the calls are hacks that need to go away btw.
2020-01-28 02:58:02 +01:00
Benjamin Otte
18cb15a05a stylecontext: Remove gtk_style_context_get_section()
The inspectors gets values differently these days.
2020-01-28 02:17:03 +01:00
Benjamin Otte
6c8b65baf9 stylecontext: Remove GTK_STYLE_PROPERTY_* defines
They shouldn't be (and aren't) used anymore.
2020-01-28 02:17:03 +01:00
Benjamin Otte
49b47c9133 Remove GtkWidgetPath
... and all associated demos and tests.
2020-01-28 02:17:02 +01:00
Timm Bäder
942a93250a render: Remove gtk_render_background_get_clip 2020-01-26 18:21:07 +01:00
Timm Bäder
cff8304133 GskTransform: Add gsk_transform_transform_point()
Equivalent of gsk_transform_transform_bounds() and
graphene_matrix_transform_point() respectively.
2020-01-24 06:19:12 +01:00
Benjamin Otte
193eb5b0dd widget: Remove gtk_widget_get_path() 2020-01-21 12:47:16 +01:00
Benjamin Otte
563ad2db1b containter: Remove gtk_container_get_path_for_child() 2020-01-21 12:47:16 +01:00
Matthias Clasen
f5daecf353 Merge branch 'dnd-gestures-2' into 'master'
Add new dnd api

See merge request GNOME/gtk!1278
2020-01-11 06:09:58 +00:00
Matthias Clasen
112aed590f Remove builtin icons altogether
This removes support for GtkCssImageBuiltin and
GtkCssImageBuiltinType from everywhere.
2020-01-10 14:34:56 -05:00
Matthias Clasen
c7dc17d837 docs: Expand the dnd migration hints 2020-01-09 07:47:28 -05:00
Matthias Clasen
42e440a111 docs: Add GtkDragIcon 2020-01-08 18:48:22 -05:00
Matthias Clasen
13adb2591c docs: Add GtkDropTarget section 2020-01-08 18:48:22 -05:00
Matthias Clasen
7b73824dfe docs: Remove dropped drag source apis 2020-01-08 18:48:22 -05:00
Matthias Clasen
403aba82a9 docs: Remove the dnd section
These functions in this section are all gone.
2020-01-08 18:48:22 -05:00
Matthias Clasen
f3be49838f Move code over
Move remaining code from gtkdnd.c to gtkdragdest.c
and nuke gtkdnd.c and gtkdndprivate.h.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e53e0f461e Hook up the GtkDragSource docs 2020-01-08 18:48:20 -05:00
Matthias Clasen
e03bdbe307 docs: Mention DND in the migration guide 2020-01-08 18:48:20 -05:00
Timm Bäder
1e2c03beee rename CODE-OWNERS to CODEOWNERS
gitlab reads the new filename but not the old one.
2020-01-08 21:03:15 +01:00
Timm Bäder
df1d2b8417 gsk: Add GskParseErrorFunc to the docs 2020-01-07 17:27:17 +01:00
Matthias Clasen
156935e0e9 docs: Mention custom tooltip windows in the migration guide
These no longer exist.
2019-12-29 22:09:13 -05:00
Matthias Clasen
52e0eef6cb docs: Touch up menu button docs 2019-12-29 20:31:58 -05:00
Matthias Clasen
85bf4cf895 docs: Mention the demise of menus in the migration guide
This needs more details, but it is a start.

Also add sections about grabs and about toolbar
overflow handling.
2019-12-29 20:31:58 -05:00
Matthias Clasen
9b165c8bec treeview: Use a popover for search
This is a more modern way of doing things, and avoids a window
of type GTK_WINDOW_POPUP. With a popover, it doesn't make sense
to have a positioning function, so remove that api.
2019-12-29 20:31:58 -05:00
Matthias Clasen
0bb9fc65ad Remove gdk_seat_grab
We are no longer using free-standing grabs
in GTK. The replacement is the autohide
functionality of popup surfaces.
2019-12-29 20:31:58 -05:00
Matthias Clasen
7ee5779efc gtk: Remove menu code
GtkMenu, GtkMenuBar, GtkMenuItem and their subclasses
and supporting classes are replaced by model-based popover
implementations.
2019-12-29 20:31:58 -05:00
Matthias Clasen
53d9445715 doc: Build fixes 2019-12-29 20:31:58 -05:00
Matthias Clasen
54b2727b50 docs: Remove mentions of GtkMenuItem 2019-12-29 20:31:58 -05:00
Matthias Clasen
27543120f2 menubutton: Stop supporting menus 2019-12-29 20:31:57 -05:00
Matthias Clasen
4c9b0d82af menutoolbutton: Stop supporting menus 2019-12-29 20:31:57 -05:00
Matthias Clasen
8ee44d200d toolbar: Simplify overflow implementation
Do away with the proxy menu items, and instead
just have toolitems provide a label for overflow
items. We create the overflow widgets ourselves
already, as model buttons.
Also replace the toggle button used for overflow
with a menubutton, simplifying things further.
2019-12-29 20:31:57 -05:00
Matthias Clasen
8b3066127f docs: Avoid using a menu for an example 2019-12-29 18:45:40 -05:00
Matthias Clasen
360239a6c8 docs: Remove menubars from the visual index 2019-12-29 18:45:37 -05:00
Matthias Clasen
80e903afeb docs: Stop taking menubar screenshots
The widget is going away.
2019-12-29 18:44:26 -05:00
Benjamin Otte
c4043a8eef treelistmodel: Improve docs
- Move into its own section
- Split GtkTreeListRow into its own document

Trees are weird with listmodels and they deserve their own treatment,
they shouldn't be mushed up with the rest of the list machinery.
2019-12-15 21:07:54 +01:00
Benjamin Otte
dff86c0e12 eventcontrollermotion: Add getters for the properties
... and use them.

Also, rename them from is/contains-pointer-focus to is/contains-pointer,
that's clear enough and not too long.

Finally, adapt the semantics of contains-pointer to mirror
GtkEventControllerKey::contains-focus. If is-pointer is set, so is
contains-pointer, they are not exclusive.
Which is what all users of this property wanted, too.
2019-12-15 21:07:54 +01:00
Matthias Clasen
353df67c0b Add GtkNative to the docs
It was not included in the generated docs.
2019-12-12 18:21:16 -05:00
Matthias Clasen
050eb9ba73 Fix up GtkBuilderScope docs
They were not hooked into the document generation.
2019-12-12 18:18:49 -05:00
Matthias Clasen
21a032b783 docs: Ignore more private headers 2019-12-12 17:59:24 -05:00
Matthias Clasen
207efd8932 docs: Remove symbols that no longer exist 2019-12-12 17:59:24 -05:00
Benjamin Otte
f8a7f30a0d builder: Add GtkBuilderScope
GtkBuilderScope is an interface that provides the scope that a builder
instance operates in.
It creates closures and resolves types. Language bindings are meant to
use this interface to customize the behavior of builder files, in
particular when instantiating templates.

A default implementation for C is provided via GtkBuilderCScope (to keep
with the awkward naming that glib uses for closures). It is derivable on
purpose so that languages or extensions that extend C can use it.

The reftest code in fact does derive GtkBuilderCScope for its own scope
implementation that implements looking up symbols in modules.

gtk-widget-factory was updated to use the new GtkBuilderCScope to add
its custom callback symbols.
So it does it different from gtk-demo, which uses the normal way of
exporting symbols for dlsym() and thereby makes the 2 demos test the 2
ways GtkBuilder uses for looking up symbols.
2019-12-12 19:39:23 +01:00
Benjamin Otte
1f94028ff7 builder: Add gtk_builder_set_current_object()
Use it as the default object for expression binds and when connecting
signals. It is intended to work kind of as the "this" object while
parsing. In fact, the term "current object" was stolen from the Java
docs and various C++ tutorials for the this pointer.

Set the current object in gtk_widget_init_template() and
GtkListItemBuilder.

This more-or-less replaces the object passed to
gtk_builder_connect_signals() in GTK3.
2019-12-12 19:12:11 +01:00
Matthias Clasen
9f6d12551f Add GtkTreeListRow type to the docs 2019-12-08 17:58:09 -05:00
Matthias Clasen
43c93d6f85 Add missing listmodel and selection types to the docs 2019-12-08 13:56:47 -05:00
Benjamin Otte
b025ee428c builder: Connect signals automatically
gtk_builder_connect_signals() is no longer necessary, because all the
setup that made it necessary to have this extra step is now done
automatically via the closure functions.
2019-11-22 17:42:31 +01:00
Benjamin Otte
b7ff017f8d widget: Change templates to use closure functions
... instead of connect functions.
2019-11-22 17:42:31 +01:00
Benjamin Otte
0627bba5a0 builder: Add gtk_builder_set_closure_func()
This allows bindings and templates to setup a way to create closures.
2019-11-22 08:13:16 +01:00