summaryrefslogtreecommitdiff
path: root/gtk/gtkrange.c
Commit message (Collapse)AuthorAgeFilesLines
* Add missing va marshallersMatthias Clasen2023-05-131-0/+3
| | | | | | Whenever we pass a marshaller to g_signal_new, call g_signal_set_va_marshaller with the corresponding va marshaller.
* range: Fix a copy-paste errorMatthias Clasen2023-04-091-1/+1
| | | | | This was showing up as the alpha popup in the color editor not being positioned correctly.
* Make adjustment setters behaveMatthias Clasen2023-03-301-1/+1
|
* Deprecate gtk_widget_translate_coordinatesMatthias Clasen2023-03-251-23/+28
| | | | | | | Update all (non-deprecated) callers to use gtk_widget_compute_point instead. Fixes: #5697
* gtk: Stop using gtk_widget_show/hideMatthias Clasen2022-11-281-4/+1
| | | | | | | gtk_widget_set_visible and gtk_window_present are better alternatives, and calling gtk_widget_show on newly created widgets is no longer necessary anyway.
* a11y: Drop GtkAccessibleRange.get_minimum_increment()ebassi/a11y/accessible-rangeEmmanuele Bassi2022-09-301-12/+5
| | | | | | | | | | | | | | | MinimumIncrement is an AT-SPI-ism that has no counterpart in the ARIA specification, so it should not live inside public API. Additionally, it's not really a useful method because it collapses two values on the adjustment API. The only method in the GtkAccessibleRange interface should be the set_current_value(), which allows ATs to control the current position in a ranged widget. The AT-SPI implementation can now use all the accessible properties, including the VALUE_TEXT one, mapped to the Text property on the AtSpi.Value interface.
* Actually use the AccessibleRange interfaceLukáš Tyrychtr2022-09-291-1/+2
|
* Implement GtkAccessibleRange for GtkRangeLukáš Tyrychtr2022-09-291-0/+26
|
* Drop gtkintl.hMatthias Clasen2022-09-241-1/+0
| | | | | Include gtkprivate.h for I_() and glib-i18n.h for gettext macros.
* Merge branch 'wip/sophie-h/remove-param-nicks-blurbs' into 'main'Matthias Clasen2022-05-121-18/+6
|\ | | | | | | | | | | | | gtk: Remove all nicks and blurbs from param specs Closes #4904 See merge request GNOME/gtk!4717
| * Remove all nicks and blurbs from param specsSophie Herold2022-05-111-18/+6
| | | | | | | | | | | | | | | | Those property features don't seem to be in use anywhere. They are redundant since the docs cover the same information and more. They also created unnecessary translation work. Closes #4904
* | range: Support border-radius for GtkColorScale troughsAlexander Mikhaylenko2022-05-121-3/+11
|/ | | | | With how this hack is organized, it's simpler to add more code here than to pass it to GtkColorScale itself.
* gtkrange: Add scroll unit handlingpanoplie2022-03-191-9/+11
|
* Avoid copying static debug stringsMatthias Clasen2021-07-281-2/+2
| | | | | | The g_source_set_name calls were showing up as a major source of strdups in our profiles. Avoid that by using new GLib api when available.
* introspection: Stop using allow-noneMatthias Clasen2021-05-201-2/+2
| | | | | allow-none has been deprecated for a long time already. Instead use optional and nullable everywhere.
* Documentation fixesMatthias Clasen2021-05-201-4/+2
| | | | | Mostly fixing up indentation of continuation lines, and other small cleanups.
* range: Convert docsMatthias Clasen2021-03-111-141/+170
|
* gtk: Move from g_memdup() to g_memdup2()Emmanuele Bassi2021-02-111-1/+1
| | | | | The g_memdup() function is replaced by a safer version in newer versions of GLib.
* gtk/range: Move button release handling to GtkGestureDragCarlos Garnacho2020-12-121-20/+18
| | | | | | | | | | | | | Tracking it through the GtkGestureClick becomes a bit cumbersome for handling of simultaneously pressed buttons. We can track ::stopped, but that also emits for a number of situations where we want drag to continue. However, the GtkGestureDrag is grouped with the click gesture, and knows better when to finish the drag gesture (not just because of a button release), so hook drag and zoom mode finalization there. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
* range: Hide internals from accessibilityMatthias Clasen2020-10-211-6/+7
| | | | | | | The nameless, faceless gizmos inside a range do not contribute to the accessible experience at all, lets not add them to the tree. All the accessible functionality is on the main widget (either a scale or a scrollbar).
* macos: port gtk to GDK_WINDOWING_MACOSwip/chergert/gdk-macos-fixesChristian Hergert2020-10-091-1/+1
| | | | | | | | | For the various uses of GDK_WINDOWING_QUARTZ, we need to use alternatives from GDK_WINDOWING_MACOS. Some minor loss of functionality is here, such as icons sent with application menus. That can certainly be added back at a future point.
* Clean up lots of GTK+ -> GTKMatthias Clasen2020-09-121-3/+3
| | | | | | Replace most remaining uses of GTK+ in the docs and user-visible strings by GTK. Also remove some leftover "Was added in 3.x" sentences from the docs.
* Drop style class definesMatthias Clasen2020-08-141-8/+8
| | | | | | 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.
* gdk: Conflate GDK devicesCarlos Garnacho2020-07-291-1/+1
| | | | | | | | | | 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.
* a11y: Update the accessible state for GtkRangeEmmanuele Bassi2020-07-261-10/+45
|
* Remove ATKEmmanuele Bassi2020-07-261-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* gtk: Improve struct packing in placesMatthias Clasen2020-07-251-2/+2
| | | | | | Plug some holes in our structs by rearranging a few fields. This is was done looking at pahole output.
* Replace "gdouble" with "double"Benjamin Otte2020-07-251-71/+71
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-36/+36
|
* gtkrange: group gestures the right way aroundCarlos Garnacho2020-07-091-2/+2
| | | | | | | | | | | | | | The gtk_gesture_group() call is not a commutative operation, it takes two gestures, maybe detaches the first one from its current group, and adds it to the same group than the second gesture. With the flipped argument order here, GtkRange was actually detaching the same gesture in order to group it with a second one two times, so the desired effect to group all 3 gestures was not achieved. Fixes autoscroll as the drag gesture is now actually grouped with the click one, so drag offsets can be accessed from the autoscroll timeout.
* scale: Rearrange child widgetsTimm Bäder2020-06-271-11/+0
| | | | | | | | | | | | | | | | Always keep the order: - [value] - [marks.top] - [marks.bottom] - trough Which makes sense given the rendering order. Slider should be drawn after the marks. Makes it possible to simply remove the custom snapshot implementations in scale and range. And Adwaita does not depend on the node order anyway.
* Fix minor typosYuri Chornoivan2020-06-181-1/+1
|
* a11y: Drop notify_gtk() from GtkRangeAccessibleEmmanuele Bassi2020-06-051-0/+9
| | | | | Let the GtkRange notify the accessible instance when the adjustment changes.
* Move orientable style classes into GtkWidgetEmmanuele Bassi2020-06-051-4/+5
| | | | | | | | | 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.
* range: Treat lower and upper limit the sameMatthias Clasen2020-05-211-2/+2
| | | | | | | | When clamping values to be within the range of the adjustment, treat the lower and upper limit the same. Fixes: #328
* Change coordinate translation apis to take doublesMatthias Clasen2020-05-171-13/+14
| | | | | | Change gtk_widget_translate_coordinates and gtk_native_get_surface_transform to operate on doubles. Update all callers.
* scale: Make the area around the trough clickableMatthias Clasen2020-05-131-4/+4
| | | | | The narrow trough is too hard to hit as a click target. Make the entire scale clickable.
* range: Use dispose instead of destroyMatthias Clasen2020-05-051-5/+5
| | | | The destroy vfunc is going away.
* gizmo: Allow passing changing focus behaviorMatthias Clasen2020-04-091-4/+5
| | | | | We need this in popovers. Maybe it could be done better by defining one-off custom widgets.
* range: Remove ::popup-menu emissionMatthias Clasen2020-03-251-10/+0
| | | | | This signal is going away, and having context menus on sliders is not really a thing anyway.
* Revert "Merge branch 'disable-window-test' into 'master'"Matthias Clasen2020-03-191-0/+10
| | | | | This reverts commit 3ac4c76b18cc89a841ce09f0943539f16988fd21, reversing changes made to 6ec96d2e989d029a303b8b20ec72b86f974c0e87.
* range: Remove ::popup-menu emissionMatthias Clasen2020-03-181-10/+0
| | | | | This signal is going away, and having context menus on sliders is not really a thing anyway.
* range: Remove an outdated commentTimm Bäder2020-02-251-3/+0
| | | | What even is a CList.
* range: Inline function into only callerTimm Bäder2020-02-251-20/+9
|
* range: Clean up compute_slider_position()Timm Bäder2020-02-251-47/+29
|
* events: reorganize gettersMatthias Clasen2020-02-211-1/+1
| | | | | | | | | | Restructure the getters for event fields to be more targeted at particular event types. Update all callers, and replace all direct event struct access with getters. As a side-effect, this drops some unused getters.
* Strip const from GdkEventMatthias Clasen2020-02-211-1/+1
| | | | | Events are refcounted structs, and we generally don't pass these as const.
* range: Avoid rounding errors when allocating highlightTimm Bäder2020-02-151-6/+4
| | | | Fixes #2438
* Rename gtk_widget{get,set,has}_style_class to _css_classTimm Bäder2020-02-071-12/+12
| | | | We want to use css instead of style everywhere now.
* Start using GtkWidget's new style class APITimm Bäder2020-02-071-27/+12
|