aj wrote:
At 08:52 PM 10/11/2003 +0100, you wrote:
i spotted this in the CHANGES for 4.1.12
Angelo Mottola let application bundles accept files dragged onto the
application icon under MacOS X.
I'm not sure it means drag-and-drop for Allegro apps, but Angelo will
certainly set us straight.
This means one can drag and drop a file on top of an Allegro
application icon, and the app will launch with the dragged item's
filename as the only command line argument (argv[1]).
This was mainly added to make Alex the Allegator 4 to work properly
here with custom maps; you drag a text file specifying the maps on
top of the game exe, and the game loads the maps from that file.
Under Win32 it works this way, so I assumed I could emulate the
behaviour under OSX too...
I think my proposal of a win32 drag and drop is reasonable.
It is near impossible as an add-on.
The interface from an allergro users point of view is just a single
callback that receives filenames... thats got to be the easiest
interface i can think of.
The code that goes into allegro is small and easy to understand and
does not slow down allegro for those that do not wish to use this
feature.
Only thing i left out was some documenation, it would go into the
'Windows specifics' section (allegro035.html) here it is:
extern void (*drag_and_drop_callback)(int x, int y, const char*
filename);
Called by allegro when files are dragged and dropped onto the allegro
application. The callback is passed the mouse x and y positions and
the filename. This function will be called once for each file and
should execute very quickly, it is recommended that you store the
data passed and process it later.
aj.
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers