![]() |
![]() |
![]() |
MATE UI Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libmateui/libmateui.h> enum MateIconLookupFlags; enum MateIconLookupResultFlags; char * mate_icon_lookup (GtkIconTheme *icon_theme
,MateThumbnailFactory *thumbnail_factory
,const char *file_uri
,const char *custom_icon
,MateVFSFileInfo *file_info
,const char *mime_type
,MateIconLookupFlags flags
,MateIconLookupResultFlags *result
); char * mate_icon_lookup_sync (GtkIconTheme *icon_theme
,MateThumbnailFactory *thumbnail_factory
,const char *file_uri
,const char *custom_icon
,MateIconLookupFlags flags
,MateIconLookupResultFlags *result
);
typedef enum { MATE_ICON_LOOKUP_FLAGS_NONE = 0, MATE_ICON_LOOKUP_FLAGS_EMBEDDING_TEXT = 1<<0, MATE_ICON_LOOKUP_FLAGS_SHOW_SMALL_IMAGES_AS_THEMSELVES = 1<<1, MATE_ICON_LOOKUP_FLAGS_ALLOW_SVG_AS_THEMSELVES = 1<<2 } MateIconLookupFlags;
typedef enum { MATE_ICON_LOOKUP_RESULT_FLAGS_NONE = 0, MATE_ICON_LOOKUP_RESULT_FLAGS_THUMBNAIL = 1<<0 } MateIconLookupResultFlags;
char * mate_icon_lookup (GtkIconTheme *icon_theme
,MateThumbnailFactory *thumbnail_factory
,const char *file_uri
,const char *custom_icon
,MateVFSFileInfo *file_info
,const char *mime_type
,MateIconLookupFlags flags
,MateIconLookupResultFlags *result
);
This function tries to locate an icon in icon_theme
that can be used
to represent the file passed. It can optionally also look for existing
thumbnails. It does no I/O, so the lookup should be relatively fast.
If you don't know any information about the file already you can use
mate_icon_lookup_sync()
which gets this information using mate-vfs.
For backwards compatibility, this function also accepts a MateIconTheme instead of a GtkIconTheme.
The following flags
are valid:
MATE_ICON_LOOKUP_FLAGS_EMBEDDING_TEXT - Return the text icon for scripts. This is useful if you do text embedding in the icons.
MATE_ICON_LOOKUP_FLAGS_SHOW_SMALL_IMAGES_AS_THEMSELVES - Return the filename of the filename itself for small images. Only availible if you pass a thumbnail_factory.
Possible result
flags:
MATE_ICON_LOOKUP_RESULT_FLAGS_THUMBNAIL - The returned file is a thumbnail.
|
a GtkIconTheme, or (deprecated) a MateIconTheme |
|
an optional MateThumbnailFactory used to look up thumbnails |
|
the uri of the file |
|
optionally the name of a custom icon to try |
|
information about the file from mate_vfs_get_file_info()
|
|
the mime type of the icon |
|
flags that affect the result of the lookup |
|
optionally result flags of the lookups are stored here |
Returns : |
The name of an icon or an absolute filename of an image to use for the file. |
Since 2.2
char * mate_icon_lookup_sync (GtkIconTheme *icon_theme
,MateThumbnailFactory *thumbnail_factory
,const char *file_uri
,const char *custom_icon
,MateIconLookupFlags flags
,MateIconLookupResultFlags *result
);
This function tries to locate an icon in icon_theme
that can be used
to represent the file passed. See mate_icon_lookup()
for more information.
|
a GtkIconTheme, or (deprecated) a MateIconTheme |
|
an optional MateThumbnailFactory used to look up thumbnails |
|
the uri of the file |
|
optionally the name of a custom icon to try |
|
flags that affect the result of the lookup |
|
optionally result flags of the lookups are stored here |
Returns : |
The name of an icon or an absolute filename of an image to use for the file. |
Since 2.2