Author: manolo Date: 2012-06-10 05:33:04 -0700 (Sun, 10 Jun 2012) New Revision: 9584 Log: Document that the dropping of filenames under X11 produces a URL-encoded, UTF_8 string.
Modified: branches/branch-1.3/documentation/src/events.dox Modified: branches/branch-1.3/documentation/src/events.dox =================================================================== --- branches/branch-1.3/documentation/src/events.dox 2012-06-10 12:25:17 UTC (rev 9583) +++ branches/branch-1.3/documentation/src/events.dox 2012-06-10 12:33:04 UTC (rev 9584) @@ -265,8 +265,16 @@ FLTK supports drag and drop of text and files from any application on the desktop to an FLTK widget. Text is transferred using UTF-8 encoding. Files are received as a list of full path -and file names, separated by newline. On some platforms, path -names are prepended with <tt>%file://</tt>. +and file names, separated by newline. + +On some X11 platforms, files are received as a URL-encoded UTF-8 string, +that is, non-ASCII bytes (and a few others such as space and %) are +replaced by the 3 bytes "%XY" where XY are the byte's hexadecimal value. +The \ref fl_decode_uri() function can be used to transform in-place +the received string into a proper UTF-8 string. On these platforms, +strings corresponding to dropped files are further prepended +by <tt>file://</tt> (or other prefixes such as <tt>computer://</tt>). + See Fl::dnd() for drag and drop from an FLTK widget. The drag and drop data is available in Fl::event_text() _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
