On 12/20/10 4:56 PM, Greg Ercolano wrote:
> [email protected] wrote:
>> Though fork() per se will not work on win32 either - though you can of 
>> course exec another process in a way that's analogous...
> 
>       Yes; CreateProcess() has [excessively] numerous flags
>       that can be used to achieve very similar behavior to the
>       traditional unix fork/exec combo.
> 
>       There's also ways to get exit codes, and test to see
>       if the process exited (both blocking and non-blocking).
>       All Win32 API stuff, but it works well. You just have to
>       read a hell of a lot of Win32 API documentation. For instance,
>       if you read the CreateProcess() docs, you'll find this exponentially
>       spans outward into separate docs on structures within structures.
>       Worth reading all that stuff. As much as I dislike the Win32 API design,
>       it is somewhat well documented, and seems to 'behave' if you play by
>       their specific rules, and don't try to 'intuit' too much.
> 
> _______________________________________________
> fltk mailing list
> [email protected]
> http://lists.easysw.com/mailman/listinfo/fltk

Actually after thinking about it, I'd like to stay away from spawning a
second process, as students can do more interactive things with the
VideoStream object then I think we can do relying on inter-process
communication.

Right now I'm only supporting Linux/OSX and Windows via Cygwin, but I
would like to be forward thinking about this as to be able to move away
from cygwin in the future. The reason I've ran into this problem is I
wanted to use fltk using the native windows gui rather than the cygwin
fltk which relies on running an X-server on top of windows.

One thing that has occurred to me, is to do something like what SDL
does: It renames the user's main() function to SDLmain using a #define,
and then calls that main function after it has done its own setting up.
I could do something similar, but call the user's main function in its
own thread, and use the main thread for the FLTK calls, like Fl::run(),
whatever.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to