Top | ![]() |
![]() |
![]() |
![]() |
void | (*FmThumbnailReadyCallback) () |
FmThumbnailRequest * | fm_thumbnail_request () |
void | fm_thumbnail_request_cancel () |
GdkPixbuf * | fm_thumbnail_request_get_pixbuf () |
FmFileInfo * | fm_thumbnail_request_get_file_info () |
guint | fm_thumbnail_request_get_size () |
include
: libfm/fm-gtk.h
This API allows to generate thumbnails for files and save them on disk then use that cache next time to display them.
void (*FmThumbnailReadyCallback) (FmThumbnailRequest *req
,gpointer data
);
The callback to requestor when thumbnail is ready.
Note that this call is done outside of GTK loop so if the callback
wants to use any GTK API it should call gdk_threads_enter()
and
gdk_threads_leave()
for safety.
Since: 0.1.0
FmThumbnailRequest * fm_thumbnail_request (FmFileInfo *src_file
,guint size
,FmThumbnailReadyCallback callback
,gpointer user_data
);
Schedules loading/generation of thumbnail for src_file
. If the
request isn't cancelled then ready thumbnail will be given to the
requestor in callback
. Returned descriptor can be used to cancel
the job.
src_file |
an image file |
|
size |
thumbnail size |
|
callback |
callback to requestor |
|
user_data |
data provided for |
Since: 0.1.0
void
fm_thumbnail_request_cancel (FmThumbnailRequest *req
);
Cancels request. After return from this call the req
becomes invalid
and cannot be used. Caller will never get callback for cancelled
request either.
Since: 0.1.0
GdkPixbuf *
fm_thumbnail_request_get_pixbuf (FmThumbnailRequest *req
);
Retrieves loaded thumbnail. Returned data are owned by req
and should
be not freed by caller.
Since: 0.1.0
FmFileInfo *
fm_thumbnail_request_get_file_info (FmThumbnailRequest *req
);
Retrieves file descriptor that request is for. Returned data are
owned by req
and should be not freed by caller.
Since: 0.1.0
guint
fm_thumbnail_request_get_size (FmThumbnailRequest *req
);
Retrieves thumbnail size that request is for.
Since: 0.1.0