[SDL-SVN] r3019 - in branches/SDL-1.2-olpc: . include src/video src/video/gtk

Hello !

Log:
First shot at GTK+ video target for the OLPC laptops. Seriously
incomplete,
but it’s enough to get some bits to a window…

Great. Do you have an OLPC laptop ?

Is GTK+ the only way there to get
something on the screen ?

CU

First shot at GTK+ video target for the OLPC laptops. Seriously
incomplete,
but it’s enough to get some bits to a window…

Great. Do you have an OLPC laptop ?

I do, yes.

Is GTK+ the only way there to get
something on the screen ?

It’s a standard X server, so the existing X11 target works, but GTK+ is
the “official” way to render to the screen, and I want to be shielded in
case they switch to GTKFB or something.

Also, this removes the need to fight with the X11 and GTK event loops
separately, or use the SDL_WINDOWID hack on the laptops…so it makes
SDL a better “citizen” of the laptop.

–ryan.

Ryan C. Gordon wrote:

Also, this removes the need to fight with the X11 and GTK event loops
separately, or use the SDL_WINDOWID hack on the laptops…so it makes
SDL a better “citizen” of the laptop.

I’d LOVE to have a gtk-targeted SDL, actually I’m maintaining at least
three SDL/GTK apps that use the windowid hack to work together (plus
some additional magic to route events to gtk or SDL), having a gtk
target will ease this a lot :slight_smile:

This is only targeted at OLPC or it will be a generic “target”? In this
second case if you need some help I may help you (I suppose help will be
needed mostly for the win32 integration).–
Bye,
Gabry

This is only targeted at OLPC or it will be a generic “target”? In this
second case if you need some help I may help you (I suppose help will be
needed mostly for the win32 integration).

Right now it’s generic, but we’ll see what happens with the laptops as
we get further. I didn’t think there would be demand elsewhere.

–ryan.

Hello !

This is only targeted at OLPC or it will be a generic “target”? In this
second case if you need some help I may help you (I suppose help will be
needed mostly for the win32 integration).

Right now it’s generic, but we’ll see what happens with the laptops as
we get further. I didn’t think there would be demand elsewhere.

The nice thing, this is not just a driver, but it shows also
to incorporate SDL into a GUI Toolkit.

CU

There’s lots of people asking to integrate pygame with GTK all of the time.

So I’m sure there’ll be a bunch of happy GTK/SDL people :)On 4/24/07, Ryan C. Gordon wrote:

This is only targeted at OLPC or it will be a generic “target”? In this
second case if you need some help I may help you (I suppose help will be
needed mostly for the win32 integration).

Right now it’s generic, but we’ll see what happens with the laptops as
we get further. I didn’t think there would be demand elsewhere.

–ryan.

Ryan C. Gordon wrote:

Right now it’s generic, but we’ll see what happens with the laptops as
we get further. I didn’t think there would be demand elsewhere.

I’ve looked at the code, a modification needed to make it useful also
outside of olpc will be to provide an enviroment variable to avoid the
creation of the window but place the GtkDrawingArea where SDL paints in
an user provided GtkContainer. Something like “SDL_VIDEO_GTK_CONTAINER” :)–
Bye,
Gabry