[SDL] Re: sdl windows position on screen

florencelaure2002 florencelaure2002 at yahoo.fr
Wed Nov 9 04:02:11 PST 2005


uses 
xlib,
libc,
sdl;

for pascal...

need help to convert it in pascal (delphi or freepascal)....

thanks....i am not a really good c programmer so i have difficulties to 
translate....thanks a lot...



On Wednesday 09 November 2005 12:38, Ricardo Cruz wrote:
> Hi there,
>
>  This is not really related with this specific problem, but just a couple
> of questions that have jumped my mind before:
>
> * If you use X11 library functions do you need to append a -lXlib yourself
> or the -lSDL is enough?
>
> * Is there any environment define to know if this is a Unix system we are
> compiling in... I generally end up using "#ifndef WIN32".
>
> Cheers,
>  Ricardo
>
> Em Terça 08 Novembro 2005 20:24, o Bill May escreveu:
> > florence blabla wrote:
> > > when i open an sdl windows , windowed mode , it
> > > appears
> > > at randon place on the screen...
> > >
> > > is it possible to place window sdl at x , y
> > > coordinates
> > >
> > > (sorry for my english ) , under sdl or by another way.
> > >
> > > under X11 and linux , programming in freepascal...
> > >
> > > thanks ....
> >
> > Do this after SDL_SetVideoMode:
> >
> >      SDL_SysWMinfo info;
> >      SDL_VERSION(&info.version);
> >      int ret;
> >      ret = SDL_GetWMInfo(&info);
> >      if (ret > 0) {
> > #ifdef unix
> >        if (info.subsystem == SDL_SYSWM_X11) {
> >          info.info.x11.lock_func();
> >          XMoveWindow(info.info.x11.display, info.info.x11.wmwindow,
> >                      m_pos_x, m_pos_y);
> >          info.info.x11.unlock_func();
> >        }
> > #endif

	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com





More information about the SDL mailing list