|
| static void | pixbuf_data_to_cairo_data (const unsigned char *pixels_p, unsigned char *pixels_c, size_t rowstride_p, size_t rowstride_c, int width, int height, int n_channels) |
| | Reassemble the data parts of a GdkPixbuf into a cairo_surface_t's data field.
|
| |
| int | get_icon_width (cairo_surface_t *icon, double scale) |
| | Get the unscaled icon width.
|
| |
| int | get_icon_height (cairo_surface_t *icon, double scale) |
| | Get the unscaled icon height, see get_icon_width.
|
| |
| cairo_surface_t * | gdk_pixbuf_to_cairo_surface (GdkPixbuf *pixbuf) |
| |
| static bool | icon_size_clamp (int *w, int *h, int min_size, int max_size) |
| | Scales the given image dimensions if necessary according to the settings.
|
| |
| static GdkPixbuf * | icon_pixbuf_scale_to_size (GdkPixbuf *pixbuf, double dpi_scale, int min_size, int max_size) |
| | Scales the given GdkPixbuf to a given size.
|
| |
| static char * | get_id_from_data (const uint8_t *data_pb, size_t width, size_t height, size_t pixelstride, size_t rowstride) |
| |
| GdkPixbuf * | get_pixbuf_from_file (const char *filename, char **id, int min_size, int max_size, double scale) |
| | Retrieve an icon by its full filepath, scaled according to settings.
|
| |
| char * | get_path_from_icon_name (const char *iconname, int size) |
| | Retrieve a path from an icon name.
|
| |
| static void | icon_destroy (guchar *pixels, gpointer data) |
| |
| GdkPixbuf * | icon_get_for_data (GVariant *data, char **id, double dpi_scale, int min_size, int max_size) |
| | Convert a GVariant like described in GdkPixbuf, scaled according to settings.
|
| |
- Copyright
- Copyright 2018-2026 Dunst contributors
- License
- BSD-3-Clause
Definition in file icon.c.
| GdkPixbuf * icon_get_for_data |
( |
GVariant * | data, |
|
|
char ** | id, |
|
|
double | dpi_scale, |
|
|
int | min_size, |
|
|
int | max_size ) |
Convert a GVariant like described in GdkPixbuf, scaled according to settings.
The returned id will be a unique identifier. To check if two given GdkPixbufs are equal, it's sufficient to just compare the id strings.
- Parameters
-
| data | A GVariant in the format "(iiibii@ay)" filled with values like described in the notification spec. |
| id | (necessary) A unique identifier of the returned pixbuf. Only filled, if the return value is non-NULL. |
| dpi_scale | An integer representing the output dpi scaling. |
| min_size | An integer representing the desired minimum unscaled icon size. |
| max_size | An integer representing the desired maximum unscaled icon size. |
- Returns
- an instance of
GdkPixbuf derived from the GVariant
- Return values
-
| NULL | GVariant parameter nulled, invalid or in wrong format |
Definition at line 313 of file icon.c.