Corentin Noël
076b2f11d2
docs: Fix several missing references in the documentation
...
This fixes several typos and missing references
2020-05-11 19:26:20 +02:00
Matthias Clasen
6d969d1026
Update the docs
...
Remove various references to gtk_widget_destroy in the docs.
2020-05-11 12:20:59 -04:00
Matthias Clasen
1306727fb1
window: Remove _set_has_user_ref_count
2020-05-11 12:20:59 -04:00
Matthias Clasen
0f10b170f4
widget: Drop gtk_widget_destroy
2020-05-11 12:20:59 -04:00
Matthias Clasen
48821a64d0
window: Add gtk_window_destroy
...
This is a replacement for gtk_widget_destroy for toplevels.
For now, it is just a wrapper.
2020-05-11 12:19:39 -04:00
Matthias Clasen
573b20a8f8
Drop gtk_widget_destroyed
...
Use g_object_add_weak_pointer or a weak reference instead.
2020-05-11 12:19:39 -04:00
Matthias Clasen
9f3fb69dce
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2729 and #2730
See merge request GNOME/gtk!1870
2020-05-11 12:51:08 +00:00
Matthias Clasen
d2430c70bd
Refresh the tutorial examples
...
Redo this series of examples from 2013, and adapt it to modern
way of doing things. The biggest differences are that we use
a headerbar right from the start, and don't mention the app
menu.
Fixes : #2730
2020-05-11 08:15:56 -04:00
Matthias Clasen
0fc1a290e2
docs: Cosmetic updates to the tutorial
...
Since the meson conversion, we are no longer expanding
gtk-doc references in this file, so take them out. And
touch up the wording in various places.
2020-05-11 08:15:55 -04:00
Matthias Clasen
edc31a264c
widget: Add a :focusable property
...
Add back a property that determines whether an individual
widget will accept focus or not. :can-focus prevents the
focus from ever entering the entire widget hierarchy
below a widget, and :focusable just determines if grabbing
the focus to the widget itself will succeed.
See #2686
2020-05-10 23:24:48 -04:00
Alexander Mikhaylenko
8bd44cb3eb
Add GtkWindowHandle
...
This will allow to move the titlebar handling logic out from GtkWindow.
2020-05-07 23:57:58 +05:00
Matthias Clasen
8ad49b33ed
gestureclick: Drop the area
...
This is a rarely used api, and our general trend has been
to use widgets whenever we need an area singled out.
2020-05-06 14:19:50 -04:00
Matthias Clasen
b96509c030
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!1828
2020-05-06 03:55:55 +00:00
Timm Bäder
14b27446a3
stylecontext: Remove _list_classes() from public API
...
Applications can use gtk_widget_get_css_classes these days.
2020-05-05 08:20:09 +02:00
Matthias Clasen
3c165b3b77
Drop GtkBin
...
It is no longer used anywhere.
2020-05-04 22:53:08 -04:00
Matthias Clasen
5d26af06e4
combobox: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
b96d7b62d1
Add gtk_overlay_remove_overlay
...
Now that GtkOverlay is not a container anymore,
gtk_container_remove can't be used for this anymore,
so add a separate api.
2020-05-04 22:53:08 -04:00
Matthias Clasen
53f9737dcf
overlay: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
e2abe6dd29
searchbar: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
b8d1a9eb0d
flowboxchild: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
686be577d5
revealer: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
b9b1bf85e1
window: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
04e4a02cd0
button: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
67759d4c3e
Use gtk_scrolled_window_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_scrolled_window_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
54b613392b
scrolledwindow: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
ee284a560a
popover: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
937c94bab5
viewport: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
e137152520
aspectframe: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
7f975472a7
frame: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
fd1fe0eed5
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add more detail to the drawing overview
See merge request GNOME/gtk!1811
2020-05-01 21:09:38 +00:00
Benjamin Otte
fa90747815
Merge branch 'wip/exalm/headerbar-title' into 'master'
...
Headerbar title/subtitle cleanups
See merge request GNOME/gtk!1807
2020-05-01 19:39:27 +00:00
Matthias Clasen
431545877e
docs: Add more detail to the drawing overview
2020-05-01 14:24:21 -04:00
Alexander Mikhaylenko
739f681076
headerbar: Rename custom-title to title-widget
...
Now that all the other title-related properties are gone, custom title can
have a more mundane name.
2020-05-01 20:11:19 +05:00
Alexander Mikhaylenko
c2e4e1af73
headerbar: Remove user-settable title
...
Use window title, or custom title widget if it's set. Remove 'title'
property.
Update demos and tests to set the title on the window instead of
headerbar.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
35d50f88c8
headerbar: Remove subtitle
...
Also remove the box containing title and subtitle, as there's only one
label now.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
43a453e465
headerbar: Remove has-subtitle property
...
Subtitle will go too in the next commit, but has-subtitle goes first as
it's broken right now anyway.
2020-05-01 19:48:05 +05:00
Matthias Clasen
74dcbae1f3
docs: Some revisions of the input overview
...
Remove some less than accurate details, and add
an illustration.
2020-05-01 09:26:06 -04:00
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
Matthias Clasen
c9aef3fc4d
Add gdk_event_get_match
...
This is a counterpart to gdk_event_matches() that can
be used to obtain a shortcut matching an event.
2020-04-05 23:37:13 -04:00
Matthias Clasen
e8330c5eec
Add gdk_event_matches
...
Move the elaborate key event matching code from
GtkShortcutTrigger to GdkEvent, which greatly reduces
the amount of keymap api use outside of GDK.
2020-04-05 23:37:13 -04:00
Matthias Clasen
ec854fc503
shortcuts: documentation fixes
...
Update symbol lists, and add examples for parsing triggers
and actions.
2020-04-04 12:22:43 -04:00
Matthias Clasen
5bf030413b
Add new api to the docs
2020-03-30 14:12:14 -04:00
Matthias Clasen
d07e22dc03
Some documentation fixes
2020-03-25 23:14:45 -04:00
Matthias Clasen
ce22ef18f9
docs: Update the overview input chapter
...
Update the wording around events to reflect current
usage, and add information about shortcuts and the
shortcut controller.
2020-03-25 23:14:45 -04:00
Emmanuele Bassi
6e8c78714d
Turn GtkShortcutAction into a GObject
...
Just like we did for GtkShortcutTrigger.
This allows language bindings to properly deal with all the actions.
2020-03-25 23:14:45 -04:00
Benjamin Otte
bb4fbe3d8f
accels: Remove GtkAccelGroup
2020-03-25 23:14:44 -04:00
Benjamin Otte
4c45410d43
widget: Remove gtk_widget_add_accelerator()
...
People should use shortcut controllers instead (global, capture).
A side effect of this is that GtkAccelLabel now lost its method to
magically look up accelerators to display. Somebody needs to add that
back later.
2020-03-25 23:14:28 -04:00
Benjamin Otte
7974751e24
shortcuttrigger: Add gtk_shortcut_triger_new_parse_string()
...
And hook it up into the GtkBuilder infrastructure.
2020-03-25 23:14:28 -04:00
Benjamin Otte
fb6a8f5fc1
shortcuttrigger: Add hash(), equal(), and compare() functions
...
Those are useful for putting triggers in hash tables or getting sorted
output.
2020-03-25 23:14:28 -04:00
Benjamin Otte
4c5d8547be
shortcutaction: Add gtk_shortcut_action_to_string()
...
For all but the callback action, we can print something useful.
2020-03-25 23:14:27 -04:00
Benjamin Otte
a1e9ae5259
shortcutcontroller: Add gtk_shortcut_controller_new_for_model()
...
This is mainly for internal use, but I can't see a reason to not have it
public for people who want to maintain their own lists.
I'm sure gnome-builder will never ever find a way to misuse it.
2020-03-25 23:14:27 -04:00