Commit Graph

69 Commits

Author SHA1 Message Date
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Timm Bäder
7cc9bee7a2 spinner: Stop using gtk_widget_get_content_size 2017-12-03 22:04:59 +01:00
Matthias Clasen
ffd6baec42 gtk: Intern css names
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Timm Bäder
b5c3c51124 spinner: Remove priv pointer 2017-10-01 09:19:09 +02:00
Daniel Boles
d48f904e3c Spinner: Document how to select on animated in CSS
This is not particularly obvious, so it seems worth including.
2017-09-14 19:25:50 +01:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
1535cab936 spinner: Use get_content_size 2017-07-19 21:27:14 -04:00
Timm Bäder
4f0140fa6c Remove GtkBuiltinIcon
Now unused.
2017-07-19 21:27:13 -04:00
Timm Bäder
d1be5f2941 spinner: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
82a4bcf824 spinner: Set clip 2017-07-19 21:27:11 -04:00
Benjamin Otte
dad8703e03 snapshot: Convert GtkSpinner 2016-11-15 17:49:19 +01:00
Timm Bäder
9992a616ef widget: Use ::measure vfunc to measure size
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Matthias Clasen
c5a2ae2f95 Convert GtkSpinner to indirect rendering 2016-10-18 11:49:15 +01:00
Benjamin Otte
9d56a076cc gadget: Add builtin icon gadget
This is to be used in all the places where we now call
gtk_render_activity()/option()/check() etc that in turn call the icon
render function.
2015-12-16 04:46:23 +01:00
Matthias Clasen
9e278293ca spinner: Use a gadget
This gives us min-width/height support. Currently, the spinner
still has a hardcoded minimum size of 16 and doesn't grow beyond
32. We may want to revisit that at some point.
2015-12-15 08:41:16 -05:00
Benjamin Otte
d26a4b5555 spinner: Active spinners should be :checked, not :active
If that sounds confusing, it's because GTK and CSS can sometimes not
agree on naming.

:active for CSS means that a button is currently pressed on an element.
And that is clearly not the case for spinning spinners.
2015-12-02 00:39:25 +01:00
Matthias Clasen
9269525f07 spinner: Use the element name spinner
Switch GtkSpinner from using the .spinner style class to
using the element name spinner for its css node.
2015-10-25 15:45:13 -04:00
Matthias Clasen
9321b30b0b GtkSpinner: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:10 -04:00
Benjamin Otte
434f91feff spinner: Implement clip
We now allow you to gtk-icon-transform() the spinner outside of the
spinners allocation.
2014-05-24 16:12:20 +02:00
Benjamin Otte
55f473f4e6 spinner: Don't arbitrarily limit sizes anymore
This essentially reverts b33877e173

Now that we can theme the spinner as a real icon using -gtk-icontheme()
this limit is no longer necessary.
2014-05-14 04:28:34 +02:00
Benjamin Otte
a1bba344f2 spinner: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
b33877e173 spinner: don't expand to fill the allocated space
Spinners are essentially animated symbolic icons. We don't really
want them being rendered to arbitrary sizes. Also the current
technique for rendering the activity is not suitable for larger
sizes. Until we have a better technique we should limit the size
to the MENU icon size or exactly twice that size.
2013-10-11 08:38:37 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Matthias Clasen
bf2cf23262 Force spinners to be square 2012-09-17 22:47:36 -04:00
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Rui Matos
b203ea2f93 spinner: Stop setting state flags on the style context for drawing 2012-01-09 16:45:44 +00:00
Matthias Clasen
ba0bc468d6 Fix the build
I didn't pay enough attention when merging, it seems.
2011-07-05 16:57:46 -04:00
Matthias Clasen
e6251f0248 Move GtkSpinnerAccessible to a11y/ 2011-07-05 16:10:25 -04:00
Matthias Clasen
775ccf39e7 Initial conversion of GailWidget to GtkWidgetAccessible 2011-07-05 16:09:57 -04:00
Matthias Clasen
3edebfb81c GtkSpinner: set a suitable role for the accessible
The consensus of the accessibility team was that this is
an animation. Update tests to match.
2011-07-05 16:08:07 -04:00
Matthias Clasen
5eb8ca1882 Remove unnecessary includes
gtkstyle.h is similarly unused.
2011-06-16 23:35:24 -04:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Matthias Clasen
072023e57b Remove deprecated GtkSpinner style properties 2011-01-05 23:21:52 -05:00
Matthias Clasen
d5df33c75f Fix abi check after recent merges 2010-12-05 12:18:30 -05:00
Carlos Garnacho
e9ef162d4c GtkSpinner: Use style context for rendering.
Animation is now handled by the theming layer, a looping animation
has been defined in the default CSS to handle active spinners.
2010-12-04 15:39:45 +01:00
Guillaume Desmottes
8076dbfb5c gtkspinner: don't setup the timeout twice (#636129) 2010-11-30 15:59:49 +01:00
Emmanuele Bassi
781d4faf4c a11y: Use ATK macros and clean up/2 - GtkSpinner
ATK provides macros to the same effect as G_DEFINE_TYPE; using these
macros has the advantage of removing tons of duplicated code and
reducing the maintainership burden.

The widgets with inline accessibility implementation should switch to
these macros, and clean up the code.

https://bugzilla.gnome.org/show_bug.cgi?id=636060
2010-11-30 02:06:57 +00:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
0a6b7e5759 spinner: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
e06d04032b spinner: We're a no-window widget, so setting a colormap does nothing 2010-09-26 15:11:31 +02:00
Javier Jardón
f5a06df3dc spinner: timeout should add/remove in map/unmap, not realize/unrealize.
Otherwise hiding the spinner won't stop it
2010-09-15 04:00:55 +02:00
Benjamin Otte
7b42d4feda spinner: Don't inherit from drawing area
A drawing area is not meant to be subclassed from. It also doesn't
provide any feature a spinner would need either.
2010-09-14 01:28:01 +02:00
Benjamin Otte
032d3f0ada spinner: Implement the size request interface
Doing size requests in expose is broken.
2010-09-14 01:25:07 +02:00
Benjamin Otte
c22b80949d spinner: Move G_DEFINE_TYPE() below function definitions
Also remove redundant double definition.
2010-09-14 01:19:48 +02:00
Benjamin Otte
5ba6295a10 spinner: Define desired size at top of file
No magic numbers in the code please
2010-09-14 01:09:53 +02:00
Mike Gorse
8fb5bc2583 Remove a duplicate variable
Bug#629110: gtk_spinner_accessible_get_type always returns null
2010-09-08 17:55:28 -04:00
Javier Jardón
91a49bac5a gtk/gtkspinner.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00