[SDL] SDL_WINDOWID: embedding SDL into gtkmm

Germán Diago germandiago at gmail.com
Sun Sep 16 16:12:48 PDT 2007


2007/9/15, Mikael Eriksson <mikael_miffe_eriksson at yahoo.se>:
>
> On Sat, Sep 15, 2007 at 11:04:57AM +0200, Germán Diago wrote:
> > 2007/9/15, Mikael Eriksson <mikael_miffe_eriksson at yahoo.se>:
> > >
> > > On Fri, Sep 14, 2007 at 11:21:28AM +0200, Germán Diago wrote:
> > > > Hello. I'm trying to embed an SDL_Window into my own application.
> > > > I think that this way SDL should draw into my own application
> window,
> > > like
> > > > described in a lot of mailing lists I googled.
> > > > But I get an SDL toplevel window instead. So I have my app's window
> and
> > > an
> > > > SDL one. I checked if the variable is
> > > > correctly set up, and it is. So... could anyone help on this,
> please.
> > > > Thank you very much in advance.
> > >
> > > I'm not sure but i think the window has to be a GtkSocket, atleast
> that
> > > works for me, see the attached test program. It works but putting the
> > > draw rect stuff inside the button callback didn't seem to work, thats
> > > why it's an event.
> >
> >
> >
> >    I thought of this way of doing that. But the problem is that I have
> two
> > different processes instead of
> >   one. I'd like to have one process and two threads to manage the whole
> > program. Anyway, if there's not
> >   an optimal solution, I'll try with the two processes one. Thanks for
> your
> > help.
>
> You don't have to put them into separate processes, GtkSocket works just
> fine with everything in one process. Anyway, doing it like you did in
> the first mail, using SDL_WINDOWID=GDK_WINDOW_XWINDOW(window->window)
> works for me. But i'm not using gtkmm, can it be that that is
> interfering?


 This code doesn't want to work, but don't know why. Can anyone see anything
I can't?


_______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070917/d80f8c9a/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VentanaSDL.cpp
Type: text/x-c++src
Size: 2326 bytes
Desc: not available
Url : http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070917/d80f8c9a/attachment.cpp 


More information about the SDL mailing list