Re: [AD] Platform specific functions in A5 [was Re: Windows Addition for Message Parsing]

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 8 Oct 2008, at 20:30, Chris Robinson wrote:
Ok, the function won't work on other systems, but, does other OS
require you to "catch" "messages" to add functionality? I'm pretty
sure there are more libraries for unix/OSX that can coexist with
allegro and may add things that in windows could be only done by
parsing messages.

So even more platform specific code? "For Windows, use this Allegro
functionality. For other OSs we have to use an external lib." Isn't the point of Allegro to provide cross-platform capabilities, without the user having to
directly use platform-specific libs?

Yes, so as I said, for this particular case, we should not add this function so people can use more functionality (multiple mice) - if we want that we should implement support for that properly. The API is not fixed in stone at the moment, though I don't think we want to be doing any radical design changes. Also, if we decide that we do want this, it's not something that we need to implement *now*, just something that can be implemented later without breaking (or disfiguring) the API too much. If it fits on smoothly, it can be in, say, 5.0.1 rather than 5.0.0

It's better to have a cross-platform function that no-ops on other platforms, than a platform-specific function that's not available on other systems, IMO.

I think I agree with this - although it would be a bit silly if we know it's only ever going to work on one system (the again, did scrolling displays really work on anything other than DOS? I don't mean the hack job that was in the X11 port). Having more platform specific functions makes it harder to write portable code, but having platform specific functions that maskerade as platform neutral functions is arguably worse because they suggest functionality that isn't there.

Does it have to be, though? If it can be exposed in a platform- neutral way, and be useful on multiple platforms, IMO, we should try to make it platform
neutral.

Apparently, intercepting messages cannot really be abstracted into a platform neutral function, unfortunately. I figured it'd be very hard to do, but thought we should discuss it anyway.

FWIW, multiple mice is supported by X11, AFAIK, so it's not platform specific and shouldn't require platform-specific code to use. If someone needs to manually parse platform-specific window messages to do it in Windows, it's
definitely a candidate to make an API for it in a cross-platform way.

I agree.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/