rox_dnd.c File Reference

Utilities for using drag & drop with ROX apps. More...

#include "rox-clib.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <glib.h>
#include <gtk/gtk.h>
#include "rox_dnd.h"
#include "rox_path.h"
#include "error.h"
#include "rox_debug.h"

Functions

void rox_dnd_init (void)
void rox_dnd_register_full (GtkWidget *widget, guint flags, rox_dnd_handle_uris uris, rox_dnd_handle_xds xds, gpointer udata)
GSList * rox_dnd_filter_local (GSList *uris)
void rox_dnd_local_free (GSList *paths)


Detailed Description

Utilities for using drag & drop with ROX apps.

This provides the receiver part of the protocol. The sender part is handled by _GtkSavebox.

Author:
Stephen Watson
Version:
Id
rox_dnd.c,v 1.13 2006/08/12 17:04:56 stephen Exp

Function Documentation

GSList* rox_dnd_filter_local ( GSList *  uris  ) 

Given a list of URIs return only those which are local files. Uses rox_path_get_local().

Parameters:
[in] uris list of URIs.
Returns:
list of local paths (pass to rox_dnd_local_free() when done, or 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().

Parameters:
[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.

Parameters:
[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.


Generated on Sat Oct 13 17:22:45 2007 for ROX-CLib by  doxygen 1.5.0