/*************************************************************************
 * WARNING! This file was automatically generated by cpp-to-c (2009/03/08)
 * Avoid editing it since it is likely going to be overwritten.
 *************************************************************************/

/* src/misc/libsswf_c.c++ -- written by Alexis WILKE for Made to Order Software Corp. (c) 2006-2009 */

/*

Copyright (c) 2006-2009 Made to Order Software Corp.

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/

#include "sswf/libsswf_c.h"
#include "sswf/libsswf.h"

extern "C"
{

  /* Object: ErrorManager */
void sswf_error_manager_destroy(struct SSWF_ErrorManager *error_manager)
{
	delete reinterpret_cast<sswf::ErrorManager *>(error_manager);
}

struct SSWF_ErrorManager *sswf_error_manager_create()
{
	return reinterpret_cast<struct SSWF_ErrorManager *>(new sswf::ErrorManager);
}

void sswf_error_manager_reset(struct SSWF_ErrorManager *error_manager)
{
	reinterpret_cast<sswf::ErrorManager *>(error_manager)->Reset();
}

int sswf_error_manager_count(struct SSWF_ErrorManager *error_manager)
{
	return reinterpret_cast<sswf::ErrorManager *>(error_manager)->Count();
}

enum sswf_error_code_t sswf_error_manager_keep_first(enum sswf_error_code_t a, enum sswf_error_code_t b)
{
	return static_cast<enum sswf_error_code_t>(sswf::ErrorManager::KeepFirst(static_cast<sswf::ErrorManager::error_code_t>(a), static_cast<sswf::ErrorManager::error_code_t>(b)));
}

enum sswf_error_code_t sswf_error_manager_on_error(struct SSWF_ErrorManager *error_manager, enum sswf_error_code_t errcode, const char * message, va_list ap)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::ErrorManager *>(error_manager)->OnError(static_cast<sswf::ErrorManager::error_code_t>(errcode), message, ap));
}

  /* Object: Vectors */
void sswf_vectors_destroy(struct SSWF_Vectors *vectors)
{
	delete reinterpret_cast<sswf::Vectors *>(vectors);
}

struct SSWF_Vectors *sswf_vectors_create1()
{
	return reinterpret_cast<struct SSWF_Vectors *>(new sswf::Vectors);
}

struct SSWF_Vectors *sswf_vectors_create2(const struct SSWF_Vectors * vector)
{
	return reinterpret_cast<struct SSWF_Vectors *>(new sswf::Vectors(*reinterpret_cast<const sswf::Vectors *>(vector)));
}

struct SSWF_ItemBase * sswf_vectors_get(struct SSWF_Vectors *vectors, int index)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(reinterpret_cast<sswf::Vectors *>(vectors)->Get(index));
}

void sswf_vectors_set(struct SSWF_Vectors *vectors, int index, struct SSWF_ItemBase * vector)
{
	reinterpret_cast<sswf::Vectors *>(vectors)->Set(index, reinterpret_cast<sswf::ItemBase *>(vector));
}

void sswf_vectors_insert(struct SSWF_Vectors *vectors, int index, struct SSWF_ItemBase * vector)
{
	reinterpret_cast<sswf::Vectors *>(vectors)->Insert(index, reinterpret_cast<sswf::ItemBase *>(vector));
}

void sswf_vectors_set_size(struct SSWF_Vectors *vectors, int size)
{
	reinterpret_cast<sswf::Vectors *>(vectors)->SetSize(size);
}

int sswf_vectors_count(struct SSWF_Vectors *vectors)
{
	return reinterpret_cast<sswf::Vectors *>(vectors)->Count();
}

void sswf_vectors_empty(struct SSWF_Vectors *vectors)
{
	reinterpret_cast<sswf::Vectors *>(vectors)->Empty();
}

  /* Object: Data */
void sswf_data_destroy(struct SSWF_Data *data)
{
	delete reinterpret_cast<sswf::Data *>(data);
}

struct SSWF_Data *sswf_data_create()
{
	return reinterpret_cast<struct SSWF_Data *>(new sswf::Data);
}

void sswf_data_empty(struct SSWF_Data *data)
{
	reinterpret_cast<sswf::Data *>(data)->Empty();
}

void sswf_data_align(struct SSWF_Data *data)
{
	reinterpret_cast<sswf::Data *>(data)->Align();
}

void sswf_data_overwrite(struct SSWF_Data *data, size_t offset, const void * ptr, size_t size)
{
	reinterpret_cast<sswf::Data *>(data)->Overwrite(offset, ptr, size);
}

void sswf_data_overwrite_byte(struct SSWF_Data *data, size_t offset, char c)
{
	reinterpret_cast<sswf::Data *>(data)->OverwriteByte(offset, c);
}

void sswf_data_overwrite_short(struct SSWF_Data *data, size_t offset, short s)
{
	reinterpret_cast<sswf::Data *>(data)->OverwriteShort(offset, s);
}

void sswf_data_overwrite_long(struct SSWF_Data *data, size_t offset, long l)
{
	reinterpret_cast<sswf::Data *>(data)->OverwriteLong(offset, l);
}

void sswf_data_write(struct SSWF_Data *data, const void * ptr, size_t size)
{
	reinterpret_cast<sswf::Data *>(data)->Write(ptr, size);
}

void sswf_data_write_bits(struct SSWF_Data *data, long value, size_t bits)
{
	reinterpret_cast<sswf::Data *>(data)->WriteBits(value, bits);
}

void sswf_data_put_byte(struct SSWF_Data *data, char c)
{
	reinterpret_cast<sswf::Data *>(data)->PutByte(c);
}

void sswf_data_put_short(struct SSWF_Data *data, short s)
{
	reinterpret_cast<sswf::Data *>(data)->PutShort(s);
}

void sswf_data_put_long(struct SSWF_Data *data, long l)
{
	reinterpret_cast<sswf::Data *>(data)->PutLong(l);
}

void sswf_data_put_dlong(struct SSWF_Data *data, int64_t ll)
{
	reinterpret_cast<sswf::Data *>(data)->PutDLong(ll);
}

void sswf_data_put_short_float(struct SSWF_Data *data, float f)
{
	reinterpret_cast<sswf::Data *>(data)->PutShortFloat(f);
}

void sswf_data_put_long_float(struct SSWF_Data *data, float f)
{
	reinterpret_cast<sswf::Data *>(data)->PutLongFloat(f);
}

void sswf_data_put_double_float(struct SSWF_Data *data, double f)
{
	reinterpret_cast<sswf::Data *>(data)->PutDoubleFloat(f);
}

void sswf_data_put_string(struct SSWF_Data *data, const char * string)
{
	reinterpret_cast<sswf::Data *>(data)->PutString(string);
}

void sswf_data_append(struct SSWF_Data *data, const struct SSWF_Data * append)
{
	reinterpret_cast<sswf::Data *>(data)->Append(*reinterpret_cast<const sswf::Data *>(append));
}

void sswf_data_read(struct SSWF_Data *data, void ** ptr, size_t * size)
{
	reinterpret_cast<sswf::Data *>(data)->Read(*ptr, *size);
}

unsigned long sswf_data_byte_size(struct SSWF_Data *data)
{
	return reinterpret_cast<sswf::Data *>(data)->ByteSize();
}

unsigned long sswf_data_get_size(struct SSWF_Data *data)
{
	return reinterpret_cast<sswf::Data *>(data)->GetSize();
}

void sswf_data_set_size(struct SSWF_Data *data, unsigned long size)
{
	reinterpret_cast<sswf::Data *>(data)->SetSize(size);
}

  /* Object: SRectangle */
void sswf_srectangle_destroy(struct SSWF_SRectangle *srectangle)
{
	delete reinterpret_cast<sswf::SRectangle *>(srectangle);
}

struct SSWF_SRectangle *sswf_srectangle_create()
{
	return reinterpret_cast<struct SSWF_SRectangle *>(new sswf::SRectangle);
}

void sswf_srectangle_reset(struct SSWF_SRectangle *srectangle)
{
	reinterpret_cast<sswf::SRectangle *>(srectangle)->Reset();
}

void sswf_srectangle_set(struct SSWF_SRectangle *srectangle, long xmin, long xmax, long ymin, long ymax)
{
	reinterpret_cast<sswf::SRectangle *>(srectangle)->Set(xmin, xmax, ymin, ymax);
}

void sswf_srectangle_set_reorder(struct SSWF_SRectangle *srectangle, long xmin, long xmax, long ymin, long ymax)
{
	reinterpret_cast<sswf::SRectangle *>(srectangle)->SetReorder(xmin, xmax, ymin, ymax);
}

long sswf_srectangle_xmin(struct SSWF_SRectangle *srectangle)
{
	return reinterpret_cast<sswf::SRectangle *>(srectangle)->XMin();
}

long sswf_srectangle_xmax(struct SSWF_SRectangle *srectangle)
{
	return reinterpret_cast<sswf::SRectangle *>(srectangle)->XMax();
}

long sswf_srectangle_ymin(struct SSWF_SRectangle *srectangle)
{
	return reinterpret_cast<sswf::SRectangle *>(srectangle)->YMin();
}

long sswf_srectangle_ymax(struct SSWF_SRectangle *srectangle)
{
	return reinterpret_cast<sswf::SRectangle *>(srectangle)->YMax();
}

int sswf_srectangle_is_empty(struct SSWF_SRectangle *srectangle)
{
	return reinterpret_cast<sswf::SRectangle *>(srectangle)->IsEmpty();
}

void sswf_srectangle_save(struct SSWF_SRectangle *srectangle, struct SSWF_Data * data)
{
	reinterpret_cast<sswf::SRectangle *>(srectangle)->Save(*reinterpret_cast<sswf::Data *>(data));
}

  /* Object: Color */
void sswf_color_destroy(struct SSWF_Color *color)
{
	delete reinterpret_cast<sswf::Color *>(color);
}

struct SSWF_Color *sswf_color_create()
{
	return reinterpret_cast<struct SSWF_Color *>(new sswf::Color);
}

void sswf_color_reset(struct SSWF_Color *color)
{
	reinterpret_cast<sswf::Color *>(color)->Reset();
}

void sswf_color_set(struct SSWF_Color *color, unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
{
	reinterpret_cast<sswf::Color *>(color)->Set(red, green, blue, alpha);
}

unsigned char sswf_color_red(struct SSWF_Color *color)
{
	return reinterpret_cast<sswf::Color *>(color)->Red();
}

unsigned char sswf_color_green(struct SSWF_Color *color)
{
	return reinterpret_cast<sswf::Color *>(color)->Green();
}

unsigned char sswf_color_blue(struct SSWF_Color *color)
{
	return reinterpret_cast<sswf::Color *>(color)->Blue();
}

unsigned char sswf_color_alpha(struct SSWF_Color *color)
{
	return reinterpret_cast<sswf::Color *>(color)->Alpha();
}

void sswf_color_save(struct SSWF_Color *color, struct SSWF_Data * data, int save_alpha)
{
	reinterpret_cast<sswf::Color *>(color)->Save(*reinterpret_cast<sswf::Data *>(data), save_alpha != 0);
}

int sswf_color_is_solid(struct SSWF_Color *color)
{
	return reinterpret_cast<sswf::Color *>(color)->IsSolid();
}

int sswf_color_is_invisible(struct SSWF_Color *color)
{
	return reinterpret_cast<sswf::Color *>(color)->IsInvisible();
}

  /* Object: ColorTransform */
void sswf_color_transform_destroy(struct SSWF_ColorTransform *color_transform)
{
	delete reinterpret_cast<sswf::ColorTransform *>(color_transform);
}

struct SSWF_ColorTransform *sswf_color_transform_create()
{
	return reinterpret_cast<struct SSWF_ColorTransform *>(new sswf::ColorTransform);
}

void sswf_color_transform_reset(struct SSWF_ColorTransform *color_transform)
{
	reinterpret_cast<sswf::ColorTransform *>(color_transform)->Reset();
}

void sswf_color_transform_set_add(struct SSWF_ColorTransform *color_transform, double red, double green, double blue, double alpha)
{
	reinterpret_cast<sswf::ColorTransform *>(color_transform)->SetAdd(red, green, blue, alpha);
}

void sswf_color_transform_set_mult(struct SSWF_ColorTransform *color_transform, double red, double green, double blue, double alpha)
{
	reinterpret_cast<sswf::ColorTransform *>(color_transform)->SetMult(red, green, blue, alpha);
}

double sswf_color_transform_add_red(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->AddRed();
}

double sswf_color_transform_add_green(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->AddGreen();
}

double sswf_color_transform_add_blue(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->AddBlue();
}

double sswf_color_transform_add_alpha(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->AddAlpha();
}

double sswf_color_transform_mult_red(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->MultRed();
}

double sswf_color_transform_mult_green(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->MultGreen();
}

double sswf_color_transform_mult_blue(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->MultBlue();
}

double sswf_color_transform_mult_alpha(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->MultAlpha();
}

void sswf_color_transform_save(struct SSWF_ColorTransform *color_transform, struct SSWF_Data * data, int save_alpha)
{
	reinterpret_cast<sswf::ColorTransform *>(color_transform)->Save(*reinterpret_cast<sswf::Data *>(data), save_alpha != 0);
}

int sswf_color_transform_is_null(struct SSWF_ColorTransform *color_transform, int with_alpha)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->IsNull(with_alpha != 0);
}

int sswf_color_transform_is_solid_compatible(struct SSWF_ColorTransform *color_transform)
{
	return reinterpret_cast<sswf::ColorTransform *>(color_transform)->IsSolidCompatible();
}

  /* Object: Matrix */
void sswf_matrix_destroy(struct SSWF_Matrix *matrix)
{
	delete reinterpret_cast<sswf::Matrix *>(matrix);
}

struct SSWF_Matrix *sswf_matrix_create()
{
	return reinterpret_cast<struct SSWF_Matrix *>(new sswf::Matrix);
}

void sswf_matrix_reset(struct SSWF_Matrix *matrix)
{
	reinterpret_cast<sswf::Matrix *>(matrix)->Reset();
}

void sswf_matrix_set_scale1(struct SSWF_Matrix *matrix, double x, double y)
{
	reinterpret_cast<sswf::Matrix *>(matrix)->SetScale(x, y);
}

void sswf_matrix_set_scale2(struct SSWF_Matrix *matrix, double scale)
{
	reinterpret_cast<sswf::Matrix *>(matrix)->SetScale(scale);
}

void sswf_matrix_set_rotate(struct SSWF_Matrix *matrix, double rotate)
{
	reinterpret_cast<sswf::Matrix *>(matrix)->SetRotate(rotate);
}

void sswf_matrix_set_skew(struct SSWF_Matrix *matrix, double skew0, double skew1)
{
	reinterpret_cast<sswf::Matrix *>(matrix)->SetSkew(skew0, skew1);
}

void sswf_matrix_set_translate(struct SSWF_Matrix *matrix, long x, long y)
{
	reinterpret_cast<sswf::Matrix *>(matrix)->SetTranslate(x, y);
}

void sswf_matrix_save(struct SSWF_Matrix *matrix, struct SSWF_Data * data)
{
	reinterpret_cast<sswf::Matrix *>(matrix)->Save(*reinterpret_cast<sswf::Data *>(data));
}

int sswf_matrix_is_null(struct SSWF_Matrix *matrix)
{
	return reinterpret_cast<sswf::Matrix *>(matrix)->IsNull();
}

  /* Object: Envelope */
struct SSWF_ItemBase *sswf_envelope_cast_item_base(struct SSWF_Envelope *envelope)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::Envelope *>(envelope)));
}

void sswf_envelope_destroy(struct SSWF_Envelope *envelope)
{
	delete reinterpret_cast<sswf::Envelope *>(envelope);
}

struct SSWF_Envelope *sswf_envelope_create1(unsigned long p, unsigned short l, unsigned short r)
{
	return reinterpret_cast<struct SSWF_Envelope *>(new sswf::Envelope(p, l, r));
}

struct SSWF_Envelope *sswf_envelope_create2(const struct SSWF_Envelope * envelope)
{
	return reinterpret_cast<struct SSWF_Envelope *>(new sswf::Envelope(*reinterpret_cast<const sswf::Envelope *>(envelope)));
}

unsigned long sswf_envelope_position(struct SSWF_Envelope *envelope)
{
	return reinterpret_cast<sswf::Envelope *>(envelope)->Position();
}

unsigned short sswf_envelope_left(struct SSWF_Envelope *envelope)
{
	return reinterpret_cast<sswf::Envelope *>(envelope)->Left();
}

unsigned short sswf_envelope_right(struct SSWF_Envelope *envelope)
{
	return reinterpret_cast<sswf::Envelope *>(envelope)->Right();
}

void sswf_envelope_save(struct SSWF_Envelope *envelope, struct SSWF_Data * data)
{
	reinterpret_cast<sswf::Envelope *>(envelope)->Save(*reinterpret_cast<sswf::Data *>(data));
}

  /* Object: SoundInfo */
void sswf_sound_info_destroy(struct SSWF_SoundInfo *sound_info)
{
	delete reinterpret_cast<sswf::SoundInfo *>(sound_info);
}

struct SSWF_SoundInfo *sswf_sound_info_create(struct SSWF_ErrorManager * error_manager)
{
	return reinterpret_cast<struct SSWF_SoundInfo *>(new sswf::SoundInfo(*reinterpret_cast<sswf::ErrorManager *>(error_manager)));
}

void sswf_sound_info_set_sound_id(struct SSWF_SoundInfo *sound_info, sswf_id_t id)
{
	reinterpret_cast<sswf::SoundInfo *>(sound_info)->SetSoundID(id);
}

void sswf_sound_info_stop_sound(struct SSWF_SoundInfo *sound_info, int stop)
{
	reinterpret_cast<sswf::SoundInfo *>(sound_info)->StopSound(stop != 0);
}

void sswf_sound_info_no_multiple(struct SSWF_SoundInfo *sound_info, int no_multiple)
{
	reinterpret_cast<sswf::SoundInfo *>(sound_info)->NoMultiple(no_multiple != 0);
}

void sswf_sound_info_set_range(struct SSWF_SoundInfo *sound_info, unsigned long start, unsigned long end)
{
	reinterpret_cast<sswf::SoundInfo *>(sound_info)->SetRange(start, end);
}

void sswf_sound_info_set_loop(struct SSWF_SoundInfo *sound_info, unsigned short loop)
{
	reinterpret_cast<sswf::SoundInfo *>(sound_info)->SetLoop(loop);
}

void sswf_sound_info_add_envelope(struct SSWF_SoundInfo *sound_info, const struct SSWF_Envelope * envelope)
{
	reinterpret_cast<sswf::SoundInfo *>(sound_info)->AddEnvelope(*reinterpret_cast<const sswf::Envelope *>(envelope));
}

enum sswf_error_code_t sswf_sound_info_pre_save(struct SSWF_SoundInfo *sound_info)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::SoundInfo *>(sound_info)->PreSave());
}

void sswf_sound_info_save(struct SSWF_SoundInfo *sound_info, struct SSWF_Data * data)
{
	reinterpret_cast<sswf::SoundInfo *>(sound_info)->Save(*reinterpret_cast<sswf::Data *>(data));
}

  /* Object: BlendMode */
void sswf_blend_mode_destroy(struct SSWF_BlendMode *blend_mode)
{
	delete reinterpret_cast<sswf::BlendMode *>(blend_mode);
}

struct SSWF_BlendMode *sswf_blend_mode_create()
{
	return reinterpret_cast<struct SSWF_BlendMode *>(new sswf::BlendMode);
}

int sswf_blend_mode_has_blend_mode(struct SSWF_BlendMode *blend_mode)
{
	return reinterpret_cast<sswf::BlendMode *>(blend_mode)->HasBlendMode();
}

void sswf_blend_mode_set_blend_mode(struct SSWF_BlendMode *blend_mode, enum sswf_blend_mode_t blend_mode_value)
{
	reinterpret_cast<sswf::BlendMode *>(blend_mode)->SetBlendMode(static_cast<sswf::BlendMode::blend_mode_t>(blend_mode_value));
}

int sswf_blend_mode_set_blend_mode_by_name(struct SSWF_BlendMode *blend_mode, const char * blend_mode_name)
{
	return reinterpret_cast<sswf::BlendMode *>(blend_mode)->SetBlendModeByName(blend_mode_name);
}

enum sswf_blend_mode_t sswf_blend_mode_get_blend_mode(struct SSWF_BlendMode *blend_mode)
{
	return static_cast<enum sswf_blend_mode_t>(reinterpret_cast<sswf::BlendMode *>(blend_mode)->GetBlendMode());
}

void sswf_blend_mode_save(struct SSWF_BlendMode *blend_mode, struct SSWF_Data * data)
{
	reinterpret_cast<sswf::BlendMode *>(blend_mode)->Save(*reinterpret_cast<sswf::Data *>(data));
}

  /* Object: State */
struct SSWF_ItemBase *sswf_state_cast_item_base(struct SSWF_State *state)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::State *>(state)));
}

void sswf_state_destroy(struct SSWF_State *state)
{
	delete reinterpret_cast<sswf::State *>(state);
}

struct SSWF_State *sswf_state_create(struct SSWF_ErrorManager * error_manager)
{
	return reinterpret_cast<struct SSWF_State *>(new sswf::State(*reinterpret_cast<sswf::ErrorManager *>(error_manager)));
}

void sswf_state_reset(struct SSWF_State *state)
{
	reinterpret_cast<sswf::State *>(state)->Reset();
}

void sswf_state_set_object_id(struct SSWF_State *state, sswf_id_t id)
{
	reinterpret_cast<sswf::State *>(state)->SetObjectID(id);
}

int sswf_state_set_flags(struct SSWF_State *state, unsigned char flags)
{
	return reinterpret_cast<sswf::State *>(state)->SetFlags(flags);
}

void sswf_state_set_layer(struct SSWF_State *state, unsigned short layer)
{
	reinterpret_cast<sswf::State *>(state)->SetLayer(layer);
}

void sswf_state_set_matrix(struct SSWF_State *state, const struct SSWF_Matrix * matrix)
{
	reinterpret_cast<sswf::State *>(state)->SetMatrix(*reinterpret_cast<const sswf::Matrix *>(matrix));
}

void sswf_state_set_color_transform(struct SSWF_State *state, const struct SSWF_ColorTransform * color_transform)
{
	reinterpret_cast<sswf::State *>(state)->SetColorTransform(*reinterpret_cast<const sswf::ColorTransform *>(color_transform));
}

int sswf_state_has_color_transform(struct SSWF_State *state)
{
	return reinterpret_cast<sswf::State *>(state)->HasColorTransform();
}

void sswf_state_set_blend_mode(struct SSWF_State *state, const struct SSWF_BlendMode * blend_mode)
{
	reinterpret_cast<sswf::State *>(state)->SetBlendMode(*reinterpret_cast<const sswf::BlendMode *>(blend_mode));
}

enum sswf_error_code_t sswf_state_save(struct SSWF_State *state, struct SSWF_Data * data, int color_transform)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::State *>(state)->Save(*reinterpret_cast<sswf::Data *>(data), color_transform != 0));
}

unsigned char sswf_state_get_flags(struct SSWF_State *state)
{
	return reinterpret_cast<sswf::State *>(state)->GetFlags();
}

  /* Object: Event */
struct SSWF_ItemBase *sswf_event_cast_item_base(struct SSWF_Event *event)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::Event *>(event)));
}

void sswf_event_destroy(struct SSWF_Event *event)
{
	delete reinterpret_cast<sswf::Event *>(event);
}

struct SSWF_Event *sswf_event_create()
{
	return reinterpret_cast<struct SSWF_Event *>(new sswf::Event);
}

void sswf_event_reset(struct SSWF_Event *event)
{
	reinterpret_cast<sswf::Event *>(event)->Reset();
}

void sswf_event_set_events(struct SSWF_Event *event, unsigned long events)
{
	reinterpret_cast<sswf::Event *>(event)->SetEvents(events);
}

void sswf_event_set_key(struct SSWF_Event *event, unsigned char key)
{
	reinterpret_cast<sswf::Event *>(event)->SetKey(key);
}

unsigned long sswf_event_events(struct SSWF_Event *event)
{
	return reinterpret_cast<sswf::Event *>(event)->Events();
}

unsigned long sswf_event_conditions(struct SSWF_Event *event)
{
	return reinterpret_cast<sswf::Event *>(event)->Conditions();
}

unsigned char sswf_event_key(struct SSWF_Event *event)
{
	return reinterpret_cast<sswf::Event *>(event)->Key();
}

struct SSWF_Vectors * sswf_event_actions(struct SSWF_Event *event)
{
	return reinterpret_cast<struct SSWF_Vectors *>(&reinterpret_cast<sswf::Event *>(event)->Actions());
}

unsigned long sswf_event_string_to_events(const char * s)
{
	return sswf::Event::StringToEvents(s);
}

unsigned char sswf_event_string_to_key_code(const char * s)
{
	return sswf::Event::StringToKeyCode(s);
}

  /* Object: Style */
struct SSWF_ItemBase *sswf_style_cast_item_base(struct SSWF_Style *style)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::Style *>(style)));
}

void sswf_style_destroy(struct SSWF_Style *style)
{
	delete reinterpret_cast<sswf::Style *>(style);
}

struct SSWF_Style *sswf_style_create(struct SSWF_ErrorManager * error_manager)
{
	return reinterpret_cast<struct SSWF_Style *>(new sswf::Style(*reinterpret_cast<sswf::ErrorManager *>(error_manager)));
}

void sswf_style_reset(struct SSWF_Style *style)
{
	reinterpret_cast<sswf::Style *>(style)->Reset();
}

enum sswf_style_t sswf_style_type(struct SSWF_Style *style)
{
	return static_cast<enum sswf_style_t>(reinterpret_cast<sswf::Style *>(style)->Type());
}

signed char sswf_style_gradients(struct SSWF_Style *style)
{
	return reinterpret_cast<sswf::Style *>(style)->Gradients();
}

int sswf_style_has_morph(struct SSWF_Style *style)
{
	return reinterpret_cast<sswf::Style *>(style)->HasMorph();
}

int sswf_style_has_alpha(struct SSWF_Style *style)
{
	return reinterpret_cast<sswf::Style *>(style)->HasAlpha();
}

int sswf_style_has_hard_edges(struct SSWF_Style *style)
{
	return reinterpret_cast<sswf::Style *>(style)->HasHardEdges();
}

int sswf_style_set_type(struct SSWF_Style *style, enum sswf_style_t style_type)
{
	return reinterpret_cast<sswf::Style *>(style)->SetType(static_cast<sswf::Style::style_t>(style_type));
}

int sswf_style_set_line(struct SSWF_Style *style, int index, unsigned short width, const struct SSWF_Color * color)
{
	return reinterpret_cast<sswf::Style *>(style)->SetLine(index, width, *reinterpret_cast<const sswf::Color *>(color));
}

int sswf_style_set_line_caps(struct SSWF_Style *style, enum sswf_cap_t start, enum sswf_cap_t end)
{
	return reinterpret_cast<sswf::Style *>(style)->SetLineCaps(static_cast<sswf::Style::cap_t>(start), static_cast<sswf::Style::cap_t>(end));
}

int sswf_style_set_line_join(struct SSWF_Style *style, enum sswf_join_t join, float miter_limit_factor)
{
	return reinterpret_cast<sswf::Style *>(style)->SetLineJoin(static_cast<sswf::Style::join_t>(join), miter_limit_factor);
}

int sswf_style_set_line_scale(struct SSWF_Style *style, int horiz, int vert)
{
	return reinterpret_cast<sswf::Style *>(style)->SetLineScale(horiz != 0, vert != 0);
}

int sswf_style_set_line_pixel_hinting(struct SSWF_Style *style, int pixel_hinting)
{
	return reinterpret_cast<sswf::Style *>(style)->SetLinePixelHinting(pixel_hinting != 0);
}

int sswf_style_set_line_no_close(struct SSWF_Style *style, int no_close)
{
	return reinterpret_cast<sswf::Style *>(style)->SetLineNoClose(no_close != 0);
}

int sswf_style_set_line_fill_style(struct SSWF_Style *style, const struct SSWF_Style * fill_style)
{
	return reinterpret_cast<sswf::Style *>(style)->SetLineFillStyle(*reinterpret_cast<const sswf::Style *>(fill_style));
}

int sswf_style_set_color(struct SSWF_Style *style, int index, const struct SSWF_Color * color)
{
	return reinterpret_cast<sswf::Style *>(style)->SetColor(index, *reinterpret_cast<const sswf::Color *>(color));
}

int sswf_style_set_gradient(struct SSWF_Style *style, int index, int pos, const struct SSWF_Color * color)
{
	return reinterpret_cast<sswf::Style *>(style)->SetGradient(index, pos, *reinterpret_cast<const sswf::Color *>(color));
}

int sswf_style_set_gradient_modes(struct SSWF_Style *style, enum sswf_spread_t spread, enum sswf_interpolation_t interpolation)
{
	return reinterpret_cast<sswf::Style *>(style)->SetGradientModes(static_cast<sswf::Style::spread_t>(spread), static_cast<sswf::Style::interpolation_t>(interpolation));
}

int sswf_style_set_gradient_focal(struct SSWF_Style *style, float focal)
{
	return reinterpret_cast<sswf::Style *>(style)->SetGradientFocal(focal);
}

int sswf_style_set_matrix(struct SSWF_Style *style, int index, const struct SSWF_Matrix * matrix)
{
	return reinterpret_cast<sswf::Style *>(style)->SetMatrix(index, *reinterpret_cast<const sswf::Matrix *>(matrix));
}

int sswf_style_set_bitmap(struct SSWF_Style *style, sswf_id_t id_ref)
{
	return reinterpret_cast<sswf::Style *>(style)->SetBitmap(id_ref);
}

int sswf_style_set_clipping(struct SSWF_Style *style)
{
	return reinterpret_cast<sswf::Style *>(style)->SetClipping();
}

enum sswf_error_code_t sswf_style_save(struct SSWF_Style *style, struct SSWF_Data * data, int save_alpha, int save_morph)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::Style *>(style)->Save(*reinterpret_cast<sswf::Data *>(data), save_alpha != 0, save_morph != 0));
}

  /* Object: Edges */
struct SSWF_ItemBase *sswf_edges_cast_item_base(struct SSWF_Edges *edges)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::Edges *>(edges)));
}

void sswf_edges_destroy(struct SSWF_Edges *edges)
{
	delete reinterpret_cast<sswf::Edges *>(edges);
}

struct SSWF_Edges *sswf_edges_create()
{
	return reinterpret_cast<struct SSWF_Edges *>(new sswf::Edges);
}

void sswf_edges_set1(struct SSWF_Edges *edges, long x, long y)
{
	reinterpret_cast<sswf::Edges *>(edges)->Set(x, y);
}

void sswf_edges_set2(struct SSWF_Edges *edges, long x, long y, long ctrl_x, long ctrl_y)
{
	reinterpret_cast<sswf::Edges *>(edges)->Set(x, y, ctrl_x, ctrl_y);
}

void sswf_edges_set3(struct SSWF_Edges *edges, int index, long x, long y, long ctrl_x, long ctrl_y)
{
	reinterpret_cast<sswf::Edges *>(edges)->Set(index, x, y, ctrl_x, ctrl_y);
}

void sswf_edges_save(struct SSWF_Edges *edges, struct SSWF_Data * data, long * x, long * y)
{
	reinterpret_cast<sswf::Edges *>(edges)->Save(*reinterpret_cast<sswf::Data *>(data), *x, *y);
}

  /* Object: TagBase */
void sswf_tag_base_destroy(struct SSWF_TagBase *tag_base)
{
	delete reinterpret_cast<sswf::TagBase *>(tag_base);
}

enum sswf_error_code_t sswf_tag_base_save_string(struct SSWF_TagBase *tag_base, struct SSWF_Data * data, const char * string)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagBase *>(tag_base)->SaveString(*reinterpret_cast<sswf::Data *>(data), string));
}

int sswf_tag_base_save_tag(struct SSWF_Data * data, enum sswf_swf_tag_t tag, size_t size)
{
	return sswf::TagBase::SaveTag(*reinterpret_cast<sswf::Data *>(data), static_cast<sswf::TagBase::swf_tag_t>(tag), size);
}

long sswf_tag_base_sibit_size(long value)
{
	return sswf::TagBase::SIBitSize(value);
}

long sswf_tag_base_uibit_size(unsigned long value)
{
	return sswf::TagBase::UIBitSize(value);
}

long sswf_tag_base_double2_signed16(double value)
{
	return sswf::TagBase::Double2Signed16(value);
}

long sswf_tag_base_double2_signed(double value)
{
	return sswf::TagBase::Double2Signed(value);
}

double sswf_tag_base_signed2_double(long value)
{
	return sswf::TagBase::Signed2Double(value);
}

void sswf_tag_base_minimum_version(struct SSWF_TagBase *tag_base, unsigned char version)
{
	reinterpret_cast<sswf::TagBase *>(tag_base)->MinimumVersion(version);
}

unsigned char sswf_tag_base_version(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<sswf::TagBase *>(tag_base)->Version();
}

const char * sswf_tag_base_name(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<const char *>(reinterpret_cast<sswf::TagBase *>(tag_base)->Name());
}

const char * sswf_tag_base_label(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<const char *>(reinterpret_cast<sswf::TagBase *>(tag_base)->Label());
}

void sswf_tag_base_reset_frames(struct SSWF_TagBase *tag_base)
{
	reinterpret_cast<sswf::TagBase *>(tag_base)->ResetFrames();
}

void sswf_tag_base_show_frame(struct SSWF_TagBase *tag_base)
{
	reinterpret_cast<sswf::TagBase *>(tag_base)->ShowFrame();
}

sswf_frame_t sswf_tag_base_frame_count(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<sswf::TagBase *>(tag_base)->FrameCount();
}

sswf_frame_t sswf_tag_base_which_frame(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<sswf::TagBase *>(tag_base)->WhichFrame();
}

void sswf_tag_base_set_label(struct SSWF_TagBase *tag_base, const char * label)
{
	reinterpret_cast<sswf::TagBase *>(tag_base)->SetLabel(label);
}

struct SSWF_TagBase * sswf_tag_base_find_labelled_tag(struct SSWF_TagBase *tag_base, const char * label)
{
	return reinterpret_cast<struct SSWF_TagBase *>(reinterpret_cast<sswf::TagBase *>(tag_base)->FindLabelledTag(label));
}

struct SSWF_TagBase * sswf_tag_base_find_tag_with_id(struct SSWF_TagBase *tag_base, sswf_id_t id, int search_import)
{
	return reinterpret_cast<struct SSWF_TagBase *>(reinterpret_cast<sswf::TagBase *>(tag_base)->FindTagWithID(id, search_import != 0));
}

struct SSWF_TagBase * sswf_tag_base_children(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<struct SSWF_TagBase *>(reinterpret_cast<sswf::TagBase *>(tag_base)->Children());
}

struct SSWF_TagBase * sswf_tag_base_next(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<struct SSWF_TagBase *>(reinterpret_cast<sswf::TagBase *>(tag_base)->Next());
}

struct SSWF_TagBase * sswf_tag_base_previous(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<struct SSWF_TagBase *>(reinterpret_cast<sswf::TagBase *>(tag_base)->Previous());
}

struct SSWF_TagBase * sswf_tag_base_parent(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<struct SSWF_TagBase *>(reinterpret_cast<sswf::TagBase *>(tag_base)->Parent());
}

struct SSWF_TagHeader * sswf_tag_base_header(struct SSWF_TagBase *tag_base)
{
	return reinterpret_cast<struct SSWF_TagHeader *>(reinterpret_cast<sswf::TagBase *>(tag_base)->Header());
}

enum sswf_error_code_t sswf_tag_base_on_error(struct SSWF_TagBase *tag_base, enum sswf_error_code_t errcode, const char * message, va_list ap)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagBase *>(tag_base)->OnError(static_cast<sswf::ErrorManager::error_code_t>(errcode), message, ap));
}

  /* Object: TagHeader */
struct SSWF_TagBase *sswf_tag_header_cast_tag_base(struct SSWF_TagHeader *tag_header)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagHeader *>(tag_header)));
}

struct SSWF_ErrorManager *sswf_tag_header_cast_error_manager(struct SSWF_TagHeader *tag_header)
{
	return reinterpret_cast<struct SSWF_ErrorManager *>(static_cast<sswf::ErrorManager *>(reinterpret_cast<sswf::TagHeader *>(tag_header)));
}

void sswf_tag_header_destroy(struct SSWF_TagHeader *tag_header)
{
	delete reinterpret_cast<sswf::TagHeader *>(tag_header);
}

struct SSWF_TagHeader *sswf_tag_header_create()
{
	return reinterpret_cast<struct SSWF_TagHeader *>(new sswf::TagHeader);
}

enum sswf_error_code_t sswf_tag_header_save(struct SSWF_TagHeader *tag_header, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagHeader *>(tag_header)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

enum sswf_error_code_t sswf_tag_header_save_encoded_string(struct SSWF_TagHeader *tag_header, struct SSWF_Data * data, const char * string)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagHeader *>(tag_header)->SaveEncodedString(*reinterpret_cast<sswf::Data *>(data), string));
}

swf_type_t sswf_tag_header_type_flags(struct SSWF_TagHeader *tag_header)
{
	return reinterpret_cast<sswf::TagHeader *>(tag_header)->TypeFlags();
}

enum sswf_error_code_t sswf_tag_header_on_error(struct SSWF_TagHeader *tag_header, enum sswf_error_code_t errcode, const char * message, va_list ap)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagHeader *>(tag_header)->OnError(static_cast<sswf::ErrorManager::error_code_t>(errcode), message, ap));
}

sswf_id_t sswf_tag_header_next_id(struct SSWF_TagHeader *tag_header)
{
	return reinterpret_cast<sswf::TagHeader *>(tag_header)->NextID();
}

void sswf_tag_header_remove_id(struct SSWF_TagHeader *tag_header, sswf_id_t id)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->RemoveID(id);
}

unsigned char sswf_tag_header_version(struct SSWF_TagHeader *tag_header)
{
	return reinterpret_cast<sswf::TagHeader *>(tag_header)->Version();
}

void sswf_tag_header_set_version(struct SSWF_TagHeader *tag_header, unsigned char version)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetVersion(version);
}

void sswf_tag_header_set_minimum_version(struct SSWF_TagHeader *tag_header, unsigned char version)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetMinimumVersion(version);
}

void sswf_tag_header_set_maximum_version(struct SSWF_TagHeader *tag_header, unsigned char version)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetMaximumVersion(version);
}

void sswf_tag_header_set_compress(struct SSWF_TagHeader *tag_header, int compress)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetCompress(compress != 0);
}

void sswf_tag_header_set_auto_order(struct SSWF_TagHeader *tag_header, int auto_order)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetAutoOrder(auto_order != 0);
}

void sswf_tag_header_set_use_network(struct SSWF_TagHeader *tag_header, int use_network)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetUseNetwork(use_network != 0);
}

void sswf_tag_header_set_frame(struct SSWF_TagHeader *tag_header, const struct SSWF_SRectangle * rect)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetFrame(*reinterpret_cast<const sswf::SRectangle *>(rect));
}

const struct SSWF_SRectangle * sswf_tag_header_frame(struct SSWF_TagHeader *tag_header)
{
	return reinterpret_cast<const struct SSWF_SRectangle *>(&reinterpret_cast<sswf::TagHeader *>(tag_header)->Frame());
}

void sswf_tag_header_set_output_encoding(struct SSWF_TagHeader *tag_header, const char * encoding)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetOutputEncoding(encoding);
}

void sswf_tag_header_set_rate(struct SSWF_TagHeader *tag_header, float rate)
{
	reinterpret_cast<sswf::TagHeader *>(tag_header)->SetRate(rate);
}

float sswf_tag_header_rate(struct SSWF_TagHeader *tag_header)
{
	return reinterpret_cast<sswf::TagHeader *>(tag_header)->Rate();
}

  /* Object: Action */
struct SSWF_ItemBase *sswf_action_cast_item_base(struct SSWF_Action *action)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::Action *>(action)));
}

void sswf_action_destroy(struct SSWF_Action *action)
{
	delete reinterpret_cast<sswf::Action *>(action);
}

struct SSWF_Action *sswf_action_create(struct SSWF_TagBase * tag, enum sswf_action_t action)
{
	return reinterpret_cast<struct SSWF_Action *>(new sswf::Action(reinterpret_cast<sswf::TagBase *>(tag), static_cast<sswf::Action::action_t>(action)));
}

struct SSWF_Action * sswf_action_duplicate(struct SSWF_Action *action)
{
	return reinterpret_cast<struct SSWF_Action *>(reinterpret_cast<sswf::Action *>(action)->Duplicate());
}

unsigned long sswf_action_offset(struct SSWF_Action *action)
{
	return reinterpret_cast<sswf::Action *>(action)->Offset();
}

unsigned char sswf_action_version(struct SSWF_Action *action)
{
	return reinterpret_cast<sswf::Action *>(action)->Version();
}

enum sswf_error_code_t sswf_action_save(struct SSWF_Action *action, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::Action *>(action)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

struct SSWF_Vectors * sswf_action_sub_list(struct SSWF_Action *action)
{
	return reinterpret_cast<struct SSWF_Vectors *>(reinterpret_cast<sswf::Action *>(action)->SubList());
}

enum sswf_error_code_t sswf_action_save_list(struct SSWF_Action *action, const struct SSWF_Vectors * list, struct SSWF_Data * data, const struct SSWF_Vectors * extra)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::Action *>(action)->SaveList(reinterpret_cast<const sswf::Vectors *>(list), *reinterpret_cast<sswf::Data *>(data), reinterpret_cast<const sswf::Vectors *>(extra)));
}

int sswf_action_minimum_list_version(const struct SSWF_Vectors * list)
{
	return sswf::Action::MinimumListVersion(*reinterpret_cast<const sswf::Vectors *>(list));
}

int sswf_action_get_maximum_register(const struct SSWF_Vectors * list)
{
	return sswf::Action::GetMaximumRegister(*reinterpret_cast<const sswf::Vectors *>(list));
}

struct SSWF_ActionLabel * sswf_action_find_label(const struct SSWF_Vectors * list, const char * label)
{
	return reinterpret_cast<struct SSWF_ActionLabel *>(sswf::Action::FindLabel(*reinterpret_cast<const sswf::Vectors *>(list), label));
}

  /* Object: ActionBranch */
struct SSWF_Action *sswf_action_branch_cast_action(struct SSWF_ActionBranch *action_branch)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionBranch *>(action_branch)));
}

struct SSWF_ItemBase *sswf_action_branch_cast_item_base(struct SSWF_ActionBranch *action_branch)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionBranch *>(action_branch)));
}

void sswf_action_branch_destroy(struct SSWF_ActionBranch *action_branch)
{
	delete reinterpret_cast<sswf::ActionBranch *>(action_branch);
}

struct SSWF_ActionBranch *sswf_action_branch_create(struct SSWF_TagBase * tag, enum sswf_action_t action)
{
	return reinterpret_cast<struct SSWF_ActionBranch *>(new sswf::ActionBranch(reinterpret_cast<sswf::TagBase *>(tag), static_cast<sswf::Action::action_t>(action)));
}

void sswf_action_branch_set_label(struct SSWF_ActionBranch *action_branch, const char * label)
{
	reinterpret_cast<sswf::ActionBranch *>(action_branch)->SetLabel(label);
}

  /* Object: ActionCallFrame */
struct SSWF_Action *sswf_action_call_frame_cast_action(struct SSWF_ActionCallFrame *action_call_frame)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionCallFrame *>(action_call_frame)));
}

struct SSWF_ItemBase *sswf_action_call_frame_cast_item_base(struct SSWF_ActionCallFrame *action_call_frame)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionCallFrame *>(action_call_frame)));
}

void sswf_action_call_frame_destroy(struct SSWF_ActionCallFrame *action_call_frame)
{
	delete reinterpret_cast<sswf::ActionCallFrame *>(action_call_frame);
}

struct SSWF_ActionCallFrame *sswf_action_call_frame_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionCallFrame *>(new sswf::ActionCallFrame(reinterpret_cast<sswf::TagBase *>(tag)));
}

  /* Object: ActionDictionary */
struct SSWF_Action *sswf_action_dictionary_cast_action(struct SSWF_ActionDictionary *action_dictionary)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionDictionary *>(action_dictionary)));
}

struct SSWF_ItemBase *sswf_action_dictionary_cast_item_base(struct SSWF_ActionDictionary *action_dictionary)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionDictionary *>(action_dictionary)));
}

void sswf_action_dictionary_destroy(struct SSWF_ActionDictionary *action_dictionary)
{
	delete reinterpret_cast<sswf::ActionDictionary *>(action_dictionary);
}

struct SSWF_ActionDictionary *sswf_action_dictionary_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionDictionary *>(new sswf::ActionDictionary(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_dictionary_add_string(struct SSWF_ActionDictionary *action_dictionary, const char * string)
{
	reinterpret_cast<sswf::ActionDictionary *>(action_dictionary)->AddString(string);
}

  /* Object: ActionFunction */
struct SSWF_Action *sswf_action_function_cast_action(struct SSWF_ActionFunction *action_function)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionFunction *>(action_function)));
}

struct SSWF_ItemBase *sswf_action_function_cast_item_base(struct SSWF_ActionFunction *action_function)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionFunction *>(action_function)));
}

void sswf_action_function_destroy(struct SSWF_ActionFunction *action_function)
{
	delete reinterpret_cast<sswf::ActionFunction *>(action_function);
}

struct SSWF_ActionFunction *sswf_action_function_create(struct SSWF_TagBase * tag, enum sswf_action_t action)
{
	return reinterpret_cast<struct SSWF_ActionFunction *>(new sswf::ActionFunction(reinterpret_cast<sswf::TagBase *>(tag), static_cast<sswf::Action::action_t>(action)));
}

void sswf_action_function_set_name(struct SSWF_ActionFunction *action_function, const char * name)
{
	reinterpret_cast<sswf::ActionFunction *>(action_function)->SetName(name);
}

void sswf_action_function_set_registers_count(struct SSWF_ActionFunction *action_function, unsigned int count)
{
	reinterpret_cast<sswf::ActionFunction *>(action_function)->SetRegistersCount(count);
}

void sswf_action_function_add_parameter(struct SSWF_ActionFunction *action_function, const char * name, int register_number)
{
	reinterpret_cast<sswf::ActionFunction *>(action_function)->AddParameter(name, register_number);
}

void sswf_action_function_add_action(struct SSWF_ActionFunction *action_function, struct SSWF_Action * action)
{
	reinterpret_cast<sswf::ActionFunction *>(action_function)->AddAction(reinterpret_cast<sswf::Action *>(action));
}

struct SSWF_Vectors * sswf_action_function_sub_list(struct SSWF_ActionFunction *action_function)
{
	return reinterpret_cast<struct SSWF_Vectors *>(reinterpret_cast<sswf::ActionFunction *>(action_function)->SubList());
}

  /* Object: ActionGoto */
struct SSWF_Action *sswf_action_goto_cast_action(struct SSWF_ActionGoto *action_goto)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionGoto *>(action_goto)));
}

struct SSWF_ItemBase *sswf_action_goto_cast_item_base(struct SSWF_ActionGoto *action_goto)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionGoto *>(action_goto)));
}

void sswf_action_goto_destroy(struct SSWF_ActionGoto *action_goto)
{
	delete reinterpret_cast<sswf::ActionGoto *>(action_goto);
}

struct SSWF_ActionGoto *sswf_action_goto_create(struct SSWF_TagBase * tag, enum sswf_action_t action)
{
	return reinterpret_cast<struct SSWF_ActionGoto *>(new sswf::ActionGoto(reinterpret_cast<sswf::TagBase *>(tag), static_cast<sswf::Action::action_t>(action)));
}

void sswf_action_goto_set_frame_name(struct SSWF_ActionGoto *action_goto, const char * frame_name)
{
	reinterpret_cast<sswf::ActionGoto *>(action_goto)->SetFrameName(frame_name);
}

void sswf_action_goto_set_play(struct SSWF_ActionGoto *action_goto, int play)
{
	reinterpret_cast<sswf::ActionGoto *>(action_goto)->SetPlay(play != 0);
}

  /* Object: ActionLabel */
struct SSWF_Action *sswf_action_label_cast_action(struct SSWF_ActionLabel *action_label)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionLabel *>(action_label)));
}

struct SSWF_ItemBase *sswf_action_label_cast_item_base(struct SSWF_ActionLabel *action_label)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionLabel *>(action_label)));
}

void sswf_action_label_destroy(struct SSWF_ActionLabel *action_label)
{
	delete reinterpret_cast<sswf::ActionLabel *>(action_label);
}

struct SSWF_ActionLabel *sswf_action_label_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionLabel *>(new sswf::ActionLabel(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_label_set_label(struct SSWF_ActionLabel *action_label, const char * label)
{
	reinterpret_cast<sswf::ActionLabel *>(action_label)->SetLabel(label);
}

const char * sswf_action_label_get_label(struct SSWF_ActionLabel *action_label)
{
	return reinterpret_cast<const char *>(reinterpret_cast<sswf::ActionLabel *>(action_label)->GetLabel());
}

  /* Object: ActionPushData */
struct SSWF_Action *sswf_action_push_data_cast_action(struct SSWF_ActionPushData *action_push_data)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionPushData *>(action_push_data)));
}

struct SSWF_ItemBase *sswf_action_push_data_cast_item_base(struct SSWF_ActionPushData *action_push_data)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionPushData *>(action_push_data)));
}

void sswf_action_push_data_destroy(struct SSWF_ActionPushData *action_push_data)
{
	delete reinterpret_cast<sswf::ActionPushData *>(action_push_data);
}

struct SSWF_ActionPushData *sswf_action_push_data_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionPushData *>(new sswf::ActionPushData(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_push_data_add_empty_string(struct SSWF_ActionPushData *action_push_data)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddEmptyString();
}

void sswf_action_push_data_add_string(struct SSWF_ActionPushData *action_push_data, const char * string)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddString(string);
}

void sswf_action_push_data_add_true(struct SSWF_ActionPushData *action_push_data)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddTrue();
}

void sswf_action_push_data_add_false(struct SSWF_ActionPushData *action_push_data)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddFalse();
}

void sswf_action_push_data_add_boolean(struct SSWF_ActionPushData *action_push_data, int value)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddBoolean(value != 0);
}

void sswf_action_push_data_add_integer(struct SSWF_ActionPushData *action_push_data, long value)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddInteger(value);
}

void sswf_action_push_data_add_float(struct SSWF_ActionPushData *action_push_data, float value)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddFloat(value);
}

void sswf_action_push_data_add_double(struct SSWF_ActionPushData *action_push_data, double value)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddDouble(value);
}

void sswf_action_push_data_add_null(struct SSWF_ActionPushData *action_push_data)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddNull();
}

void sswf_action_push_data_add_lookup(struct SSWF_ActionPushData *action_push_data, unsigned short index)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddLookup(index);
}

void sswf_action_push_data_add_register(struct SSWF_ActionPushData *action_push_data, unsigned char reg_index)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddRegister(reg_index);
}

void sswf_action_push_data_add_undefined(struct SSWF_ActionPushData *action_push_data)
{
	reinterpret_cast<sswf::ActionPushData *>(action_push_data)->AddUndefined();
}

  /* Object: ActionSetTarget */
struct SSWF_Action *sswf_action_set_target_cast_action(struct SSWF_ActionSetTarget *action_set_target)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionSetTarget *>(action_set_target)));
}

struct SSWF_ItemBase *sswf_action_set_target_cast_item_base(struct SSWF_ActionSetTarget *action_set_target)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionSetTarget *>(action_set_target)));
}

void sswf_action_set_target_destroy(struct SSWF_ActionSetTarget *action_set_target)
{
	delete reinterpret_cast<sswf::ActionSetTarget *>(action_set_target);
}

struct SSWF_ActionSetTarget *sswf_action_set_target_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionSetTarget *>(new sswf::ActionSetTarget(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_set_target_set_target(struct SSWF_ActionSetTarget *action_set_target, const char * target)
{
	reinterpret_cast<sswf::ActionSetTarget *>(action_set_target)->SetTarget(target);
}

  /* Object: ActionStoreRegister */
struct SSWF_Action *sswf_action_store_register_cast_action(struct SSWF_ActionStoreRegister *action_store_register)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionStoreRegister *>(action_store_register)));
}

struct SSWF_ItemBase *sswf_action_store_register_cast_item_base(struct SSWF_ActionStoreRegister *action_store_register)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionStoreRegister *>(action_store_register)));
}

void sswf_action_store_register_destroy(struct SSWF_ActionStoreRegister *action_store_register)
{
	delete reinterpret_cast<sswf::ActionStoreRegister *>(action_store_register);
}

struct SSWF_ActionStoreRegister *sswf_action_store_register_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionStoreRegister *>(new sswf::ActionStoreRegister(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_store_register_set_register(struct SSWF_ActionStoreRegister *action_store_register, unsigned char reg)
{
	reinterpret_cast<sswf::ActionStoreRegister *>(action_store_register)->SetRegister(reg);
}

  /* Object: ActionStrictMode */
struct SSWF_Action *sswf_action_strict_mode_cast_action(struct SSWF_ActionStrictMode *action_strict_mode)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionStrictMode *>(action_strict_mode)));
}

struct SSWF_ItemBase *sswf_action_strict_mode_cast_item_base(struct SSWF_ActionStrictMode *action_strict_mode)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionStrictMode *>(action_strict_mode)));
}

void sswf_action_strict_mode_destroy(struct SSWF_ActionStrictMode *action_strict_mode)
{
	delete reinterpret_cast<sswf::ActionStrictMode *>(action_strict_mode);
}

struct SSWF_ActionStrictMode *sswf_action_strict_mode_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionStrictMode *>(new sswf::ActionStrictMode(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_strict_mode_set_strict(struct SSWF_ActionStrictMode *action_strict_mode, int strict)
{
	reinterpret_cast<sswf::ActionStrictMode *>(action_strict_mode)->SetStrict(strict != 0);
}

  /* Object: ActionTry */
struct SSWF_Action *sswf_action_try_cast_action(struct SSWF_ActionTry *action_try)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionTry *>(action_try)));
}

struct SSWF_ItemBase *sswf_action_try_cast_item_base(struct SSWF_ActionTry *action_try)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionTry *>(action_try)));
}

void sswf_action_try_destroy(struct SSWF_ActionTry *action_try)
{
	delete reinterpret_cast<sswf::ActionTry *>(action_try);
}

struct SSWF_ActionTry *sswf_action_try_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionTry *>(new sswf::ActionTry(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_try_add_try_action(struct SSWF_ActionTry *action_try, struct SSWF_Action * action)
{
	reinterpret_cast<sswf::ActionTry *>(action_try)->AddTryAction(reinterpret_cast<sswf::Action *>(action));
}

void sswf_action_try_add_catch_action(struct SSWF_ActionTry *action_try, struct SSWF_Action * action)
{
	reinterpret_cast<sswf::ActionTry *>(action_try)->AddCatchAction(reinterpret_cast<sswf::Action *>(action));
}

void sswf_action_try_add_finally_action(struct SSWF_ActionTry *action_try, struct SSWF_Action * action)
{
	reinterpret_cast<sswf::ActionTry *>(action_try)->AddFinallyAction(reinterpret_cast<sswf::Action *>(action));
}

void sswf_action_try_set_identifier1(struct SSWF_ActionTry *action_try, int register_number)
{
	reinterpret_cast<sswf::ActionTry *>(action_try)->SetIdentifier(register_number);
}

void sswf_action_try_set_identifier2(struct SSWF_ActionTry *action_try, const char * variable_name)
{
	reinterpret_cast<sswf::ActionTry *>(action_try)->SetIdentifier(variable_name);
}

struct SSWF_Vectors * sswf_action_try_sub_list_try(struct SSWF_ActionTry *action_try)
{
	return reinterpret_cast<struct SSWF_Vectors *>(reinterpret_cast<sswf::ActionTry *>(action_try)->SubListTry());
}

struct SSWF_Vectors * sswf_action_try_sub_list_catch(struct SSWF_ActionTry *action_try)
{
	return reinterpret_cast<struct SSWF_Vectors *>(reinterpret_cast<sswf::ActionTry *>(action_try)->SubListCatch());
}

struct SSWF_Vectors * sswf_action_try_sub_list_finally(struct SSWF_ActionTry *action_try)
{
	return reinterpret_cast<struct SSWF_Vectors *>(reinterpret_cast<sswf::ActionTry *>(action_try)->SubListFinally());
}

  /* Object: ActionURL */
struct SSWF_Action *sswf_action_url_cast_action(struct SSWF_ActionURL *action_url)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionURL *>(action_url)));
}

struct SSWF_ItemBase *sswf_action_url_cast_item_base(struct SSWF_ActionURL *action_url)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionURL *>(action_url)));
}

void sswf_action_url_destroy(struct SSWF_ActionURL *action_url)
{
	delete reinterpret_cast<sswf::ActionURL *>(action_url);
}

struct SSWF_ActionURL *sswf_action_url_create(struct SSWF_TagBase * tag, enum sswf_action_t action)
{
	return reinterpret_cast<struct SSWF_ActionURL *>(new sswf::ActionURL(reinterpret_cast<sswf::TagBase *>(tag), static_cast<sswf::Action::action_t>(action)));
}

void sswf_action_url_set_url(struct SSWF_ActionURL *action_url, const char * url, const char * target)
{
	reinterpret_cast<sswf::ActionURL *>(action_url)->SetURL(url, target);
}

void sswf_action_url_set_method(struct SSWF_ActionURL *action_url, enum sswf_url_method_t method)
{
	reinterpret_cast<sswf::ActionURL *>(action_url)->SetMethod(static_cast<sswf::ActionURL::url_method_t>(method));
}

  /* Object: ActionWaitForFrame */
struct SSWF_Action *sswf_action_wait_for_frame_cast_action(struct SSWF_ActionWaitForFrame *action_wait_for_frame)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionWaitForFrame *>(action_wait_for_frame)));
}

struct SSWF_ItemBase *sswf_action_wait_for_frame_cast_item_base(struct SSWF_ActionWaitForFrame *action_wait_for_frame)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionWaitForFrame *>(action_wait_for_frame)));
}

void sswf_action_wait_for_frame_destroy(struct SSWF_ActionWaitForFrame *action_wait_for_frame)
{
	delete reinterpret_cast<sswf::ActionWaitForFrame *>(action_wait_for_frame);
}

struct SSWF_ActionWaitForFrame *sswf_action_wait_for_frame_create(struct SSWF_TagBase * tag, enum sswf_action_t action)
{
	return reinterpret_cast<struct SSWF_ActionWaitForFrame *>(new sswf::ActionWaitForFrame(reinterpret_cast<sswf::TagBase *>(tag), static_cast<sswf::Action::action_t>(action)));
}

void sswf_action_wait_for_frame_set_frame_name(struct SSWF_ActionWaitForFrame *action_wait_for_frame, const char * name)
{
	reinterpret_cast<sswf::ActionWaitForFrame *>(action_wait_for_frame)->SetFrameName(name);
}

void sswf_action_wait_for_frame_add_action(struct SSWF_ActionWaitForFrame *action_wait_for_frame, struct SSWF_Action * action)
{
	reinterpret_cast<sswf::ActionWaitForFrame *>(action_wait_for_frame)->AddAction(reinterpret_cast<sswf::Action *>(action));
}

struct SSWF_Vectors * sswf_action_wait_for_frame_sub_list(struct SSWF_ActionWaitForFrame *action_wait_for_frame)
{
	return reinterpret_cast<struct SSWF_Vectors *>(reinterpret_cast<sswf::ActionWaitForFrame *>(action_wait_for_frame)->SubList());
}

  /* Object: ActionWith */
struct SSWF_Action *sswf_action_with_cast_action(struct SSWF_ActionWith *action_with)
{
	return reinterpret_cast<struct SSWF_Action *>(static_cast<sswf::Action *>(reinterpret_cast<sswf::ActionWith *>(action_with)));
}

struct SSWF_ItemBase *sswf_action_with_cast_item_base(struct SSWF_ActionWith *action_with)
{
	return reinterpret_cast<struct SSWF_ItemBase *>(static_cast<sswf::ItemBase *>(reinterpret_cast<sswf::ActionWith *>(action_with)));
}

void sswf_action_with_destroy(struct SSWF_ActionWith *action_with)
{
	delete reinterpret_cast<sswf::ActionWith *>(action_with);
}

struct SSWF_ActionWith *sswf_action_with_create(struct SSWF_TagBase * tag)
{
	return reinterpret_cast<struct SSWF_ActionWith *>(new sswf::ActionWith(reinterpret_cast<sswf::TagBase *>(tag)));
}

void sswf_action_with_add_action(struct SSWF_ActionWith *action_with, struct SSWF_Action * action)
{
	reinterpret_cast<sswf::ActionWith *>(action_with)->AddAction(reinterpret_cast<sswf::Action *>(action));
}

struct SSWF_Vectors * sswf_action_with_sub_list(struct SSWF_ActionWith *action_with)
{
	return reinterpret_cast<struct SSWF_Vectors *>(reinterpret_cast<sswf::ActionWith *>(action_with)->SubList());
}

  /* Object: TagDoAction */
struct SSWF_TagBase *sswf_tag_do_action_cast_tag_base(struct SSWF_TagDoAction *tag_do_action)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagDoAction *>(tag_do_action)));
}

void sswf_tag_do_action_destroy(struct SSWF_TagDoAction *tag_do_action)
{
	delete reinterpret_cast<sswf::TagDoAction *>(tag_do_action);
}

struct SSWF_TagDoAction *sswf_tag_do_action_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagDoAction *>(new sswf::TagDoAction(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_do_action_save(struct SSWF_TagDoAction *tag_do_action, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagDoAction *>(tag_do_action)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_do_action_type_flags(struct SSWF_TagDoAction *tag_do_action)
{
	return reinterpret_cast<sswf::TagDoAction *>(tag_do_action)->TypeFlags();
}

void sswf_tag_do_action_set_action(struct SSWF_TagDoAction *tag_do_action, const struct SSWF_Action * action)
{
	reinterpret_cast<sswf::TagDoAction *>(tag_do_action)->SetAction(*reinterpret_cast<const sswf::Action *>(action));
}

void sswf_tag_do_action_set_sprite(struct SSWF_TagDoAction *tag_do_action, sswf_id_t sprite)
{
	reinterpret_cast<sswf::TagDoAction *>(tag_do_action)->SetSprite(sprite);
}

struct SSWF_Vectors * sswf_tag_do_action_actions(struct SSWF_TagDoAction *tag_do_action)
{
	return reinterpret_cast<struct SSWF_Vectors *>(&reinterpret_cast<sswf::TagDoAction *>(tag_do_action)->Actions());
}

  /* Object: TagMetadata */
struct SSWF_TagBase *sswf_tag_metadata_cast_tag_base(struct SSWF_TagMetadata *tag_metadata)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagMetadata *>(tag_metadata)));
}

void sswf_tag_metadata_destroy(struct SSWF_TagMetadata *tag_metadata)
{
	delete reinterpret_cast<sswf::TagMetadata *>(tag_metadata);
}

struct SSWF_TagMetadata *sswf_tag_metadata_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagMetadata *>(new sswf::TagMetadata(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_metadata_save(struct SSWF_TagMetadata *tag_metadata, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_metadata_type_flags(struct SSWF_TagMetadata *tag_metadata)
{
	return reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->TypeFlags();
}

void sswf_tag_metadata_set_filename(struct SSWF_TagMetadata *tag_metadata, const char * filename)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetFilename(filename);
}

void sswf_tag_metadata_set_metadata(struct SSWF_TagMetadata *tag_metadata, const char * xml)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetMetadata(xml);
}

void sswf_tag_metadata_set_title(struct SSWF_TagMetadata *tag_metadata, const char * title)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetTitle(title);
}

void sswf_tag_metadata_set_description(struct SSWF_TagMetadata *tag_metadata, const char * description)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetDescription(description);
}

void sswf_tag_metadata_set_author(struct SSWF_TagMetadata *tag_metadata, const char * description)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetAuthor(description);
}

void sswf_tag_metadata_set_publisher(struct SSWF_TagMetadata *tag_metadata, const char * publisher)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetPublisher(publisher);
}

void sswf_tag_metadata_set_copyright(struct SSWF_TagMetadata *tag_metadata, const char * copyright)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetCopyright(copyright);
}

void sswf_tag_metadata_set_url(struct SSWF_TagMetadata *tag_metadata, const char * url)
{
	reinterpret_cast<sswf::TagMetadata *>(tag_metadata)->SetURL(url);
}

  /* Object: TagPlace */
struct SSWF_TagBase *sswf_tag_place_cast_tag_base(struct SSWF_TagPlace *tag_place)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagPlace *>(tag_place)));
}

void sswf_tag_place_destroy(struct SSWF_TagPlace *tag_place)
{
	delete reinterpret_cast<sswf::TagPlace *>(tag_place);
}

struct SSWF_TagPlace *sswf_tag_place_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagPlace *>(new sswf::TagPlace(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_place_save(struct SSWF_TagPlace *tag_place, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagPlace *>(tag_place)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_place_type_flags(struct SSWF_TagPlace *tag_place)
{
	return reinterpret_cast<sswf::TagPlace *>(tag_place)->TypeFlags();
}

void sswf_tag_place_set_object_id(struct SSWF_TagPlace *tag_place, sswf_id_t id)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetObjectID(id);
}

void sswf_tag_place_set_depth(struct SSWF_TagPlace *tag_place, int depth)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetDepth(depth);
}

void sswf_tag_place_set_clip(struct SSWF_TagPlace *tag_place, int depth)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetClip(depth);
}

void sswf_tag_place_set_matrix(struct SSWF_TagPlace *tag_place, const struct SSWF_Matrix * matrix)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetMatrix(*reinterpret_cast<const sswf::Matrix *>(matrix));
}

void sswf_tag_place_set_color_transform(struct SSWF_TagPlace *tag_place, const struct SSWF_ColorTransform * color_transform)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetColorTransform(*reinterpret_cast<const sswf::ColorTransform *>(color_transform));
}

void sswf_tag_place_set_name(struct SSWF_TagPlace *tag_place, const char * name)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetName(name);
}

void sswf_tag_place_set_morph_position(struct SSWF_TagPlace *tag_place, int position)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetMorphPosition(position);
}

void sswf_tag_place_set_blend_mode(struct SSWF_TagPlace *tag_place, const struct SSWF_BlendMode * blend_mode)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetBlendMode(*reinterpret_cast<const sswf::BlendMode *>(blend_mode));
}

void sswf_tag_place_set_bitmap_caching(struct SSWF_TagPlace *tag_place, int bitmap_caching)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->SetBitmapCaching(bitmap_caching);
}

void sswf_tag_place_replace(struct SSWF_TagPlace *tag_place)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->Replace();
}

void sswf_tag_place_place(struct SSWF_TagPlace *tag_place)
{
	reinterpret_cast<sswf::TagPlace *>(tag_place)->Place();
}

int sswf_tag_place_add_event(struct SSWF_TagPlace *tag_place, struct SSWF_Event * event)
{
	return reinterpret_cast<sswf::TagPlace *>(tag_place)->AddEvent(reinterpret_cast<sswf::Event *>(event));
}

  /* Object: TagRemove */
struct SSWF_TagBase *sswf_tag_remove_cast_tag_base(struct SSWF_TagRemove *tag_remove)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagRemove *>(tag_remove)));
}

void sswf_tag_remove_destroy(struct SSWF_TagRemove *tag_remove)
{
	delete reinterpret_cast<sswf::TagRemove *>(tag_remove);
}

struct SSWF_TagRemove *sswf_tag_remove_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagRemove *>(new sswf::TagRemove(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_remove_save(struct SSWF_TagRemove *tag_remove, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagRemove *>(tag_remove)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_remove_type_flags(struct SSWF_TagRemove *tag_remove)
{
	return reinterpret_cast<sswf::TagRemove *>(tag_remove)->TypeFlags();
}

void sswf_tag_remove_set_depth(struct SSWF_TagRemove *tag_remove, int depth)
{
	reinterpret_cast<sswf::TagRemove *>(tag_remove)->SetDepth(depth);
}

void sswf_tag_remove_set_object_id(struct SSWF_TagRemove *tag_remove, sswf_id_t id)
{
	reinterpret_cast<sswf::TagRemove *>(tag_remove)->SetObjectID(id);
}

  /* Object: TagSceneFrameData */
struct SSWF_TagBase *sswf_tag_scene_frame_data_cast_tag_base(struct SSWF_TagSceneFrameData *tag_scene_frame_data)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagSceneFrameData *>(tag_scene_frame_data)));
}

void sswf_tag_scene_frame_data_destroy(struct SSWF_TagSceneFrameData *tag_scene_frame_data)
{
	delete reinterpret_cast<sswf::TagSceneFrameData *>(tag_scene_frame_data);
}

struct SSWF_TagSceneFrameData *sswf_tag_scene_frame_data_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagSceneFrameData *>(new sswf::TagSceneFrameData(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_scene_frame_data_save(struct SSWF_TagSceneFrameData *tag_scene_frame_data, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagSceneFrameData *>(tag_scene_frame_data)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_scene_frame_data_type_flags(struct SSWF_TagSceneFrameData *tag_scene_frame_data)
{
	return reinterpret_cast<sswf::TagSceneFrameData *>(tag_scene_frame_data)->TypeFlags();
}

int sswf_tag_scene_frame_data_set_file_data(struct SSWF_TagSceneFrameData *tag_scene_frame_data, const char * filename)
{
	return reinterpret_cast<sswf::TagSceneFrameData *>(tag_scene_frame_data)->SetFileData(filename);
}

void sswf_tag_scene_frame_data_set_scene_frame_data(struct SSWF_TagSceneFrameData *tag_scene_frame_data, const char * data, size_t size)
{
	reinterpret_cast<sswf::TagSceneFrameData *>(tag_scene_frame_data)->SetSceneFrameData(data, size);
}

  /* Object: TagScriptLimits */
struct SSWF_TagBase *sswf_tag_script_limits_cast_tag_base(struct SSWF_TagScriptLimits *tag_script_limits)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits)));
}

void sswf_tag_script_limits_destroy(struct SSWF_TagScriptLimits *tag_script_limits)
{
	delete reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits);
}

struct SSWF_TagScriptLimits *sswf_tag_script_limits_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagScriptLimits *>(new sswf::TagScriptLimits(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_script_limits_save(struct SSWF_TagScriptLimits *tag_script_limits, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_script_limits_type_flags(struct SSWF_TagScriptLimits *tag_script_limits)
{
	return reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits)->TypeFlags();
}

void sswf_tag_script_limits_set_max_recursion_depth(struct SSWF_TagScriptLimits *tag_script_limits, int depth)
{
	reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits)->SetMaxRecursionDepth(depth);
}

void sswf_tag_script_limits_set_timeout_seconds(struct SSWF_TagScriptLimits *tag_script_limits, int timeout)
{
	reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits)->SetTimeoutSeconds(timeout);
}

int sswf_tag_script_limits_get_max_recursion_depth(struct SSWF_TagScriptLimits *tag_script_limits)
{
	return reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits)->GetMaxRecursionDepth();
}

int sswf_tag_script_limits_get_timeout_seconds(struct SSWF_TagScriptLimits *tag_script_limits)
{
	return reinterpret_cast<sswf::TagScriptLimits *>(tag_script_limits)->GetTimeoutSeconds();
}

  /* Object: TagSetTabIndex */
struct SSWF_TagBase *sswf_tag_set_tab_index_cast_tag_base(struct SSWF_TagSetTabIndex *tag_set_tab_index)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index)));
}

void sswf_tag_set_tab_index_destroy(struct SSWF_TagSetTabIndex *tag_set_tab_index)
{
	delete reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index);
}

struct SSWF_TagSetTabIndex *sswf_tag_set_tab_index_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagSetTabIndex *>(new sswf::TagSetTabIndex(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_set_tab_index_save(struct SSWF_TagSetTabIndex *tag_set_tab_index, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_set_tab_index_type_flags(struct SSWF_TagSetTabIndex *tag_set_tab_index)
{
	return reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index)->TypeFlags();
}

void sswf_tag_set_tab_index_set_depth(struct SSWF_TagSetTabIndex *tag_set_tab_index, int depth)
{
	reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index)->SetDepth(depth);
}

void sswf_tag_set_tab_index_set_index(struct SSWF_TagSetTabIndex *tag_set_tab_index, int timeout)
{
	reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index)->SetIndex(timeout);
}

int sswf_tag_set_tab_index_get_depth(struct SSWF_TagSetTabIndex *tag_set_tab_index)
{
	return reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index)->GetDepth();
}

int sswf_tag_set_tab_index_get_index(struct SSWF_TagSetTabIndex *tag_set_tab_index)
{
	return reinterpret_cast<sswf::TagSetTabIndex *>(tag_set_tab_index)->GetIndex();
}

  /* Object: TagSetBackgroundColor */
struct SSWF_TagBase *sswf_tag_set_background_color_cast_tag_base(struct SSWF_TagSetBackgroundColor *tag_set_background_color)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagSetBackgroundColor *>(tag_set_background_color)));
}

void sswf_tag_set_background_color_destroy(struct SSWF_TagSetBackgroundColor *tag_set_background_color)
{
	delete reinterpret_cast<sswf::TagSetBackgroundColor *>(tag_set_background_color);
}

struct SSWF_TagSetBackgroundColor *sswf_tag_set_background_color_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagSetBackgroundColor *>(new sswf::TagSetBackgroundColor(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_set_background_color_save(struct SSWF_TagSetBackgroundColor *tag_set_background_color, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagSetBackgroundColor *>(tag_set_background_color)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_set_background_color_type_flags(struct SSWF_TagSetBackgroundColor *tag_set_background_color)
{
	return reinterpret_cast<sswf::TagSetBackgroundColor *>(tag_set_background_color)->TypeFlags();
}

void sswf_tag_set_background_color_set_color(struct SSWF_TagSetBackgroundColor *tag_set_background_color, struct SSWF_Color * color)
{
	reinterpret_cast<sswf::TagSetBackgroundColor *>(tag_set_background_color)->SetColor(*reinterpret_cast<sswf::Color *>(color));
}

struct SSWF_Color * sswf_tag_set_background_color_get_color(struct SSWF_TagSetBackgroundColor *tag_set_background_color)
{
	return reinterpret_cast<struct SSWF_Color *>(&reinterpret_cast<sswf::TagSetBackgroundColor *>(tag_set_background_color)->GetColor());
}

  /* Object: TagShowFrame */
struct SSWF_TagBase *sswf_tag_show_frame_cast_tag_base(struct SSWF_TagShowFrame *tag_show_frame)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagShowFrame *>(tag_show_frame)));
}

void sswf_tag_show_frame_destroy(struct SSWF_TagShowFrame *tag_show_frame)
{
	delete reinterpret_cast<sswf::TagShowFrame *>(tag_show_frame);
}

struct SSWF_TagShowFrame *sswf_tag_show_frame_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagShowFrame *>(new sswf::TagShowFrame(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_show_frame_save(struct SSWF_TagShowFrame *tag_show_frame, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShowFrame *>(tag_show_frame)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_show_frame_type_flags(struct SSWF_TagShowFrame *tag_show_frame)
{
	return reinterpret_cast<sswf::TagShowFrame *>(tag_show_frame)->TypeFlags();
}

  /* Object: TagEnd */
struct SSWF_TagBase *sswf_tag_end_cast_tag_base(struct SSWF_TagEnd *tag_end)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagEnd *>(tag_end)));
}

void sswf_tag_end_destroy(struct SSWF_TagEnd *tag_end)
{
	delete reinterpret_cast<sswf::TagEnd *>(tag_end);
}

struct SSWF_TagEnd *sswf_tag_end_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagEnd *>(new sswf::TagEnd(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_end_save(struct SSWF_TagEnd *tag_end, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagEnd *>(tag_end)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_end_type_flags(struct SSWF_TagEnd *tag_end)
{
	return reinterpret_cast<sswf::TagEnd *>(tag_end)->TypeFlags();
}

  /* Object: TagFrameLabel */
struct SSWF_TagBase *sswf_tag_frame_label_cast_tag_base(struct SSWF_TagFrameLabel *tag_frame_label)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagFrameLabel *>(tag_frame_label)));
}

void sswf_tag_frame_label_destroy(struct SSWF_TagFrameLabel *tag_frame_label)
{
	delete reinterpret_cast<sswf::TagFrameLabel *>(tag_frame_label);
}

struct SSWF_TagFrameLabel *sswf_tag_frame_label_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagFrameLabel *>(new sswf::TagFrameLabel(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_frame_label_save(struct SSWF_TagFrameLabel *tag_frame_label, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagFrameLabel *>(tag_frame_label)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_frame_label_type_flags(struct SSWF_TagFrameLabel *tag_frame_label)
{
	return reinterpret_cast<sswf::TagFrameLabel *>(tag_frame_label)->TypeFlags();
}

void sswf_tag_frame_label_set_frame_label(struct SSWF_TagFrameLabel *tag_frame_label, const char * label)
{
	reinterpret_cast<sswf::TagFrameLabel *>(tag_frame_label)->SetFrameLabel(label);
}

  /* Object: TagExport */
struct SSWF_TagBase *sswf_tag_export_cast_tag_base(struct SSWF_TagExport *tag_export)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagExport *>(tag_export)));
}

void sswf_tag_export_destroy(struct SSWF_TagExport *tag_export)
{
	delete reinterpret_cast<sswf::TagExport *>(tag_export);
}

struct SSWF_TagExport *sswf_tag_export_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagExport *>(new sswf::TagExport(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_export_save(struct SSWF_TagExport *tag_export, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagExport *>(tag_export)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_export_type_flags(struct SSWF_TagExport *tag_export)
{
	return reinterpret_cast<sswf::TagExport *>(tag_export)->TypeFlags();
}

void sswf_tag_export_set_object(struct SSWF_TagExport *tag_export, sswf_id_t id, const char * name, const char * used_glyphs)
{
	reinterpret_cast<sswf::TagExport *>(tag_export)->SetObject(id, name, used_glyphs);
}

  /* Object: TagImport */
struct SSWF_TagBase *sswf_tag_import_cast_tag_base(struct SSWF_TagImport *tag_import)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagImport *>(tag_import)));
}

void sswf_tag_import_destroy(struct SSWF_TagImport *tag_import)
{
	delete reinterpret_cast<sswf::TagImport *>(tag_import);
}

struct SSWF_TagImport *sswf_tag_import_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagImport *>(new sswf::TagImport(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_import_save(struct SSWF_TagImport *tag_import, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagImport *>(tag_import)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_import_type_flags(struct SSWF_TagImport *tag_import)
{
	return reinterpret_cast<sswf::TagImport *>(tag_import)->TypeFlags();
}

const char * sswf_tag_import_has_id(struct SSWF_TagImport *tag_import, sswf_id_t id)
{
	return reinterpret_cast<const char *>(reinterpret_cast<sswf::TagImport *>(tag_import)->HasID(id));
}

sswf_id_t sswf_tag_import_has_name(struct SSWF_TagImport *tag_import, const char * name)
{
	return reinterpret_cast<sswf::TagImport *>(tag_import)->HasName(name);
}

void sswf_tag_import_set_url(struct SSWF_TagImport *tag_import, const char * url)
{
	reinterpret_cast<sswf::TagImport *>(tag_import)->SetURL(url);
}

void sswf_tag_import_set_filename(struct SSWF_TagImport *tag_import, const char * filename)
{
	reinterpret_cast<sswf::TagImport *>(tag_import)->SetFilename(filename);
}

void sswf_tag_import_add_name(struct SSWF_TagImport *tag_import, const char * name, const char * type)
{
	reinterpret_cast<sswf::TagImport *>(tag_import)->AddName(name, type);
}

  /* Object: TagProtect */
struct SSWF_TagBase *sswf_tag_protect_cast_tag_base(struct SSWF_TagProtect *tag_protect)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagProtect *>(tag_protect)));
}

void sswf_tag_protect_destroy(struct SSWF_TagProtect *tag_protect)
{
	delete reinterpret_cast<sswf::TagProtect *>(tag_protect);
}

struct SSWF_TagProtect *sswf_tag_protect_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagProtect *>(new sswf::TagProtect(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_protect_save(struct SSWF_TagProtect *tag_protect, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagProtect *>(tag_protect)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_protect_type_flags(struct SSWF_TagProtect *tag_protect)
{
	return reinterpret_cast<sswf::TagProtect *>(tag_protect)->TypeFlags();
}

void sswf_tag_protect_set_password(struct SSWF_TagProtect *tag_protect, const char * password)
{
	reinterpret_cast<sswf::TagProtect *>(tag_protect)->SetPassword(password);
}

void sswf_tag_protect_set_encoded_password(struct SSWF_TagProtect *tag_protect, const char * password)
{
	reinterpret_cast<sswf::TagProtect *>(tag_protect)->SetEncodedPassword(password);
}

  /* Object: TagProductInfo */
struct SSWF_TagBase *sswf_tag_product_info_cast_tag_base(struct SSWF_TagProductInfo *tag_product_info)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)));
}

void sswf_tag_product_info_destroy(struct SSWF_TagProductInfo *tag_product_info)
{
	delete reinterpret_cast<sswf::TagProductInfo *>(tag_product_info);
}

struct SSWF_TagProductInfo *sswf_tag_product_info_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagProductInfo *>(new sswf::TagProductInfo(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_product_info_save(struct SSWF_TagProductInfo *tag_product_info, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_product_info_type_flags(struct SSWF_TagProductInfo *tag_product_info)
{
	return reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)->TypeFlags();
}

void sswf_tag_product_info_set_product(struct SSWF_TagProductInfo *tag_product_info, long product_id)
{
	reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)->SetProduct(product_id);
}

void sswf_tag_product_info_set_edition(struct SSWF_TagProductInfo *tag_product_info, long edition)
{
	reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)->SetEdition(edition);
}

void sswf_tag_product_info_set_version(struct SSWF_TagProductInfo *tag_product_info, int major, int minor)
{
	reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)->SetVersion(major, minor);
}

void sswf_tag_product_info_set_build(struct SSWF_TagProductInfo *tag_product_info, int64_t build_number)
{
	reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)->SetBuild(build_number);
}

void sswf_tag_product_info_set_compile_date(struct SSWF_TagProductInfo *tag_product_info, int64_t date)
{
	reinterpret_cast<sswf::TagProductInfo *>(tag_product_info)->SetCompileDate(date);
}

  /* Object: TagInfo */
struct SSWF_TagBase *sswf_tag_info_cast_tag_base(struct SSWF_TagInfo *tag_info)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagInfo *>(tag_info)));
}

void sswf_tag_info_destroy(struct SSWF_TagInfo *tag_info)
{
	delete reinterpret_cast<sswf::TagInfo *>(tag_info);
}

struct SSWF_TagInfo *sswf_tag_info_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagInfo *>(new sswf::TagInfo(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_info_save(struct SSWF_TagInfo *tag_info, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagInfo *>(tag_info)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_info_type_flags(struct SSWF_TagInfo *tag_info)
{
	return reinterpret_cast<sswf::TagInfo *>(tag_info)->TypeFlags();
}

void sswf_tag_info_set_info(struct SSWF_TagInfo *tag_info, const char * info)
{
	reinterpret_cast<sswf::TagInfo *>(tag_info)->SetInfo(info);
}

void sswf_tag_info_set_version(struct SSWF_TagInfo *tag_info, long version)
{
	reinterpret_cast<sswf::TagInfo *>(tag_info)->SetVersion(version);
}

  /* Object: TagStartSound */
struct SSWF_TagBase *sswf_tag_start_sound_cast_tag_base(struct SSWF_TagStartSound *tag_start_sound)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagStartSound *>(tag_start_sound)));
}

void sswf_tag_start_sound_destroy(struct SSWF_TagStartSound *tag_start_sound)
{
	delete reinterpret_cast<sswf::TagStartSound *>(tag_start_sound);
}

struct SSWF_TagStartSound *sswf_tag_start_sound_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagStartSound *>(new sswf::TagStartSound(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_start_sound_save(struct SSWF_TagStartSound *tag_start_sound, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagStartSound *>(tag_start_sound)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_start_sound_type_flags(struct SSWF_TagStartSound *tag_start_sound)
{
	return reinterpret_cast<sswf::TagStartSound *>(tag_start_sound)->TypeFlags();
}

void sswf_tag_start_sound_set_info(struct SSWF_TagStartSound *tag_start_sound, struct SSWF_SoundInfo * sound_info)
{
	reinterpret_cast<sswf::TagStartSound *>(tag_start_sound)->SetInfo(reinterpret_cast<sswf::SoundInfo *>(sound_info));
}

  /* Object: TagScalingGrid */
void sswf_tag_scaling_grid_destroy(struct SSWF_TagScalingGrid *tag_scaling_grid)
{
	delete reinterpret_cast<sswf::TagScalingGrid *>(tag_scaling_grid);
}

enum sswf_error_code_t sswf_tag_scaling_grid_grid_save(struct SSWF_TagScalingGrid *tag_scaling_grid, struct SSWF_Data * data, sswf_id_t id)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagScalingGrid *>(tag_scaling_grid)->GridSave(*reinterpret_cast<sswf::Data *>(data), id));
}

enum sswf_error_code_t sswf_tag_scaling_grid_grid_pre_save(struct SSWF_TagScalingGrid *tag_scaling_grid)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagScalingGrid *>(tag_scaling_grid)->GridPreSave());
}

const struct SSWF_SRectangle * sswf_tag_scaling_grid_grid(struct SSWF_TagScalingGrid *tag_scaling_grid)
{
	return reinterpret_cast<const struct SSWF_SRectangle *>(&reinterpret_cast<sswf::TagScalingGrid *>(tag_scaling_grid)->Grid());
}

void sswf_tag_scaling_grid_set_grid(struct SSWF_TagScalingGrid *tag_scaling_grid, const struct SSWF_SRectangle * rect)
{
	reinterpret_cast<sswf::TagScalingGrid *>(tag_scaling_grid)->SetGrid(*reinterpret_cast<const sswf::SRectangle *>(rect));
}

  /* Object: TagBaseID */
struct SSWF_TagBase *sswf_tag_base_id_cast_tag_base(struct SSWF_TagBaseID *tag_base_id)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagBaseID *>(tag_base_id)));
}

void sswf_tag_base_id_destroy(struct SSWF_TagBaseID *tag_base_id)
{
	delete reinterpret_cast<sswf::TagBaseID *>(tag_base_id);
}

sswf_id_t sswf_tag_base_id_identification(struct SSWF_TagBaseID *tag_base_id)
{
	return reinterpret_cast<sswf::TagBaseID *>(tag_base_id)->Identification();
}

void sswf_tag_base_id_no_identification(struct SSWF_TagBaseID *tag_base_id)
{
	reinterpret_cast<sswf::TagBaseID *>(tag_base_id)->NoIdentification();
}

int sswf_tag_base_id_has_identification(struct SSWF_TagBaseID *tag_base_id)
{
	return reinterpret_cast<sswf::TagBaseID *>(tag_base_id)->HasIdentification();
}

int sswf_tag_base_id_save_id(struct SSWF_TagBaseID *tag_base_id, struct SSWF_Data * data)
{
	return reinterpret_cast<sswf::TagBaseID *>(tag_base_id)->SaveID(*reinterpret_cast<sswf::Data *>(data));
}

  /* Object: TagBinaryData */
struct SSWF_TagBaseID *sswf_tag_binary_data_cast_tag_base_id(struct SSWF_TagBinaryData *tag_binary_data)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagBinaryData *>(tag_binary_data)));
}

struct SSWF_TagBase *sswf_tag_binary_data_cast_tag_base(struct SSWF_TagBinaryData *tag_binary_data)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagBinaryData *>(tag_binary_data)));
}

void sswf_tag_binary_data_destroy(struct SSWF_TagBinaryData *tag_binary_data)
{
	delete reinterpret_cast<sswf::TagBinaryData *>(tag_binary_data);
}

struct SSWF_TagBinaryData *sswf_tag_binary_data_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagBinaryData *>(new sswf::TagBinaryData(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_binary_data_save(struct SSWF_TagBinaryData *tag_binary_data, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagBinaryData *>(tag_binary_data)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_binary_data_type_flags(struct SSWF_TagBinaryData *tag_binary_data)
{
	return reinterpret_cast<sswf::TagBinaryData *>(tag_binary_data)->TypeFlags();
}

void sswf_tag_binary_data_get_data(struct SSWF_TagBinaryData *tag_binary_data, const char ** data, size_t * size)
{
	reinterpret_cast<sswf::TagBinaryData *>(tag_binary_data)->GetData(*reinterpret_cast<const char **>(data), *size);
}

void sswf_tag_binary_data_set_data(struct SSWF_TagBinaryData *tag_binary_data, const char * data, size_t size)
{
	reinterpret_cast<sswf::TagBinaryData *>(tag_binary_data)->SetData(data, size);
}

  /* Object: TagButton */
struct SSWF_TagBaseID *sswf_tag_button_cast_tag_base_id(struct SSWF_TagButton *tag_button)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagButton *>(tag_button)));
}

struct SSWF_TagBase *sswf_tag_button_cast_tag_base(struct SSWF_TagButton *tag_button)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagButton *>(tag_button)));
}

struct SSWF_TagScalingGrid *sswf_tag_button_cast_tag_scaling_grid(struct SSWF_TagButton *tag_button)
{
	return reinterpret_cast<struct SSWF_TagScalingGrid *>(static_cast<sswf::TagScalingGrid *>(reinterpret_cast<sswf::TagButton *>(tag_button)));
}

void sswf_tag_button_destroy(struct SSWF_TagButton *tag_button)
{
	delete reinterpret_cast<sswf::TagButton *>(tag_button);
}

struct SSWF_TagButton *sswf_tag_button_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagButton *>(new sswf::TagButton(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_button_save(struct SSWF_TagButton *tag_button, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagButton *>(tag_button)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_button_type_flags(struct SSWF_TagButton *tag_button)
{
	return reinterpret_cast<sswf::TagButton *>(tag_button)->TypeFlags();
}

int sswf_tag_button_set_state(struct SSWF_TagButton *tag_button, const struct SSWF_State * state)
{
	return reinterpret_cast<sswf::TagButton *>(tag_button)->SetState(*reinterpret_cast<const sswf::State *>(state));
}

void sswf_tag_button_set_action(struct SSWF_TagButton *tag_button, const struct SSWF_Action * action)
{
	reinterpret_cast<sswf::TagButton *>(tag_button)->SetAction(*reinterpret_cast<const sswf::Action *>(action));
}

void sswf_tag_button_set_menu(struct SSWF_TagButton *tag_button, int menu)
{
	reinterpret_cast<sswf::TagButton *>(tag_button)->SetMenu(menu != 0);
}

struct SSWF_Vectors * sswf_tag_button_actions(struct SSWF_TagButton *tag_button)
{
	return reinterpret_cast<struct SSWF_Vectors *>(&reinterpret_cast<sswf::TagButton *>(tag_button)->Actions());
}

int sswf_tag_button_add_event(struct SSWF_TagButton *tag_button, struct SSWF_Event * event)
{
	return reinterpret_cast<sswf::TagButton *>(tag_button)->AddEvent(reinterpret_cast<sswf::Event *>(event));
}

  /* Object: TagCSMTextSettings */
void sswf_tag_csmtext_settings_destroy(struct SSWF_TagCSMTextSettings *tag_csmtext_settings)
{
	delete reinterpret_cast<sswf::TagCSMTextSettings *>(tag_csmtext_settings);
}

struct SSWF_TagCSMTextSettings *sswf_tag_csmtext_settings_create()
{
	return reinterpret_cast<struct SSWF_TagCSMTextSettings *>(new sswf::TagCSMTextSettings);
}

int sswf_tag_csmtext_settings_is_csmtext_settings_defined(struct SSWF_TagCSMTextSettings *tag_csmtext_settings)
{
	return reinterpret_cast<sswf::TagCSMTextSettings *>(tag_csmtext_settings)->IsCSMTextSettingsDefined();
}

void sswf_tag_csmtext_settings_set_renderer(struct SSWF_TagCSMTextSettings *tag_csmtext_settings, enum sswf_csm_text_renderer_t csm_text_renderer)
{
	reinterpret_cast<sswf::TagCSMTextSettings *>(tag_csmtext_settings)->SetRenderer(static_cast<sswf::TagCSMTextSettings::csm_text_renderer_t>(csm_text_renderer));
}

void sswf_tag_csmtext_settings_set_grid_fit(struct SSWF_TagCSMTextSettings *tag_csmtext_settings, enum sswf_csm_text_gridfit_t csm_text_gridfit)
{
	reinterpret_cast<sswf::TagCSMTextSettings *>(tag_csmtext_settings)->SetGridFit(static_cast<sswf::TagCSMTextSettings::csm_text_gridfit_t>(csm_text_gridfit));
}

void sswf_tag_csmtext_settings_set_thickness(struct SSWF_TagCSMTextSettings *tag_csmtext_settings, float thickness)
{
	reinterpret_cast<sswf::TagCSMTextSettings *>(tag_csmtext_settings)->SetThickness(thickness);
}

void sswf_tag_csmtext_settings_set_sharpness(struct SSWF_TagCSMTextSettings *tag_csmtext_settings, float sharpness)
{
	reinterpret_cast<sswf::TagCSMTextSettings *>(tag_csmtext_settings)->SetSharpness(sharpness);
}

  /* Object: TagFont */
struct SSWF_TagBaseID *sswf_tag_font_cast_tag_base_id(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagFont *>(tag_font)));
}

struct SSWF_TagBase *sswf_tag_font_cast_tag_base(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagFont *>(tag_font)));
}

void sswf_tag_font_destroy(struct SSWF_TagFont *tag_font)
{
	delete reinterpret_cast<sswf::TagFont *>(tag_font);
}

struct SSWF_TagFont *sswf_tag_font_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagFont *>(new sswf::TagFont(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_font_save(struct SSWF_TagFont *tag_font, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagFont *>(tag_font)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_font_type_flags(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<sswf::TagFont *>(tag_font)->TypeFlags();
}

enum sswf_error_code_t sswf_tag_font_glyph_info(struct SSWF_TagFont *tag_font, struct sswf_font_info_t * info)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagFont *>(tag_font)->GlyphInfo(*reinterpret_cast<sswf::TagFont::font_info_t *>(info)));
}

int sswf_tag_font_has_glyph(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<sswf::TagFont *>(tag_font)->HasGlyph();
}

int sswf_tag_font_find_glyph(struct SSWF_TagFont *tag_font, struct sswf_font_info_t * info, int mark_empty_in_use)
{
	return reinterpret_cast<sswf::TagFont *>(tag_font)->FindGlyph(*reinterpret_cast<sswf::TagFont::font_info_t *>(info), mark_empty_in_use != 0);
}

const char * sswf_tag_font_font_name(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<const char *>(reinterpret_cast<sswf::TagFont *>(tag_font)->FontName());
}

long sswf_tag_font_default_ascent(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<sswf::TagFont *>(tag_font)->DefaultAscent();
}

long sswf_tag_font_default_descent(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<sswf::TagFont *>(tag_font)->DefaultDescent();
}

long sswf_tag_font_default_leading_height(struct SSWF_TagFont *tag_font)
{
	return reinterpret_cast<sswf::TagFont *>(tag_font)->DefaultLeadingHeight();
}

enum sswf_font_language_t sswf_tag_font_string_to_language(const char * language)
{
	return static_cast<enum sswf_font_language_t>(sswf::TagFont::StringToLanguage(language));
}

const char * sswf_tag_font_language_to_string(enum sswf_font_language_t language)
{
	return reinterpret_cast<const char *>(sswf::TagFont::LanguageToString(static_cast<sswf::TagFont::font_language_t>(language)));
}

enum sswf_error_code_t sswf_tag_font_add_glyph(struct SSWF_TagFont *tag_font, sswf_ucs4_t name, const struct SSWF_TagBase * ref, long advance)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagFont *>(tag_font)->AddGlyph(name, reinterpret_cast<const sswf::TagBase *>(ref), advance));
}

void sswf_tag_font_set_name(struct SSWF_TagFont *tag_font, const char * font_name)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetName(font_name);
}

void sswf_tag_font_set_display_name(struct SSWF_TagFont *tag_font, const char * display_name)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetDisplayName(display_name);
}

void sswf_tag_font_set_copyright(struct SSWF_TagFont *tag_font, const char * copyright)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetCopyright(copyright);
}

void sswf_tag_font_set_layout(struct SSWF_TagFont *tag_font, long ascent, long descent, long leading_height)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetLayout(ascent, descent, leading_height);
}

void sswf_tag_font_set_default_advance(struct SSWF_TagFont *tag_font, long advance)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetDefaultAdvance(advance);
}

void sswf_tag_font_set_space_advance(struct SSWF_TagFont *tag_font, long advance)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetSpaceAdvance(advance);
}

void sswf_tag_font_set_type(struct SSWF_TagFont *tag_font, enum sswf_font_type_t type)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetType(static_cast<sswf::TagFont::font_type_t>(type));
}

void sswf_tag_font_set_language(struct SSWF_TagFont *tag_font, enum sswf_font_language_t language)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetLanguage(static_cast<sswf::TagFont::font_language_t>(language));
}

void sswf_tag_font_set_bold(struct SSWF_TagFont *tag_font, int bold)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetBold(bold != 0);
}

void sswf_tag_font_set_italic(struct SSWF_TagFont *tag_font, int italic)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetItalic(italic != 0);
}

void sswf_tag_font_set_small_text(struct SSWF_TagFont *tag_font, int small_text)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetSmallText(small_text != 0);
}

void sswf_tag_font_set_thickness(struct SSWF_TagFont *tag_font, enum sswf_font_thickness_t thickness)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetThickness(static_cast<sswf::TagFont::font_thickness_t>(thickness));
}

void sswf_tag_font_set_emsize(struct SSWF_TagFont *tag_font, enum sswf_font_em_size_t font_em_size)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetEMSize(static_cast<sswf::TagFont::font_em_size_t>(font_em_size));
}

void sswf_tag_font_set_wide(struct SSWF_TagFont *tag_font, int wide)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetWide(wide != 0);
}

enum sswf_error_code_t sswf_tag_font_set_used_glyphs1(struct SSWF_TagFont *tag_font, const char * used_glyphs, int mark_empty_in_use)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagFont *>(tag_font)->SetUsedGlyphs(used_glyphs, mark_empty_in_use != 0));
}

enum sswf_error_code_t sswf_tag_font_set_used_glyphs2(struct SSWF_TagFont *tag_font, const sswf_ucs4_t * used_glyphs, int mark_empty_in_use)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagFont *>(tag_font)->SetUsedGlyphs(reinterpret_cast<const sswf::sswf_ucs4_t *>(used_glyphs), mark_empty_in_use != 0));
}

void sswf_tag_font_set_used_by_edit_text(struct SSWF_TagFont *tag_font, int used)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->SetUsedByEditText(used != 0);
}

void sswf_tag_font_add_kern(struct SSWF_TagFont *tag_font, sswf_ucs4_t code0, sswf_ucs4_t code1, long advance)
{
	reinterpret_cast<sswf::TagFont *>(tag_font)->AddKern(code0, code1, advance);
}

  /* Object: TagEditText */
struct SSWF_TagBaseID *sswf_tag_edit_text_cast_tag_base_id(struct SSWF_TagEditText *tag_edit_text)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagEditText *>(tag_edit_text)));
}

struct SSWF_TagBase *sswf_tag_edit_text_cast_tag_base(struct SSWF_TagEditText *tag_edit_text)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagEditText *>(tag_edit_text)));
}

struct SSWF_TagCSMTextSettings *sswf_tag_edit_text_cast_tag_csmtext_settings(struct SSWF_TagEditText *tag_edit_text)
{
	return reinterpret_cast<struct SSWF_TagCSMTextSettings *>(static_cast<sswf::TagCSMTextSettings *>(reinterpret_cast<sswf::TagEditText *>(tag_edit_text)));
}

void sswf_tag_edit_text_destroy(struct SSWF_TagEditText *tag_edit_text)
{
	delete reinterpret_cast<sswf::TagEditText *>(tag_edit_text);
}

struct SSWF_TagEditText *sswf_tag_edit_text_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagEditText *>(new sswf::TagEditText(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_edit_text_save(struct SSWF_TagEditText *tag_edit_text, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_edit_text_type_flags(struct SSWF_TagEditText *tag_edit_text)
{
	return reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->TypeFlags();
}

void sswf_tag_edit_text_set_text(struct SSWF_TagEditText *tag_edit_text, const char * text)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetText(text);
}

void sswf_tag_edit_text_set_variable_name(struct SSWF_TagEditText *tag_edit_text, const char * name)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetVariableName(name);
}

void sswf_tag_edit_text_set_font(struct SSWF_TagEditText *tag_edit_text, const struct SSWF_TagFont * font, long height)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetFont(reinterpret_cast<const sswf::TagFont *>(font), height);
}

void sswf_tag_edit_text_set_margins(struct SSWF_TagEditText *tag_edit_text, long left, long right)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetMargins(left, right);
}

void sswf_tag_edit_text_set_bounds(struct SSWF_TagEditText *tag_edit_text, const struct SSWF_SRectangle * bounds)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetBounds(*reinterpret_cast<const sswf::SRectangle *>(bounds));
}

void sswf_tag_edit_text_set_align(struct SSWF_TagEditText *tag_edit_text, enum sswf_edit_text_alignment_t align)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetAlign(static_cast<sswf::TagEditText::edit_text_alignment_t>(align));
}

void sswf_tag_edit_text_set_indent(struct SSWF_TagEditText *tag_edit_text, long indent)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetIndent(indent);
}

void sswf_tag_edit_text_set_leading(struct SSWF_TagEditText *tag_edit_text, long leading)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetLeading(leading);
}

void sswf_tag_edit_text_set_color(struct SSWF_TagEditText *tag_edit_text, struct SSWF_Color * color)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetColor(*reinterpret_cast<sswf::Color *>(color));
}

void sswf_tag_edit_text_set_max_length(struct SSWF_TagEditText *tag_edit_text, long length)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetMaxLength(length);
}

void sswf_tag_edit_text_set_word_wrap(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetWordWrap(status != 0);
}

void sswf_tag_edit_text_set_multiline(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetMultiline(status != 0);
}

void sswf_tag_edit_text_set_password(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetPassword(status != 0);
}

void sswf_tag_edit_text_set_read_only(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetReadOnly(status != 0);
}

void sswf_tag_edit_text_set_no_select(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetNoSelect(status != 0);
}

void sswf_tag_edit_text_set_border(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetBorder(status != 0);
}

void sswf_tag_edit_text_set_outline(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetOutline(status != 0);
}

void sswf_tag_edit_text_set_html(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetHTML(status != 0);
}

void sswf_tag_edit_text_set_auto_size(struct SSWF_TagEditText *tag_edit_text, int status)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetAutoSize(status != 0);
}

void sswf_tag_edit_text_set_used_glyphs(struct SSWF_TagEditText *tag_edit_text, const char * lists)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->SetUsedGlyphs(lists);
}

void sswf_tag_edit_text_add_used_string(struct SSWF_TagEditText *tag_edit_text, const char * string)
{
	reinterpret_cast<sswf::TagEditText *>(tag_edit_text)->AddUsedString(string);
}

  /* Object: TagImage */
struct SSWF_TagBaseID *sswf_tag_image_cast_tag_base_id(struct SSWF_TagImage *tag_image)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagImage *>(tag_image)));
}

struct SSWF_TagBase *sswf_tag_image_cast_tag_base(struct SSWF_TagImage *tag_image)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagImage *>(tag_image)));
}

void sswf_tag_image_destroy(struct SSWF_TagImage *tag_image)
{
	delete reinterpret_cast<sswf::TagImage *>(tag_image);
}

struct SSWF_TagImage *sswf_tag_image_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagImage *>(new sswf::TagImage(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_image_save(struct SSWF_TagImage *tag_image, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagImage *>(tag_image)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_image_type_flags(struct SSWF_TagImage *tag_image)
{
	return reinterpret_cast<sswf::TagImage *>(tag_image)->TypeFlags();
}

void sswf_tag_image_get_image_data(struct SSWF_TagImage *tag_image, struct sswf_image_t * image_data)
{
	reinterpret_cast<sswf::TagImage *>(tag_image)->GetImageData(*reinterpret_cast<sswf::TagImage::image_t *>(image_data));
}

void sswf_tag_image_set_format(struct SSWF_TagImage *tag_image, enum sswf_image_format_t format)
{
	reinterpret_cast<sswf::TagImage *>(tag_image)->SetFormat(static_cast<sswf::TagImage::image_format_t>(format));
}

void sswf_tag_image_set_quality(struct SSWF_TagImage *tag_image, int quality)
{
	reinterpret_cast<sswf::TagImage *>(tag_image)->SetQuality(quality);
}

enum sswf_error_code_t sswf_tag_image_set_filename(struct SSWF_TagImage *tag_image, const char * image, const char * mask)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagImage *>(tag_image)->SetFilename(image, mask));
}

void sswf_tag_image_set_image(struct SSWF_TagImage *tag_image, long width, long height, unsigned char * data, int alpha, long count, unsigned char * colormap)
{
	reinterpret_cast<sswf::TagImage *>(tag_image)->SetImage(width, height, data, alpha != 0, count, colormap);
}

enum sswf_error_code_t sswf_tag_image_load_tga(struct SSWF_TagImage *tag_image, const char * filename, struct sswf_image_t * im)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagImage *>(tag_image)->LoadTGA(filename, *reinterpret_cast<sswf::TagImage::image_t *>(im)));
}

enum sswf_error_code_t sswf_tag_image_load_jpeg(struct SSWF_TagImage *tag_image, const char * filename, struct sswf_image_t * im)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagImage *>(tag_image)->LoadJPEG(filename, *reinterpret_cast<sswf::TagImage::image_t *>(im)));
}

enum sswf_error_code_t sswf_tag_image_save_jpeg(struct SSWF_TagImage *tag_image, struct SSWF_Data * encoding, struct SSWF_Data * image)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagImage *>(tag_image)->SaveJPEG(*reinterpret_cast<sswf::Data *>(encoding), *reinterpret_cast<sswf::Data *>(image)));
}

enum sswf_error_code_t sswf_tag_image_set_alpha(struct SSWF_TagImage *tag_image, struct sswf_image_t * im, const struct sswf_image_t * mask)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagImage *>(tag_image)->SetAlpha(*reinterpret_cast<sswf::TagImage::image_t *>(im), *reinterpret_cast<const sswf::TagImage::image_t *>(mask)));
}

  /* Object: TagShape */
struct SSWF_TagBaseID *sswf_tag_shape_cast_tag_base_id(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagShape *>(tag_shape)));
}

struct SSWF_TagBase *sswf_tag_shape_cast_tag_base(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagShape *>(tag_shape)));
}

void sswf_tag_shape_destroy(struct SSWF_TagShape *tag_shape)
{
	delete reinterpret_cast<sswf::TagShape *>(tag_shape);
}

struct SSWF_TagShape *sswf_tag_shape_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagShape *>(new sswf::TagShape(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_shape_save(struct SSWF_TagShape *tag_shape, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_shape_type_flags(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<sswf::TagShape *>(tag_shape)->TypeFlags();
}

enum sswf_error_code_t sswf_tag_shape_save_without_styles(struct SSWF_TagShape *tag_shape, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->SaveWithoutStyles(*reinterpret_cast<sswf::Data *>(data)));
}

void sswf_tag_shape_save_align_zone(struct SSWF_TagShape *tag_shape, struct SSWF_Data * data)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->SaveAlignZone(*reinterpret_cast<sswf::Data *>(data));
}

int sswf_tag_shape_has_align_zone(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<sswf::TagShape *>(tag_shape)->HasAlignZone();
}

int sswf_tag_shape_has_bounds(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<sswf::TagShape *>(tag_shape)->HasBounds();
}

const struct SSWF_SRectangle * sswf_tag_shape_bounds(struct SSWF_TagShape *tag_shape, int index)
{
	return reinterpret_cast<const struct SSWF_SRectangle *>(&reinterpret_cast<sswf::TagShape *>(tag_shape)->Bounds(index));
}

int sswf_tag_shape_is_glyph(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<sswf::TagShape *>(tag_shape)->IsGlyph();
}

int sswf_tag_shape_is_empty(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<sswf::TagShape *>(tag_shape)->IsEmpty();
}

enum sswf_error_code_t sswf_tag_shape_add_move(struct SSWF_TagShape *tag_shape, enum sswf_morph_t morph_mode, long x, long y)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->AddMove(static_cast<sswf::TagShape::morph_t>(morph_mode), x, y));
}

enum sswf_error_code_t sswf_tag_shape_add_edge1(struct SSWF_TagShape *tag_shape, enum sswf_morph_t morph_mode, long x, long y)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->AddEdge(static_cast<sswf::TagShape::morph_t>(morph_mode), x, y));
}

enum sswf_error_code_t sswf_tag_shape_add_edge2(struct SSWF_TagShape *tag_shape, enum sswf_morph_t morph_mode, long x, long y, long ctrl_x, long ctrl_y)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->AddEdge(static_cast<sswf::TagShape::morph_t>(morph_mode), x, y, ctrl_x, ctrl_y));
}

void sswf_tag_shape_new_styles(struct SSWF_TagShape *tag_shape)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->NewStyles();
}

enum sswf_error_code_t sswf_tag_shape_add_style(struct SSWF_TagShape *tag_shape, const struct SSWF_Style * style, enum sswf_fill_t fill)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->AddStyle(*reinterpret_cast<const sswf::Style *>(style), static_cast<sswf::TagShape::fill_t>(fill)));
}

void sswf_tag_shape_set_align_zone(struct SSWF_TagShape *tag_shape, const struct SSWF_SRectangle * zone)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->SetAlignZone(*reinterpret_cast<const sswf::SRectangle *>(zone));
}

enum sswf_error_code_t sswf_tag_shape_set_bounds(struct SSWF_TagShape *tag_shape, int index, const struct SSWF_SRectangle * rect, int show)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->SetBounds(index, *reinterpret_cast<const sswf::SRectangle *>(rect), show != 0));
}

enum sswf_error_code_t sswf_tag_shape_set_strokes_bounds(struct SSWF_TagShape *tag_shape, int index, const struct SSWF_SRectangle * rect)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagShape *>(tag_shape)->SetStrokesBounds(index, *reinterpret_cast<const sswf::SRectangle *>(rect)));
}

void sswf_tag_shape_show_bounds(struct SSWF_TagShape *tag_shape, int show)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->ShowBounds(show != 0);
}

void sswf_tag_shape_show_origin(struct SSWF_TagShape *tag_shape, int show)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->ShowOrigin(show != 0);
}

void sswf_tag_shape_set_non_scaling_strokes(struct SSWF_TagShape *tag_shape, int has_non_scaling_strokes)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->SetNonScalingStrokes(has_non_scaling_strokes != 0);
}

void sswf_tag_shape_set_scaling_strokes(struct SSWF_TagShape *tag_shape, int has_scaling_strokes)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->SetScalingStrokes(has_scaling_strokes != 0);
}

void sswf_tag_shape_glyph(struct SSWF_TagShape *tag_shape)
{
	reinterpret_cast<sswf::TagShape *>(tag_shape)->Glyph();
}

int sswf_tag_shape_has_show_bounds(struct SSWF_TagShape *tag_shape)
{
	return reinterpret_cast<sswf::TagShape *>(tag_shape)->HasShowBounds();
}

  /* Object: TagSound */
struct SSWF_TagBaseID *sswf_tag_sound_cast_tag_base_id(struct SSWF_TagSound *tag_sound)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagSound *>(tag_sound)));
}

struct SSWF_TagBase *sswf_tag_sound_cast_tag_base(struct SSWF_TagSound *tag_sound)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagSound *>(tag_sound)));
}

void sswf_tag_sound_destroy(struct SSWF_TagSound *tag_sound)
{
	delete reinterpret_cast<sswf::TagSound *>(tag_sound);
}

struct SSWF_TagSound *sswf_tag_sound_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagSound *>(new sswf::TagSound(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_sound_save(struct SSWF_TagSound *tag_sound, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagSound *>(tag_sound)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_sound_type_flags(struct SSWF_TagSound *tag_sound)
{
	return reinterpret_cast<sswf::TagSound *>(tag_sound)->TypeFlags();
}

size_t sswf_tag_sound_get_samples_count(struct SSWF_TagSound *tag_sound)
{
	return reinterpret_cast<sswf::TagSound *>(tag_sound)->GetSamplesCount();
}

enum sswf_error_code_t sswf_tag_sound_set_filename(struct SSWF_TagSound *tag_sound, const char * filename)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagSound *>(tag_sound)->SetFilename(filename));
}

void sswf_tag_sound_set_format(struct SSWF_TagSound *tag_sound, enum sswf_sound_format_t format)
{
	reinterpret_cast<sswf::TagSound *>(tag_sound)->SetFormat(static_cast<sswf::TagSound::sound_format_t>(format));
}

int sswf_tag_sound_set_data(struct SSWF_TagSound *tag_sound, const void * data, size_t size, enum sswf_sound_endian_t endian, int width, unsigned int rate, int stereo)
{
	return reinterpret_cast<sswf::TagSound *>(tag_sound)->SetData(data, size, static_cast<sswf::TagSound::sound_endian_t>(endian), width, rate, stereo != 0);
}

void sswf_tag_sound_set_mono(struct SSWF_TagSound *tag_sound)
{
	reinterpret_cast<sswf::TagSound *>(tag_sound)->SetMono();
}

void sswf_tag_sound_set8_bits(struct SSWF_TagSound *tag_sound)
{
	reinterpret_cast<sswf::TagSound *>(tag_sound)->Set8Bits();
}

  /* Object: TagSprite */
struct SSWF_TagBaseID *sswf_tag_sprite_cast_tag_base_id(struct SSWF_TagSprite *tag_sprite)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagSprite *>(tag_sprite)));
}

struct SSWF_TagBase *sswf_tag_sprite_cast_tag_base(struct SSWF_TagSprite *tag_sprite)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagSprite *>(tag_sprite)));
}

struct SSWF_TagScalingGrid *sswf_tag_sprite_cast_tag_scaling_grid(struct SSWF_TagSprite *tag_sprite)
{
	return reinterpret_cast<struct SSWF_TagScalingGrid *>(static_cast<sswf::TagScalingGrid *>(reinterpret_cast<sswf::TagSprite *>(tag_sprite)));
}

void sswf_tag_sprite_destroy(struct SSWF_TagSprite *tag_sprite)
{
	delete reinterpret_cast<sswf::TagSprite *>(tag_sprite);
}

struct SSWF_TagSprite *sswf_tag_sprite_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagSprite *>(new sswf::TagSprite(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_sprite_save(struct SSWF_TagSprite *tag_sprite, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagSprite *>(tag_sprite)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_sprite_type_flags(struct SSWF_TagSprite *tag_sprite)
{
	return reinterpret_cast<sswf::TagSprite *>(tag_sprite)->TypeFlags();
}

  /* Object: TagText */
struct SSWF_TagBaseID *sswf_tag_text_cast_tag_base_id(struct SSWF_TagText *tag_text)
{
	return reinterpret_cast<struct SSWF_TagBaseID *>(static_cast<sswf::TagBaseID *>(reinterpret_cast<sswf::TagText *>(tag_text)));
}

struct SSWF_TagBase *sswf_tag_text_cast_tag_base(struct SSWF_TagText *tag_text)
{
	return reinterpret_cast<struct SSWF_TagBase *>(static_cast<sswf::TagBase *>(reinterpret_cast<sswf::TagText *>(tag_text)));
}

struct SSWF_TagCSMTextSettings *sswf_tag_text_cast_tag_csmtext_settings(struct SSWF_TagText *tag_text)
{
	return reinterpret_cast<struct SSWF_TagCSMTextSettings *>(static_cast<sswf::TagCSMTextSettings *>(reinterpret_cast<sswf::TagText *>(tag_text)));
}

void sswf_tag_text_destroy(struct SSWF_TagText *tag_text)
{
	delete reinterpret_cast<sswf::TagText *>(tag_text);
}

struct SSWF_TagText *sswf_tag_text_create(struct SSWF_TagBase * parent)
{
	return reinterpret_cast<struct SSWF_TagText *>(new sswf::TagText(reinterpret_cast<sswf::TagBase *>(parent)));
}

enum sswf_error_code_t sswf_tag_text_save(struct SSWF_TagText *tag_text, struct SSWF_Data * data)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagText *>(tag_text)->Save(*reinterpret_cast<sswf::Data *>(data)));
}

swf_type_t sswf_tag_text_type_flags(struct SSWF_TagText *tag_text)
{
	return reinterpret_cast<sswf::TagText *>(tag_text)->TypeFlags();
}

void sswf_tag_text_set_matrix(struct SSWF_TagText *tag_text, const struct SSWF_Matrix * matrix)
{
	reinterpret_cast<sswf::TagText *>(tag_text)->SetMatrix(*reinterpret_cast<const sswf::Matrix *>(matrix));
}

void sswf_tag_text_set_bounds(struct SSWF_TagText *tag_text, const struct SSWF_SRectangle * bounds)
{
	reinterpret_cast<sswf::TagText *>(tag_text)->SetBounds(*reinterpret_cast<const sswf::SRectangle *>(bounds));
}

enum sswf_error_code_t sswf_tag_text_add_text(struct SSWF_TagText *tag_text, const char * string, long advance)
{
	return static_cast<enum sswf_error_code_t>(reinterpret_cast<sswf::TagText *>(tag_text)->AddText(string, advance));
}

void sswf_tag_text_add_font(struct SSWF_TagText *tag_text, const struct SSWF_TagFont * font, long height)
{
	reinterpret_cast<sswf::TagText *>(tag_text)->AddFont(reinterpret_cast<const sswf::TagFont *>(font), height);
}

void sswf_tag_text_add_offsets(struct SSWF_TagText *tag_text, long x, long y)
{
	reinterpret_cast<sswf::TagText *>(tag_text)->AddOffsets(x, y);
}

void sswf_tag_text_add_color(struct SSWF_TagText *tag_text, struct SSWF_Color * color)
{
	reinterpret_cast<sswf::TagText *>(tag_text)->AddColor(*reinterpret_cast<sswf::Color *>(color));
}


void sswf_error_manager_set_callback(struct SSWF_ErrorManager *error_manager, sswf_error_manager_on_error_callback callback)
{
	static struct ErrorHandlerCallback : public sswf::ErrorManager::ErrorHandler {
		virtual sswf::ErrorManager::error_code_t OnError(sswf::ErrorManager::error_code_t errcode, const char *msg)
			{
				if(f_callback != 0) {
					return static_cast<sswf::ErrorManager::error_code_t>((*f_callback)(static_cast<enum sswf_error_code_t>(errcode), msg));
				}
				fprintf(stderr, "sswf: error: %d: %s\n", errcode, msg);
				return errcode;
			}
		sswf_error_manager_on_error_callback f_callback;
	} error_handler;
	error_handler.f_callback = callback;
	reinterpret_cast<sswf::ErrorManager *>(error_manager)->SetErrorHandler(&error_handler);
}

}; // extern "C"
