Gtk on SDL?

This is possibly a dumb question, but how ridiculous would it be to have
a Gtk port to SDL? I’m not talking about having an SDL Gtk-widget that
you can embed in an existing Gtk app, I mean porting Gtk/Gdk to use SDL
as its primary rendering surface.

I vaguely recall some talk about that a while back, and am curious where
things are.

Obstacles I see are that the whole point of SDL is to be cross-platform,
and Gdk/Gtk probably make some API calls that are not necessarily
portable.

Since I’m at least somewhat clueless, anyone who actually knows what
they’re talking about have anything to add?

-Roy

This is possibly a dumb question, but how ridiculous would it be to have
a Gtk port to SDL? I’m not talking about having an SDL Gtk-widget that
you can embed in an existing Gtk app, I mean porting Gtk/Gdk to use SDL
as its primary rendering surface.

Gtk+/Gdk runs on Linux framebuffer (experimental), so that it is not so
hard - not so quite hard - to port Gtk+/Gdk to SDL.

KentarouFrom: roy.wood@filogix.com (Roy Wood)
Subject: [SDL] Gtk on SDL?
Date: Wed, 24 Apr 2002 12:07:04 -0400

This is possibly a dumb question, but how ridiculous would it be to
have a Gtk port to SDL? I’m not talking about having an SDL Gtk-widget
that you can embed in an existing Gtk app, I mean porting Gtk/Gdk to
use SDL as its primary rendering surface.

Not too ridiculous. In fact, probably less ridiculous than the fbdev port
and similar projects that already exist, and address embedded systems.
Porting GTK+ to SDL would make it run in such environments and on X or
whatever, without even a recompile.

I vaguely recall some talk about that a while back, and am curious
where things are.

Obstacles I see are that the whole point of SDL is to be
cross-platform, and Gdk/Gtk probably make some API calls that are not
necessarily portable.

You’d have to change most of those to use SDL anyway, or it wouldn’t work
on all SDL targets. (You’re never supposed to bypass SDL for doing things
it can do.) SDL is not just about rendering, you know. :slight_smile:

Since I’m at least somewhat clueless, anyone who actually knows what
they’re talking about have anything to add?

Well, there’s one major issue: SDL doesn’t (officially) support multiple
windows.

Mark Lindner just announced that he’s written a
patch, but it’s X only, and only deals with the rendering part of the API.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Wednesday 24 April 2002 18:07, Roy Wood wrote:

David Olofson wrote:

Since I’m at least somewhat clueless, anyone who actually knows what
they’re talking about have anything to add?

Well, there’s one major issue: SDL doesn’t (officially) support multiple
windows.

If you map one GTK applications to one SDL surface then you only get
into trouble with multi-window apps and pop up windows. Let’s just
ignore multi-window aps because SDL ignores them and most importantly
games tend to be single window, often full screen, applications. That
leaves pop ups. Most apps could live with pop ups that are restricted to
the same window as the base application. So, you can do popups by
rendering them in the same window as the rest of the SDL application.
These leads to the conclusion that you would have to add some window
manager functionality between the GTK layer and the SDL layer.

		Bob Pendleton> On Wednesday 24 April 2002 18:07, Roy Wood wrote:

Mark Lindner just announced that he’s written a
patch, but it’s X only, and only deals with the rendering part of the API.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -’


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


±-----------------------------------------+

  • Bob Pendleton, an experienced C/C++/Java +
  • UNIX/Linux programmer, researcher, and +
  • system architect, is seeking full time, +
  • consulting, or contract employment. +
  • Resume: http://www.jump.net/~bobp +
  • Email: @Bob_Pendleton +
    ±-----------------------------------------+

At 12.30 24/04/2002 -0500, you wrote:

If you map one GTK applications to one SDL surface then you only get into
trouble with multi-window apps and pop up windows. Let’s just ignore
multi-window aps because SDL ignores them and most importantly games tend
to be single window, often full screen, applications. That leaves pop ups.
Most apps could live with pop ups that are restricted to the same window
as the base application. So, you can do popups by rendering them in the
same window as the rest of the SDL application. These leads to the
conclusion that you would have to add some window manager functionality
between the GTK layer and the SDL layer.

I think such layer should be already present in the directfb port. I see
really no difference between a simple frame buffer and the bitmap of an X11
window, except the fact that the second one should be updated in an
indirect way.

Bye,
Gabry

Gabriele Greco wrote:

At 12.30 24/04/2002 -0500, you wrote:

If you map one GTK applications to one SDL surface then you only get
into trouble with multi-window apps and pop up windows. Let’s just
ignore multi-window aps because SDL ignores them and most importantly
games tend to be single window, often full screen, applications. That
leaves pop ups. Most apps could live with pop ups that are restricted
to the same window as the base application. So, you can do popups by
rendering them in the same window as the rest of the SDL application.
These leads to the conclusion that you would have to add some window
manager functionality between the GTK layer and the SDL layer.

I think such layer should be already present in the directfb port. I see
really no difference between a simple frame buffer and the bitmap of an
X11 window, except the fact that the second one should be updated in an
indirect way.

That is absolutely correct!>

Bye,
Gabry


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


±-----------------------------------------+

  • Bob Pendleton, an experienced C/C++/Java +
  • UNIX/Linux programmer, researcher, and +
  • system architect, is seeking full time, +
  • consulting, or contract employment. +
  • Resume: http://www.jump.net/~bobp +
  • Email: @Bob_Pendleton +
    ±-----------------------------------------+

Best idea ever !

If you’ve got the courage to do it, YES do it !

Jocelyn.

“Roy Wood” <roy.wood at filogix.com> a ?crit dans le message news:
mailman.1019664431.1637.sdl at libsdl.org…> This is possibly a dumb question, but how ridiculous would it be to have

a Gtk port to SDL? I’m not talking about having an SDL Gtk-widget that
you can embed in an existing Gtk app, I mean porting Gtk/Gdk to use SDL
as its primary rendering surface.

I vaguely recall some talk about that a while back, and am curious where
things are.

Obstacles I see are that the whole point of SDL is to be cross-platform,
and Gdk/Gtk probably make some API calls that are not necessarily
portable.

Since I’m at least somewhat clueless, anyone who actually knows what
they’re talking about have anything to add?

-Roy

Best idea ever !

If you’ve got the courage to do it, YES do it !

Courage, tenacity, or stupidity?

Actually, since the framebuffer and win32 ports have been done, I’m not
such a trailblazer. Lotsa work though.

What I’m hoping for is some suggestions as to what areas to concentrate
on first, so I can get to that sweet spot of having something compile and
run, even if all it does is display a window with a couple of lines drawn
on it.

-Roy

Yes. =)On Fri, Apr 26, 2002 at 03:40:04PM -0400, Roy Wood wrote:

Courage, tenacity, or stupidity?


Joseph Carter Only l33t on Thursdays

What’s this message on my screen,
so blue, so blue, what could it mean?
Could you, would you press Delete,
Ctrl and Alt and then repeat.

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020426/d0c82f62/attachment.pgp