![]() |
![]() |
![]() |
Libfm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
void (*FmThumbnailReadyCallback) (FmThumbnailRequest *req
,gpointer data
); FmThumbnailRequest; FmThumbnailRequest * fm_thumbnail_request (FmFileInfo *src_file
,guint size
,FmThumbnailReadyCallback callback
,gpointer user_data
); void fm_thumbnail_request_cancel (FmThumbnailRequest *req
); FmFileInfo * fm_thumbnail_request_get_file_info (FmThumbnailRequest *req
); GdkPixbuf * fm_thumbnail_request_get_pixbuf (FmThumbnailRequest *req
); guint fm_thumbnail_request_get_size (FmThumbnailRequest *req
);
include
: libfm/fm-thumbnail.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.
|
request descriptor |
|
user data provided when request was made |
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.
|
an image file |
|
thumbnail size |
|
callback to requestor |
|
data provided for callback
|
Returns : |
request descriptor. [transfer none] |
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.
|
the request descriptor |
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.
|
request descriptor |
Returns : |
file descriptor. [transfer none] |
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.
|
request descriptor |
Returns : |
thumbnail. [transfer none] |
Since 0.1.0
guint fm_thumbnail_request_get_size (FmThumbnailRequest *req
);
Retrieves thumbnail size that request is for.
|
request descriptor |
Returns : |
size in pixels. |
Since 0.1.0