[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/Makefile.am gui/Player.cpp ...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/Makefile.am gui/Player.cpp ... |
Date: |
Thu, 26 Jul 2007 14:39:10 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/07/26 14:39:10
Modified files:
. : ChangeLog
gui : Makefile.am Player.cpp Player.h gui.h
Added files:
gui : gui_aqua.cpp gui_fb.cpp gui_fltk.cpp
gui_gtk.cpp gui_kde.cpp gui_riscos.cpp
gui_sdl.cpp
Log message:
* gui/Makefile.am: build libgnashplayer again,
linked against libgnashgui, which is linked
against any gui/renderer specific lib that was
built
* gui/Player.{cpp,h}: use named constructors to create
guis, so to avoid the need of including GUI-specific
headers (which do conflict).
* gui/gui.h: make constructors protected, provide named
(free functions) constructors for the different guis.
* gui/: gui_aqua.cpp, gui_fb.cpp, gui_fltk.cpp, gui_gtk.cpp,
gui_kde.cpp, gui_riscos.cpp, gui_sdl.cpp: modules implementing
the GUI named constructors.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3832&r2=1.3833
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.87&r2=1.88
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.h?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui_aqua.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui_fb.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui_fltk.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui_gtk.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui_kde.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui_riscos.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui_sdl.cpp?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3832
retrieving revision 1.3833
diff -u -b -r1.3832 -r1.3833
--- ChangeLog 26 Jul 2007 05:14:53 -0000 1.3832
+++ ChangeLog 26 Jul 2007 14:39:08 -0000 1.3833
@@ -1,5 +1,20 @@
2007-07-25 Sandro Santilli <address@hidden>
+ * gui/Makefile.am: build libgnashplayer again,
+ linked against libgnashgui, which is linked
+ against any gui/renderer specific lib that was
+ built
+ * gui/Player.{cpp,h}: use named constructors to create
+ guis, so to avoid the need of including GUI-specific
+ headers (which do conflict).
+ * gui/gui.h: make constructors protected, provide named
+ (free functions) constructors for the different guis.
+ * gui/: gui_aqua.cpp, gui_fb.cpp, gui_fltk.cpp, gui_gtk.cpp,
+ gui_kde.cpp, gui_riscos.cpp, gui_sdl.cpp: modules implementing
+ the GUI named constructors.
+
+2007-07-25 Sandro Santilli <address@hidden>
+
* gui/Player.{cpp,h}: add support for multiple GUI libs.
They can be statically or dynamically linked (not loaded as plugins
yet).
Index: gui/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/gui/Makefile.am,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- gui/Makefile.am 25 Jul 2007 13:38:29 -0000 1.87
+++ gui/Makefile.am 26 Jul 2007 14:39:09 -0000 1.88
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# $Id: Makefile.am,v 1.87 2007/07/25 13:38:29 strk Exp $
+# $Id: Makefile.am,v 1.88 2007/07/26 14:39:09 strk Exp $
AUTOMAKE_OPTIONS = -Wno-portability
@@ -24,7 +24,7 @@
# this is where Gnash plugins get installed
pluginsdir = $(libdir)/gnash/plugins
-lib_LTLIBRARIES = libgnashgui.la
+lib_LTLIBRARIES = libgnashgui.la libgnashplayer.la
BUILT_SOURCES = klash.moc .configline
AM_CPPFLAGS = -I.. \
@@ -61,6 +61,9 @@
$(GLIB_LIBS) \
$(EXPAT_LIBS)
+# The following will be filled up later
+GUI_CPPFLAGS =
+
## WARNING: make sure GLIB_LIBS appears first
## See: http://lists.gnu.org/archive/html/gnash-dev/2006-07/msg00076.html
AM_LDFLAGS = \
@@ -74,6 +77,46 @@
$(PTHREAD_LIBS) \
$(NULL)
+libgnashgui_la_SOURCES = \
+ gui.cpp gui.h \
+ NullGui.cpp \
+ gui_gtk.cpp \
+ gui_kde.cpp \
+ gui_sdl.cpp \
+ gui_fb.cpp \
+ gui_fltk.cpp \
+ gui_aqua.cpp \
+ gui_riscos.cpp \
+ NullGui.h
+
+libgnashgui_la_LIBADD = \
+ $(top_builddir)/server/libgnashserver.la \
+ $(top_builddir)/backend/libgnashbackend.la \
+ $(top_builddir)/libamf/libgnashamf.la
+
+# is LDFLAGS still needed when AM_LDFLAGS is defined already ?
+libgnashgui_la_LDFLAGS = \
+ -release $(VERSION) \
+ $(AM_LDFLAGS)
+
+libgnashgui_la_CPPFLAGS = $(AM_CPPFLAGS) $(GUI_CPPFLAGS)
+
+
+libgnashplayer_la_SOURCES = \
+ Player.cpp Player.h
+
+libgnashplayer_la_LIBADD = \
+ $(top_builddir)/server/libgnashserver.la \
+ $(top_builddir)/backend/libgnashbackend.la \
+ libgnashgui.la
+
+libgnashplayer_la_CPPFLAGS = $(AM_CPPFLAGS) $(GUI_CPPFLAGS)
+libgnashplayer_la_LDFLAGS = \
+ -release $(VERSION) \
+ -no-undefined \
+ -export-dynamic \
+ $(AM_LDFLAGS)
+
GNASH_LIBS = \
$(top_builddir)/libamf/libgnashamf.la \
$(top_builddir)/backend/libgnashbackend.la \
@@ -88,10 +131,6 @@
$(top_builddir)/libgeometry/libgnashgeo.la \
$(top_builddir)/libbase/libgnashbase.la
-# The player class has to be added to each GUI library because it
-# requires an ifdef to change between the various GUI toolkits.
-PLAYER_SRCS = Player.cpp Player.h
-
#
# Build the libraries that hold the combined GUI toolkit and
# renderer. These are built as static libraries if doing a static
@@ -114,165 +153,186 @@
# AQUA Toolkit
if BUILD_AQUA_GUI
+ GUI_CPPFLAGS += -DGUI_AQUA
if HAVE_OPENGL
- plugins_LTLIBRARIES += libgnashaqua_gl.la
- libgnashaqua_gl_la_CPPFLAGS = -DGUI_AQUA $(AM_CPPFLAGS) \
+ plugins_LTLIBRARIES += libgnashaqua_ogl.la
+ libgnashaqua_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(OPENGL_CFLAGS)
- libgnashaqua_gl_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashaqua_ogl_la_SOURCES = \
aqua_ogl_glue.cpp aqua_ogl_glue.h \
aqua.cpp aquasup.h aqua_glue.h
- libgnashaqua_gl_la_LDFLAGS = $(LIB_FLAGS)
- libgnashaqua_gl_la_LIBADD = \
- $(top_builddir)/backend/libgnashogl.la libgnashgui.la
+ libgnashaqua_ogl_la_LDFLAGS = $(LIB_FLAGS)
+ libgnashaqua_ogl_la_LIBADD = \
+ $(top_builddir)/backend/libgnashogl.la
+ libgnashgui_la_LIBADD += libgnashaqua_ogl.la
endif # HAVE_OPENGL
endif # BUILD_AQUA_GUI
# GTK2 Toolkit
if BUILD_GTK_GUI
+ GUI_CPPFLAGS += -DGUI_GTK $(GTK_CFLAGS)
if HAVE_OPENGL
- plugins_LTLIBRARIES += libgnashgtk_gl.la
- libgnashgtk_gl_la_CPPFLAGS = -DGUI_GTK $(AM_CPPFLAGS) \
+ plugins_LTLIBRARIES += libgnashgtk_ogl.la
+ libgnashgtk_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(GTK_CFLAGS) $(OPENGL_CFLAGS)
- libgnashgtk_gl_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashgtk_ogl_la_SOURCES = \
gtk_glue_gtkglext.cpp gtk_glue_gtkglext.h \
gtk.cpp gtksup.h gtk_glue.h
- libgnashgtk_gl_la_LDFLAGS = $(LIB_FLAGS)
- libgnashgtk_gl_la_LIBADD = \
- $(top_builddir)/backend/libgnashogl.la libgnashgui.la $(GTK_LIBS)
+ libgnashgtk_ogl_la_LDFLAGS = $(LIB_FLAGS)
+ libgnashgtk_ogl_la_LIBADD = \
+ $(top_builddir)/backend/libgnashogl.la $(GTK_LIBS)
+ libgnashgui_la_LIBADD += libgnashgtk_ogl.la
endif # HAVE_OPENGL
if HAVE_AGG
plugins_LTLIBRARIES += libgnashgtk_agg.la
- libgnashgtk_agg_la_CPPFLAGS = -DGUI_GTK $(AM_CPPFLAGS) \
+ libgnashgtk_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(GTK_CFLAGS) $(AGG_CFLAGS)
- libgnashgtk_agg_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashgtk_agg_la_SOURCES = \
gtk_glue_agg.cpp gtk_glue_agg.h \
gtk.cpp gtksup.h gtk_glue.h
libgnashgtk_agg_la_LDFLAGS = $(LIB_FLAGS)
libgnashgtk_agg_la_LIBADD = \
- $(top_builddir)/backend/libgnashagg.la libgnashgui.la \
+ $(top_builddir)/backend/libgnashagg.la \
$(GTK_LIBS) $(AGG_LIBS)
+ libgnashgui_la_LIBADD += libgnashgtk_agg.la
endif # HAVE_AGG
if HAVE_CAIRO
plugins_LTLIBRARIES += libgnashgtk_cairo.la
- libgnashgtk_cairo_la_CPPFLAGS = -DGUI_GTK $(AM_CPPFLAGS) \
+ libgnashgtk_cairo_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(GTK_CFLAGS) $(CAIRO_CFLAGS)
- libgnashgtk_cairo_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashgtk_cairo_la_SOURCES = \
gtk_glue_cairo.cpp gtk_glue_cairo.h \
gtk.cpp gtksup.h gtk_glue.h
libgnashgtk_cairo_la_LDFLAGS = $(LIB_FLAGS)
libgnashgtk_cairo_la_LIBADD = \
- $(top_builddir)/backend/libgnashcairo.la libgnashgui.la \
+ $(top_builddir)/backend/libgnashcairo.la \
$(GTK_LIBS) $(CAIRO_LIBS)
+ libgnashgui_la_LIBADD += libgnashgtk_cairo.la
endif # HAVE_CAIRO
endif # BUILD_GTK_GUI
# KDE/QT Toolkit
if BUILD_KDE_GUI
+ GUI_CPPFLAGS += -DGUI_KDE $(KDE_CFLAGS) $(QT_CFLAGS)
if HAVE_OPENGL
- plugins_LTLIBRARIES += libgnashkde_gl.la
- libgnashkde_gl_la_CPPFLAGS = -DGUI_KDE $(AM_CPPFLAGS) \
+ plugins_LTLIBRARIES += libgnashkde_ogl.la
+ libgnashkde_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(OPENGL_FLAGS) $(KDE_CFLAGS) $(QT_CFLAGS)
- libgnashkde_gl_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashkde_ogl_la_SOURCES = \
kde_glue_opengl.cpp kde_glue.h \
kde.cpp kdesup.h kde_glue.h
- libgnashkde_gl_la_LDFLAGS = $(LIB_FLAGS)
- libgnashkde_gl_la_LIBADD = libgnashgui.la \
+ libgnashkde_ogl_la_LDFLAGS = $(LIB_FLAGS)
+ libgnashkde_ogl_la_LIBADD = \
$(top_builddir)/backend/libgnashogl.la \
$(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS)
+ libgnashgui_la_LIBADD += libgnashkde_ogl.la
endif # HAVE_OPENGL
if HAVE_AGG
plugins_LTLIBRARIES += libgnashkde_agg.la
- libgnashkde_agg_la_CPPFLAGS = -DGUI_KDE $(AM_CPPFLAGS) \
+ libgnashkde_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(AGG_CFLAGS) $(KDE_CFLAGS) $(QT_CFLAGS)
- libgnashkde_agg_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashkde_agg_la_SOURCES = \
kde_glue_agg.cpp kde_glue_agg.h \
kde.cpp kdesup.h kde_glue.h
libgnashkde_agg_la_LDFLAGS = $(LIB_FLAGS)
- libgnashkde_agg_la_LIBADD = libgnashgui.la \
+ libgnashkde_agg_la_LIBADD = \
$(top_builddir)/backend/libgnashagg.la \
$(KDE_LIBS) $(QT_LIBS) $(AGG_LIBS)
+ libgnashgui_la_LIBADD += libgnashkde_agg.la
endif # HAVE_AGG
endif # BUILD_KDE_GUI
# SDL Toolkit
if BUILD_SDL_GUI
+ GUI_CPPFLAGS += -DGUI_SDL $(SDL_CFLAGS)
if HAVE_OPENGL
- plugins_LTLIBRARIES += libgnashsdl_gl.la
- libgnashsdl_gl_la_CPPFLAGS = -DGUI_SDL $(AM_CPPFLAGS) \
+ plugins_LTLIBRARIES += libgnashsdl_ogl.la
+ libgnashsdl_ogl_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(SDL_CFLAGS) $(OPENGL_CFLAGS)
- libgnashsdl_gl_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashsdl_ogl_la_SOURCES = \
sdl_ogl_glue.cpp sdl_ogl_glue.h \
sdl.cpp sdlsup.h sdl_glue.h
- libgnashsdl_gl_la_LDFLAGS = $(LIB_FLAGS)
- libgnashsdl_gl_la_LIBADD = \
- $(top_builddir)/backend/libgnashogl.la libgnashgui.la \
+ libgnashsdl_ogl_la_LDFLAGS = $(LIB_FLAGS)
+ libgnashsdl_ogl_la_LIBADD = \
+ $(top_builddir)/backend/libgnashogl.la \
$(SDL_LIBS) $(OPENGL_LIBS)
+ libgnashgui_la_LIBADD += libgnashsdl_ogl.la
endif # HAVE_OPENGL
if HAVE_AGG
plugins_LTLIBRARIES += libgnashsdl_agg.la
- libgnashsdl_agg_la_CPPFLAGS = -DGUI_SDL $(AM_CPPFLAGS) \
+ libgnashsdl_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(SDL_CFLAGS) $(AGG_CFLAGS)
- libgnashsdl_agg_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashsdl_agg_la_SOURCES = \
sdl_agg_glue.cpp sdl_agg_glue.h \
sdl.cpp sdlsup.h sdl_glue.h
libgnashsdl_agg_la_LDFLAGS = $(LIB_FLAGS)
libgnashsdl_agg_la_LIBADD = \
- $(top_builddir)/backend/libgnashagg.la libgnashgui.la \
+ $(top_builddir)/backend/libgnashagg.la \
$(SDL_LIBS) $(AGG_LIBS)
+ libgnashgui_la_LIBADD += libgnashsdl_agg.la
endif # HAVE_AGG
if HAVE_CAIRO
plugins_LTLIBRARIES += libgnashsdl_cairo.la
- libgnashsdl_cairo_la_CPPFLAGS = -DGUI_SDL $(AM_CPPFLAGS) \
+ libgnashsdl_cairo_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(SDL_CFLAGS) $(CAIRO_CFLAGS)
- libgnashsdl_cairo_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashsdl_cairo_la_SOURCES = \
sdl_cairo_glue.cpp sdl_cairo_glue.h \
sdl.cpp sdlsup.h sdl_glue.h
libgnashsdl_cairo_la_LDFLAGS = $(LIB_FLAGS)
libgnashsdl_cairo_la_LIBADD = \
- $(top_builddir)/backend/libgnashcairo.la libgnashgui.la \
+ $(top_builddir)/backend/libgnashcairo.la \
$(SDL_LIBS) $(CAIRO_LIBS)
+ libgnashgui_la_LIBADD += libgnashsdl_cairo.la
endif # HAVE_CAIRO
endif # BUILD_SDL_GUI
# FLTK2 Toolkit
if BUILD_FLTK_GUI
+
+ GUI_CPPFLAGS += -DGUI_FLTK $(FLTK2_CFLAGS)
if HAVE_AGG
plugins_LTLIBRARIES += libgnashfltk_agg.la
- libgnashfltk_agg_la_CPPFLAGS = -DGUI_FLTK $(AM_CPPFLAGS) \
+ libgnashfltk_agg_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(FLTK2_CFLAGS) $(AGG_CFLAGS)
- libgnashfltk_agg_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashfltk_agg_la_SOURCES = \
fltk_glue_agg.cpp fltk_glue_agg.h \
fltk.cpp fltksup.h
libgnashfltk_agg_la_LDFLAGS = $(LIB_FLAGS)
libgnashfltk_agg_la_LIBADD = \
- $(top_builddir)/backend/libgnashagg.la libgnashgui.la \
+ $(top_builddir)/backend/libgnashagg.la \
$(FLTK2_LIBS) $(AGG_LIBS) $(XFT_LIBS) $(X11_LIBS)
+ libgnashgui_la_LIBADD += libgnashfltk_agg.la
endif # HAVE_AGG
+
if HAVE_CAIRO
plugins_LTLIBRARIES += libgnashfltk_cairo.la
- libgnashfltk_agg_la_CPPFLAGS = -DGUI_FLTK $(AM_CPPFLAGS) \
+ libgnashfltk_cairo_la_CPPFLAGS = $(AM_CPPFLAGS) \
$(FLTK2_CFLAGS) $(CAIRO_CFLAGS)
- libgnashfltk_cairo_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashfltk_cairo_la_SOURCES = \
fltk_glue_cairo.cpp fltk_glue_cairo.h \
fltk.cpp fltksup.h
libgnashfltk_cairo_la_LDFLAGS = $(LIB_FLAGS)
libgnashfltk_cairo_la_LIBADD = \
- $(top_builddir)/backend/libgnashcairo.la libgnashgui.la \
+ $(top_builddir)/backend/libgnashcairo.la \
$(FLTK2_LIBS) $(CAIRO_LIBS) $(XFT_LIBS) $(X11_LIBS)
+ libgnashgui_la_LIBADD += libgnashfltk_cairo.la
endif # HAVE_CAIRO
+
endif # BUILD_FLTK_GUI
# Framebuffer, no toolkit
if BUILD_FB_GUI
+ GUI_CPPFLAGS += -DGUI_FB
if HAVE_AGG
- libgnashsdl_agg_la_CPPFLAGS = -DGUI_FB $(AM_CPPFLAGS) $(SDL_CFLAGS)
+ libgnashsdl_agg_la_CPPFLAGS = $(AM_CPPFLAGS) $(SDL_CFLAGS)
plugins_LTLIBRARIES += libgnashfb_agg.la
- libgnashfb_agg_la_SOURCES = $(PLAYER_SRCS) \
+ libgnashfb_agg_la_SOURCES = \
fb.cpp fbsup.h
libgnashfb_agg_la_LDFLAGS = $(LIB_FLAGS)
libgnashfb_agg_la_LIBADD = \
- $(top_builddir)/backend/libgnashagg.la libgnashgui.la \
+ $(top_builddir)/backend/libgnashagg.la \
$(SDL_LIBS) $(AGG_LIBS)
+ libgnashgui_la_LIBADD += libgnashfb_agg.la
endif # HAVE_AGG
endif # BUILD_FB_GUI
@@ -287,17 +347,17 @@
if STATIC_GUI
if BUILD_OGL_RENDERER
if BUILD_GTK_GUI
- GNASH_LIBS += libgnashgtk_gl.la $(GTK_LIBS) $(OPENGL_LIBS)
+ GNASH_LIBS += libgnashgtk_ogl.la $(GTK_LIBS) $(OPENGL_LIBS)
endif # BUILD_GTK_GUI
if BUILD_AQUA_GUI
- GNASH_LIBS += libgnashaqua_gl.la $(AQUA_LIBS) $(OPENGL_LIBS)
+ GNASH_LIBS += libgnashaqua_ogl.la $(AQUA_LIBS) $(OPENGL_LIBS)
endif # BUILD_AQUA_GUI
if BUILD_SDL_GUI
- GNASH_LIBS += libgnashsdl_gl.la $(SDL_LIBS) $(OPENGL_LIBS)
+ GNASH_LIBS += libgnashsdl_ogl.la $(SDL_LIBS) $(OPENGL_LIBS)
endif # BUILD_SDL_GUI
if BUILD_KDE_GUI
- GNASH_LIBS += libgnashkde_gl.la $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS)
- KLASH_LIBS += libgnashkde_gl.la $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS)
+ GNASH_LIBS += libgnashkde_ogl.la $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS)
+ KLASH_LIBS += libgnashkde_ogl.la $(KDE_LIBS) $(QT_LIBS) $(OPENGL_LIBS)
endif # BUILD_KDE_GUI
endif # BUILD_OPENGL_RENDERER
@@ -378,43 +438,15 @@
#dist_images_DATA = images/gnash_G_v3.ico
imagesdir = $(pkgdatadir)
-libgnashgui_la_SOURCES = \
- gui.cpp gui.h \
- NullGui.cpp \
- NullGui.h
-
-libgnashgui_la_LIBADD = \
- $(top_builddir)/server/libgnashserver.la \
- $(top_builddir)/backend/libgnashbackend.la \
- $(top_builddir)/libamf/libgnashamf.la
-
-# is LDFLAGS still needed when AM_LDFLAGS is defined already ?
-libgnashgui_la_LDFLAGS = \
- -release $(VERSION) \
- $(AM_LDFLAGS)
-
bin_PROGRAMS = gnash
-if KLASH
- bin_PROGRAMS += klash
-
- klash_SOURCES = gnash.cpp
- # export our symbols so they can be used by Gnash plugins
- klash_LDFLAGS = $(LIBLTDL) -export-dynamic
- klash_DEPENDENCIES = libgnashgui.la .configline
- klash_LDADD = \
- libgnashgui.la \
- $(MYSQL_LIBS) \
- $(KLASH_LIBS) \
- $(AM_LDFLAGS)
-endif # KLASH
-
gnash_SOURCES = gnash.cpp
# export our symbols so they can be used by Gnash plugins
gnash_LDFLAGS = $(LIBLTDL) -export-dynamic
gnash_DEPENDENCIES = libgnashgui.la .configline
gnash_LDADD = \
libgnashgui.la \
+ libgnashplayer.la \
$(MYSQL_LIBS) \
$(GNASH_LIBS) \
$(AM_LDFLAGS)
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- gui/Player.cpp 26 Jul 2007 05:14:54 -0000 1.59
+++ gui/Player.cpp 26 Jul 2007 14:39:09 -0000 1.60
@@ -22,40 +22,34 @@
#endif
#ifdef GUI_GTK
-# include "gtksup.h"
# define DEFAULT_GUI guiGTK
#endif
#ifdef GUI_SDL
-# include "sdlsup.h"
# define DEFAULT_GUI guiSDL
#endif
#ifdef GUI_AQUA
-# include "aquasup.h"
# define DEFAULT_GUI guiAQUA
#endif
#ifdef GUI_RISCOS
-# include "riscossup.h"
# define DEFAULT_GUI guiRISCOS
#endif
#ifdef GUI_FLTK
-# include "fltksup.h"
# define DEFAULT_GUI guiFLTK
#endif
#ifdef GUI_KDE
-# include "kdesup.h"
# define DEFAULT_GUI guiKDE
#endif
#ifdef GUI_FB
-# include "fbsup.h"
# define DEFAULT_GUI guiFB
#endif
+#include "gui.h"
#include "NullGui.h"
#include "gnash.h" // still needed ?
@@ -210,8 +204,11 @@
void
Player::init_gui()
{
+ std::cout << "init_gui called - gui flavor : " << _guiFlavor <<
std::endl;
if ( do_render )
{
+ std::cout << "Gui flavor is " << _guiFlavor << std::endl;
+
_gui = getGui(_guiFlavor); // throws on unsupported gui
RcInitFile& rcfile = RcInitFile::getDefaultInstance();
@@ -400,55 +397,33 @@
std::auto_ptr<Gui>
Player::getGui(GuiFlavor which)
{
+ std::cout << "getGui(" << which << ") called " << std::endl;
switch (which)
{
case guiGTK:
-#ifdef GUI_GTK // if we've been built with support for GTK
- return std::auto_ptr<Gui>(new GtkGui(windowid, scale,
do_loop, bit_depth));
-#endif
+ return createGTKGui(windowid, scale, do_loop,
bit_depth);
case guiKDE:
-#ifdef GUI_KDE // if we've been built with support for KDE
- return std::auto_ptr<Gui>(new KdeGui(windowid, scale,
do_loop, bit_depth));
-#else
- throw GnashException("Support for KDE gui was not
compiled in");
-#endif
+ return createKDEGui(windowid, scale, do_loop,
bit_depth);
case guiSDL:
-#ifdef GUI_SDL // if we've been built with support for SDL
- return std::auto_ptr<Gui>(new SDLGui(windowid, scale,
do_loop, bit_depth));
-#else
- throw GnashException("Support for SDL gui was not
compiled in");
-#endif
+ return createSDLGui(windowid, scale, do_loop,
bit_depth);
case guiAQUA:
-#ifdef GUI_AQUA // if we've been built with support for AQUA
- return std::auto_ptr<Gui>(new AquaGui(windowid, scale,
do_loop, bit_depth));
-#else
- throw GnashException("Support for AQUA gui was not
compiled in");
-#endif
+ return createAQUAGui(windowid, scale, do_loop,
bit_depth);
case guiRISCOS:
-#ifdef GUI_RISCOS // if we've been built with support for RISCOS
- return std::auto_ptr<Gui>(new RiscosGui(windowid,
scale, do_loop, bit_depth));
-#else
- throw GnashException("Support for RISCOS gui was not
compiled in");
-#endif
+ return createRISCOSGui(windowid, scale, do_loop,
bit_depth);
case guiFLTK:
-#ifdef GUI_FLTK // if we've been built with support for FLTK
- return std::auto_ptr<Gui>(new FltkGui(windowid, scale,
do_loop, bit_depth));
-#else
- throw GnashException("Support for FLTK gui was not
compiled in");
-#endif
+ return createFLTKGui(windowid, scale, do_loop,
bit_depth);
case guiFB:
-#ifdef GUI_FB // if we've been built with support for FB
- return std::auto_ptr<Gui>(new FBGui(windowid, scale,
do_loop, bit_depth));
-#else
- throw GnashException("Support for FB gui was not
compiled in");
-#endif
+ return createFBGui(windowid, scale, do_loop, bit_depth);
+
+ case guiNull:
+ return std::auto_ptr<Gui>(new NullGui(do_loop));
}
@@ -469,6 +444,7 @@
if ( match(flavorName, "FB") ) return guiFB;
if ( match(flavorName, "AQUA") ) return guiAQUA;
if ( match(flavorName, "RISCOS") ) return guiRISCOS;
+ if ( match(flavorName, "NULL") ) return guiNull;
std::stringstream ss;
ss << "Unknown Gui flavor " << flavorName;
Index: gui/Player.h
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- gui/Player.h 26 Jul 2007 05:14:54 -0000 1.13
+++ gui/Player.h 26 Jul 2007 14:39:09 -0000 1.14
@@ -33,6 +33,7 @@
#include <string>
#include <map>
+#include <iostream> // debugging...
// Forward declarations
namespace gnash
@@ -55,6 +56,9 @@
enum GuiFlavor {
+ /// Null gui
+ guiNull,
+
/// GTK gui
guiGTK,
@@ -139,7 +143,10 @@
/// Throws an exception if gui name is invalid
///
void setGuiFlavor(const std::string& flavorName) {
- setGuiFlavor(parseGuiFlavorByName(flavorName));
+ GuiFlavor flav = parseGuiFlavorByName(flavorName);
+ std::cout << "Flavor '" << flavorName << "' parsed as " << flav
<< std::endl;
+ //setGuiFlavor(parseGuiFlavorByName(flavorName));
+ setGuiFlavor(flav);
}
void setGuiFlavor(GuiFlavor which) { _guiFlavor = which; }
Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- gui/gui.h 3 Jul 2007 08:07:07 -0000 1.56
+++ gui/gui.h 26 Jul 2007 14:39:09 -0000 1.57
@@ -52,25 +52,8 @@
/// Parent class from which all GUI implementations will depend.
class DSOEXPORT Gui {
-public:
- /// Default constructor. Initialises members to safe defaults.
- Gui();
- /** \brief
- * Expanded constructor for more control over member values.
- *
- * @param xid The X11 Window ID to attach to. If this is argument is zero,
- * a new window is created.
- *
- * @param scale The scale used to resize the window size, which has been
- * established by extracting information from the SWF file.
- *
- * @param loop Defines whether or not the movie should be played once or
- * looped indefinitely.
- *
- * @param depth Colour depth to be used in the client area of our window.
- */
- Gui(unsigned long xid, float scale, bool loop, unsigned int depth);
+public:
virtual ~Gui();
@@ -259,6 +242,25 @@
#endif // def GNASH_FPS_DEBUG
protected:
+
+ /// Default constructor. Initialises members to safe defaults.
+ Gui();
+
+ /** \brief
+ * Expanded constructor for more control over member values.
+ *
+ * @param xid The X11 Window ID to attach to. If this is argument is zero,
+ * a new window is created.
+ *
+ * @param scale The scale used to resize the window size, which has been
+ * established by extracting information from the SWF file.
+ *
+ * @param loop Defines whether or not the movie should be played once or
+ * looped indefinitely.
+ *
+ * @param depth Colour depth to be used in the client area of our window.
+ */
+ Gui(unsigned long xid, float scale, bool loop, unsigned int depth);
/// Determines if playback should restart after the movie ends.
bool _loop;
/// The X Window ID to attach to. If zero, we create a new window.
@@ -324,6 +326,15 @@
};
+/// Named constructors
+std::auto_ptr<Gui> createGTKGui(unsigned long xid, float scale, bool loop,
unsigned int depth);
+std::auto_ptr<Gui> createKDEGui(unsigned long xid, float scale, bool loop,
unsigned int depth);
+std::auto_ptr<Gui> createSDLGui(unsigned long xid, float scale, bool loop,
unsigned int depth);
+std::auto_ptr<Gui> createFLTKGui(unsigned long xid, float scale, bool loop,
unsigned int depth);
+std::auto_ptr<Gui> createFBGui(unsigned long xid, float scale, bool loop,
unsigned int depth);
+std::auto_ptr<Gui> createAQUAGui(unsigned long xid, float scale, bool loop,
unsigned int depth);
+std::auto_ptr<Gui> createRISCOSGui(unsigned long xid, float scale, bool loop,
unsigned int depth);
+
} // end of gnash namespace
Index: gui/gui_aqua.cpp
===================================================================
RCS file: gui/gui_aqua.cpp
diff -N gui/gui_aqua.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/gui_aqua.cpp 26 Jul 2007 14:39:09 -0000 1.1
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+/* $Id: gui_aqua.cpp,v 1.1 2007/07/26 14:39:09 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+#include "GnashException.h"
+
+#ifdef GUI_AQUA
+#include "aquasup.h"
+#endif
+
+namespace gnash {
+
+#ifdef GUI_AQUA
+std::auto_ptr<Gui> createAQUAGui(unsigned long windowid, float scale, bool
do_loop, unsigned int bit_depth)
+{
+ return std::auto_ptr<Gui>(new AquaGui(windowid, scale, do_loop,
bit_depth));
+}
+#else // ! GUI_AQUA
+std::auto_ptr<Gui> createAQUAGui(unsigned long , float , bool , unsigned int )
+{
+ throw GnashException("Support for AQUA gui was not compiled in");
+}
+#endif // ! GUI_AQUA
+
+} // namespace gnash
+
Index: gui/gui_fb.cpp
===================================================================
RCS file: gui/gui_fb.cpp
diff -N gui/gui_fb.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/gui_fb.cpp 26 Jul 2007 14:39:09 -0000 1.1
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+/* $Id: gui_fb.cpp,v 1.1 2007/07/26 14:39:09 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+#include "GnashException.h"
+
+#ifdef GUI_FB
+#include "fbsup.h"
+#endif
+
+namespace gnash {
+
+#ifdef GUI_FB
+std::auto_ptr<Gui> createFBGui(unsigned long windowid, float scale, bool
do_loop, unsigned int bit_depth)
+{
+ return std::auto_ptr<Gui>(new FbGui(windowid, scale, do_loop,
bit_depth));
+}
+#else // ! GUI_FB
+std::auto_ptr<Gui> createFBGui(unsigned long , float , bool , unsigned int )
+{
+ throw GnashException("Support for FB gui was not compiled in");
+}
+#endif // ! GUI_FB
+
+} // namespace gnash
+
Index: gui/gui_fltk.cpp
===================================================================
RCS file: gui/gui_fltk.cpp
diff -N gui/gui_fltk.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/gui_fltk.cpp 26 Jul 2007 14:39:09 -0000 1.1
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+/* $Id: gui_fltk.cpp,v 1.1 2007/07/26 14:39:09 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+#include "GnashException.h"
+
+#ifdef GUI_FLTK
+#include "fltksup.h"
+#endif
+
+namespace gnash {
+
+#ifdef GUI_FLTK
+std::auto_ptr<Gui> createFLTKGui(unsigned long windowid, float scale, bool
do_loop, unsigned int bit_depth)
+{
+ return std::auto_ptr<Gui>(new FltkGui(windowid, scale, do_loop,
bit_depth));
+}
+#else // ! GUI_FLTK
+std::auto_ptr<Gui> createFLTKGui(unsigned long , float , bool , unsigned int )
+{
+ throw GnashException("Support for FLTK gui was not compiled in");
+}
+#endif // ! GUI_FLTK
+
+} // namespace gnash
+
Index: gui/gui_gtk.cpp
===================================================================
RCS file: gui/gui_gtk.cpp
diff -N gui/gui_gtk.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/gui_gtk.cpp 26 Jul 2007 14:39:09 -0000 1.1
@@ -0,0 +1,48 @@
+// gui_gtk.cpp: Wrapper for Gnome ToolKit graphical user interface, for Gnash.
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+/* $Id: gui_gtk.cpp,v 1.1 2007/07/26 14:39:09 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+#include "GnashException.h"
+
+#ifdef GUI_GTK
+#include "gtksup.h"
+#endif
+
+namespace gnash {
+
+#ifdef GUI_GTK
+std::auto_ptr<Gui> createGTKGui(unsigned long windowid, float scale, bool
do_loop, unsigned int bit_depth)
+{
+ return std::auto_ptr<Gui>(new GtkGui(windowid, scale, do_loop,
bit_depth));
+}
+#else // ! GUI_GTK
+std::auto_ptr<Gui> createGTKGui(unsigned long , float , bool , unsigned int )
+{
+ throw GnashException("Support for GTK gui was not compiled in");
+}
+#endif // ! GUI_GTK
+
+} // namespace gnash
+
Index: gui/gui_kde.cpp
===================================================================
RCS file: gui/gui_kde.cpp
diff -N gui/gui_kde.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/gui_kde.cpp 26 Jul 2007 14:39:09 -0000 1.1
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+/* $Id: gui_kde.cpp,v 1.1 2007/07/26 14:39:09 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+#include "GnashException.h"
+
+#ifdef GUI_KDE
+#include "kdesup.h"
+#endif
+
+namespace gnash {
+
+#ifdef GUI_KDE
+std::auto_ptr<Gui> createKDEGui(unsigned long windowid, float scale, bool
do_loop, unsigned int bit_depth)
+{
+ return std::auto_ptr<Gui>(new KdeGui(windowid, scale, do_loop,
bit_depth));
+}
+#else // ! GUI_KDE
+std::auto_ptr<Gui> createKDEGui(unsigned long , float , bool , unsigned int )
+{
+ throw GnashException("Support for KDE gui was not compiled in");
+}
+#endif // ! GUI_KDE
+
+} // namespace gnash
+
Index: gui/gui_riscos.cpp
===================================================================
RCS file: gui/gui_riscos.cpp
diff -N gui/gui_riscos.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/gui_riscos.cpp 26 Jul 2007 14:39:09 -0000 1.1
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+/* $Id: gui_riscos.cpp,v 1.1 2007/07/26 14:39:09 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+#include "GnashException.h"
+
+#ifdef GUI_RISCOS
+#include "riscossup.h"
+#endif
+
+namespace gnash {
+
+#ifdef GUI_RISCOS
+std::auto_ptr<Gui> createRISCOSGui(unsigned long windowid, float scale, bool
do_loop, unsigned int bit_depth)
+{
+ return std::auto_ptr<Gui>(new RiscosGui(windowid, scale, do_loop,
bit_depth));
+}
+#else // ! GUI_RISCOS
+std::auto_ptr<Gui> createRISCOSGui(unsigned long , float , bool , unsigned int
)
+{
+ throw GnashException("Support for RISCOS gui was not compiled in");
+}
+#endif // ! GUI_RISCOS
+
+} // namespace gnash
+
Index: gui/gui_sdl.cpp
===================================================================
RCS file: gui/gui_sdl.cpp
diff -N gui/gui_sdl.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gui/gui_sdl.cpp 26 Jul 2007 14:39:09 -0000 1.1
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+/* $Id: gui_sdl.cpp,v 1.1 2007/07/26 14:39:09 strk Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gui.h"
+#include "GnashException.h"
+
+#ifdef GUI_SDL
+#include "sdlsup.h"
+#endif
+
+namespace gnash {
+
+#ifdef GUI_SDL
+std::auto_ptr<Gui> createSDLGui(unsigned long windowid, float scale, bool
do_loop, unsigned int bit_depth)
+{
+ return std::auto_ptr<Gui>(new SDLGui(windowid, scale, do_loop,
bit_depth));
+}
+#else // ! GUI_SDL
+std::auto_ptr<Gui> createSDLGui(unsigned long , float , bool , unsigned int )
+{
+ throw GnashException("Support for SDL gui was not compiled in");
+}
+#endif // ! GUI_SDL
+
+} // namespace gnash
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/Makefile.am gui/Player.cpp ...,
Sandro Santilli <=