[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Adonthell-devel] Redesign?
From: |
Kai Sterker |
Subject: |
Re: [Adonthell-devel] Redesign? |
Date: |
Sun, 17 Aug 2003 22:54:01 +0200 |
Am Sonntag, 17.08.03 um 15:07 Uhr schrieb Alexandre Courbot:
I fear I haven't understood everything from your mail. Can you give a
short
example of what would work and what wouldn't on OSX? From your mail,
gfx::init would never return because it runs the apps main loop?
Yeah. That's because the OSX gui is running a loop of it's own. So our
loop would have to run inside that. The OSX gui has to be initialized
when loading the sdl gfx backend, so that it is available for any
programs and scripts that use it. But since the OSX gui will never
return, once initialized, we have to "jump" out of it somehow. That's
why I suggested to run our main loop inside that of OSX. Which means it
would have to be started from the gfx library.
Quite messy, I know. That's why fixing SDL might be a better approach:
What seems weird is that SDL is supposed to make any decently written
program
run on all the supported platforms. Maybe there are some weaknesses in
the
OSX port? If this is the case, I'd rather look at fixing SDL - Sam
Latinga is
never reluctant to include external patches. And I wonder whether your
fix
would still work fine with Python programs, for instance.
Well, I could have a closer look at SDL first. However, as far as I
know, this isn't an OSX specific problem. Something similar will happen
on Win32 too, I think. It's a bit like GTK programming. At some point
you'll have to do a gtk_main (argc, argv) and from there you never
return until you close the app. Execution itself continues at some
other place, usually after the user triggers some events by pressing
buttons and such.
That is basically what happens with the OSX GUI. SDL uses that
mechanism I described: the application's main function is replaced by
one that SDL provides. In there, all platform specific initialization
of the GUI takes place and then the applications actual main method is
invoked from inside the main loop of the GUI.
I hope it's clearer now.
All in all, there seem to be very little Adonthell activity these
days. We
didn't have a meeting yet - maybe we could plan that later this year.
So I'm not the only one still thinking about the meeting ;). Yeah, we
should try to get something sorted out for later this year. Or early
next year, perhaps.
Kai
Re: [Adonthell-devel] Redesign?, Micah J. Cowan, 2003/08/18
Re: [Adonthell-devel] Redesign?, Kenneth Gangstoe, 2003/08/19