[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/render_handler_ogl.cpp ...
From: |
Markus Gothe |
Subject: |
[Gnash-commit] gnash ChangeLog backend/render_handler_ogl.cpp ... |
Date: |
Thu, 05 Apr 2007 01:28:40 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Markus Gothe <nihilus> 07/04/05 01:28:40
Modified files:
. : ChangeLog
backend : render_handler_ogl.cpp
Added files:
server/asobj : TextFormat.cpp TextFormat.h
Log message:
Added stub for class TextFormat.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2782&r2=1.2783
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_ogl.cpp?cvsroot=gnash&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/TextFormat.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/TextFormat.h?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2782
retrieving revision 1.2783
diff -u -b -r1.2782 -r1.2783
--- ChangeLog 4 Apr 2007 20:30:45 -0000 1.2782
+++ ChangeLog 5 Apr 2007 01:28:39 -0000 1.2783
@@ -1,3 +1,7 @@
+2007-04-04 Markus Gothe <address@hidden>
+
+ * server/asobj/TextFormat.{cpp,h} - Added stub for class TextFormat.
+
2007-04-04 Bastiaan Jacques <address@hidden>
* gui/gui.cpp, backend/render_handler_agg_style.h,
Index: backend/render_handler_ogl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_ogl.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- backend/render_handler_ogl.cpp 3 Apr 2007 21:46:37 -0000 1.67
+++ backend/render_handler_ogl.cpp 5 Apr 2007 01:28:40 -0000 1.68
@@ -6,7 +6,7 @@
// A render_handler that uses SDL & OpenGL
-/* $Id: render_handler_ogl.cpp,v 1.67 2007/04/03 21:46:37 nihilus Exp $ */
+/* $Id: render_handler_ogl.cpp,v 1.68 2007/04/05 01:28:40 nihilus Exp $ */
//#include "gnash.h"
#include "render_handler.h"
@@ -29,7 +29,7 @@
// 1 = hardware (experimental, should be fast, somewhat buggy)
// 2 = fast software bilinear (default)
// 3 = use image::resample(), slow software resampling
-#define RESAMPLE_METHOD 2
+#define RESAMPLE_METHOD 1
// Determines whether to generate mipmaps for smoother rendering of
Index: server/asobj/TextFormat.cpp
===================================================================
RCS file: server/asobj/TextFormat.cpp
diff -N server/asobj/TextFormat.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/TextFormat.cpp 5 Apr 2007 01:28:40 -0000 1.1
@@ -0,0 +1,108 @@
+//
+// 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 2 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: TextFormat.cpp,v 1.1 2007/04/05 01:28:40 nihilus Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "TextFormat.h"
+#include "as_object.h" // for inheritance
+#include "log.h"
+#include "fn_call.h"
+#include "smart_ptr.h" // for boost intrusive_ptr
+#include "builtin_function.h" // need builtin_function
+
+
+as_value textformat_tostring(const fn_call& fn);
+as_value textformat_ctor(const fn_call& fn);
+
+static void
+attachTextFormatInterface(as_object& o)
+{
+ // is this really needed ? shouldn't toString be
+ // derived from Object inheritance ?
+ o.init_member("toString", new builtin_function(textformat_tostring));
+}
+
+static as_object*
+getTextFormatInterface()
+{
+ static boost::intrusive_ptr<as_object> o;
+ if ( ! o )
+ {
+ o = new as_object();
+ attachTextFormatInterface(*o);
+ }
+ return o.get();
+}
+
+class textformat_as_object: public as_object
+{
+
+public:
+
+ textformat_as_object()
+ :
+ as_object(getTextFormatInterface())
+ {}
+
+ // override from as_object ?
+ //const char* get_text_value() const { return "TextFormat"; }
+
+ // override from as_object ?
+ //double get_numeric_value() const { return 0; }
+};
+
+as_value textformat_tostring(const fn_call& /*fn*/) {
+ log_warning("%s: unimplemented \n", __FUNCTION__);
+ return as_value();
+}
+
+as_value
+textformat_ctor(const fn_call& /* fn */)
+{
+ boost::intrusive_ptr<as_object> obj = new textformat_as_object;
+
+ return as_value(obj.get()); // will keep alive
+}
+
+// extern (used by Global.cpp)
+void textformat_class_init(as_object& global)
+{
+ // This is going to be the global TextFormat "class"/"function"
+ static boost::intrusive_ptr<builtin_function> cl;
+
+ if ( cl == NULL )
+ {
+ cl=new builtin_function(&textformat_ctor,
getTextFormatInterface());
+ // replicate all interface to class, to be able to access
+ // all methods as static functions
+ attachTextFormatInterface(*cl);
+
+ }
+
+ // Register _global.TextFormat
+ global.init_member("TextFormat", cl.get());
+
+}
+
+
+} // end of gnash namespace
+
Index: server/asobj/TextFormat.h
===================================================================
RCS file: server/asobj/TextFormat.h
diff -N server/asobj/TextFormat.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/asobj/TextFormat.h 5 Apr 2007 01:28:40 -0000 1.1
@@ -0,0 +1,45 @@
+//
+// 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 2 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: TextFormat.h,v 1.1 2007/04/05 01:28:40 nihilus Exp $ */
+
+#ifndef __GNASH_ASOBJ_TEXTFORMAT_H__
+#define __GNASH_ASOBJ_TEXTFORMAT_H__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include <memory> // for auto_ptr
+
+namespace gnash {
+
+class as_object;
+
+/// Initialize the global Boolean class
+void textformat_class_init(as_object& global);
+
+/// Return a TextFormat instance (in case the core lib needs it)
+//std::auto_ptr<as_object> init_textformat_instance();
+
+} // end of gnash namespace
+
+// __GNASH_ASOBJ_BOOLEAN_H__
+#endif
+
- [Gnash-commit] gnash ChangeLog backend/render_handler_ogl.cpp ...,
Markus Gothe <=