Commit Graph

4196 Commits

Author SHA1 Message Date
Matthias Clasen
658397fad0 Documentation fixes
Make sure all types show up in the docs,
and misc other improvements.
2019-07-01 03:17:58 +00:00
Emmanuele Bassi
46403bac12 docs: Add GtkConstraint and friends to the API reference 2019-07-01 00:49:20 +01:00
Matthias Clasen
2405e2711e Add a non-varargs variant of activate_action
I recently turned gtk_widget_activate_action()
into a varargs function. That is more convenient
from C, but we need a non-varargs variant for
bindings. So add the old API back, under the
name gtk_widget_activate_action_variant(),
with a rename-to annotation.
2019-06-24 15:51:39 +00:00
Emmanuele Bassi
03840fb687 Add getter for a monitor connector
The migration from GdkScreen's monitor API to GdkMonitor left out a way
to get the connector's name of a monitor.

While there's no real guarantee coming from the underlying graphics
system that the connector's name is stable, some system components may
use it to uniquely identify a monitor until the next plug in/out event.
2019-06-24 15:38:36 +01:00
Matthias Clasen
1be850d806 Add includes back to gtk4.types.in
Without these, gtkdoc-scangobj doesn't work. Who knew!
2019-06-22 21:42:30 -04:00
Matthias Clasen
35a88c1440 widget: Rename a function
set_enabled is shorter and more to the point
than enabled_changed, now that we no longer have
a callback to query the state.

Adapt all callers.
2019-06-22 17:03:51 -04:00
Matthias Clasen
d1f4068b94 Replace stateful actions by property actions
The only cases of stateful actions we've seen
so far have been boolean properties, and we
don't really want to add much state handling
API, so lets just go with property actions
for now.

Adapt the only user in GtkText.
2019-06-22 17:03:38 -04:00
Matthias Clasen
ea456b80da Make actions minimally introspectable
This will let us autogenerate some docs for
actions, in the future.
2019-06-21 22:47:40 -04:00
Benjamin Otte
27d6276212 bindings: Make gtk_binding_entry_add_signall() private
This function needs a replacement and that will appear after
refactorings.
2019-06-18 15:54:27 -04:00
Matthias Clasen
6581d66652 Docs: expand actions chapter
Mention widget class actions and non-global actions
in various places.
2019-06-18 14:50:24 -04:00
Matthias Clasen
ef031e1a9d Allow registering actions per-class
Add a facility to register and install actions
at class init time. The intended use for these
actions is for

a) context and other model-based menus
b) key bindings

Most of these actions are going to be stateless,
so add separate apis for the simple and stateful
cases.

We avoid creating an action group for these by
teaching the action muxer about these actions.
The action muxer also maintains the enabled
state for these actions.
2019-06-18 14:47:33 -04:00
Matthias Clasen
cc667926d6 Drop gtk_widget_get_action_group
Ths api exposes too much of the internal
action muxer setup; we want to add actions
to the muxer without an action group.
2019-06-15 21:41:11 -04:00
Matthias Clasen
037e205da0 textview: Redo context menus
Drop the ::populate-popup signal and implement
the new context menu api.
2019-06-13 11:59:50 +00:00
Matthias Clasen
964b2574cf label: Redo context menus
Drop the ::populate-popup signal and implement
the new context menu api. Things are a bit more
complicated here, since we have different menus
on links and selectable text.
2019-06-13 11:59:50 +00:00
Matthias Clasen
1b21d6ecba password entry: Adapt to new context menu api 2019-06-13 11:59:50 +00:00
Matthias Clasen
a28d5d1888 text, entry: Implement context menu api
Drop the ::populate-popup signal and implement
the new context menu api.
2019-06-13 11:59:50 +00:00
Matthias Clasen
21a5c7f0eb layout managers: Handle native children
Add a convenience api to skip children
that should not be included in the layout,
and call gtk_native_check_resize on all
native children outside of the vfunc.
2019-06-11 14:52:30 -04:00
Matthias Clasen
3c1163e7f4 popovermenubar: Add docs 2019-06-09 17:42:11 +00:00
Matthias Clasen
609f1659bd Rationalize popover menu apis
Make gtk_popover_new_from_model() return a GtkPopoverMenu,
rename it to gtk_popover_menu_new_from_model() and add
a relative_to argument to gtk_popover_menu_new().

Update all callers.
2019-06-09 17:38:54 +00:00
Matthias Clasen
03964b5edb Remove an unused enum
No use of GtkArrowPlacement anywhere.
2019-06-01 04:11:22 +00:00
Matthias Clasen
57175dd5b1 Drop gdk_event_get_root_coords 2019-05-31 23:36:35 +00:00
Benjamin Otte
7a3ffec762 docs: Fix build 2019-05-30 18:26:32 +02:00
Matthias Clasen
90f330e27a Merge branch 'gesture-click' into 'master'
Rename GtkGestureMultiPress to GtkGestureClick

See merge request GNOME/gtk!878
2019-05-29 18:39:09 +00:00
Matthias Clasen
200373f435 Mention event controller API in the migration guide 2019-05-29 14:17:07 -04:00
Matthias Clasen
d47434bdb6 Mention global coordinates in the migration guide 2019-05-29 18:11:57 +00:00
Matthias Clasen
8ed27d6e3b Drop gdk_surface_move
And its cousin, gdk_surface_move_resize.
These APIs are expecting global coordinates,
which are going away. GTK is not using them
anymore.
2019-05-29 18:04:08 +00:00
Matthias Clasen
12da0a6db1 Drop gdk_device_get_position
Root coordinates are going away, so this
api does not make sense anymore. Use
gdk_surface_get_device_position instead.
We still keep this as internal api for
root-coordinate using backends.
2019-05-29 18:04:08 +00:00
Matthias Clasen
d515c43dce Make gdk_surface_get_origin internal
We still use this function inside gdk in
a number of places, so keep it around.
2019-05-29 18:04:08 +00:00
Matthias Clasen
879f22fd27 Drop gdk_display_get_monitor_at_point
This api expects global coordinates, and
is unused.
2019-05-29 18:04:08 +00:00
Matthias Clasen
a8899cc6a3 window: Drop gtk_window_set_position
This is heavily using global coordinates, and
can't be guaranteed to work across wms / platforms.
2019-05-29 18:04:08 +00:00
Matthias Clasen
987e7878a2 Drop gdk_surface_get_frame_extents
No longer used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
7f65e5f96b Rename GtkGestureMultiPress to GtkGestureClick
The name just made it hard for people to find the
right gesture to use.
2019-05-29 17:10:46 +00:00
Matthias Clasen
ec413357c6 popover: Make it possible to not have an arrow
This will make popovers move flexible for other
uses, such as the Emoji completion popup.
2019-05-28 20:25:16 +00:00
Matthias Clasen
26b4329061 Mention gtk_widget_get_toplevel in the migration guide. 2019-05-28 20:25:16 +00:00
Matthias Clasen
693b2aa4d1 Drop gtk_widget_get_toplevel
Not used anymore.
2019-05-28 20:25:16 +00:00
Matthias Clasen
7b9789d029 Mention gtk_widget_is_toplevel in the migration guide 2019-05-28 20:25:16 +00:00
Matthias Clasen
6674f2764e Drop gtk_widget_is_toplevel
No longer used.
2019-05-28 20:25:16 +00:00
Matthias Clasen
8af89b3380 Mention gtk_widget_get_surface in the migration guide 2019-05-28 20:25:16 +00:00
Matthias Clasen
8fc6f07327 Drop gtk_widget_get_surface
It is no longer used.
2019-05-28 20:25:16 +00:00
Matthias Clasen
9765aabebd Mention modal->autohide rename in migration guide 2019-05-28 20:25:16 +00:00
Matthias Clasen
25aef96d5d popover: Rename modal to autohide
This is the term we use for the surface,
and it matches the behavior a bit better
than modal.

Update all callers.
2019-05-28 20:25:15 +00:00
Matthias Clasen
b99962e7a2 Drop gtk_widget_set_surface
Not used anymore. Only GtkNative's have surfaces.
2019-05-28 20:25:15 +00:00
Matthias Clasen
18788c2a86 Remove gtk_widget_get/set_has_surface
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
18e396ef6c Add gdk_surface_get_parent back
The api is the same, the parent is different.
This now returns the parent of popup surfaces.
2019-05-28 20:25:15 +00:00
Alexander Larsson
ebb89bca0d surface: Remove gdk_surface_set/merge_child_input_shapes()
These are useless now that we don't have child surfaces
2019-05-28 20:25:15 +00:00
Matthias Clasen
b15ba64ec9 surface: Add an autohide property
This api is meant to mimic xdg-popover.grab - we
show the surface, and dismiss it when we get events
on other surfaces. For foreign surfaces, the compositor
handles that for us; for our own, we check outselves
before delivering events to GTK.
2019-05-28 20:25:14 +00:00
Matthias Clasen
d2951d3aac Rename surface constructors
We want to use a gdk_surface_new_popup for popups,
and align the constructor names with the surface
types, so rename

gdk_surface_new_popup -> gdk_surface_new_temp
gdk_surface_new_popup_full -> gdk_surface_new_popup

The temp surface type will disappear eventually.
2019-05-28 20:25:14 +00:00
Matthias Clasen
8536557007 gdk: Drop pass-through surfaces
With client-side windows gone, this property
is no longer used at all, and has been replaced
by a similar concept on the widget level.
Drop it.
2019-05-28 20:25:14 +00:00
Matthias Clasen
2855729cb4 gdk: Drop input-only surfaces
We are not creating such surfaces anymore, and
they were only ever meaningfully implemented
on X11. Drop the concept, and the api for determining
if a surface is input-only.
2019-05-28 20:25:14 +00:00
Matthias Clasen
82c8a05855 Drop gdk_surface_new_temp
This is no longer used, and the only difference
to gdk_surface_new_popup is input-only, which is
an X11-only concept.
2019-05-28 20:25:14 +00:00