[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/gnash.cpp gui/gtk.cpp gui/g...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/gnash.cpp gui/gtk.cpp gui/g... |
Date: |
Mon, 31 Jul 2006 23:26:33 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/07/31 23:26:33
Modified files:
. : ChangeLog
gui : gnash.cpp gtk.cpp gtksup.h gui.h sdl.cpp
sdlsup.h
Log message:
added Gui::createWindow() function taking window title, with default
implementation discarding it. Changed /gnash.cpp to use the new signature.
patch by annonygmouse <address@hidden>
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.566&r2=1.567
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdlsup.h?cvsroot=gnash&r1=1.7&r2=1.8
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.566
retrieving revision 1.567
diff -u -b -r1.566 -r1.567
--- ChangeLog 31 Jul 2006 23:10:13 -0000 1.566
+++ ChangeLog 31 Jul 2006 23:26:33 -0000 1.567
@@ -1,3 +1,11 @@
+
+2006-08-01 annonygmouse <address@hidden>
+
+ * gui/gnash.cpp, gui/gtk.cpp, gui/gtksup.h, gui/gui.h, gui/sdl.cpp,
+ gui/sdlsup.h: add Gui::createWindow() function taking window
+ title, with default implementation discarding it. Changed
+ gui/gnash.cpp to use the new signature.
+
2006-08-01 Sandro Santilli <address@hidden>
* server/font.h, server/font.cpp: split read of DefineFont and
Index: gui/gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- gui/gnash.cpp 31 Jul 2006 03:13:43 -0000 1.23
+++ gui/gnash.cpp 31 Jul 2006 23:26:33 -0000 1.24
@@ -339,7 +339,7 @@
gui.init(argc, &argv);
- gui.createWindow(width, height);
+ gui.createWindow(infile, width, height);
// Load the actual movie.
gnash::movie_definition *md;
Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- gui/gtk.cpp 27 Jul 2006 00:15:22 -0000 1.14
+++ gui/gtk.cpp 31 Jul 2006 23:26:33 -0000 1.15
@@ -81,6 +81,20 @@
return true;
}
+
+bool
+GtkGui::createWindow(char *title, int width, int height)
+{
+//First call the old createWindow function and then set the title.
+//In case there's some need to not setting the title.
+ bool ret;
+
+ ret = createWindow(width, height);
+ gtk_window_set_title(GTK_WINDOW(_window), title);
+
+ return ret;
+}
+
bool
GtkGui::createWindow(int width, int height)
{
Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- gui/gtksup.h 15 Jul 2006 16:02:23 -0000 1.11
+++ gui/gtksup.h 31 Jul 2006 23:26:33 -0000 1.12
@@ -71,6 +71,7 @@
virtual ~GtkGui();
virtual bool init(int argc, char **argv[]);
virtual bool createWindow(int width, int height);
+ virtual bool createWindow(char *title, int width, int height);
virtual bool run(void *arg);
virtual bool createMenu();
virtual bool setupEvents();
Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gui/gui.h 31 Jul 2006 03:13:43 -0000 1.10
+++ gui/gui.h 31 Jul 2006 23:26:33 -0000 1.11
@@ -66,14 +66,29 @@
bool createWindow(int xid, int width, int height);
virtual bool init(int argc, char **argv[]) = 0;
+
+ /// Set main loop delay in milliseconds. @@ should rename to setDelay
virtual void setCallback(unsigned int interval) = 0;
+
virtual void setTimeout(unsigned int timeout) = 0;
+
+ /// Create a window of given size. @@ shoudn't we use unsigned ints ?
virtual bool createWindow(int width, int height) = 0;
+
+ /// Create a window of given size with given title.
+ //
+ /// Default implementation discards title and calls the above version
+ ///
+ virtual bool createWindow(char* /*title*/, int width, int height) {
+ return createWindow(width, height);
+ }
+
virtual bool run(void *) = 0;
virtual bool createMenu() = 0;
virtual bool setupEvents() = 0;
virtual void renderBuffer() = 0;
+
float getScale() { return _scale; }
bool loops() { return _loop; }
Index: gui/sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gui/sdl.cpp 27 Jul 2006 00:15:22 -0000 1.10
+++ gui/sdl.cpp 31 Jul 2006 23:26:33 -0000 1.11
@@ -204,7 +204,19 @@
}
bool
-SDLGui::createWindow(int width, int height)
+SDLGui::createWindow(char *title, int width, int height)
+{
+ bool ret;
+
+ ret = createWindow(width, height);
+
+ // Set the window title
+ SDL_WM_SetCaption( title, title);
+ return ret;
+}
+
+bool
+SDLGui::createWindow( int width, int height)
{
GNASH_REPORT_FUNCTION;
_width = width;
@@ -231,9 +243,6 @@
exit(1);
}
- // Set the window title
- SDL_WM_SetCaption(_name.c_str(), _name.c_str());
-
#ifdef RENDERER_CAIRO
int stride=width * 4;
Index: gui/sdlsup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/sdlsup.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- gui/sdlsup.h 15 Jul 2006 16:02:23 -0000 1.7
+++ gui/sdlsup.h 31 Jul 2006 23:26:33 -0000 1.8
@@ -62,7 +62,8 @@
SDLGui(unsigned long xid, float scale, bool loop, unsigned int depth);
virtual ~SDLGui();
virtual bool init(int argc, char **argv[]);
- virtual bool createWindow(int width, int height);
+ virtual bool createWindow( int width, int height);
+ virtual bool createWindow(char *title, int width, int height);
virtual bool run(void *arg);
virtual bool createMenu();
virtual bool setupEvents();