Go to the documentation of this file.
19 #ifndef GNASH_SWF_PLACEOBJECT2TAG_H
20 #define GNASH_SWF_PLACEOBJECT2TAG_H
23 #include <boost/ptr_container/ptr_vector.hpp>
35 class movie_definition;
106 return m_has_flags2 & (HAS_CHARACTER_MASK | MOVE_MASK);
111 std::uint16_t
getID()
const {
return _id; }
112 const std::string&
getName()
const {
return m_name; }
118 bool hasClipDepth()
const {
return m_has_flags2 & HAS_CLIP_DEPTH_MASK; };
119 bool hasName()
const {
return m_has_flags2 & HAS_NAME_MASK; }
120 bool hasRatio()
const {
return m_has_flags2 & HAS_RATIO_MASK; }
121 bool hasCxform()
const {
return m_has_flags2 & HAS_CXFORM_MASK; }
122 bool hasMatrix()
const {
return m_has_flags2 & HAS_MATRIX_MASK; }
123 bool hasCharacter()
const {
return m_has_flags2 & HAS_CHARACTER_MASK; }
125 bool hasImage()
const {
return m_has_flags3 & HAS_IMAGE_MASK; }
128 return m_has_flags3 & HAS_CLASS_NAME_MASK;
132 return m_has_flags3 & HAS_BITMAP_CACHING_MASK;
136 return m_has_flags3 & HAS_BLEND_MODE_MASK;
140 return m_has_flags3 & HAS_FILTERS_MASK;
165 std::uint8_t m_has_flags2;
166 std::uint8_t m_has_flags3;
170 std::uint16_t _ratio;
174 std::uint8_t _blendMode;
185 enum has_flags2_mask_e
187 HAS_CLIP_ACTIONS_MASK = 1 << 7,
188 HAS_CLIP_DEPTH_MASK = 1 << 6,
189 HAS_NAME_MASK = 1 << 5,
190 HAS_RATIO_MASK = 1 << 4,
191 HAS_CXFORM_MASK = 1 << 3,
192 HAS_MATRIX_MASK = 1 << 2,
193 HAS_CHARACTER_MASK = 1 << 1,
197 enum has_flags3_mask_e
199 HAS_IMAGE_MASK = 1 << 4,
200 HAS_CLASS_NAME_MASK = 1 << 3,
201 HAS_BITMAP_CACHING_MASK = 1 << 2,
202 HAS_BLEND_MODE_MASK = 1 << 1,
203 HAS_FILTERS_MASK = 1 << 0
206 const movie_definition& _movie_def;
217 #endif // GNASH_SWF_PLACEOBJECT2TAG_H
SWFMatrix readSWFMatrix(SWFStream &in)
Read a SWFMatrix from input stream.
Definition: TypesParser.cpp:49
bool hasRatio() const
Definition: PlaceObject2Tag.h:120
bool hasClassName() const
Definition: PlaceObject2Tag.h:127
bool hasClipDepth() const
Definition: PlaceObject2Tag.h:118
bool hasCharacter() const
Definition: PlaceObject2Tag.h:123
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
TagType
SWF tag types. Symbolic names copied from Ming.
Definition: SWF.h:31
size_t arraySize(T(&)[N])
Get the size of an array without passing a pointer by mistake.
Definition: GnashAlgorithm.h:58
static const int staticDepthOffset
Definition: DisplayObject.h:205
@ LOAD
Definition: event_id.h:73
@ MOUSE_UP
Definition: event_id.h:77
@ i
Definition: GnashKey.h:155
#define LOG_ONCE(x)
Definition: log.h:49
#define _(String)
Definition: log.h:44
PlaceObject2Tag(const movie_definition &def)
Definition: PlaceObject2Tag.cpp:45
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
const EventHandlers & getEventHandlers() const
Definition: PlaceObject2Tag.h:115
@ ROLL_OVER
Definition: event_id.h:65
int _depth
Definition: DisplayListTag.h:63
bool hasBitmapCaching() const
Definition: PlaceObject2Tag.h:131
void executeState(MovieClip *m, DisplayList &dlist) const
Place/move/whatever our object in the given movie.
Definition: PlaceObject2Tag.cpp:458
~PlaceObject2Tag()
Definition: PlaceObject2Tag.cpp:480
@ m
Definition: GnashKey.h:159
bool hasBlendMode() const
Definition: PlaceObject2Tag.h:135
bool hasCxform() const
Definition: PlaceObject2Tag.h:121
std::uint16_t getID() const
Definition: PlaceObject2Tag.h:111
bool hasFilters() const
Definition: PlaceObject2Tag.h:139
@ PLACEOBJECT2
Definition: SWF.h:58
static int read(SWFStream &in, bool read_multiple, Filters *store)
Read one, possibly multiple filters from the stream, and push them into the vector store....
Definition: filter_factory.cpp:41
A MovieClip is a container for DisplayObjects.
Definition: MovieClip.h:84
#define UNUSED(x)
Definition: utility.h:113
static const int noClipDepthValue
Definition: DisplayObject.h:230
virtual int get_version() const =0
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:96
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
std::uint16_t getRatio() const
Definition: PlaceObject2Tag.h:109
A list of on-stage DisplayObjects, ordered by depth.
Definition: DisplayList.h:65
@ PLACEOBJECT
Definition: SWF.h:36
@ DRAG_OVER
Definition: event_id.h:67
@ r
Definition: GnashKey.h:164
@ ROLL_OUT
Definition: event_id.h:66
bool hasMatrix() const
Definition: PlaceObject2Tag.h:122
int getPlaceType() const
Definition: PlaceObject2Tag.h:105
DisplayList tag.
Definition: DisplayListTag.h:42
@ DATA
Definition: event_id.h:81
@ RELEASE
Definition: event_id.h:63
EventCode
The types of events that are handled by DisplayObjects.
Definition: event_id.h:58
unsigned long tell()
Return our current (byte) position in the input stream.
Definition: SWFStream.cpp:447
code
Definition: GnashKey.h:44
@ INVALID
Definition: GnashKey.h:45
int getClipDepth() const
Definition: PlaceObject2Tag.h:110
std::vector< std::unique_ptr< BitmapFilter > > Filters
Definition: filter_factory.h:32
@ UNLOAD
Definition: event_id.h:74
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
@ PRESS
Definition: event_id.h:62
Definition: SWFMatrix.h:54
const SWFMatrix & getMatrix() const
Definition: PlaceObject2Tag.h:113
SWFCxForm readCxFormRGBA(SWFStream &in)
Read a CxForm with alpha from the input stream.
Definition: TypesParser.cpp:354
unsigned long get_tag_end_position()
Return the file position of the end of the current tag.
Definition: SWFStream.cpp:497
SWF Tag PlaceObject (4) or PlaceObject2 (9)
Definition: PlaceObject2Tag.h:86
static void loader(SWFStream &in, TagType tag, movie_definition &m, const RunResources &r)
Definition: PlaceObject2Tag.cpp:485
#define IF_VERBOSE_PARSE(x)
Definition: log.h:378
void log_parse(StringType msg, Args... args)
Definition: log.h:313
boost::ptr_vector< swf_event > EventHandlers
Definition: PlaceObject2Tag.h:90
@ MOUSE_DOWN
Definition: event_id.h:76
@ KEY_DOWN
Definition: event_id.h:79
std::uint16_t read_u16()
Read a aligned unsigned 16-bit value from the stream.
Definition: SWFStream.cpp:332
SWFCxForm readCxFormRGB(SWFStream &in)
Read a RGB CxForm from the input stream.
Definition: TypesParser.cpp:322
@ INITIALIZE
Definition: event_id.h:72
@ CONSTRUCT
Definition: event_id.h:82
SWF stream wrapper class.
Definition: SWFStream.h:59
const std::string & getName() const
Definition: PlaceObject2Tag.h:112
bool hasName() const
Definition: PlaceObject2Tag.h:119
@ RELEASE_OUTSIDE
Definition: event_id.h:64
std::uint8_t getBlendMode() const
Get an associated blend mode.
Definition: PlaceObject2Tag.h:147
bool hasClipActions() const
Definition: PlaceObject2Tag.h:117
void ensureBytes(unsigned long needed)
Ensure the requested number of bytes are available for an aligned read in the currently opened tag.
Definition: SWFStream.cpp:50
@ ENTER_FRAME
Definition: event_id.h:75
@ SWF
Definition: GnashKey.h:331
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
const SWFCxForm & getCxform() const
Definition: PlaceObject2Tag.h:114
@ KEY_UP
Definition: event_id.h:80
@ MOUSE_MOVE
Definition: event_id.h:78
@ PLACEOBJECT3
Definition: SWF.h:100
void read(SWFStream &in, TagType tag)
Read SWF::PLACEOBJECT or SWF::PLACEOBJECT2.
Definition: PlaceObject2Tag.cpp:443
@ KEY_PRESS
Definition: event_id.h:69
boost::ptr_vector< action_buffer > ActionBuffers
Definition: PlaceObject2Tag.h:89
bool hasImage() const
Definition: PlaceObject2Tag.h:125
@ DRAG_OUT
Definition: event_id.h:68