[fpc-pascal] Linux : Using SDL with GTK2 ?
AndrewD207 at aol.com
Fri Nov 16 20:42:05 CET 2007
> 1. I'm unsure of chronology of things to do in the program body. Is the
> following correct :
> a) Create GTK stuff
> b) SDL Hack/SDL_WINDOWID
> c) SDL_INIT
> d) Show GTK widgets
Yes that's right. With the only exception being that you have to use
gtk_widget_realize on whatever gtk widget you are using for sdl so that
the x11 window will be allocated.
> 2. You mentioned "this is for gtk1 only. gtk2 is similar but different".
> What to do for GTK2 ?
I've attached a simple program that will compile for gtk1 or gtk2. you
can change a define at the top of the source to switch between gtk 1 or 2.
> 3. Which kind of GTK Object "APanel" can be ?
> 4. FPC complains on "handle". What's wrong ?
Sorry I thought you were using the LCL and so my example was for that. I
attached an example program that doesn't use the LCL.
> Thanks Again.
It's worth noting that you cannot have more than one sdl window per
application. It's a limitation of sdl.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the fpc-pascal