Defines | |
#define | rox_dnd_register_uris(w, f, u, d) rox_dnd_register_full(w, f, u, NULL, d) |
#define | rox_dnd_register_xds(w, f, x, d) rox_dnd_register_full(w, f, NULL, x, d) |
Typedefs | |
typedef gboolean(*) | rox_dnd_handle_uris (GtkWidget *widget, GSList *uris, gpointer data, gpointer udata) |
typedef gboolean(*) | rox_dnd_handle_xds (GtkWidget *widget, const gchar *path, gpointer data, gpointer udata) |
Functions | |
void | rox_dnd_init (void) |
void | rox_dnd_register_full (GtkWidget *widget, guint flags, rox_dnd_handle_uris, rox_dnd_handle_xds, gpointer udata) |
GSList * | rox_dnd_filter_local (GSList *uris) |
void | rox_dnd_local_free (GSList *paths) |
#define rox_dnd_register_uris | ( | w, | |||
f, | |||||
u, | |||||
d | ) | rox_dnd_register_full(w, f, u, NULL, d) |
Register a handler for a widget that handles URIs only.
[in] | w | widget |
[in] | f | flags |
[in] | u | callback function |
[in] | d | additional data to pass |
#define rox_dnd_register_xds | ( | w, | |||
f, | |||||
x, | |||||
d | ) | rox_dnd_register_full(w, f, NULL, x, d) |
Register a handler for a widget that handles URIs only.
[in] | w | widget |
[in] | f | flags |
[in] | x | callback function |
[in] | d | additional data to pass |
typedef gboolean(*) rox_dnd_handle_uris(GtkWidget *widget, GSList *uris, gpointer data, gpointer udata) |
Function which responds to drop on a widget by processing a list of URIs.
[in] | widget | the widget that was the target of the drop |
[in] | uris | list of URIs to process |
[in] | data | internal data, ignore. |
[in] | udata | user data passed when the callback was registered in rox_dnd_register_full() |
TRUE
if handled successfully, FALSE
otherwise. typedef gboolean(*) rox_dnd_handle_xds(GtkWidget *widget, const gchar *path, gpointer data, gpointer udata) |
Function which responds to drop on a widget by the XDS protocol. The system negotiates a temporary file to store the transfered file.
[in] | widget | the widget that was the target of the drop |
[in] | path | path to the file the dropped data was stored in. Delete this file when it is finished with. |
[in] | data | internal data, ignore. |
[in] | udata | user data passed when the callback was registered in rox_dnd_register_full() |
TRUE
if handled successfully, FALSE
otherwise.
GSList* rox_dnd_filter_local | ( | GSList * | uris | ) |
Given a list of URIs return only those which are local files. Uses rox_path_get_local().
[in] | uris | list of URIs. |
NULL
if none of the URIs were local files. void rox_dnd_init | ( | void | ) |
Initialize the drag and drop system. Calling this function is optional, the other dnd functions will call this automatically if they detect that initialization has not been performed.
void rox_dnd_local_free | ( | GSList * | paths | ) |
Free a list of local files returned by rox_dnd_filter_local().
[in,out] | paths | list of local files returned by rox_dnd_filter_local(). |
void rox_dnd_register_full | ( | GtkWidget * | widget, | |
guint | flags, | |||
rox_dnd_handle_uris | uris, | |||
rox_dnd_handle_xds | xds, | |||
gpointer | udata | |||
) |
Register callback functions for handling drag and drop on a widget.
[in] | widget | widget which will accept drops. |
[in] | flags | bit mask of flags. None are currently defined. |
[in] | uris | function to call to handle the text/uri-list protocol. |
[in] | xds | function to call to handle the X Direct Save protocol. |
[in] | udata | additional user data to pass to callback functions. |