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

{\tt \#include \char`\"{}rox-clib.h\char`\"{}}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$glib.h$>$}\par
{\tt \#include $<$gtk/gtk.h$>$}\par
{\tt \#include \char`\"{}rox\_\-dnd.h\char`\"{}}\par
{\tt \#include \char`\"{}rox\_\-path.h\char`\"{}}\par
{\tt \#include \char`\"{}error.h\char`\"{}}\par
{\tt \#include \char`\"{}rox\_\-debug.h\char`\"{}}\par
\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} uris, {\bf rox\_\-dnd\_\-handle\_\-xds} 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. 

This provides the receiver part of the protocol. The sender part is handled by \doxyref{\_\-Gtk\-Savebox}{p.}{struct__GtkSavebox}.

\begin{Desc}
\item[Author:]Stephen Watson \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]\doxyref{rox\_\-dnd.c}{p.}{rox__dnd_8c},v 1.13 2006/08/12 17:04:56 stephen Exp \end{Desc}
\end{Desc}


\subsection{Function Documentation}
\index{rox_dnd.c@{rox\_\-dnd.c}!rox_dnd_filter_local@{rox\_\-dnd\_\-filter\_\-local}}
\index{rox_dnd_filter_local@{rox\_\-dnd\_\-filter\_\-local}!rox_dnd.c@{rox\_\-dnd.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}GSList$\ast$ rox\_\-dnd\_\-filter\_\-local (GSList $\ast$ {\em uris})}\label{rox__dnd_8c_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.c@{rox\_\-dnd.c}!rox_dnd_init@{rox\_\-dnd\_\-init}}
\index{rox_dnd_init@{rox\_\-dnd\_\-init}!rox_dnd.c@{rox\_\-dnd.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-dnd\_\-init (void)}\label{rox__dnd_8c_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.c@{rox\_\-dnd.c}!rox_dnd_local_free@{rox\_\-dnd\_\-local\_\-free}}
\index{rox_dnd_local_free@{rox\_\-dnd\_\-local\_\-free}!rox_dnd.c@{rox\_\-dnd.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-dnd\_\-local\_\-free (GSList $\ast$ {\em paths})}\label{rox__dnd_8c_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.c@{rox\_\-dnd.c}!rox_dnd_register_full@{rox\_\-dnd\_\-register\_\-full}}
\index{rox_dnd_register_full@{rox\_\-dnd\_\-register\_\-full}!rox_dnd.c@{rox\_\-dnd.c}}
\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_8c_93871415fe4afa31e0a9716e3f17a600}


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}
