[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/Makefile.am server/gener...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/Makefile.am server/gener... |
Date: |
Mon, 25 Sep 2006 15:17:43 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/09/25 15:17:42
Modified files:
. : ChangeLog
server : Makefile.am generic_character.h render.cpp
styles.cpp
server/parser : Makefile.am bitmap_character_def.h
morph2_character_def.cpp movie_def_impl.cpp
movie_def_impl.h movie_definition.h
sprite_definition.h
server/swf : tag_loaders.cpp
Added files:
server : bitmap_character_instance.cpp
bitmap_character_instance.h
server/parser : .cvsignore bitmap_character_def.cpp
Log message:
* server/parser/.cvsignore: new file
* server/render.cpp: abort when bitmap_info creation is
requested but a renderer is not defined.
* server/Makefile.am, server/parser/Makefile.am,
server/bitmap_character_instance.cpp,
server/bitmap_character_instance.h,
server/parser/bitmap_character_def.cpp,
server/parser/bitmap_character_def.h:
Split bitmap_character into definition and instance;
had bitmap_character_def initialized by image::rgb
and image::rgba instead as with bitmap_info, made bitmap_info
creation a lazy process inside get_bitmap_info (to be called
only *after* parsing, when renderer is registered).
* server/parser/movie_def_impl.cpp,
server/parser/movie_def_impl.h,
server/parser/movie_definition.h,
server/parser/sprite_definition.h:
Renamed movie_definition methods to add/get
bitmap_character_*defs*
* server/generic_character.h, server/styles.cpp,
server/parser/morph2_character_def.cpp,
server/swf/tag_loaders.cpp:
Updated creation of bitmap_character_def and calls to add them
to movie_definitions.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.919&r2=1.920
http://cvs.savannah.gnu.org/viewcvs/gnash/server/Makefile.am?cvsroot=gnash&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/gnash/server/generic_character.h?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/render.cpp?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/server/styles.cpp?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/server/bitmap_character_instance.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/bitmap_character_instance.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/Makefile.am?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/bitmap_character_def.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/morph2_character_def.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.cpp?cvsroot=gnash&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_definition.h?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sprite_definition.h?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/.cvsignore?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/bitmap_character_def.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.46&r2=1.47
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.919
retrieving revision 1.920
diff -u -b -r1.919 -r1.920
--- ChangeLog 25 Sep 2006 13:16:43 -0000 1.919
+++ ChangeLog 25 Sep 2006 15:17:42 -0000 1.920
@@ -1,3 +1,30 @@
+2006-09-25 Sandro Santilli <address@hidden>
+
+ * gui/Player.cpp: make sure gui.createWindow()
+ is called *before* actual parsing (quick solution
+ to our renderer calls within the parser)
+ * server/parser/.cvsignore: new file
+ * server/render.cpp: abort when bitmap_info creation is
+ requested but a renderer is not defined.
+ * server/Makefile.am, server/parser/Makefile.am,
+ server/bitmap_character_instance.cpp,
+ server/bitmap_character_instance.h,
+ server/parser/bitmap_character_def.cpp,
+ server/parser/bitmap_character_def.h:
+ Split bitmap_character into definition and instance;
+ had bitmap_character_def initialized by image::rgb
+ and image::rgba instead as with bitmap_info, made bitmap_info
+ creation a lazy process inside get_bitmap_info (to be called
+ only *after* parsing, when renderer is registered).
+ * server/parser/movie_def_impl.cpp, server/parser/movie_def_impl.h,
+ server/parser/movie_definition.h, server/parser/sprite_definition.h:
+ Renamed movie_definition methods to add/get bitmap_character_*defs*
+ * server/generic_character.h, server/styles.cpp,
+ server/parser/morph2_character_def.cpp,
+ server/swf/tag_loaders.cpp:
+ Updated creation of bitmap_character_def and calls to add them
+ to movie_definitions.
+
2006-09-25 Vitaly Alexeev <address@hidden>
* gui/Player.cpp: reverted
Index: server/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/Makefile.am,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- server/Makefile.am 30 Aug 2006 09:11:09 -0000 1.65
+++ server/Makefile.am 25 Sep 2006 15:17:42 -0000 1.66
@@ -75,6 +75,7 @@
as_environment.cpp \
as_function.cpp \
swf_function.cpp \
+ bitmap_character_instance.cpp \
character.cpp \
textformat.cpp \
timers.cpp \
@@ -116,6 +117,7 @@
as_value.h \
as_environment.h \
as_function.h \
+ bitmap_character_instance.h \
builtin_function.h \
swf_function.h \
as_member.h \
Index: server/generic_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/generic_character.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- server/generic_character.h 26 Aug 2006 02:08:31 -0000 1.7
+++ server/generic_character.h 25 Sep 2006 15:17:42 -0000 1.8
@@ -56,7 +56,7 @@
class generic_character : public character
{
-private:
+protected:
character_def* m_def;
Index: server/render.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/render.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- server/render.cpp 14 Sep 2006 03:00:23 -0000 1.6
+++ server/render.cpp 25 Sep 2006 15:17:42 -0000 1.7
@@ -15,6 +15,8 @@
#include "log.h"
#endif
+#include <cassert>
+
namespace gnash {
static render_handler* s_render_handler;
@@ -35,6 +37,7 @@
class bogus_bi : public bitmap_info
{
public:
+ bogus_bi() { assert(0); }
};
Index: server/styles.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/styles.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- server/styles.cpp 14 Sep 2006 03:00:23 -0000 1.19
+++ server/styles.cpp 25 Sep 2006 15:17:42 -0000 1.20
@@ -157,7 +157,7 @@
);
// Look up the bitmap character.
- m_bitmap_character = md->get_bitmap_character(bitmap_char_id);
+ m_bitmap_character = md->get_bitmap_character_def(bitmap_char_id);
matrix m;
m.read(in);
Index: server/parser/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/parser/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- server/parser/Makefile.am 26 Aug 2006 22:58:12 -0000 1.4
+++ server/parser/Makefile.am 25 Sep 2006 15:17:42 -0000 1.5
@@ -68,6 +68,7 @@
libgnashparser_la_SOURCES = \
action_buffer.cpp \
+ bitmap_character_def.cpp \
button_character_def.cpp \
character_def.cpp \
edit_text_character_def.cpp \
Index: server/parser/bitmap_character_def.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/bitmap_character_def.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/parser/bitmap_character_def.h 26 Aug 2006 13:09:53 -0000
1.5
+++ server/parser/bitmap_character_def.h 25 Sep 2006 15:17:42 -0000
1.6
@@ -56,50 +56,54 @@
namespace gnash {
-/// What's this ? An interface ?
-class bitmap_character_def : public character_def
+struct image_rgb_or_rgba : public ref_counted
{
-public:
- virtual gnash::bitmap_info* get_bitmap_info() = 0;
+ int type; // 0: rgb, 1: rgba
+ union {
+ image::rgb* rgb;
+ image::rgba* rgba;
+ };
};
-#if 1
-/// Bitmap character
-class bitmap_character : public bitmap_character_def
+/// What's this ? An interface ?
+class bitmap_character_def : public character_def
{
+
public:
- bitmap_character(bitmap_info* bi)
- :
- m_bitmap_info(bi)
+
+ bitmap_character_def(image::rgb* image)
{
+ assert(image != 0);
+ _image.type = 0;
+ _image.rgb = image;
}
-// bitmap_character(image::rgb* image)
-// {
-// assert(image != 0);
-
-// // Create our bitmap info, from our image.
-// m_bitmap_info =
gnash::render::create_bitmap_info_rgb(image);
-// }
-
-// bitmap_character(image::rgba* image)
-// {
-// assert(image != 0);
-
-// // Create our bitmap info, from our image.
-// m_bitmap_info =
gnash::render::create_bitmap_info_rgba(image);
-// }
+ bitmap_character_def(image::rgba* image)
+ {
+ assert(image != 0);
+ _image.type = 1;
+ _image.rgba = image;
+ }
+
+ virtual character* create_character_instance(character* parent,
+ int id);
- gnash::bitmap_info* get_bitmap_info()
+ // Use the renderer to create a bitmap_info from the image
+ // information. DO NOT CALL THIS FUNCTION FROM THE PARSER LIB !
+ gnash::bitmap_info* get_bitmap_info();
+
+ void set_bitmap_info(smart_ptr<gnash::bitmap_info> bi)
{
- return m_bitmap_info.get_ptr();
+ _bitmap_info = bi;
}
private:
- smart_ptr<gnash::bitmap_info> m_bitmap_info;
+
+ smart_ptr<gnash::bitmap_info> _bitmap_info;
+
+ image_rgb_or_rgba _image;
};
-#endif
} // end namespace gnash
Index: server/parser/morph2_character_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/morph2_character_def.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/parser/morph2_character_def.cpp 26 Aug 2006 10:14:51 -0000
1.1
+++ server/parser/morph2_character_def.cpp 25 Sep 2006 15:17:42 -0000
1.2
@@ -220,7 +220,7 @@
);
// Look up the bitmap character.
- fs1.m_bitmap_character =
md->get_bitmap_character(bitmap_char_id);
+ fs1.m_bitmap_character =
md->get_bitmap_character_def(bitmap_char_id);
fs2.m_bitmap_character = fs1.m_bitmap_character;
matrix m1, m2;
Index: server/parser/movie_def_impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- server/parser/movie_def_impl.cpp 23 Sep 2006 16:22:43 -0000 1.20
+++ server/parser/movie_def_impl.cpp 25 Sep 2006 15:17:42 -0000 1.21
@@ -531,7 +531,7 @@
return f.get_ptr();
}
-bitmap_character_def* movie_def_impl::get_bitmap_character(int character_id)
+bitmap_character_def* movie_def_impl::get_bitmap_character_def(int
character_id)
{
smart_ptr<bitmap_character_def> ch;
m_bitmap_characters.get(character_id, &ch);
@@ -539,12 +539,16 @@
return ch.get_ptr();
}
-void movie_def_impl::add_bitmap_character(int character_id,
bitmap_character_def* ch)
+void
+movie_def_impl::add_bitmap_character_def(int character_id,
+ bitmap_character_def* ch)
{
assert(ch);
//log_msg("Add bitmap character %d", character_id);
m_bitmap_characters.add(character_id, ch);
+ // we can *NOT* generate bitmap_info until
+ // a renderer is present
add_bitmap_info(ch->get_bitmap_info());
}
Index: server/parser/movie_def_impl.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/parser/movie_def_impl.h 27 Aug 2006 15:26:11 -0000 1.5
+++ server/parser/movie_def_impl.h 25 Sep 2006 15:17:42 -0000 1.6
@@ -425,8 +425,8 @@
void add_font(int font_id, font* f);
font* get_font(int font_id);
- bitmap_character_def* get_bitmap_character(int character_id);
- void add_bitmap_character(int character_id, bitmap_character_def*
ch);
+ bitmap_character_def* get_bitmap_character_def(int character_id);
+ void add_bitmap_character_def(int character_id,
bitmap_character_def* ch);
sound_sample* get_sound_sample(int character_id);
virtual void add_sound_sample(int character_id, sound_sample* sam);
virtual void set_loading_sound_stream_id(int id) {
m_loading_sound_stream = id; }
Index: server/parser/movie_definition.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/movie_definition.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- server/parser/movie_definition.h 26 Aug 2006 22:58:12 -0000 1.4
+++ server/parser/movie_definition.h 25 Sep 2006 15:17:42 -0000 1.5
@@ -221,9 +221,9 @@
virtual jpeg::input* get_jpeg_loader() = 0;
- virtual bitmap_character_def* get_bitmap_character(int character_id)=0;
+ virtual bitmap_character_def* get_bitmap_character_def(int
character_id)=0;
- virtual void add_bitmap_character(int character_id,
+ virtual void add_bitmap_character_def(int character_id,
bitmap_character_def* ch) = 0;
virtual sound_sample* get_sound_sample(int character_id) = 0;
Index: server/parser/sprite_definition.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/sprite_definition.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/parser/sprite_definition.h 24 Aug 2006 00:57:20 -0000 1.1
+++ server/parser/sprite_definition.h 25 Sep 2006 15:17:42 -0000 1.2
@@ -155,12 +155,12 @@
return NULL;
}
- virtual bitmap_character_def* get_bitmap_character(int id)
+ virtual bitmap_character_def* get_bitmap_character_def(int id)
{
- return m_movie_def->get_bitmap_character(id);
+ return m_movie_def->get_bitmap_character_def(id);
}
- virtual void add_bitmap_character(int /*id*/,
+ virtual void add_bitmap_character_def(int /*id*/,
bitmap_character_def* /*ch*/)
{
log_error("add_bc appears in sprite tags!"
Index: server/swf/tag_loaders.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- server/swf/tag_loaders.cpp 21 Sep 2006 07:28:37 -0000 1.46
+++ server/swf/tag_loaders.cpp 25 Sep 2006 15:17:42 -0000 1.47
@@ -36,7 +36,7 @@
//
//
-/* $Id: tag_loaders.cpp,v 1.46 2006/09/21 07:28:37 strk Exp $ */
+/* $Id: tag_loaders.cpp,v 1.47 2006/09/25 15:17:42 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -263,20 +263,20 @@
j_in->discard_partial_buffer();
image::rgb* im = image::read_swf_jpeg2_with_tables(j_in);
- bi = render::create_bitmap_info_rgb(im);
- delete im;
+ //bi = render::create_bitmap_info_rgb(im);
+ //delete im;
#else
log_error("gnash is not linked to jpeglib -- can't load jpeg image
data!\n");
return;
#endif
- assert(bi->get_ref_count() == 0);
+ //assert(im->get_ref_count() == 0);
- bitmap_character* ch = new bitmap_character(bi);
+ bitmap_character_def* ch = new bitmap_character_def(im);
- m->add_bitmap_character(character_id, ch);
-}
+ m->add_bitmap_character_def(character_id, ch);
+ }
}
@@ -300,21 +300,21 @@
if (m->get_create_bitmaps() == DO_LOAD_BITMAPS)
{
- bitmap_info* bi = NULL;
+ //bitmap_info* bi = NULL;
#if TU_CONFIG_LINK_TO_JPEGLIB
image::rgb* im = image::read_jpeg(in->get_underlying_stream());
- bi = render::create_bitmap_info_rgb(im);
- delete im;
+ //bi = render::create_bitmap_info_rgb(im);
+ //delete im;
#else
log_error("gnash is not linked to jpeglib -- can't load jpeg image
data!\n");
return;
#endif
- assert(bi->get_ref_count() == 0);
+ //assert(bi->get_ref_count() == 0);
- bitmap_character* ch = new bitmap_character(bi);
+ bitmap_character_def* ch = new bitmap_character_def(im);
- m->add_bitmap_character(character_id, ch);
+ m->add_bitmap_character_def(character_id, ch);
}
}
@@ -393,7 +393,8 @@
if (m->get_create_bitmaps() == DO_LOAD_BITMAPS)
{
- bitmap_info* bi = NULL;
+ image::rgba* im = NULL;
+
#if TU_CONFIG_LINK_TO_JPEGLIB == 0 || TU_CONFIG_LINK_TO_ZLIB == 0
log_error("gnash is not linked to jpeglib/zlib -- can't load
jpeg/zipped image data!\n");
return;
@@ -403,7 +404,7 @@
//
// Read rgb data.
- image::rgba* im =
image::read_swf_jpeg3(in->get_underlying_stream());
+ im = image::read_swf_jpeg3(in->get_underlying_stream());
// Read alpha channel.
in->set_position(alpha_position);
@@ -420,14 +421,13 @@
delete [] buffer;
- bi = render::create_bitmap_info_rgba(im);
-
- delete im;
+ //bitmap_info* bi = render::create_bitmap_info_rgba(im);
+ //delete im;
#endif
// Create bitmap character.
- bitmap_character* ch = new bitmap_character(bi);
+ bitmap_character_def* ch = new bitmap_character_def(im);
- m->add_bitmap_character(character_id, ch);
+ m->add_bitmap_character_def(character_id, ch);
}
}
@@ -562,12 +562,12 @@
delete [] buffer;
}
-// bitmap_character* ch = new
bitmap_character(image);
- bi = render::create_bitmap_info_rgb(image);
- delete image;
+ bitmap_character_def* ch = new bitmap_character_def(image);
+ //bi = render::create_bitmap_info_rgb(image);
+ //delete image;
-// // add image to movie, under character id.
-// m->add_bitmap_character(character_id, ch);
+ // add image to movie, under character id.
+ m->add_bitmap_character_def(character_id, ch);
}
else
{
@@ -665,21 +665,22 @@
}
}
- bi = render::create_bitmap_info_rgba(image);
-// bitmap_character* ch = new
bitmap_character(image);
- delete image;
+ bitmap_character_def* ch = new
bitmap_character_def(image);
+// delete image;
-// // add image to movie, under character id.
-// m->add_bitmap_character(character_id, ch);
+ // add image to movie, under character id.
+ m->add_bitmap_character_def(character_id, ch);
}
#endif // TU_CONFIG_LINK_TO_ZLIB
+#if 0
assert(bi->get_ref_count() == 0);
bitmap_character* ch = new bitmap_character(bi);
// add image to movie, under character id.
m->add_bitmap_character(character_id, ch);
+#endif
}
}
Index: server/bitmap_character_instance.cpp
===================================================================
RCS file: server/bitmap_character_instance.cpp
diff -N server/bitmap_character_instance.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/bitmap_character_instance.cpp 25 Sep 2006 15:17:42 -0000
1.1
@@ -0,0 +1,58 @@
+//
+// Copyright (C) 2005, 2006 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
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+//
+//
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "log.h"
+#include "bitmap_character_def.h"
+#include "bitmap_character_instance.h"
+#include "gnash.h" // for bitmap_info
+#include "smart_ptr.h"
+
+namespace gnash {
+
+gnash::bitmap_info*
+bitmap_character_instance::get_bitmap_info()
+{
+ // the definition will create a bitmap_info
+ // on demand, using the renderer
+ return _def->get_bitmap_info();
+}
+
+} // namespace gnash
Index: server/bitmap_character_instance.h
===================================================================
RCS file: server/bitmap_character_instance.h
diff -N server/bitmap_character_instance.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/bitmap_character_instance.h 25 Sep 2006 15:17:42 -0000 1.1
@@ -0,0 +1,85 @@
+//
+// Copyright (C) 2005, 2006 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
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+//
+//
+//
+
+#ifndef GNASH_BITMAP_CHARACTER_INSTANCE_H
+#define GNASH_BITMAP_CHARACTER_INSTANCE_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gnash.h" // for bitmap_info definition
+//#include "character.h" // for inheritance
+#include "generic_character.h" // for inheritance
+#include "bitmap_character_def.h" // for composition
+#include "smart_ptr.h"
+
+namespace gnash {
+
+
+/// Bitmap character instance
+class bitmap_character_instance : public generic_character
+{
+public:
+ bitmap_character_instance(bitmap_character_def* def,
+ character* parent, int id)
+ :
+ generic_character(def, parent, id),
+ _def(def)
+ {
+ }
+
+ gnash::bitmap_info* get_bitmap_info();
+
+private:
+
+ smart_ptr<bitmap_character_def> _def;
+
+};
+
+
+} // end namespace gnash
+
+
+#endif // GNASH_BITMAP_CHARACTER_INSTANCE_H
+
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:
Index: server/parser/.cvsignore
===================================================================
RCS file: server/parser/.cvsignore
diff -N server/parser/.cvsignore
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/parser/.cvsignore 25 Sep 2006 15:17:42 -0000 1.1
@@ -0,0 +1,6 @@
+Makefile
+Makefile.in
+.deps
+.libs
+*.lo
+*.la
Index: server/parser/bitmap_character_def.cpp
===================================================================
RCS file: server/parser/bitmap_character_def.cpp
diff -N server/parser/bitmap_character_def.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ server/parser/bitmap_character_def.cpp 25 Sep 2006 15:17:42 -0000
1.1
@@ -0,0 +1,89 @@
+//
+// Copyright (C) 2005, 2006 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
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+//
+//
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+// This needs to be included first for NetBSD systems or we get a weird
+// problem with pthread_t being defined too many times if we use any
+// STL containers.
+#ifdef HAVE_PTHREADS
+#include <pthread.h>
+#endif
+
+#include "bitmap_character_def.h"
+#include "bitmap_character_instance.h"
+#include "gnash.h" // for bitmap_info
+#include "render.h"
+
+#include <vector>
+#include <string>
+#include <cassert>
+
+using namespace std;
+
+namespace gnash {
+
+gnash::bitmap_info*
+bitmap_character_def::get_bitmap_info()
+{
+ if ( ! _bitmap_info.get_ptr() )
+ {
+ // Create our bitmap info, from our image.
+ if ( _image.type == 0 )
+ {
+ _bitmap_info =
gnash::render::create_bitmap_info_rgb(_image.rgb);
+ }
+ else
+ {
+ _bitmap_info =
gnash::render::create_bitmap_info_rgba(_image.rgba);
+ }
+ }
+ assert(_bitmap_info.get_ptr());
+ return _bitmap_info.get_ptr();
+}
+
+character*
+bitmap_character_def::create_character_instance(character* parent, int id)
+{
+ bitmap_character_instance* instance = new bitmap_character_instance(
+ this, parent, -1);
+ return instance;
+}
+
+} // namespace gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/Makefile.am server/gener...,
Sandro Santilli <=