\section{rox\_\-dnd.h File Reference}
\label{rox__dnd_8h}\index{rox_dnd.h@{rox\_\-dnd.h}}
Utilities for using drag \& drop with ROX apps. 

\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf rox\_\-dnd\_\-register\_\-uris}(w, f, u, d)~rox\_\-dnd\_\-register\_\-full(w, f, u, NULL, d)
\item 
\#define {\bf rox\_\-dnd\_\-register\_\-xds}(w, f, x, d)~rox\_\-dnd\_\-register\_\-full(w, f, NULL, x, d)
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef gboolean($\ast$) {\bf rox\_\-dnd\_\-handle\_\-uris} (Gtk\-Widget $\ast$widget, GSList $\ast$uris, gpointer data, gpointer udata)
\item 
typedef gboolean($\ast$) {\bf rox\_\-dnd\_\-handle\_\-xds} (Gtk\-Widget $\ast$widget, const gchar $\ast$path, gpointer data, gpointer udata)
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf rox\_\-dnd\_\-init} (void)
\item 
void {\bf rox\_\-dnd\_\-register\_\-full} (Gtk\-Widget $\ast$widget, guint flags, {\bf rox\_\-dnd\_\-handle\_\-uris}, {\bf rox\_\-dnd\_\-handle\_\-xds}, gpointer udata)
\item 
GSList $\ast$ {\bf rox\_\-dnd\_\-filter\_\-local} (GSList $\ast$uris)
\item 
void {\bf rox\_\-dnd\_\-local\_\-free} (GSList $\ast$paths)
\end{CompactItemize}


\subsection{Detailed Description}
Utilities for using drag \& drop with ROX apps. 

\begin{Desc}
\item[Author:]Stephen Watson \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]\doxyref{rox\_\-dnd.h}{p.}{rox__dnd_8h},v 1.4 2005/09/10 16:15:58 stephen Exp \end{Desc}
\end{Desc}


\subsection{Define Documentation}
\index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_register_uris@{rox\_\-dnd\_\-register\_\-uris}}
\index{rox_dnd_register_uris@{rox\_\-dnd\_\-register\_\-uris}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define rox\_\-dnd\_\-register\_\-uris(w, f, u, d)~rox\_\-dnd\_\-register\_\-full(w, f, u, NULL, d)}\label{rox__dnd_8h_53152677ddca2734f400178eaafebf05}


Register a handler for a widget that handles URIs only. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em w}]widget \item[\mbox{$\leftarrow$} {\em f}]flags \item[\mbox{$\leftarrow$} {\em u}]callback function \item[\mbox{$\leftarrow$} {\em d}]additional data to pass \end{description}
\end{Desc}
\index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_register_xds@{rox\_\-dnd\_\-register\_\-xds}}
\index{rox_dnd_register_xds@{rox\_\-dnd\_\-register\_\-xds}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define rox\_\-dnd\_\-register\_\-xds(w, f, x, d)~rox\_\-dnd\_\-register\_\-full(w, f, NULL, x, d)}\label{rox__dnd_8h_f85f61b4ccbe58f599d99ab8de43e243}


Register a handler for a widget that handles URIs only. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em w}]widget \item[\mbox{$\leftarrow$} {\em f}]flags \item[\mbox{$\leftarrow$} {\em x}]callback function \item[\mbox{$\leftarrow$} {\em d}]additional data to pass \end{description}
\end{Desc}


\subsection{Typedef Documentation}
\index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_handle_uris@{rox\_\-dnd\_\-handle\_\-uris}}
\index{rox_dnd_handle_uris@{rox\_\-dnd\_\-handle\_\-uris}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef gboolean($\ast$) {\bf rox\_\-dnd\_\-handle\_\-uris}(Gtk\-Widget $\ast$widget, GSList $\ast$uris, gpointer data, gpointer udata)}\label{rox__dnd_8h_1be8cb6a69a7b935b8d64ce0bdc7d33b}


Function which responds to drop on a widget by processing a list of URIs.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em widget}]the widget that was the target of the drop \item[\mbox{$\leftarrow$} {\em uris}]list of URIs to process \item[\mbox{$\leftarrow$} {\em data}]internal data, ignore. \item[\mbox{$\leftarrow$} {\em udata}]user data passed when the callback was registered in \doxyref{rox\_\-dnd\_\-register\_\-full()}{p.}{rox__dnd_8c_93871415fe4afa31e0a9716e3f17a600} \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]{\tt TRUE} if handled successfully, {\tt FALSE} otherwise. \end{Desc}
\index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_handle_xds@{rox\_\-dnd\_\-handle\_\-xds}}
\index{rox_dnd_handle_xds@{rox\_\-dnd\_\-handle\_\-xds}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef gboolean($\ast$) {\bf rox\_\-dnd\_\-handle\_\-xds}(Gtk\-Widget $\ast$widget, const gchar $\ast$path, gpointer data, gpointer udata)}\label{rox__dnd_8h_01f0d519c95c4145da4ef1e74d557af0}


Function which responds to drop on a widget by the XDS protocol. The system negotiates a temporary file to store the transfered file.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em widget}]the widget that was the target of the drop \item[\mbox{$\leftarrow$} {\em path}]path to the file the dropped data was stored in. Delete this file when it is finished with. \item[\mbox{$\leftarrow$} {\em data}]internal data, ignore. \item[\mbox{$\leftarrow$} {\em udata}]user data passed when the callback was registered in \doxyref{rox\_\-dnd\_\-register\_\-full()}{p.}{rox__dnd_8c_93871415fe4afa31e0a9716e3f17a600} \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]{\tt TRUE} if handled successfully, {\tt FALSE} otherwise. \end{Desc}


\subsection{Function Documentation}
\index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_filter_local@{rox\_\-dnd\_\-filter\_\-local}}
\index{rox_dnd_filter_local@{rox\_\-dnd\_\-filter\_\-local}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GSList$\ast$ rox\_\-dnd\_\-filter\_\-local (GSList $\ast$ {\em uris})}\label{rox__dnd_8h_9b42ffa6f96adc48922aac58607a8439}


Given a list of URIs return only those which are local files. Uses \doxyref{rox\_\-path\_\-get\_\-local()}{p.}{rox__path_8c_bc818f1474a359eeee30c170f522b89e}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em uris}]list of URIs. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]list of local paths (pass to \doxyref{rox\_\-dnd\_\-local\_\-free()}{p.}{rox__dnd_8c_915ac49fe2e0bfc2cea22eb85acd0748} when done, or {\tt NULL} if none of the URIs were local files. \end{Desc}
\index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_init@{rox\_\-dnd\_\-init}}
\index{rox_dnd_init@{rox\_\-dnd\_\-init}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-dnd\_\-init (void)}\label{rox__dnd_8h_fd4c8fc87c977a9746d58017ccb80caf}


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. \index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_local_free@{rox\_\-dnd\_\-local\_\-free}}
\index{rox_dnd_local_free@{rox\_\-dnd\_\-local\_\-free}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-dnd\_\-local\_\-free (GSList $\ast$ {\em paths})}\label{rox__dnd_8h_915ac49fe2e0bfc2cea22eb85acd0748}


Free a list of local files returned by \doxyref{rox\_\-dnd\_\-filter\_\-local()}{p.}{rox__dnd_8c_9b42ffa6f96adc48922aac58607a8439}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftrightarrow$} {\em paths}]list of local files returned by \doxyref{rox\_\-dnd\_\-filter\_\-local()}{p.}{rox__dnd_8c_9b42ffa6f96adc48922aac58607a8439}. \end{description}
\end{Desc}
\index{rox_dnd.h@{rox\_\-dnd.h}!rox_dnd_register_full@{rox\_\-dnd\_\-register\_\-full}}
\index{rox_dnd_register_full@{rox\_\-dnd\_\-register\_\-full}!rox_dnd.h@{rox\_\-dnd.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-dnd\_\-register\_\-full (Gtk\-Widget $\ast$ {\em widget}, guint {\em flags}, {\bf rox\_\-dnd\_\-handle\_\-uris} {\em uris}, {\bf rox\_\-dnd\_\-handle\_\-xds} {\em xds}, gpointer {\em udata})}\label{rox__dnd_8h_b8e47b48b78359efd546c7fde49db399}


Register callback functions for handling drag and drop on a widget.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em widget}]widget which will accept drops. \item[\mbox{$\leftarrow$} {\em flags}]bit mask of flags. None are currently defined. \item[\mbox{$\leftarrow$} {\em uris}]function to call to handle the text/uri-list protocol. \item[\mbox{$\leftarrow$} {\em xds}]function to call to handle the X Direct Save protocol. \item[\mbox{$\leftarrow$} {\em udata}]additional user data to pass to callback functions. \end{description}
\end{Desc}
