summaryrefslogtreecommitdiff
path: root/gtk/gtkicontheme.h
Commit message (Collapse)AuthorAgeFilesLines
* icontheme: Add a missing getterMatthias Clasen2020-10-031-0/+3
| | | | | We want to have a get_display() method on every object that is tied to the display, so add one here.
* Replace "gchar" with "char"Benjamin Otte2020-07-251-3/+3
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-7/+7
|
* icontheme: Update the apiMatthias Clasen2020-02-181-17/+15
| | | | | | | | | Add properties, and use string arrays instead of lists. Among other things, this renames gtk_icon_theme_list_icons to gtk_icon_theme_get_icon_names. Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2410
* Typo fixMatthias Clasen2020-02-111-1/+1
|
* Expose gtk_icon_paintable_new_for_fileAlexander Larsson2020-02-101-0/+4
|
* icon paintable: Replace get_filename and get_resource_path with get_file()Alexander Larsson2020-02-101-3/+1
| | | | This returns a GFile which can represent both the above.
* Rename GTK_ICON_LOOKUP_LOAD_IN_THREAD to GTK_ICON_LOOKUP_PRELOADAlexander Larsson2020-02-101-4/+4
|
* icon-theme: Add GTK_ICON_LOOKUP_LOAD_IN_THREAD flagAlexander Larsson2020-02-071-1/+4
| | | | This causes lookup to trigger a thread that loads the icon texture.
* Add gtk_icon_paintable_get_resource_path()Alexander Larsson2020-02-061-3/+5
| | | | | Also, return NULL from gtk_icon_paintable_get_filename() if the path is really a resource path.
* Add gtk_icon_paintable_get_icon_name()Alexander Larsson2020-02-061-0/+2
| | | | This allows you to see which icon was actually chosen.
* Remove gtk_icon_paintable_download_texture() public APIAlexander Larsson2020-02-061-2/+0
| | | | | | This allows us do do what we want internally, and anyway it didn't really do what you'd expect anymore now that we do resizing during rendering.
* IconTheme: Never fail a lookup or icon loadAlexander Larsson2020-02-061-2/+1
| | | | | | | | | | | | | If icon lookup fails or if loading it fails later, just always fall back to the built in image-missing icon. Nobody is handling missing icons in a sane way anyway. If you *truly* need to handle missing icons, you need to manually use gtk_icon_theme_has_icon(). While changing the loading code I also fixed an issue where it was always passing "png" to pixbuf, now it also handles "xpm" if that is the filename suffix.
* IconTheme: Simplify icon scalingAlexander Larsson2020-02-061-5/+2
| | | | | | | | | | | | | | | | | | | | | We had a pretty complex setup where we tried to avoid scaling up themes from dirs that specified a size. However, not only was it very complex, but it didn't quite work with window scales, because when using e.g. a size 32 directory for 16@2x the dir size is wrong anyway. Additionally it turns out most code either picks an existing icon size, or uses the FORCE_SIZE flags, so it doesn't seem like a useful behaviour. This change drops the FORCE_SIZE flags, and always scales icons. Additionally it moves the scaling of the icon to rendering, which seems more modern, and allows us to (later) share icons loaded for different sizes that happened to use the same source file (at different scales). Note that this changes the behaviour of gtk_icon_paintable_download_texture() is it now returns the unscaled source icon. However, ignore thats, as I plan to remove this function and replace it with a way to render a paintable to a cairo-surface instead.
* Rename GtkIcon to GtkIconPaintableAlexander Larsson2020-02-041-48/+47
|
* icontheme: Remove GENERIC_FALLBACKSBenjamin Otte2020-02-041-8/+3
| | | | | | | | | 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.
* icontheme: Pass fallbacks as optional argument to lookup_icon()Benjamin Otte2020-02-041-8/+2
| | | | This way, we can remove gtk_icon_theme_choose_icon() completely.
* icontheme: Remove contextsBenjamin Otte2020-02-041-2/+1
| | | | | | | | 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".
* icontheme: Clean up includesBenjamin Otte2020-02-041-3/+1
|
* icontheme: Remove gtk_icon_get_base_size() and gtk_icon_get_base_dir()Benjamin Otte2020-02-041-4/+0
| | | | | | | | 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.
* icontheme: Remove crayon APIsBenjamin Otte2020-02-041-16/+0
| | | | | | | | 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.
* icontheme: Remove gtk_icon_theme_rescan_if_needed()Benjamin Otte2020-02-041-2/+0
| | | | | | | 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.
* icontheme: Remove NO_SVG and FORCE_SVG flagsBenjamin Otte2020-02-041-11/+4
| | | | | If the icon theme loads SVGs or not is an implementation detail and should not be exposed in public API.
* icontheme: Remove GTK_ICON_LOOKUP_USE_BUILTINBenjamin Otte2020-02-041-9/+4
| | | | It's unused.
* icontheme: Make text direction a lookup argumentBenjamin Otte2020-02-041-7/+4
| | | | | | 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.
* icontheme: Remove async APIsBenjamin Otte2020-02-041-14/+0
| | | | | | | 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.
* icontheme: Remove gtk_icon_theme_get_default()Benjamin Otte2020-02-041-2/+0
| | | | | | | 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 ())
* icon-theme: Add i/o priority to choose_icon_async()Alexander Larsson2020-01-301-0/+1
| | | | | This is set on the GTask and lower priority will be loaded before, this can be used to prioritize some icons for preloading.
* icon-theme: Use GtkSnapshot, not GdkSnapshotAlexander Larsson2020-01-301-3/+3
|
* icon-theme: Drop the _for_scale() versions and always take scaleAlexander Larsson2020-01-301-18/+2
|
* icon-theme: Rename GtkIconInfo to GtkIconAlexander Larsson2020-01-301-66/+63
|
* icon-theme: Drop all load() calls from GtkIconInfoAlexander Larsson2020-01-291-65/+0
| | | | | All users now either use it directly as a paintable or download the texture to use the pixels.
* icon-theme: Add async icon loaderAlexander Larsson2020-01-291-0/+13
|
* icon-theme: Add gtk_icon_info_download_colored_texture()Alexander Larsson2020-01-291-0/+7
| | | | | This is a way to get at recolored pixels and will replace all existing users of _load_symbolic*()
* icon theme: Add gtk_icon_info_download_texture() functionAlexander Larsson2020-01-291-0/+5
| | | | | This returns a reference to the texture (if possible) and can be used to get access to the pixels of the icon.
* Add gtk_icon_info_snapshot_with_colors() and use instead of custom codeAlexander Larsson2020-01-291-0/+8
|
* Drop gtk_icon_info_new_for_pixbufMatthias Clasen2019-10-181-4/+0
| | | | | It is better to keep icon infos as something you only get from the icon theme.
* Drop gtk_icon_theme_get_example_icon_nameMatthias Clasen2019-10-181-2/+0
| | | | | | | 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.
* Drop gtk_icon_theme_list_contextsMatthias Clasen2019-10-181-2/+0
| | | | Contexts in icon themes are not useful for anything.
* icontheme: Stop using a private structTimm Bäder2019-09-091-34/+34
| | | | | The GtkIconTheme/GtkIconInfo structs aren't public anymore, so use the structs directly instead of a priv pointer.
* icontheme: Remove gtk_icon_info_load_textureTimm Bäder2019-09-091-4/+0
| | | | It's the same as load_icon now.
* icontheme: Return a paintable from gtk_icon_info_load_iconTimm Bäder2019-09-091-2/+2
|
* icontheme: Return paintables from more APITimm Bäder2019-09-091-30/+30
|
* icontheme: Return textures from load_icon{,_for_scale}Timm Bäder2019-09-091-6/+6
|
* icontheme: Add error argument to _load_textureTimm Bäder2019-09-091-3/+4
| | | | Loading an icon might fail.
* icon theme: Make finalMatthias Clasen2019-05-261-58/+0
| | | | Nobody should subclass GtkIconTheme or GtkIconInfo.
* Remove a lot of Since annotationsMatthias Clasen2018-06-251-6/+6
| | | | | 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.
* icontheme: Remove surface supportBenjamin Otte2018-03-161-12/+0
| | | | It's not used anymore.
* The big versioning cleanupMatthias Clasen2018-02-061-18/+18
| | | | | | | 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.
* Drop gtk_icon_size_lookupMatthias Clasen2017-11-151-5/+0
| | | | | Add a new, private gtk_image_get_image_size to replace it, and update the remaining callers in a suitable way.