![]() |
![]() |
![]() |
WebKit2GTK+ Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
struct WebKitFaviconDatabase; #define WEBKIT_FAVICON_DATABASE_ERROR enum WebKitFaviconDatabaseError; void webkit_favicon_database_get_favicon (WebKitFaviconDatabase *database
,const gchar *page_uri
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); cairo_surface_t * webkit_favicon_database_get_favicon_finish (WebKitFaviconDatabase *database
,GAsyncResult *result
,GError **error
); gchar * webkit_favicon_database_get_favicon_uri (WebKitFaviconDatabase *database
,const gchar *page_uri
); void webkit_favicon_database_clear (WebKitFaviconDatabase *database
);
#define WEBKIT_FAVICON_DATABASE_ERROR (webkit_favicon_database_error_quark())
typedef enum { WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED, WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND, WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN } WebKitFaviconDatabaseError;
Enum values used to denote the various errors related to the WebKitFaviconDatabase.
The WebKitFaviconDatabase has not been initialized yet | |
There is not an icon available for the requested URL | |
There might be an icon for the requested URL, but its data is unknown at the moment |
void webkit_favicon_database_get_favicon (WebKitFaviconDatabase *database
,const gchar *page_uri
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously obtains a cairo_surface_t of the favicon for the given page URI. It returns the cached icon if it's in the database asynchronously waiting for the icon to be read from the database.
This is an asynchronous method. When the operation is finished, callback will
be invoked. You can then call webkit_favicon_database_get_favicon_finish()
to get the result of the operation.
|
a WebKitFaviconDatabase |
|
URI of the page for which we want to retrieve the favicon |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is
satisfied or NULL if you don't care about the result. [scope async]
|
|
The data to pass to callback . [closure]
|
cairo_surface_t * webkit_favicon_database_get_favicon_finish (WebKitFaviconDatabase *database
,GAsyncResult *result
,GError **error
);
Finishes an operation started with webkit_favicon_database_get_favicon()
.
|
a WebKitFaviconDatabase |
|
A GAsyncResult obtained from the GAsyncReadyCallback passed to webkit_favicon_database_get_favicon()
|
|
Return location for error or NULL . [allow-none]
|
Returns : |
a new reference to a cairo_surface_t, or
NULL in case of error. [transfer full]
|
gchar * webkit_favicon_database_get_favicon_uri (WebKitFaviconDatabase *database
,const gchar *page_uri
);
Obtains the URI of the favicon for the given page_uri
.
|
a WebKitFaviconDatabase |
|
URI of the page containing the icon |
Returns : |
a newly allocated URI for the favicon, or NULL if the
database doesn't have a favicon for page_uri . |
void webkit_favicon_database_clear (WebKitFaviconDatabase *database
);
Clears all icons from the database.
|
a WebKitFaviconDatabase |
"favicon-ready"
signalvoid user_function (WebKitFaviconDatabase *database,
gchar *page_uri,
gpointer user_data) : Run Last
This signal gets emitted when the favicon of page_uri
is
ready. This means that the favicon's data is ready to be used
by the application, either because it has been loaded from the
network, if it's the first time it gets retrieved, or because
it has been already imported from the icon database.
|
the object on which the signal is emitted |
|
the URI of the Web page containing the icon. |
|
user data set when the signal handler was connected. |