Alexander Larsson
410541f82b
Rename GtkIcon to GtkIconPaintable
2020-02-04 17:19:22 +01:00
Benjamin Otte
138de60ab2
icontheme: Remove GENERIC_FALLBACKS
...
Instead, rely on people passing fallbacks explicitly.
Alternatively, GThemedIcon provides the functionality to create
fallbacks, which is what GtkImage and the testsuite now use.
That method is slightly better, too, so the expected test results
have been updated accordingly.
2020-02-04 16:51:54 +01:00
Benjamin Otte
571021cbc1
icontheme: Pass fallbacks as optional argument to lookup_icon()
...
This way, we can remove gtk_icon_theme_choose_icon() completely.
2020-02-04 16:51:54 +01:00
Benjamin Otte
f7a5dd7b8b
icontheme: Remove contexts
...
There is no way to query contexts or do anything useful with them.
So don't keep track of them and don't make them an argument in public
APIs with the docs saying "I don't know what to use here, maybe read
some spec somewhere".
2020-02-04 16:51:54 +01:00
Benjamin Otte
544cd1acfc
icontheme: Clean up includes
2020-02-04 16:43:59 +01:00
Benjamin Otte
4b96ba592f
icontheme: Remove gtk_icon_get_base_size() and gtk_icon_get_base_dir()
...
Those functions are unused and the documentation says "Returns some
random number that the icon theme creator chose" which does not seem at
all useful and an implementation detail.
So get rid of it.
2020-02-04 16:43:59 +01:00
Benjamin Otte
3bba52ed67
icontheme: Remove crayon APIs
...
We expose no API to get at any colors for drawing symbolics, so we
shouldn't have APIs to draw with them.
Apart from that, those APIs look like a box of crayons, not like an
icontheme.
2020-02-04 16:43:59 +01:00
Benjamin Otte
48b9791989
icontheme: Remove gtk_icon_theme_rescan_if_needed()
...
If the icon theme needs to be rescanned, it should just do it.
If it doesn't, there's no need for this function.
Ergo: Don't have the function.
2020-02-04 16:43:59 +01:00
Benjamin Otte
4c3363b8c2
icontheme: Remove NO_SVG and FORCE_SVG flags
...
If the icon theme loads SVGs or not is an implementation detail and
should not be exposed in public API.
2020-02-04 16:41:36 +01:00
Benjamin Otte
10023b5d6d
icontheme: Remove GTK_ICON_LOOKUP_USE_BUILTIN
...
It's unused.
2020-02-04 16:41:36 +01:00
Benjamin Otte
bbbe39fb44
icontheme: Make text direction a lookup argument
...
Most users were just forgetting to set the proper flags.
And flags aren't the right way to set this anyway, it was just
acceptable as a workaround during GTK3 to not break API.
2020-02-04 16:41:36 +01:00
Benjamin Otte
b713b9f68d
icontheme: Remove async APIs
...
Widgets would not use them properly. In fact, the only user was using
them wrong.
As icons are loaded async by default, this call isn't necessary.
2020-02-04 16:41:36 +01:00
Benjamin Otte
bfebc2b01a
icontheme: Remove gtk_icon_theme_get_default()
...
The API encouraged wrong usage - most of the users were indeed wrong.
Use the correct version instead:
gtk_icon_theme_get_for_display (gtk_widget_get_display ())
2020-02-04 16:41:36 +01:00
Alexander Larsson
d1cd578d59
icon-theme: Add i/o priority to choose_icon_async()
...
This is set on the GTask and lower priority will be loaded before,
this can be used to prioritize some icons for preloading.
2020-01-30 15:15:08 +01:00
Alexander Larsson
b227a2f190
icon-theme: Use GtkSnapshot, not GdkSnapshot
2020-01-30 10:53:43 +01:00
Alexander Larsson
b087f9ca51
icon-theme: Drop the _for_scale() versions and always take scale
2020-01-30 10:53:43 +01:00
Alexander Larsson
e2f778602b
icon-theme: Rename GtkIconInfo to GtkIcon
2020-01-30 10:53:43 +01:00
Alexander Larsson
6af4b6a644
icon-theme: Drop all load() calls from GtkIconInfo
...
All users now either use it directly as a paintable or download
the texture to use the pixels.
2020-01-29 19:12:15 +01:00
Alexander Larsson
71b3b54215
icon-theme: Add async icon loader
2020-01-29 19:06:16 +01:00
Alexander Larsson
6ffb54f47f
icon-theme: Add gtk_icon_info_download_colored_texture()
...
This is a way to get at recolored pixels and will replace all existing users
of _load_symbolic*()
2020-01-29 19:06:16 +01:00
Alexander Larsson
884e06ad37
icon theme: Add gtk_icon_info_download_texture() function
...
This returns a reference to the texture (if possible) and can be
used to get access to the pixels of the icon.
2020-01-29 19:06:16 +01:00
Alexander Larsson
53c542765f
Add gtk_icon_info_snapshot_with_colors() and use instead of custom code
2020-01-29 19:06:16 +01:00
Matthias Clasen
1dd55ed600
Drop gtk_icon_info_new_for_pixbuf
...
It is better to keep icon infos as something you
only get from the icon theme.
2019-10-18 08:53:23 -05:00
Matthias Clasen
6373ced608
Drop gtk_icon_theme_get_example_icon_name
...
This function is not useful. Every icon theme
on my system either does not have that field,
or has it as 'folder'. So, just use 'folder'
when you need an example icon.
2019-10-18 08:53:23 -05:00
Matthias Clasen
2ea95a7674
Drop gtk_icon_theme_list_contexts
...
Contexts in icon themes are not useful for anything.
2019-10-18 08:53:23 -05:00
Timm Bäder
0603b4431a
icontheme: Stop using a private struct
...
The GtkIconTheme/GtkIconInfo structs aren't public anymore, so use the
structs directly instead of a priv pointer.
2019-09-09 17:36:27 +02:00
Timm Bäder
71339225eb
icontheme: Remove gtk_icon_info_load_texture
...
It's the same as load_icon now.
2019-09-09 17:36:26 +02:00
Timm Bäder
590e70d4d1
icontheme: Return a paintable from gtk_icon_info_load_icon
2019-09-09 17:36:26 +02:00
Timm Bäder
fd16ac4d5e
icontheme: Return paintables from more API
2019-09-09 17:36:26 +02:00
Timm Bäder
f3099afcc5
icontheme: Return textures from load_icon{,_for_scale}
2019-09-09 17:36:26 +02:00
Timm Bäder
6821fe0c13
icontheme: Add error argument to _load_texture
...
Loading an icon might fail.
2019-09-09 17:36:26 +02:00
Matthias Clasen
96eefd49fa
icon theme: Make final
...
Nobody should subclass GtkIconTheme or GtkIconInfo.
2019-05-26 15:33:10 -04:00
Matthias Clasen
8755d884f3
Remove a lot of Since annotations
...
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
2018-06-25 19:55:04 -04:00
Benjamin Otte
af18796312
icontheme: Remove surface support
...
It's not used anymore.
2018-03-16 06:04:45 +01:00
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
Matthias Clasen
0d23606653
Drop gtk_icon_size_lookup
...
Add a new, private gtk_image_get_image_size to replace it, and
update the remaining callers in a suitable way.
2017-11-15 14:22:17 -05:00
Matthias Clasen
12837f6905
Drop the last use of GDK_MULTIHEAD_SAFE
...
This define is not used anymore, this was a leftover.
2017-11-10 16:14:19 -05:00
Benjamin Otte
ca3c23662c
GskTexture => GdkTexture
...
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Benjamin Otte
ecd5b399a4
icontheme: Use GdkDisplay instead of GdkScreen
2017-10-31 03:05:55 +01:00
Matthias Clasen
02db8ccd89
icon theme: Add a texture cache
...
Return cached textures for icons. This lets us avoid duplicate
texture uploads for icons whose surfaces we already cache.
2017-10-23 08:07:35 +02:00
Timm Bäder
d188912338
icontheme: Remove deprecated API
2016-10-22 19:08:29 +02:00
Timm Bäder
ed184b3935
Remove GtkIconFactory
...
Move the icon size lookup API into gtkicontheme.c
2016-10-16 18:17:21 +02:00
Benjamin Otte
0df388051d
API: Remove GtkStyle
...
All the remaining gtkrc.c stuff like GtkRcStyle goes with it.
2016-10-16 18:17:21 +02:00
Benjamin Otte
8ec2362d81
icontheme: Clarify GENERIC_FALLBACK flag handling
...
- Add docs explaining that it doesn't work everywhere
- g_warn_if_fail() in the APIs where it doesn't work
2015-10-28 19:44:26 +01:00
Matthias Clasen
5a548106b0
Deprecate gtk_icon_theme_add_builtin_icon
...
Builtin icons are deprecated in favor of loading icons
from resource paths.
2014-06-30 17:17:49 -04:00
Matthias Clasen
e9ac1bb476
Make gtk_icon_theme_add_resource_path public API
...
This makes it possible to look up icons in resources using
the icon theme api, and should be used as a replacement
for installing icons below $pkgdatadir/icons and adding
that location to the search path.
2014-06-30 17:13:04 -04:00
Matthias Clasen
2672837a14
GtkIconTheme: Keep gtk_icon_theme_add_resource_path private for now
...
We need to discuss some details of the semantics before
we can make this public.
2014-06-20 08:50:31 -04:00
Matthias Clasen
a31e8369f8
Revert "Deprecate gtk_icon_theme_add_builtin_icon"
...
This reverts commit 923eeda2d3
.
2014-06-20 08:46:24 -04:00
Matthias Clasen
923eeda2d3
Deprecate gtk_icon_theme_add_builtin_icon
2014-06-20 01:17:47 -04:00
Matthias Clasen
968ea4186d
GtkIconTheme: Allow loading icons from resources
...
We add a new API, gtk_icon_theme_add_resource_path, which
can be used to add resource path as a base location for
icon theme content, similar to gtk_icon_theme_append_search_path.
2014-06-20 01:17:46 -04:00