Matthias Clasen
1de7440c8c
Merge branch 'gdk-cleanups' into 'master'
...
Gdk cleanups
Closes #2790
See merge request GNOME/gtk!2553
2020-09-10 20:21:12 +00:00
Emmanuele Bassi
790733673f
docs: Add note on command line arguments
...
We don't parse them any more, and developers should stop using them when
migrating from GTK3 to GTK4.
2020-09-10 17:53:50 +01:00
Matthias Clasen
d5d4af585d
gdk: Move GdkSurfaceEdge to the right header
...
This is only used in gdktoplevel.h, so move it there.
2020-09-10 00:44:05 -04:00
Matthias Clasen
93078e52c0
gdk: Rename GdkSurfaceState to GdkToplevelState
...
That is what it is.
Fixes : #2790
2020-09-10 00:39:03 -04:00
Matthias Clasen
a8eae7afaa
build: Move the gtk-doc dep to the toplevel
...
We want to include the gtk-doc subproject in release
tarballs, using --include-subprojects, but that only
works if we've actually built the subproject. And
enabling gtk-doc for dist builds is problematic -
it tends to break meson dist.
So declare the gtk-doc dependency independent of
-Dgtk_doc, and use --force-fallback-for for it.
2020-09-04 09:57:14 -04:00
Matthias Clasen
b628338db3
list widgets: Simplify the constructors
...
Now that both arguments to the _new_with_factory() constructors
are nullable, there's no good reason to keep a separate _new()
around. Just make gtk_list_view_new() and gtk_grid_view_new()
take both a model and a factory.
2020-09-01 12:24:06 -04:00
Matthias Clasen
6ccc6a5650
doc shooter: Remove radio button remnants
2020-08-31 08:13:20 -04:00
Matthias Clasen
cff211ea1f
migration guide: Mention button hierarchy changes
2020-08-30 22:25:56 -04:00
Matthias Clasen
17c4838569
Drop GtkRadioButton
2020-08-30 22:25:36 -04:00
Matthias Clasen
28d7f497ef
togglebutton: Add grouping
...
This is the replacement for groups of radiobuttons
with draw-indicator = FALSE.
2020-08-30 22:14:05 -04:00
Matthias Clasen
cfade230ce
docs: Update the gallery image for check buttons
...
Show grouped and ungrouped check buttons.
2020-08-30 21:23:25 -04:00
Matthias Clasen
238d52497d
doc shooter: Drop radio buttons
...
Instead, show grouped checkbuttons.
2020-08-30 21:23:25 -04:00
Matthias Clasen
ba6070b7be
build: The doc shooter works without x11 now
...
No need to restrict the build to just x11.
We're not using pixmaps anymore.
2020-08-30 21:23:25 -04:00
Simon McVittie
43781652b3
docs: Don't build Yelp manual for bundled gtk-doc subproject
...
This adds dependencies that would otherwise be unnecessary.
Signed-off-by: Simon McVittie <smcv@debian.org>
2020-08-25 11:55:35 +01:00
Matthias Clasen
c4d350c260
build: Start using meson feature options
...
Use feature options for things that are optional features,
update the docs.
Visible changes here is that the 'print-backends' option
got renamed to 'print' to go better with 'media', and the
'tracker3' option got renamed to 'tracker'.
For options that have been changed into features, the
syntax now is -Dfeature=enabled or -Dfeature=disabled
or -Dfeature=auto.
2020-08-23 16:45:15 -04:00
Matthias Clasen
125ed52ccb
Merge branch 'new-sysprof' into 'master'
...
Port profiling to sysprof-collector api
See merge request GNOME/gtk!2457
2020-08-21 23:58:09 +00:00
Matthias Clasen
40f3da19ae
Update the docs around profiling
...
Mention sysprof-cli, and stop mentioning GTK_TRACE_FD.
2020-08-21 10:55:01 -04:00
Björn Daase
3ef7772552
docs: Reword GtkTreeView question 28
2020-08-21 15:35:29 +02:00
Björn Daase
24ce38bb36
docs: Reword gtk4-update-icon-cache description
2020-08-21 15:33:12 +02:00
Björn Daase
6315cd977c
*: Fix spelling mistakes found by codespell
2020-08-21 15:29:34 +02:00
Matthias Clasen
ae7cefd97d
Drop style class defines
...
We document the supported style classes by name,
not by macro name, and these macros don't really
add any value. Drop them for GTK 4.
2020-08-14 07:03:27 -04:00
Matthias Clasen
35708162cc
Make GtkNativeInterface private
...
We are not sure yet if allowing out-of-tree
implementations of GtkNative are a good idea.
2020-08-14 07:03:27 -04:00
Matthias Clasen
28c1e74220
docs: Minor tweaks to the tutorial
...
Fix a link, and mention meson in a few places.
2020-08-13 17:45:04 -04:00
Matthias Clasen
221786dda3
lists: Mention list style classes in docs
...
Document that GtkListView, GtkColumnView and GtkListBox
support .rich-list, .navigation-sidebar and .data-table
style classes.
2020-08-13 16:30:21 -04:00
Christian Hergert
4d88e3af17
popover: allow setting popup layout offset
...
Currently there is no way to alter the offset of the popup when positioning
with GdkPopupLayout. This makes using the popup difficult for scenarios
like completion windows where you may need to offset the window by a given
amount for aligning text.
gtk_popover_set_offset() allows setting these values and are analagous to
the function of the same name for GdkPopupLayout.
2020-08-07 17:10:52 -07:00
Matthias Clasen
1d7b273669
docs: Clean up dangling links in gdk docs
...
Clean up references to no-longer-existing APIs.
2020-08-05 15:45:43 -04:00
Matthias Clasen
d7c4f93c76
Merge branch 'wip/compute-size' into 'master'
...
Compute size via signal
See merge request GNOME/gtk!2325
2020-08-05 16:19:19 +00:00
Jonas Ådahl
2ff74eb667
gdk/toplevel: Negotiate surface size via a compute-size signal
...
GTK will not up front know how to correctly calculate a size, since it
will not be able to reliably predict the constraints that may exist
where it will be mapped.
Thus, to handle this, calculate the size of the toplevel by having GDK
emitting a signal called 'compute-size' that will contain information
needed for computing a toplevel window size.
This signal may be emitted at any time, e.g. during
gdk_toplevel_present(), or spontaneously if constraints change.
This also drops the max size from the toplevel layout, while moving the
min size from the toplevel layout struct to the struct passed via the
signal,
This needs changes to a test case where we make sure we process
GDK_CONFIGURE etc, which means we also needs to show the window and
process all pending events in the test-focus-chain test case.
2020-08-05 15:49:00 +02:00
Matthias Clasen
e60d6f70bf
Merge branch 'drop-accel-label' into 'master'
...
Drop accel label
See merge request GNOME/gtk!2368
2020-08-05 03:44:43 +00:00
Matthias Clasen
8562c623d3
Drop GtkAccelLabel
...
We no longer use this widget anywhere.
2020-08-04 23:05:18 -04:00
Matthias Clasen
2b8aeed4d8
Drop GtkCallback
...
It is no longer used in any of our public APIs.
2020-08-04 22:24:33 -04:00
Matthias Clasen
ce89f1eda1
selectionfiltermodel: Drop a leftover symbol
...
We decided not to do new_for_type() for list model
wrappers, so this function does not exist.
2020-08-04 22:11:34 -04:00
Matthias Clasen
f561000124
docs: Clean up many dangling links
...
In many cases, these were references to no longer
existing api, so some rewording was necessary.
2020-08-04 22:11:34 -04:00
Matthias Clasen
93c9600145
docs: Drop GtkPlacesSidebar from visual index
...
No longer a public widget.
2020-08-04 19:31:22 -04:00
Matthias Clasen
b3a874c4d1
Merge branch 'modern-doc-shooter' into 'master'
...
Modern doc shooter
See merge request GNOME/gtk!2363
2020-08-04 11:22:07 +00:00
Matthias Clasen
f49d267187
docs: Add a gallery image for GtkDropDown
2020-08-04 00:33:37 -04:00
Matthias Clasen
2c306f75c4
docs: Add a gallery image for GtkEditableLabel
2020-08-04 00:26:51 -04:00
Matthias Clasen
d7cd28c641
docs: Add gallery image for GtkPasswordEntry
2020-08-04 00:19:08 -04:00
Matthias Clasen
92cb629640
docs: Avoid focus in gallery images
...
Seeing focus rectangles and selections in these
images is a distraction, and we used to avoid it.
Bring that back.
2020-08-04 00:18:30 -04:00
Matthias Clasen
1492e8cf0e
docs: Improve the gallery image for scales
2020-08-04 00:18:30 -04:00
Matthias Clasen
0ae46040a4
docs: Add gallery images for some more widgets
...
This adds GtkPicture, GtkVideo, GtkMediaControls.
2020-08-04 00:18:30 -04:00
Matthias Clasen
1d1e1a0068
docs: Regenerate widget gallery images
2020-08-04 00:18:30 -04:00
Matthias Clasen
1e3df88ee0
docs: Redo the doc shooter code
...
Steal snapshotting code from the reftests to
make this work again.
Other changes here: catch up with container removal.
2020-08-04 00:18:30 -04:00
Matthias Clasen
20c1fb0a0a
docs: Tweak documentation for list widgets
...
Fix numerous cases of : vs :: for signal references,
add some more details here and there.
2020-08-03 18:43:25 -04:00
Matthias Clasen
a5058c605f
docs: Fix typos
2020-08-03 18:43:21 -04:00
Matthias Clasen
70b0bdd5e3
docs: Tell pandoc we need Docbook4
...
gtk-doc assumes Docbook4, with <ulink> and so on.
Without this, all the links in markdown are converted
to <link xlink:href=...> and then lost in the docbook->html
conversion.
2020-08-03 16:53:44 -04:00
Matthias Clasen
2d72cd00e3
docs: Fix a typo
2020-08-03 16:53:32 -04:00
Matthias Clasen
cb320849de
docs: Introspect GtkFileChooserNative info
...
We were missing gtk_file_chooser_native_get_type
in gtk4.types.in, causing introspected info to not
be included.
Fixes : #2799
2020-08-03 00:13:10 -04:00
Matthias Clasen
ed13e6a41e
grid layout: Rename some properties
...
Rename GtkGridLayoutChild:left-attach/top-attach to
GtkGridLayoutChild:column/row. Update all users.
Fixes : #2967
2020-08-02 17:58:03 -04:00
Timm Bäder
f5af18738b
listbox: Add _append
...
To have easy replacement API for gtk_container_add.
2020-08-01 15:26:28 +02:00
Carlos Garnacho
96452a2e46
gdk: Rename gdk_seat_get_physical_devices() to gdk_seat_get_devices()
...
We don't want to tell what they are, and the distinction is now less
clear. Remove the adjective from the function name.
2020-07-30 18:44:40 +02:00
Carlos Garnacho
46eb054337
gdk: Drop gdk_device_get_device_type()
...
There is no longer a hierarchy of devices, or none that is seen
on the outside.
2020-07-30 18:44:40 +02:00
Carlos Garnacho
3c68db8e47
gdk: Make gdk_device_list_physical_devices() private
...
Physical devices should probably be accounted internally in gdk/x11,
make this out of private API so at least the implementation details
don't leak.
2020-07-30 18:30:13 +02:00
Carlos Garnacho
9912c80d70
gdk: Drop gdk_device_get_associated_device()
...
Devices are no longer associated like this, the seat should be used
to resolve queries on other devices.
2020-07-30 18:30:13 +02:00
Matthias Clasen
0b11e78064
Merge branch 'display-cleanup' into 'master'
...
Display cleanup
See merge request GNOME/gtk!2319
2020-07-30 03:55:23 +00:00
Matthias Clasen
e8026e29b6
Merge branch 'surface-cleanup' into 'master'
...
Surface cleanup
See merge request GNOME/gtk!2317
2020-07-30 03:43:30 +00:00
Matthias Clasen
7df070d681
gdk: Move default group api to the X11 backend
...
This is the only place where it is implemented.
2020-07-29 22:58:37 -04:00
Matthias Clasen
abf8cbeaea
a11y: Set an accessible role for GtkLevelBar
...
Use the 'meter' role for GtkLevelBar, and set the
appropriate properties.
Update the docs and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
c0de580d46
a11y: Set an accessible role for GtkExpander
...
Use the button accessible role for GtkExpander
and set attributes as appropriate.
Update the documentation and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
144114bf40
a11y: Set accessible role for GtkLinkButton
...
Set the accessible role for GtkLinkButton to button.
We don't use the 'link' role since ARIA says "if it
behaves like a button, use 'button'".
Update docs and add a test.
This changes should not be neccessary, since
GtkLinkButton derives from GtkButton, see #2965 .
2020-07-29 22:46:00 -04:00
Matthias Clasen
c68fe1053a
a11y: Set an accessible role for GtkTextView
...
Use the text-box accessible role for GtkTextView
and set properties as appropriate.
Update the documentation and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
4d012a6d95
Rename gdk_surface_queue_expose
...
We don't have expose events anymore; instead, there
is a ::render signal. So rename queue_expose to
queue_render to match.
Update all callers.
2020-07-29 22:40:01 -04:00
Matthias Clasen
c1eedf6845
gdk: Stop exporting gdk_surface_freeze_updates
...
The only legitimate use for freezing the frame clock
is in GDK backends. Exporting this function for
applications makes no sense.
2020-07-29 22:30:44 -04:00
Matthias Clasen
7e355cbe1e
docs: Mention workarea in the migration guide
2020-07-29 12:39:57 -04:00
Jonas Ådahl
c7c71137b2
gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area
...
It's not a portable API, so remove it. The corresponding backend
specific functions are still available, if they were implemented, e.g.
gdk_macos_monitor_get_workarea() and gdk_x11_monitor_get_workarea().
2020-07-29 17:57:30 +02:00
Matthias Clasen
85fb015b45
docs: Fix links in markdown content differently
...
pandoc insists on using the xlink namespace for hrefs,
and the namespace setup doesn't carry over xi:includes.
My first fix was to tell pandoc to generate standalone
docbook documents, which makes it insert the xlink
namespace. But it also makes it wrap all sections and
chapters in articles, and that messes up our toc structure.
So, patch things up differently by stripping the xlink:
from hrefs via regex.
Yay for XML!
2020-07-29 07:47:59 -04:00
Matthias Clasen
d40b1d31b5
Merge branch 'doc-fixes' into 'master'
...
Doc fixes
See merge request GNOME/gtk!2314
2020-07-29 11:24:48 +00:00
Matthias Clasen
5fd03f3297
Merge branch 'a11y-work' into 'master'
...
A11y work
See merge request GNOME/gtk!2312
2020-07-29 11:19:22 +00:00
Matthias Clasen
3b35ae870c
docs: Add a missing symbol
2020-07-28 22:40:10 -04:00
Matthias Clasen
e4a3746755
docs: Update the symbols list
...
Make sure the sections file is in sync with what
we actually export.
2020-07-28 22:40:10 -04:00
Matthias Clasen
1772d23f8e
docs: Update private headers list
2020-07-28 22:40:10 -04:00
Matthias Clasen
b5f256937f
Merge branch 'wip/carlosg/device-api-cleanup' into 'master'
...
Cleanups to device/event API
See merge request GNOME/gtk!2313
2020-07-28 23:49:35 +00:00
Carlos Garnacho
cab1dcb696
gdk: Conflate GDK devices
...
Make GdkEvents hold a single GdkDevice. This device is closer to
the logical device conceptually, although it must be sufficient for
device checks (i.e. GdkInputSource), which makes it similar to the
physical devices.
Make the logical devices have a more accurate GdkInputSource where
needed, and conflate the event devices altogether.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
7629f6d533
gdk: Make GdkDevice axis API internal
...
All outside interaction happens through gdk_event_get_axis(), no
device poking is necessary, nor axis to array index translations.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
230ce9bfde
gdk: Remove gdk_device_get_axes()
...
Besides the implicit x/y assumptions, devices don't have axes. Those
are actually provided by the GdkDeviceTool driving the device, and
different tools may have different axes.
It does not make sense to offer this API that can change beneath
someone's feet, we now have gdk_device_tool_get_axes() which is static
to the tool.
2020-07-29 01:27:51 +02:00
Matthias Clasen
1755e07af7
a11y: Set an accessible role for GtkPasswordEntry
...
Use the text-box accessible role for GtkPasswordEntry.
And set properties as appropriate.
Update the documentation and add a test.
2020-07-28 18:23:57 -04:00
Matthias Clasen
a610bb89a0
a11y: Set an accessible role for GtkSearchEntry
...
Use the searchbox accessible role for GtkSearchEntry.
And set properties as appropriate.
Update the documentation and add a test.
2020-07-28 18:16:37 -04:00
Matthias Clasen
2040b7ecdf
a11y: Set an accessible role for GtkLabel
...
Use the label accessible role for GtkLabel. ARIA has some
ominous wording about it going way, but while we have it,
GtkLabel is the obvious candidate for carrying it.
Update the documentation and add a test.
2020-07-28 18:16:37 -04:00
Matthias Clasen
9a82aadca7
a11y: Set an accessible role for GtkEntry
...
Use the text-box accessible role for GtkEntry and
set the placeholder and read-only accessible properties.
Update the documentation and add tests.
2020-07-28 18:16:37 -04:00
Matthias Clasen
efd4169fa2
a11y: Set accessible roles for GtkImage and GtkPicture
...
Use the img accessible role for these.
Also update the documentation and add tests.
2020-07-28 18:16:37 -04:00
Carlos Garnacho
b52ad33031
gdk: Add gdk_seat_get_tools() API call
...
There's GdkSeat::tool-added and ::tool-removed, but there's no
API to query the known tools. Add this call.
2020-07-29 00:11:34 +02:00
Emmanuele Bassi
470349c902
a11y: Add an explicit "reset to default" method
...
In some cases we explicitly want to unset an accessible attribute; for
instance, an accessible property is gated on a widget property, and if
the widget property gets unset, the accessible property should be reset.
2020-07-28 16:49:13 +01:00
Carlos Garnacho
254007a142
gdk: Add gdk_device_tool_get_axes()
...
Axes are actually a per-tool property, we just adapt devices to the
current tool.
2020-07-28 17:37:09 +02:00
Carlos Garnacho
1b846e29c7
docs: Correct migration note
...
A mentioned API call is now internal.
2020-07-28 17:36:18 +02:00
Carlos Garnacho
a2876b5cb4
gdkdevice: Remove gdk_device_get_state()
...
This is not needed nor recommended anymore, all reasons to maybe
need this were all kept within gdk.
2020-07-28 17:36:18 +02:00
Matthias Clasen
29cf11fb6e
a11y: Set an accessible role for GtkWindow
...
Use the window accessible role for GtkWindow, and
set the modal accessible property.
2020-07-27 21:18:10 -04:00
Matthias Clasen
6266bcafee
docs: Flesh out the role table in the a11y intro
...
Add cross-references for all the widgets currently
implementing non-default roles.
2020-07-27 11:10:58 -04:00
Emmanuele Bassi
b7be6ee00d
docs: Document a11y attributes
2020-07-27 14:26:19 +01:00
Matthias Clasen
bc0182fa3e
Merge branch 'ebassi/new-a11y' into 'master'
...
Accessibility rework
See merge request GNOME/gtk!2239
2020-07-27 11:55:19 +00:00
Matthias Clasen
29abefbe61
docs: Fix up some issues in the a11y docs
...
Fix up syntax errors and links in the introductory
section about accessibility.
2020-07-26 21:23:48 -04:00
Matthias Clasen
81c8a2bb4b
docs: Update a11y docs
...
Add some missing functions.
2020-07-26 21:23:48 -04:00
Matthias Clasen
d187ff858c
Merge branch 'drop-down-constructor' into 'master'
...
GtkDropDown api revisions
See merge request GNOME/gtk!2286
2020-07-26 23:57:48 +00:00
Matthias Clasen
f7ab6f665d
dropdown: Revise constructors
...
A dropdown without a model is useless, so accept a model
and expression in the constructor. Allow them to be NULL,
but consume them if given. This makes chained constructors
convenient without breaking language bindings.
Drop gtk_drop_down_set_from_strings() and instead add
gtk_drop_down_new_from_strings().
Update all users.
2020-07-26 18:09:54 -04:00
Emmanuele Bassi
5a173df3da
Start documenting the Accessibility API
...
Add the introductory text from #2833 , and the various types to the API
reference.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
c63087a563
Remove ATK
...
To build a better world sometimes means having to tear the old one down.
-- Alexander Pierce, "Captain America: The Winter Soldier"
ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:
- it maps to a very specific implementation, AT-SPI, which is Linux and
Unix specific
- it requires implementing the same functionality in three different
layers of the stack: AT-SPI, ATK, and GTK
- only GTK uses it; every other Linux and Unix toolkit and application
talks to AT-SPI directly, including assistive technologies
Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:
- add an "accessible" interface, implemented by GTK objects directly,
which describe the accessible role and state changes for every UI
element
- add an "assistive technology context" to proxy a native accessibility
API, and assign it to every widget
- implement the AT context depending on the platform
For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Benjamin Otte
2f27d29247
Add GtkBoolFilter
...
Takes a boolean GtkExpression (like a boolean object property) to run a
filter with.
2020-07-26 20:43:08 +02:00
Benjamin Otte
3078b180fe
Replace "gdouble" with "double"
2020-07-25 00:47:36 +02:00
Benjamin Otte
556997f9df
Replace "gfloat" with "float"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d375dce9f5
Replace "gchar" with "char"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba
Replace "gint" with "int"
2020-07-25 00:47:36 +02:00
Florian Müllner
b146c48e23
menubutton: Remove align-widget property
...
The property has been unused since commit 8701e34f74
. That was four
years ago, so it's safe to say that nobody has been missing it terribly.
2020-07-24 13:55:06 +02:00
Matthias Clasen
561d3c68a0
docs: Pass --standalone to pandoc
...
This flag causes pandoc to emit a proper doctype
declaration and, crucially, namespace declarations
for the xlink namespace that it insists on using
for href attributes. Without this, putting external
links in md documents doesn't survive the journey
through xml.
2020-07-23 18:24:18 -04:00
Matthias Clasen
2160f52cbf
migration guide: Add some tables
...
Add a table mapping event signals to their event controller
replacements, and a table mapping former GtkContainer
subclasses to their gtk_container_add replacement.
2020-07-22 19:38:58 -04:00
Benjamin Otte
2b19e2fc1f
sortlistmodel: Add progress estimation
2020-07-22 14:30:49 +02:00
Benjamin Otte
283c3b70dd
sortlistmodel: Add an incremental property
...
Also refactor a large part of the sortmodel to make this convenient.
A large amount of time has been spent on getting items-changed regions
minimized.
2020-07-22 14:30:49 +02:00
Matthias Clasen
86c7fceb09
Merge branch 'list-model-docs' into 'master'
...
List model docs
See merge request GNOME/gtk!2182
2020-07-19 23:50:09 +00:00
Timm Bäder
de0547ede7
migration guide: Remove a stray html tag
2020-07-17 06:27:23 +02:00
Matthias Clasen
ec10857b84
docs: Move columns below columnview
2020-07-16 22:14:39 -04:00
Matthias Clasen
72d66dfcdd
docs: Revise sorter docs a bit
2020-07-16 21:45:11 -04:00
Matthias Clasen
8f7c207c7c
docs: Add more GtkExpression
...
Make GtkExpression show up in the object
hierarchy, and add the param spec and GValue
support to the docs.
2020-07-16 21:02:33 -04:00
Matthias Clasen
a8d433dd26
docs: Link to GtkTreeRowReference
...
The list overview cross-reference table links
to all objects, except for this one.
2020-07-16 19:53:47 -04:00
Matthias Clasen
ecaf6fced0
docs: Add GtkTreeExpander
...
We want to link to it from various places, so it needs
to be present in the docs.
2020-07-16 19:53:47 -04:00
Matthias Clasen
7b36b339aa
expression: Add some introspection
...
Add a few apis to peek inside expressions, mainly
for the benefit of GtkInspector and similar uses.
2020-07-13 20:19:07 -04:00
Matthias Clasen
dcee15c0f1
filechooser: Drop gtk_file_chooser_[un]select_file
...
Most use cases for these apis can be handled with
gtk_file_chooser_set_file and/or
gtk_file_chooser_set_current_folder.
2020-07-09 00:50:03 -04:00
Matthias Clasen
2321e9de05
filechooser: Drop gtk_file_chooser_[un]_select_all
...
For now, we just remove them as public api, they are
still used internally.
2020-07-09 00:50:03 -04:00
Matthias Clasen
0f8bc67a98
docs: Add gtk_file_chooser_get_shortcut_folders
2020-07-09 00:50:03 -04:00
Matthias Clasen
463f3d3a52
directorylist: Add monitoring
...
Add a GtkDirectoryList:monitored property, and
keep a file monitor if it is set to TRUE. To ensure
that the list reflects reality, we reload the directory
when monitoring is turned on after the fact. This means
that turning monitoring is expensive, while turning it
off is cheap, so we default to monitoring being on.
2020-07-07 21:21:41 -04:00
Matthias Clasen
729ba44297
Merge branch 'wip/otte/filterlistmodel' into 'master'
...
Improve GtkFilterListModel
See merge request GNOME/gtk!2199
2020-07-06 15:42:44 +00:00
Matthias Clasen
76290e8ddb
filechooser: Add gtk_file_chooser_get_filters
...
Replace gtk_file_chooser_list_filters with a new
api that returns a list model.
Update all callers.
2020-07-06 10:36:35 -04:00
Benjamin Otte
3162e25671
bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice()
2020-07-06 03:42:43 +02:00
Benjamin Otte
9b2d8ac362
filterlistmodel: Add gtk_filter_list_model_get_pending()
...
This allows tracking if the model is busy filtering.
2020-07-06 03:42:43 +02:00
Benjamin Otte
2a90bc1a9b
filterlistmodel: Add incremental filtering
2020-07-06 03:42:43 +02:00
Matthias Clasen
286a00a1db
docs: Cleanups for the file filter docs
...
Now that GtkFileFilter is a GtkFilter, move it to the
filter section of the docs. While we are at it, touch
up the docs in some places.
2020-07-05 15:10:18 -04:00
Matthias Clasen
11dd602b28
Drop gtk_file_filter_filter
...
It has been superseded by gtk_filter_match.
2020-07-05 15:10:18 -04:00
Matthias Clasen
2d8fddc1e9
filefilter: Drop GtkFileFilterFlags
...
Replace gtk_file_filter_get_needed by gtk_file_filter_get_attributes,
which directly returns the attributes that are needed.
Update all callers.
2020-07-05 15:10:13 -04:00
Matthias Clasen
644d522d19
filefilter: Drop custom filters
...
These don't work with native file choosers.
2020-07-05 14:34:33 -04:00
Matthias Clasen
a8b0125da1
filefilter: Drop GtkFileFilterInfo
...
We can just make the filter operate on GFileInfo.
This is in preparation for making GtkFileFilter a
GtkFilter.
Update all users.
2020-07-05 13:55:42 -04:00
Benjamin Otte
1dbb8df95f
stringlist: Export gtk_string_object_new()
...
There are various use cases where it makes sense to construct these -
from our internal testing to using them in flatten- or mapmodels.
2020-07-05 02:59:21 +02:00
Benjamin Otte
6099fbafc1
bitset: Add gtk_bitset_new_range()
...
It's a common use.
2020-07-05 02:59:21 +02:00
Benjamin Otte
795d3122cc
selectionmodels: Add set_model() support
...
Now that we don't care about item types anymore, we can make the child
models settable.
We try to retain the selection, even when the model changes.
2020-07-05 02:59:21 +02:00
Benjamin Otte
5080730728
listmodels: Stop respecting item-type
...
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.
It turns out nobody uses item-type anyway.
So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.
All the models need to be able to deal with any type of object going
through anyway.
2020-07-05 02:59:21 +02:00
Matthias Clasen
130bd5937c
docs: Add guidance about list model performance
...
Add a section about the performance tradeoffs between
different list model implementations.
2020-07-03 09:29:19 -04:00
Matthias Clasen
cc18191a8e
Merge branch 'wip/exalm/show-title-buttons' into 'master'
...
headerbar: Show title buttons by default
See merge request GNOME/gtk!2175
2020-07-03 05:05:24 +00:00
Matthias Clasen
76533513c2
Add a selection filter model
...
This model presents the selection of a GtkSelectionModel
as its own list model.
2020-07-02 22:59:03 -04:00
Benjamin Otte
0966636803
bitset: Add APIs needed for a filterlistmodel
2020-07-02 17:19:16 -04:00
Alexander Mikhaylenko
7c3b30036e
headerbar: Show title buttons by default
...
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
2020-07-02 23:51:16 +05:00
Matthias Clasen
d0068a036f
Add gtk_multi_selection_get_model
...
This getter was missing.
2020-06-30 20:47:03 -04:00
Matthias Clasen
6819c7c792
docs: Update environment sections
...
Fix links in markdown, and add details about
Wayland environment variables.
2020-06-28 13:42:01 -04:00
Matthias Clasen
7047d68404
gtk: Add some missing symbols to the docs
2020-06-28 12:43:16 -04:00
Matthias Clasen
4d7d031ee0
gdk: Small documentation fixes
...
Make sure gdk_event_get_seat shows up.
2020-06-28 12:24:03 -04:00
Matthias Clasen
66bce08d10
docs: Migration guide additions
2020-06-27 17:38:10 -04:00
Matthias Clasen
3f55bfe2cb
Merge branch 'matthiasc/for-master' into 'master'
...
main: Avoid a warning
Closes #2894
See merge request GNOME/gtk!2153
2020-06-26 14:31:20 +00:00
Matthias Clasen
4185ba242b
docs: Some tweaks to the list widget overview
2020-06-26 09:05:56 -04:00
Benjamin Otte
488b0cbb69
gtk: Remove GtkPropertySelection
...
GtkMultiSelection is so much faster than this that it isn't needed.
2020-06-26 07:13:32 +02:00
Benjamin Otte
58d3213eef
Remove GtkSet
...
It's been superceded by GtkBitset.
2020-06-26 07:13:32 +02:00
Benjamin Otte
006dfdc55a
selectionmodel: Remove select_callback() functions
...
gtk_selection_model_set_selection() takes care of those now.
2020-06-26 07:13:32 +02:00
Benjamin Otte
fa0295629b
selectionmodel: Add gtk_selection_model_set_selection()
...
Also port the testsuite.
2020-06-26 07:13:32 +02:00
Benjamin Otte
8395698090
selectionmodel: Replace query_range() with get_selection()
2020-06-26 07:13:32 +02:00
Benjamin Otte
db452f0c45
Add GtkBitset
2020-06-26 07:13:32 +02:00
Benjamin Otte
d830724d4f
Add amalgamated roaring bitmaps source code
...
Taken from https://github.com/RoaringBitmap/CRoaring and fixed to
not spew warnings.
2020-06-26 06:19:56 +02:00
Matthias Clasen
30e79e8412
docs: Fix a typo
2020-06-25 14:29:24 -04:00
Matthias Clasen
db82eaec0a
Merge branch 'wip/carlosg/input-cleanups' into 'master'
...
Some input cleanups
Closes #2851
See merge request GNOME/gtk!2147
2020-06-24 21:32:30 +00:00
Carlos Garnacho
f046e27bb4
gtkwidget: Drop gtk_widget_device_is_shadowed()
...
A widget no longer needs updating on GTK grabs on itself, drop
this miscellaneous and no longer used API.
2020-06-24 20:35:23 +02:00
Matthias Clasen
386b63b85d
scrolledwindow: Don't take adjustments in new()
...
In 99.9% of all cases, these are just NULL, NULL.
So just do away with these arguments, people can
use the setters for the rare cases where they want
the scrolled window to use a different adjustment.
2020-06-24 11:25:09 -04:00
Carlos Garnacho
469a4a73f9
gdk: Drop gdk_device_get_last_event_surface()
...
This kind of transient state sets the expectative that events update
devices, while it's more accurate to say that devices generate events.
It does not make to expose this function anymore.
2020-06-24 11:24:04 +02:00
Carlos Garnacho
6d2860efb7
gdk: Drop gdk_seat_get_logical_pointers()
...
Events come from hardware devices and are handled by controllers,
there's no need to use logical pointers, nor to peek them. Drop this
unused API.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
59a8106373
gdk: Drop supports_multidevice API
...
Crossing events are now detached from widget state, all tricky consequences
from getting multiple crossing events are now somewhat moot. Resort to sending
all generated crossing events, and drop this barely (ever?) used API.
2020-06-23 23:42:53 +02:00
Matthias Clasen
e8210d5865
Add GtkStringList as public api
...
This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.
2020-06-23 16:11:46 -04:00
Matthias Clasen
ad98e72884
dropdown: Add GtkDropDown:selected-item
...
This is the same readonly property we have in
GtkSingleSelection.
Fixes : #2861
2020-06-20 13:11:48 -04:00
Timm Bäder
d81a5a8338
stack: Add missing accessors for GtkStackPage properties
2020-06-19 05:26:25 +02:00
Emmanuele Bassi
1c856a208f
Rename master and slave device
...
We already use the "logical/virtual" and "physical" names in the
documentation, there's no reason to use loaded terms just because X11
uses them.
2020-06-18 19:22:20 +01:00
Rico Tzschichholz
7c1cf7781b
gdk: Drop gdk_device_get_axis_value leftovers
2020-06-16 15:31:29 +02:00
Matthias Clasen
b0d2ae612f
Add a GtkEditableLabel widget
2020-06-15 12:08:54 -04:00
Matthias Clasen
5dddec4dd9
Add GtkBookmarkList
...
This is a listmodel similar to GtkDirectoryList,
for tracking recent files.
2020-06-11 16:14:47 -04:00
Matthias Clasen
059c45a85b
propertyselection: Add getters
...
These were missing.
2020-06-11 07:35:20 -04:00
Matthias Clasen
4b241f8da2
Merge branch 'scroll-compression' into 'master'
...
gdk: Compress scroll events
Closes #2800
See merge request GNOME/gtk!2066
2020-06-10 14:35:01 +00:00
Matthias Clasen
54c098761f
gdk: Drop gdk_device_set_axis_use
...
If you need some axes changed, you can just flip
the values when you receive them.
2020-06-09 15:27:34 -04:00
Matthias Clasen
2f98400b80
gdk: Drop gdk_device_get/set_keys
...
This functionality was only ever half-implemented
on X11, and is not useful enough to keep around.
2020-06-09 15:27:33 -04:00
Matthias Clasen
c9fad25131
gdk: Rename gdk_motion_event_get_history
...
Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.
Update the docs, and all callers.
2020-06-09 13:43:12 -04:00
Matthias Clasen
805ddc3c3a
gdk: Drop gdk_device_get_history
...
This function is not implemented anywhere.
2020-06-08 18:24:20 -04:00
Matthias Clasen
9f335d3ee6
docs: Regroup the tree support parts
...
Give the chapter a title, and put some things in sections.
2020-06-06 13:54:58 -04:00
Matthias Clasen
856c8950ff
docs: Put selection models into a section
...
This makes the documentation structure a bit clearer.
2020-06-06 13:54:58 -04:00
Matthias Clasen
61ccf4e719
docs: Fix up the GtkNativeDialog section
...
Without GtkNativeDialog in the section list,
links are not generated from the object hierarchy.
2020-06-06 13:54:58 -04:00
Matthias Clasen
1567db1f02
Merge branch 'misc-multiselection' into 'master'
...
Misc multiselection
See merge request GNOME/gtk!2055
2020-06-06 17:54:42 +00:00
Matthias Clasen
d1509971d8
Add GtkPropertySelection
...
This is a selection model that stores the selection
state in a boolean property of the items, and thus
persists across reordering and similar changes.
Fixes : #2826
2020-06-06 11:41:51 -04:00
Matthias Clasen
fd7f19c934
selectionmodel: Document the callback apis
2020-06-06 10:36:57 -04:00
Matthias Clasen
3412f0554f
gtk: Documentation fixups
...
Document missing symbols, and other cleanups.
2020-06-05 22:50:30 -04:00
Matthias Clasen
61c83f9ffe
gdk: Documentation fixups
...
Document some missing symbols.
2020-06-05 20:59:51 -04:00
Matthias Clasen
3d7c1f8950
gsk: Documentation fixups
...
Document a few missing symbols.
2020-06-05 20:19:45 -04:00
Emmanuele Bassi
6e52ef96a4
Move orientable style classes into GtkWidget
...
It feels slightly wrong to have GtkOrientable operate on widgets, but at
least what happens when an orientable widget changes orientation should
be part of GtkWidget.
This will allow to add more state changes without accessing widget state
from the outside of gtkwidget.c.
2020-06-05 20:35:09 +01:00
Matthias Clasen
ed985640e8
docs: Expand list widget docs
...
Begin to flesh out the long descriptions for GtkListView,
GtkGridView and GtkColumnView.
2020-06-04 15:33:53 -04:00
Santosh Mahto
ef32df77be
docs: Fix spelling of GDK_VERSION_MIN_REQUIRED.
2020-06-04 12:12:36 +05:30
Matthias Clasen
4b68362981
columnview: Add a property for column separators
...
Rename the show-separators property to show-row-separators,
and add a matching show-column-separators property. It is
implemented by setting the .column-separators style class
on the column view.
2020-06-03 17:57:23 -04:00
Matthias Clasen
03c2202942
Add rubberband api
...
Add an ::enable-rubberband property to GtkListView,
GtkGridView and GtkColumnView.
2020-06-03 13:34:27 -04:00
Matthias Clasen
28f6e27276
Add GtkMultiSelection
...
This is implemented using a private GtkSet helper.
Includes tests.
2020-06-03 13:32:57 -04:00
Matthias Clasen
2ab1b13092
columnview: Add a GtkColumnViewColumn:expand property
...
This will be used to determine how to distribute
available extra space in a column view.
2020-06-03 13:32:15 -04:00
Matthias Clasen
11b4e0d4c0
columnview: Add a GtkColumnView:reorderable property
...
This property controls if users can reorder columns
by drag-and-drop. It defaults to TRUE.
2020-06-03 13:31:39 -04:00
Matthias Clasen
66e5027756
columnview: Add a GtkColumnViewColumn:resizable property
...
This will be used for interactive column resizing
in the future.
2020-06-03 12:49:38 -04:00
Matthias Clasen
d43aacefc9
columnview: Add GtkColumnViewColumn:fixed-width
...
Add a fixed-width property similar to the same property
of GtkTreeViewColumn.
2020-06-03 12:48:39 -04:00
Matthias Clasen
f27bd061fb
columnviewcolumn: Add a menu property
...
Add a ::header-menu property that will be used
to create a context menu for the header of the
column.
2020-06-01 22:10:53 -04:00
Matthias Clasen
c6c8263704
columnview: Add column reordering
...
Add an API to allow reordering columns.
2020-05-31 21:56:30 -04:00
Matthias Clasen
4877bb5b5c
columnviewcolumn: Add a visible property
...
This lets us hide columns, which is an expected
feature of columned lists.
2020-05-31 10:47:48 -04:00
Matthias Clasen
9c849d2084
docs: Update the list widget overview
...
Fill in the GtkComboBox and GtkCellView replacements
in the quick reference table.
2020-05-30 19:31:38 -04:00
Matthias Clasen
371dab51bb
Add GtkDropDown
...
This is a simple drop down control using list models.
2020-05-30 19:31:38 -04:00
Matthias Clasen
f611d55f16
Spread single-click-activate api
...
This makes sense to have in all the views,
not just GtkListView.
2020-05-30 19:30:14 -04:00
Matthias Clasen
12b1007046
docs: Add a listview overview section
...
Add a conceptual overview for all the listmodel-based
widgets.
Fixes : #2214
2020-05-30 19:30:14 -04:00
Matthias Clasen
e3ce99988f
Add GtkTreeListRowSorter
...
This is a special-purpose sorter that can
apply the sorting of another sorter to the
levels of a GtkTreeListModel.
2020-05-30 19:30:14 -04:00
Matthias Clasen
2945430ad7
columnview: Add a sort-by api
2020-05-30 19:28:28 -04:00
Matthias Clasen
66500a6882
columnview: Add sorting
...
This is a somewhat large commit that:
- Adds GtkColumnViewSorter
This is a special-purpose, private sorter implementation which sorts
according to multiple sorters, allowing each individual sorter to be
inverted. This will be used with clickable column view headers.
- Adds a read-only GtkColumnView::sorter property
The GtkColumnView creates a GtkColumnViewSorter at startup that it uses
for this property.
- Adds a writable GtkColumnViewColumn::sorter property
This allows defining per-column sorters. Whenever an application sets a
sorter for a column, the header becomes clickable and whenever
a header is clicked, that column's sorter is prepended to the list of
sorters, unless it is already the first sorter, in which case we invert
its order. No column can be in the list more than once.
2020-05-30 19:26:46 -04:00
Matthias Clasen
2c4c07c96d
listview: Add single-click-activate
...
Add a single-click-activate property to GtkListView.
2020-05-30 19:26:46 -04:00
Matthias Clasen
2f21003064
docs: Reorganize list widgets in their own chapter
2020-05-30 19:26:46 -04:00
Benjamin Otte
efcb3a9d67
columnview: Add header
...
This uses a custom GtkColumnViewTitle widget. So far that widget is
pretty boring, but that will change once we added
resizing, reordering, dnd, sorting, hiding/showing of columns or
whatever UIs we want.
2020-05-30 19:26:46 -04:00
Benjamin Otte
326cb1148b
columnview: Add a custom LayoutManager
...
The ColumnView now allocates column widths first and then the individual
rows use the new layout manager which looks at the column allocations to
allocate their children.
2020-05-30 19:26:46 -04:00
Benjamin Otte
9927d9bda2
columnview: Add GtkColumnViewCell
...
It's a GtkListItemWidget subclass that tracks the column it belongs to
and allows the column to track it.
We also use this subclass to implement sizing support so columns share
the same size and get resized in sync.
2020-05-30 19:26:46 -04:00
Benjamin Otte
8736343544
columnview: Add listitems for the columns
...
They are not aligned in columns yet, but they do exist.
2020-05-30 19:26:46 -04:00
Benjamin Otte
30f09ea10b
listitem: Make this a GObject
...
This splits GtkListItem into 2 parts:
1. GtkListItem
This is purely a GObject with public API for developers who want to
populate lists. There is no chance to cause conflict with GtkWidget
properties that the list implementation assumed control over and
defines a clear boundary.
2. GtkListItemWidget
The widget part of the listitem. This is not only fully in control of
the list machinery, the machinery can also use different widget
implementations for different list widgets like I inted to for
GtkColumnView.
2020-05-30 19:26:46 -04:00
Benjamin Otte
f5f9f70dd0
Add GtkSignalListItemFactory
...
So the poor Rust users can actually use this.
I would totally not use this ever!
2020-05-30 19:26:46 -04:00
Benjamin Otte
03e5c6e32d
columnview: Allow adding/removing columns
...
... and make that work in UI files via <child>, too.
2020-05-30 19:26:46 -04:00
Benjamin Otte
0e1632d002
Add GtkColumnView skeleton
...
It's just a copy/paste of the listview code with all the internals
gutted. The code doesn't do anything.
2020-05-30 19:26:46 -04:00
Benjamin Otte
dd5e6d47db
Remove gtk_selection_model_user_select_item() again
...
This reverts commit 6a164ab306dad9096bde736c907494c71086d3c4.
The function was awkward and we now have only one caller again, so we
can fold it back into it.
2020-05-30 19:26:46 -04:00
Benjamin Otte
cc987b31ae
Add GtkListBase
...
This is a base item for GTK's list widgets so they can share some (read:
hopefully a lot of) code.
2020-05-30 19:26:46 -04:00
Benjamin Otte
cb2948eda6
selectionmodel: Add gtk_selection_model_user_select_item()
...
I'm not sure this should be public API because it's incredibly awkward.
But it should definitely be shared between list widget implementations.
2020-05-30 19:26:46 -04:00
Benjamin Otte
7451e51619
Add GtkTreeExpander
...
This is a container widget that takes over all the duties of tree
expanding and collapsing.
It has to be a container so it can capture keybindings while focus is
inside the listitem.
So far, this widget does not allow interacting with it, but it shows the
expander arrow in its correct state.
Also, testlistview uses this widget now instead of implementing
expanding itself.
2020-05-30 19:26:45 -04:00
Benjamin Otte
626c525706
listview: Expose GtkListItemFactory APIs
...
Due to the many different ways to set factories, it makes sense to
expose them as custom objects.
This makes the actual APIs for the list widgets simpler, because they
can just have a regular "factory" property.
As a convenience function, gtk_list_view_new_with_factory() was added
to make this whole approach easy to use from C.
2020-05-30 19:26:45 -04:00
Benjamin Otte
0174bf4345
listview: Add gtk_list_view_set_show_separators()
...
Do the same thing that GtkListBox does in commit
0249bd4f8a
2020-05-30 19:26:45 -04:00
Benjamin Otte
86a75abe51
gridview: Add API for setting number of columns
...
The API isn't used yet.
2020-05-30 19:26:45 -04:00
Benjamin Otte
70aaecc937
gtk: Add a GtkGridView skeleton
2020-05-30 19:26:45 -04:00
Benjamin Otte
b3fb80c608
listview: Add selection properties to ListItem
...
This just brings the infrastructure into place, we're not using the
properties yet.
2020-05-30 19:26:45 -04:00
Benjamin Otte
fe14181d4e
listitem: Add gtk_list_item_get_position()
...
Also refactor the whole list item management yet again.
Now, list item APIs doesn't have bind/unbind functions anymore, but only
property setters.
The item factory is the only one doing the binding.
As before, the item manager manages when items need to be bound.
2020-05-30 19:26:45 -04:00
Benjamin Otte
e1fa627158
listview: Add GtkListItem
...
GtkListItem is a generic row widget that is supposed to replace
GtkListBoxRow and GtkFlowBoxChild.
2020-05-30 19:26:45 -04:00
Benjamin Otte
9d5bb875b1
listview: Add GtkListItemManager
...
It's all stubs for now, but here's the basic ideas about what
this object is supposed to do:
(1) It's supposed to be handling all the child GtkWidgets that are
used by the listview, so that the listview can concern
itself with how many items it needs and where to put them.
(2) It's meant to do the caching of widgets that are not (currently)
used.
(3) It's meant to track items that remain in the model across
items-changed emissions and just change position.
(2) It's code that can be shared between listview and potential
other widgets like a GridView.
It's also free to assume that the number of items it's supposed to
manage doesn't grow too much, so it's free to use O(N) algorithms.
2020-05-30 19:26:44 -04:00
Benjamin Otte
e20c207a22
listview: Introduce GtkListItemFactory
...
Thisis the abstraction I intend to use for creating widgets and binding
them to the item out of the listview.
For now this is a very dumb wrapper around the functions that exist in
the API.
But it leaves the freedom to turn this into public API, make an
interface out of it and most of all write different implementations, in
particular one that uses GtkBuilder.
2020-05-30 19:26:44 -04:00
Benjamin Otte
e19c4a3372
gtk: Add a GtkListView skeleton
2020-05-30 19:26:44 -04:00
Matthias Clasen
11a1f8f36a
Redo sort list model with GtkSorter
...
Reshuffle the api to take full advantage
of GtkSorter. Update all callers.
2020-05-30 19:26:44 -04:00
Matthias Clasen
1eda9884a0
Add GtkNumericSorter
...
This sorter compares numbers obtained from items
by evaluating an expression.
2020-05-30 19:26:44 -04:00
Matthias Clasen
ae4bb2d914
Add GtkMultiSorter
...
This is a sorter that tries multiple sorters in turn.
2020-05-30 19:26:44 -04:00
Matthias Clasen
6d68c536f3
Add GtkStringSorter
...
This is a GtkSorter implementation collating strings
2020-05-30 19:26:44 -04:00
Matthias Clasen
e74a9d09e6
Add GtkCustomSorter
...
This is a GtkSorter implementation which uses a GCompareDataFunc.
2020-05-30 17:48:44 -04:00
Matthias Clasen
b2b847f365
Add GtkSorter
...
This is a helper object for sorting, similar to GtkFilter.
2020-05-30 17:48:44 -04:00
Benjamin Otte
cb15ec0257
Add GtkOrdering
...
This is an enum that we're gonna use soon and it's worth introducing as a
separate commit.
The intention is to have meaningful names for return values in
comparison functions.
2020-05-30 17:48:44 -04:00
Benjamin Otte
22659afd00
Add GtkMultiFilter, GtkAnyFilter, GtkEveryFilter
...
GtkMultiFilter is the abstract base class for managing multiple child
filter.
GtkAnyFilter and GtkEveryFilter are the actual implementations.
2020-05-30 17:42:09 -04:00
Benjamin Otte
410e7dcf5d
filter: Add GtkStringFilter
...
Users provide a search filter and an expression that evaluates the items
to a string and then the filter goes and matches those strings to the
search term.
2020-05-30 17:42:09 -04:00
Benjamin Otte
bd8655fdee
expression: Add GtkObjectExpression
...
Weak refs break cycles...
2020-05-30 17:42:09 -04:00
Benjamin Otte
e9f1ee5aab
Add GtkExpression
...
GtkExpressions allow looking up values from objects.
There are a few simple expressions, but the main one is the closure
expression that just calls a user-provided closure.
2020-05-30 17:42:08 -04:00
Benjamin Otte
4abdf695e3
filterlistmodel: Rewrite to use GtkFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
1ab081b584
Add GtkCustomFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
1df17f2fea
Add GtkFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
682e97826c
Add GtkDirectoryList
...
Adds a new listmodel called GtkDirectoryList that lists the children of
a GFile as GFileInfos.
This is supposed to be used by the filechooser.
2020-05-30 12:30:23 -04:00
Benjamin Otte
f1d6a0a4ed
widget: Add gtk_widget_get_size()
...
A little bit of convenience.
2020-05-30 10:48:02 -04:00
Matthias Clasen
346bba6592
Bring back gdk_display_put_event
...
It is still needed in WebKit.
2020-05-29 09:26:50 -04:00
Matthias Clasen
c7a9d7b56b
Merge branch 'im-context-key-forward' into 'master'
...
Add back keyboard related apis
See merge request GNOME/gtk!1977
2020-05-29 00:10:39 +00:00
Matthias Clasen
506d73cf32
Add gtk_im_context_filter_key
...
An event-less variant of the filtering api.
2020-05-28 17:08:33 -04:00
Matthias Clasen
266a3a5267
Export keymap translation again
...
This is needed in WebKit webdriver test environment.
2020-05-28 15:15:53 -04:00
Matthias Clasen
48f8affb2c
gdk: Make event-related apis private
...
Without a way to create events, there is no point
in allowing gdk_display_put_event to be used from
the outside. And little good can come out of using
the other apis, so just make them all private.
2020-05-28 14:53:08 -04:00
Yuri Chornoivan
01bd4cc4e1
Fix minor typos
2020-05-28 11:00:03 +03:00
Matthias Clasen
c42219cd5b
Add to the docs README
...
Mention markdown syntax and gtk-doc additions.
2020-05-27 11:11:30 -04:00
Emmanuele Bassi
347cb94c43
docs: Link the documentation guidelines
...
From the coding style.
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
c5485cd6b1
Add the beginnings of a docs contribution guide
...
We have one for the whole project, but the documentation should have a
proper introduction and a proper style guide.
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
e30c974646
Add myself to more sections
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
6b6c76e3a2
docs: Remove last two steps from the release howto
...
Drop the GTK list announcements, as we don't have lists any more.
The GTK website updates itself automatically, these days.
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
25a8fa73f8
docs: Turn coding style into a markdown document
...
It was mostly one already, just needed some minor fixes.
2020-05-27 13:44:50 +01:00
Matthias Clasen
f27d855c68
gdk: Drop the GdkEventMask enum
...
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:39:31 -04:00
Matthias Clasen
0553b10214
gdk: Drop the GdkSurfaceTypeHint enum
...
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:34:59 -04:00
Matthias Clasen
8c6bbcdc2e
docs: Mention shortcuts in the migration guide
...
Add a few paragraphs about GtkAccelGroup, GtkBindingSet
and GtkAccelMap to the migration guide.
Fixes : #2778
2020-05-25 21:27:58 -04:00
Matthias Clasen
17b5cfc924
docs: Mention pandoc as build dependency
2020-05-25 20:56:09 -04:00
Matthias Clasen
5590e2f6f2
Merge branch 'doc-chapters-markdown' into 'master'
...
Include markdown content, via pandoc
See merge request GNOME/gtk!1961
2020-05-26 00:55:10 +00:00
Matthias Clasen
ae2e548b4b
docs: Use the right python
2020-05-25 18:40:09 -04:00
Matthias Clasen
aca8090a09
docs: Convert question index to markdown
...
With this, the expand_content_files list has been
completely converted to markdown files. Whats left
in content_files is man pages, and a few special
cases.
2020-05-25 16:11:18 -04:00
Matthias Clasen
84437ee0e0
docs: Allow interrupted lists
...
We use such an interrupted, numbered list in the
q&a section, so tell pandoc to pay attention to
start numbers.
2020-05-25 16:11:18 -04:00
Matthias Clasen
dc858c9686
docs: Convert treeview and textview overview to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
581b39a38d
docs: Allow influencing pandoc divisons
...
Arrange for files named section-foo.md to be turned
into docbook sections, while others get turned into
chapters. This is necessary to allow including such
content in chapters, since chapters in docbook don't
nest.
2020-05-25 16:11:18 -04:00
Matthias Clasen
a37b9d7578
docs: Drop the glossary
...
It is very incomplete, somewhat outdated, and
we lack the resources to maintain it properly.
2020-05-25 16:11:18 -04:00
Matthias Clasen
5a3fe9e5f5
docs: Convert resources section to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
f44d611f77
docs: Drop a long-stale file
...
The other_software.xml section has not been included in
the docs since 2.x, as far as I can tell. It was clearly
written before GIO existed.
2020-05-25 16:11:18 -04:00
Matthias Clasen
29fb9ae2d6
docs: Convert platform sections to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
2595cd5a93
docs: Convert getting_started to markdown
...
As part of the conversion, give up on including
sources files from the examples directory, and
instead include the content directly. All include
mechanisms add complications. They were already
complicated with xml, and markdown is not making
things easier.
We already did that for fragments, and if you
make changes to these example sources, you
probably need to revise the surrounding text
anyway.
2020-05-25 16:11:18 -04:00
Matthias Clasen
bf14d75cad
docs: Refresh the inspector screenshot
2020-05-25 16:11:18 -04:00
Matthias Clasen
b99511ee55
docs: Convert building, compiling, running to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
3bf90b4218
doc: Check for pandoc
...
Add an explicit check for pandoc, so we get a clear
error message if it is missing.
2020-05-25 16:11:18 -04:00
Matthias Clasen
9873d983ed
docs: Convert css overview to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
3338d24da4
docs: Be more careful when expanding abbreviations
...
We must not expand #symbol in the middle of a url,
where it is probably a fragment identifier. Restrict
problem.
2020-05-25 16:11:18 -04:00
Matthias Clasen
10cd539104
wip: Include markdown content, via pandoc
...
Use pandoc to convert freestanding markdown files to docbook for
inclusion in the generated docs, and use bits and pieces of
gtk-doc code to continue expanding typical gtk-doc abbreviations.
The new tool for markdown -> docbook is a python script called
gtk-markdown-to-docbook.
The markdown dialect is specified via a list of pandoc extension
in gtk-markdown-to-docbook. It includes header annocations,
definition lists and tables, among other things.
This commit converts the 3 overview chapters (drawing, input
handling and actions) and the migration guide to markdown
syntax. Other files that are still listed in content_files
can be converted later.
This commit adds a pandoc dependency.
2020-05-25 16:11:18 -04:00
Matthias Clasen
e4623fd0c4
Add GtkOverlayLayout to the docs
2020-05-25 15:18:14 -04:00
Matthias Clasen
5e25ba6c5a
Merge branch 'no-app-menu' into 'master'
...
Drop the app menu
Closes #2731
See merge request GNOME/gtk!1951
2020-05-22 23:46:56 +00:00
Matthias Clasen
1038b9b8a1
docs: Mention app menus in the migration guide
2020-05-22 18:46:51 -04:00
Matthias Clasen
79d6a77d58
gtkapplication: Drop app menu support
...
Drop apis and code related to appmenus from
both GtkApplication and GtkApplicationWindow.
We still keep the menubar support, since it
is needed for system integration on OS X.
Fixes : #2731
2020-05-22 17:31:05 -04:00
Matthias Clasen
33b836af7f
fixed: Change coordinate apis to doubles
...
We are using floating point for coordinates
everywhere now, so be consistent here.
This commit also changes the implementation of
gtk_fixed_get_child_position to work with
non-translation child transforms.
2020-05-22 17:26:08 -04:00
Matthias Clasen
edf85cb1b3
docs: Refresh the build and backend sections
...
Remove some outdated information from the sections
about building and about particular backends.
2020-05-19 15:19:53 -04:00
Matthias Clasen
287c40276a
gdk: Drop gdk_display_supports_shapes
...
The apis to set shapes on surfaces are gone,
so there is no point in providing this information
on GdkDisplay.
2020-05-17 21:52:15 -04:00
Matthias Clasen
93d4253c93
native: Make gtk_native_get_surface_transform public
...
This api is needed to translate between surface
and widget coordinates.
2020-05-17 16:01:08 -04:00
Matthias Clasen
c0faf0c6b6
Merge branch 'toplevel-move-resize' into 'master'
...
Toplevel move resize
See merge request GNOME/gtk!1923
2020-05-17 19:15:46 +00:00
Matthias Clasen
b63690aa6b
docs: Mention begin_resize_drag in the migration guide
2020-05-17 14:38:10 -04:00
Benjamin Otte
b353221185
Merge branch 'wip/otte/monitors' into 'master'
...
various GDK cleanups
See merge request GNOME/gtk!1920
2020-05-17 16:57:52 +00:00
Matthias Clasen
eb6edac4bd
gdk: Drop gdk_surface_begin_move/resize_drag
...
These have been replaced by GdkToplevel api.
2020-05-17 12:49:29 -04:00
Matthias Clasen
309a7aa253
gdk: Add gdk_toplevel_begin_move/resize
...
For now, these are wrappers around the surface apis,
but they are going to replace them, since this operation
is only available on toplevels.
2020-05-17 12:41:16 -04:00
Benjamin Otte
363c88cef7
migration guide: Update paragraph about monitors
...
Clarify the new handling of monitors via a listmodel of GdkMonitor
instead of int monitor_num.
2020-05-17 18:05:07 +02:00
Benjamin Otte
4c7914dc49
display: Remove unneeded getters
...
Applications can use the listmodel instead.
2020-05-17 07:32:37 +02:00
Benjamin Otte
d4731a4ab4
x11: Remove gdk_x11_register_standard_event_type()
...
It's not used anymore since GdkX11Display::xevent exists.
2020-05-17 01:02:17 +02:00
Benjamin Otte
0c6266fd1a
surface: Remove gdk_surface_is_viewable()
...
It returns the same value as gdk_surface_get_mapped(), so use that
instead.
2020-05-17 00:41:44 +02:00
Alexander Mikhaylenko
9f761feb93
docs: Mention GtkHeaderBar title and subtitle changes in migration guide
2020-05-14 19:51:19 +05:00
Benjamin Otte
dd7d76f389
gdk: Add gdk_display_get_monitors()
...
Returns a GListModel of GDK_TYPE_MONITOR.
This will replace the current andling of monitors in GdkDisplay.
2020-05-13 07:00:35 +02:00
Matthias Clasen
450879b1da
Merge branch 'matthiasc/for-master' into 'master'
...
Documentation work
See merge request GNOME/gtk!1880
2020-05-12 14:52:01 +00:00
Emmanuele Bassi
e8c4b8338f
docs: Mention blocking functions in the migration guide
...
Link to how to make a dialog modal, and to the response signal.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
d54b7dec94
Remove gtk_dialog_run()
...
Nested main loops are bad, as they introduce layers of complexity caused
by the potential re-entrancy in the case of multiple event sources, like
IPC, threads, etc. Additionally, the programming model they provide—stop
the world while spinning a new loop—does not conform to the event-driven
model employed by GTK.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
5d272a12cb
Remove gtk_native_dialog_run()
...
Nested main loops are bad, as they introduce layers of complexity caused
by the potential re-entrancy in the case of multiple event sources, like
IPC, threads, etc. Additionally, the programming model they provide—stop
the world while spinning a new loop—does not conform to the event-driven
model employed by GTK.
2020-05-12 13:15:19 +01:00
Matthias Clasen
6df8bf7dde
docs: Updates to the migration guide
...
Remove some duplicated content, reorder things
to make more sense, and tweak the wording.
2020-05-12 07:50:17 -04:00
Matthias Clasen
072adbf079
docs: Updates to the common questions
...
Refresh the answers to some common questions.
2020-05-12 01:03:34 -04:00
Matthias Clasen
1ef6a35f3e
docs: Don't point at mailing lists
...
Replace references to the mailing lists by
discourse + irc.
2020-05-12 01:02:49 -04:00
Matthias Clasen
91f0fcde96
docs: Rearrange the introduction some more
...
Fine-tune some wording, and move the Custom Drawing
example earlier.
2020-05-12 01:02:07 -04:00
Matthias Clasen
848a8a792e
docs: Update migration guide
...
Add sections about GtkBin, GtkContainer and gtk_widget_destroy().
2020-05-11 22:38:21 -04:00
Matthias Clasen
5ebd42d402
Drop GtkContainer and its accessible implementation
...
It is no longer used.
2020-05-11 22:38:21 -04:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
665edcba53
box: Add gtk_box_append/prepend/remove
...
Add replacement api for gtk_container_add/remove.
2020-05-11 22:38:21 -04:00
Matthias Clasen
d59d9d4bd5
headerbar: Add gtk_header_bar_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
88141103cd
Don't use container api on GtkListBox
2020-05-11 22:21:39 -04:00
Matthias Clasen
ff91ce9eb4
listbox: Add gtk_list_box_remove
...
This is a gtk_container_remove replacement.
2020-05-11 22:21:39 -04:00
Matthias Clasen
2f7f6e6a37
flowbox: Add gtk_flow_box_remove
...
This is the replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5e0c1e6a86
stack: Add gtk_stack_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
96d707444d
fixed: Add gtk_fixed_remove
...
This is the replacement for gtk_container_reomve.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5cda824784
grid: Add gtk_grid_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
12ca08c382
infobar: Add gtk_info_bar_add/remove_child
...
This is a replacement for container api that is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
78d20b9301
infobar: Add gtk_info_bar_remove_action_widget
...
This is mainly for completeness, since gtk_container_remove
will not work for those anymore.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bc6643f3c2
paned: Redo the api
...
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.
Update all users.
See #2719
2020-05-11 22:21:33 -04:00
Matthias Clasen
6b80d90db5
expander: Add a child property
2020-05-11 22:21:14 -04:00
Matthias Clasen
c0f090627a
actionbar: Add gtk_action_bar_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 20:33:23 -04:00
Matthias Clasen
aeef59fda9
textview: Derive from GtkWidget
...
Drop the GtkContainer vfuncs. As a replacement for
gtk_container_remove, make gtk_text_view_remove public.
2020-05-11 20:33:23 -04:00
Matthias Clasen
cc28a7b0ef
Merge branch 'wip/tintou/doc-fixes' into 'master'
...
docs: Fix several missing references in the documentation
See merge request GNOME/gtk!1874
2020-05-11 18:40:34 +00:00
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
cd0081d08a
Use gtk_window_destroy
...
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -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
4735d38e31
docs: Fixup for an uninitialized variable
2020-05-04 22:53:08 -04:00
Matthias Clasen
3c165b3b77
Drop GtkBin
...
It is no longer used anywhere.
2020-05-04 22:53:08 -04:00
Matthias Clasen
ec394e805b
Use gtk_combo_box_set_child throughout
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
f59f355190
Use gtk_window_set_child throughout
...
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
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
af6e0ee2b3
Use gtk_button_set_child throughout
...
Replace all uses of gtk_container_add on buttons
by gtk_button_set_child.
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