[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] gtkglext, et al

From: Rob Savoye
Subject: Re: [Gnash-dev] gtkglext, et al
Date: Sat, 22 Apr 2006 08:44:52 -0600
User-agent: Thunderbird 1.5 (X11/20051201)

Bastiaan Jacques wrote:

I was looking at backend/gnash.cpp and it occurred to me that it looked
very much like a C file with a .cpp extension.. we're using gtk+ and
gtkglext, but shouldn't we be using gtkmm and gtkglextmm (bindings for
C++) instead? I suspect that would make it easier to make that file more
readable - get rid of all those ugly #ifdefs, etc.

I'm working on getting rid of the ugly ifdefs. Much of the older code in Gnash is basically C files with a cpp suffix, which was one of my issues with GameSWF. As you dig deeper, you'll see lots of ugly code using structs instead of classes, and other non C++ things. I've been trying to change things to be more real C++ when I can.

Now for gnash.cpp, I've been writing a small class library that handles all the windowing and event handling in a clean manner, and supports SDL, FLTK, and GTKGLExt. The code is currently the way it is now because the GTK code is brand new, and at the time it was an attempt to improve the plugin, and I had to learn GTK. The new frontend library isn't done quite yet though, (I'm learning FLTK2) but will improve the spaghetti nature of gnash.cpp, while adding menus too.

But the GTK part of the library uses the C API for gtk and gtkglext mostly to reduce dependencies instead of gtkmm and gtkglextmm. At one time those packages weren't readily available on most distributions, but I guess they probably are these days. I just hated making people have to install too many packages they might not otherwise have.

        - rob -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]