Commit Graph

4498 Commits

Author SHA1 Message Date
Matthias Clasen
5f01f6f36b Drop GtkStack:homogeneous
We have hhomogeneous and vhomogeneous properties
that can be set individually.

Fixes: #2673
2020-04-28 20:00:12 -04:00
Matthias Clasen
7f1e82d1bc Merge branch 'wip/exalm/titlebuttons' into 'master'
GtkWindowControls + GtkHeaderBar cleanups

See merge request GNOME/gtk!1755
2020-04-26 13:09:35 +00:00
Alexander Mikhaylenko
b5d61eb2c8 docs: Add GtkWindowControls to docs 2020-04-26 15:13:15 +05:00
Matthias Clasen
b2deab6adf Drop gtk_widget_has_grab
This was just a leftover in our public api.
All other grab-related apis are gone.
2020-04-23 14:10:44 -04:00
Matthias Clasen
94906d076a Drop gtk_widget_reset_style
There was a single call left that should not be necessary.
Also drop no longer used attached-window functionality.
2020-04-22 19:30:48 -04:00
Matthias Clasen
723d57eeb5 widget: Add a system_setting_changed vfunc
This gives us a hook to walk the widget tree whenever a global
setting changes and do per-widget invalidations. This will
replace gtk_style_context_reset_widgets().
2020-04-22 19:29:15 -04:00
Matthias Clasen
2ddff872cd css: Drop the -gtk-icon-theme property
We want to always use the current icon theme, and only
have the minimum amount of custom properties.
2020-04-22 12:35:30 -04:00
Claudio Saavedra
e818bf8514 docs: migration guide fixes 2020-04-21 15:37:45 +03:00
Claudio Saavedra
0af16a77fc docs: fix typo 2020-04-21 14:49:13 +03:00
Matthias Clasen
b55195fa2e Move the idle sizer to GtkWindow
This was only living in gtkcontainer.c for historic
reasons. Move it closer to where it belongs, and
rename it from 'idle' to 'layout', since it is
really about the layout phase of the frame clock,
nowadays.
2020-04-20 16:30:45 -04:00
Matthias Clasen
b4c79bad34 Assorted documentation fixes 2020-04-20 00:38:58 -04:00
Matthias Clasen
013cc09651 widget: Remove some leftovers
gtk_widget_can_activate_accel is gone, so remove the
vfunc and declaration.
2020-04-19 23:44:50 -04:00
Matthias Clasen
dbf12d87a1 Add GtkShortcutLabel to the docs 2020-04-19 15:41:51 -04:00
Matthias Clasen
0b6af3bf23 Add GtkCenterLayout to the docs 2020-04-19 15:38:31 -04:00
Matthias Clasen
bc7da45902 docs: Restructure a bit
Split the overview sections off into its own "concepts part.
2020-04-19 13:15:05 -04:00
Matthias Clasen
3c987f073e Remove GdkGeometry from public API
The api to configure surfaces is now GdkToplevelLayout
and GdkPopupLayout. Unfortunately, there's still quite
a bit of internal use of GdkGeometry that will take some
time to clean up, so move it go gdkinternals.h for now.
2020-04-19 10:41:18 -04:00
Matthias Clasen
1e7c56db19 Merge branch 'focus-adjustment' into 'master'
Drop container focus adjustments

See merge request GNOME/gtk!1716
2020-04-18 20:59:50 +00:00
Matthias Clasen
b55b1773c0 docs: Mention focus adjustments in the migration guide 2020-04-18 14:59:52 -04:00
Matthias Clasen
1c472cca00 Drop gtk_container_set_focus_[hv]adjustment
This functionality should be provided by scrollables, see
for example by the recently added GtkViewport:scroll-to-focus.
2020-04-18 14:59:44 -04:00
Matthias Clasen
84fd7cf704 Shorten CSS docs
Fold the two CSS chapters into one, make more compact
tables of selectors and properties, and stop explaining
general CSS syntax.
2020-04-18 12:34:17 -04:00
Matthias Clasen
49f2012d24 migration docs: Updates
Mention shadow type, relief, aspect frame.
2020-04-17 18:46:12 -04:00
Matthias Clasen
19dbbf6fa5 aspectframe: Modernize
Make GtkAspectFrame not derive from GtkFrame anymore,
since frames now always draw, well, a frame. Also,
add proper setters for the properties of GtkAspectFrame.

Update our sole user.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2627
2020-04-17 17:38:52 -04:00
Matthias Clasen
909120ec78 Drop GtkReliefStyle
We are not using this enum anymore.
2020-04-17 10:57:36 -04:00
Matthias Clasen
12d5fdd457 menubutton: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
df1816a29c button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
fdbbef863d Drop GtkShadowType
We are not using this enum anymore.
2020-04-17 10:57:36 -04:00
Matthias Clasen
47ac0db66c viewport: Drop shadow-type
The viewport draws a frame at the same place as
the scrolled window, so there is really no need
to have that ability in both. Just drop the frame
from viewports.
2020-04-17 10:57:36 -04:00
Matthias Clasen
edae2a8dc5 frame: Drop shadow-type
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
2020-04-17 10:57:36 -04:00
Matthias Clasen
285aa226e5 scrolledwindow: Drop shadow-type
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Emmanuele Bassi
f28aa1ba02 Restructure the GdkEvent type hierarchy
GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
using a union of sub-types. This has always been problematic when it
comes to implementing accessor functions: either you get generic API
that takes a GdkEvent and uses a massive switch() to determine which
event types have the data you're looking for; or you create namespaced
accessors, but break language bindings horribly, as boxed types cannot
have derived types.

The recent conversion of GskRenderNode (which had similar issues) to
GTypeInstance, and the fact that GdkEvent is now a completely opaque
type, provide us with the chance of moving GdkEvent to GTypeInstance,
and have sub-types for GdkEvent.

The change from boxed type to GTypeInstance is pretty small, all things
considered, but ends up cascading to a larger commit, as we still have
backends and code in GTK trying to access GdkEvent structures directly.
Additionally, the naming of the public getter functions requires
renaming all the data structures to conform to the namespace/type-name
pattern.
2020-04-16 19:54:02 +01:00
Matthias Clasen
e83d87c20a Add :focus-visible to css docs 2020-04-15 23:14:34 -04:00
Matthias Clasen
71f8649f7f docs: Small revision of input handling overview
Remove a vestigial touch events section.
2020-04-15 08:08:12 -04:00
Matthias Clasen
1205f74106 Always use gtk-doc as a subproject for now
We need the support for actions syntax, among
other things.
2020-04-13 16:40:57 -04:00
Matthias Clasen
9194b7388f Add a GtkAppChooserButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:43:19 -04:00
Matthias Clasen
800f1c03d5 Add a GtkFontButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:28:34 -04:00
Matthias Clasen
15d58a868a Add a GtkColorButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:17:00 -04:00
Matthias Clasen
2aa136a19c Add a GtkFileChooserButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-12 23:45:03 -04:00
Matthias Clasen
703f18ce66 Redo gtk_show_uri_on_window
Make this a full async function, and add a simple wrapper.

Call gtk_show_uri_full() if you need control over the
results, and use gtk_show_uri() if you are fine with
ignoring any errors.
2020-04-11 21:56:32 -04:00
Matthias Clasen
feee281cf8 Drop gtk_get_current_ apis
We have event controller apis to replace these.
There is one remaining use of gtk_get_current_event_time
in gtkwindow.c, so we can't drop the implementation yet.

Add a section in the migration guide for this.
2020-04-11 17:29:27 -04:00
Matthias Clasen
bd56bc9055 Add gtk_event_controller_get_current_event[_state]
For now these are private, to replace internal uses
of gtk_get_current_event[_state], but we may want to
make them public.
2020-04-11 17:29:27 -04:00
Matthias Clasen
c5b4066714 gdk: Small documentation fixes 2020-04-11 10:07:31 -04:00
Matthias Clasen
a6a31827bc Remove gtk_style_context_reset_widgets
This should never be necessary to call from the outside.
Whenever we fail to update styles properly, it is a bug.
2020-04-10 12:45:28 -04:00
Matthias Clasen
f16c829190 Mention focus changes in the migration guide 2020-04-09 18:26:31 -04:00
Matthias Clasen
e7a8a4eb06 Update migration guide
Rewrite the sections about keymaps and menus, and add
hints about modifiers.
2020-04-06 16:32:03 -04:00
Matthias Clasen
1de7719e34 Drop gtk_accelerator_set_default_mod_mask
Our new approach to modifiers works with a fixed set,
there is really no need to customize the modifier
masks if the backends are all supposed to deliver
the same modifiers.
2020-04-06 16:32:03 -04:00
Matthias Clasen
3419d9c04f gtk: Drop gtk_widget_get_modifier_mask
This is not used anymore.
2020-04-06 16:32:03 -04:00
Matthias Clasen
89ad7893ad gdk: Make GdkKeymap a private api
We have replacement apis in GdkDevice and GdkDisplay.
2020-04-06 16:32:03 -04:00
Matthias Clasen
3300686bef gdk: Clean up GdkModifierType
Remove MOD2..MOD5. Backends are expected to just set
the named modifiers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
0a96a483c6 gdk: Redo key events
Add all of the keyboard translation results in the key event,
so we can translate the keyboard state at the time the event
is created, and avoid doing state translation at match time.

We actually need to carry two sets of translation results,
since we ignore CapsLock when matching accelerators, in
gdk_event_matches().

At the same time, drop the scancode field - it is only ever
set on win32, and is basically unused in GTK.

Update all callers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
00b25d5594 Move keymap mapping functions to GdkDisplay
We want to stop exposing GdkKeymap, so this
functionality needs a new home.
2020-04-06 01:40:40 -04:00