[SDL] SDL_WINDOWID: embedding SDL into gtkmm
Germán Diago
germandiago at gmail.com
Sat Sep 15 17:21:29 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?
Maybe. I don't know. What I did is to configure the window like you said
when
the main window is realized. Maybe it's a gtkmm issue. I don't know.
I looked at the documentation an it says that GtkSocket embeds from other
processes.
So if you use it, is it necessary to create a new process? Because I
don't know what to do.
http://library.gnome.org/devel/gtk/2.11/GtkSocket.html
If it works for you, it should for me.
> _______________________________________________
> 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/20070916/1cc5ab42/attachment.htm
More information about the SDL
mailing list