## ThunarIconFactory ThunarIconFactory |

## Functions

ThunarIconFactory * | thunar_icon_factory_get_default ()
ThunarIconFactory * | thunar_icon_factory_get_for_icon_theme ()
gboolean | thunar_icon_factory_get_show_thumbnail ()
GdkPixbuf * | thunar_icon_factory_load_icon ()
GdkPixbuf * | thunar_icon_factory_load_file_icon ()
void | thunar_icon_factory_clear_pixmap_cache ()

## Properties

GtkIconTheme * | icon-theme | Read
gboolean | thumbnail-draw-frames | Read / Write
guint64 | thumbnail-max-file-size | Read / Write
ThunarThumbnailMode | thumbnail-mode | Read / Write
ThunarThumbnailSize | thumbnail-size | Read / Write

## Object Hierarchy

        GObject
        ╰── ThunarIconFactory

## Description

## Functions

### thunar_icon_factory_get_default ()

    ThunarIconFactory *
    thunar_icon_factory_get_default (void);

Returns the ThunarIconFactory that operates on the default GtkIconTheme. The default ThunarIconFactory instance will be around for the time the programs runs, starting with the first call to this function.

The caller is responsible to free the returned object using `g_object_unref()` when no longer needed.

#### Returns

the ThunarIconFactory for the default icon theme.

### thunar_icon_factory_get_for_icon_theme ()

    ThunarIconFactory *
    thunar_icon_factory_get_for_icon_theme
                                   (GtkIconTheme *icon_theme);

Determines the proper ThunarIconFactory to be used with the specified `icon_theme` and returns it.

You need to explicitly free the returned ThunarIconFactory object using `g_object_unref()` when you are done with it.

#### Parameters

icon_theme | a GtkIconTheme instance. |

#### Returns

the ThunarIconFactory for `icon_theme` .

### thunar_icon_factory_get_show_thumbnail ()

    gboolean
    thunar_icon_factory_get_show_thumbnail
                                   (const ThunarIconFactory *factory,
                                    const ThunarFile *file);

#### Parameters

factory | a ThunarIconFactory instance. |
file | a ThunarFile. |

#### Returns

if a Thumbnail show be shown for `file` .

### thunar_icon_factory_load_icon ()

    GdkPixbuf *
    thunar_icon_factory_load_icon (ThunarIconFactory *factory,
                                   const gchar *name,
                                   gint size,
                                   gint scale_factor,
                                   gboolean wants_default,
                                   gboolean symbolic,
                                   GtkStyleContext *context);

Looks up the icon named `name` in the icon theme associated with `factory` and returns a pixbuf for the icon at the given `size` . This function will return a default fallback icon if the requested icon could not be found and `wants_default` is `TRUE`, else `NULL` will be returned in that case.

If `symbolic` is `TRUE`, try to load a symbolic icon that optionally matches the system colors provided by `context` .

Call `g_object_unref()` on the returned pixbuf when you are done with it.

#### Parameters

factory | a ThunarIconFactory instance. |
name | name of the icon to load. |
size | desired icon size. |
scale_factor | the UI scale factor. |
wants_default | `TRUE` to return the fallback icon if no icon of `name` is found in the `factory` . |
symbolic | `TRUE` to request a symbolic icon if possible. |
context | a GtkStyleContext instance, can be `NULL`. |

#### Returns

the pixbuf for the icon named `name` at `size` .

### thunar_icon_factory_load_file_icon ()

    GdkPixbuf *
    thunar_icon_factory_load_file_icon (ThunarIconFactory *factory,
                                        ThunarFile *file,
                                        ThunarFileIconState icon_state,
                                        gint icon_size,
                                        gint scale_factor,
                                        gboolean symbolic,
                                        GtkStyleContext *context);

If `symbolic` is `TRUE`, try to load a symbolic icon that optionally matches the system colors provided by `context` .

The caller is responsible to free the returned object using `g_object_unref()` when no longer needed.

#### Parameters

factory | a ThunarIconFactory instance. |
file | a ThunarFile. |
icon_state | the desired icon state. |
icon_size | the desired icon size. |
scale_factor | the UI scale factor. |
symbolic | load the symbolic version of the icon. |
context | a GtkStyleContext instance, can be `NULL`. |

#### Returns

the GdkPixbuf icon.

### thunar_icon_factory_clear_pixmap_cache ()

    void
    thunar_icon_factory_clear_pixmap_cache
                                   (ThunarFile *file);

Unset the pixmap cache on a file to force a reload on the next request.

#### Parameters

file | a ThunarFile. |

## Property Details

### The `“icon-theme”` property

      “icon-theme”               GtkIconTheme *

The GtkIconTheme on which the given ThunarIconFactory instance operates on.

Owner: ThunarIconFactory

Flags: Read

### The `“thumbnail-draw-frames”` property

      “thumbnail-draw-frames”    gboolean

Whether to draw black frames around thumbnails. This looks neat, but will delay the first draw a bit. May have an impact on older systems, on folders with many pictures.

Owner: ThunarIconFactory

Flags: Read / Write

Default value: FALSE

### The `“thumbnail-max-file-size”` property

      “thumbnail-max-file-size”  guint64

Maximum file size (in bytes) allowed to be thumbnailed

Owner: ThunarIconFactory

Flags: Read / Write

Default value: 0

### The `“thumbnail-mode”` property

      “thumbnail-mode”           ThunarThumbnailMode

Whether this ThunarIconFactory will try to generate and load thumbnails when loading icons for ThunarFiles.

Owner: ThunarIconFactory

Flags: Read / Write

Default value: THUNAR_THUMBNAIL_MODE_ONLY_LOCAL

### The `“thumbnail-size”` property

      “thumbnail-size”           ThunarThumbnailSize

Size of the thumbnails to load

Owner: ThunarIconFactory

Flags: Read / Write

Default value: THUNAR_THUMBNAIL_SIZE_NORMAL