/*
 * Automatically generated, do not edit this file directly
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdio.h>
#include <stdlib.h>

#include "cbinding.h"

#if SL_2_0
/**
 * Application
 **/
Application *
application_new (void)
{
	return new Application ();
}
#endif


/**
 * ArcSegment
 **/
ArcSegment *
arc_segment_new (void)
{
	return new ArcSegment ();
}


#if SL_2_0
/**
 * AssemblyPart
 **/
AssemblyPart *
assembly_part_new (void)
{
	return new AssemblyPart ();
}
#endif


#if SL_2_0
/**
 * AssemblyPartCollection
 **/
AssemblyPartCollection *
assembly_part_collection_new (void)
{
	return new AssemblyPartCollection ();
}
#endif


/**
 * BeginStoryboard
 **/
BeginStoryboard *
begin_storyboard_new (void)
{
	return new BeginStoryboard ();
}


/**
 * BezierSegment
 **/
BezierSegment *
bezier_segment_new (void)
{
	return new BezierSegment ();
}


#if SL_2_0
/**
 * BitmapImage
 **/
BitmapImage *
bitmap_image_new (void)
{
	return new BitmapImage ();
}
#endif


#if SL_2_0
/**
 * Border
 **/
Border *
border_new (void)
{
	return new Border ();
}
#endif


/**
 * Brush
 **/
Brush *
brush_new (void)
{
	return new Brush ();
}


/**
 * Canvas
 **/
Canvas *
canvas_new (void)
{
	return new Canvas ();
}


#if SL_2_0
/**
 * Collection
 **/
int
collection_add_with_error (Collection *instance, Value *value, MoonError *error)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	if (error == NULL)
		g_warning ("Moonlight: Called collection_add_with_error () with error == NULL.");
	return instance->AddWithError (value, error);
}
#endif


bool
collection_clear (Collection *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->Clear ();
}


bool
collection_contains (Collection *instance, Value *value)
{
	if (instance == NULL)
		return false;
	
	return instance->Contains (value);
}


int
collection_get_count (Collection *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetCount ();
}


Type::Kind
collection_get_element_type (Collection *instance)
{
	if (instance == NULL)
		return Type::INVALID;
	
	return instance->GetElementType ();
}


CollectionIterator *
collection_get_iterator (Collection *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetIterator ();
}


#if SL_2_0
Value *
collection_get_value_at_with_error (Collection *instance, int index, MoonError *error)
{
	if (instance == NULL)
		return NULL;
	
	if (error == NULL)
		g_warning ("Moonlight: Called collection_get_value_at_with_error () with error == NULL.");
	return instance->GetValueAtWithError (index, error);
}
#endif


int
collection_index_of (Collection *instance, Value *value)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->IndexOf (value);
}


#if SL_2_0
int
collection_insert_with_error (Collection *instance, int index, Value *value, MoonError *error)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	if (error == NULL)
		g_warning ("Moonlight: Called collection_insert_with_error () with error == NULL.");
	return instance->InsertWithError (index, value, error);
}
#endif


bool
collection_remove (Collection *instance, Value *value)
{
	if (instance == NULL)
		return false;
	
	return instance->Remove (value);
}


#if SL_2_0
bool
collection_remove_at_with_error (Collection *instance, int index, MoonError *error)
{
	if (instance == NULL)
		return false;
	
	if (error == NULL)
		g_warning ("Moonlight: Called collection_remove_at_with_error () with error == NULL.");
	return instance->RemoveAtWithError (index, error);
}
#endif


#if SL_2_0
bool
collection_set_value_at_with_error (Collection *instance, int index, Value *value, MoonError *error)
{
	if (instance == NULL)
		return false;
	
	if (error == NULL)
		g_warning ("Moonlight: Called collection_set_value_at_with_error () with error == NULL.");
	return instance->SetValueAtWithError (index, value, error);
}
#endif


/**
 * CollectionChangedEventArgs
 **/
CollectionChangedEventArgs *
collection_changed_event_args_new (void)
{
	return new CollectionChangedEventArgs ();
}


CollectionChangedAction
collection_changed_event_args_get_changed_action (CollectionChangedEventArgs *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (CollectionChangedAction) 0;
	
	return instance->GetChangedAction ();
}


int
collection_changed_event_args_get_index (CollectionChangedEventArgs *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetIndex ();
}


Value *
collection_changed_event_args_get_new_item (CollectionChangedEventArgs *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetNewItem ();
}


Value *
collection_changed_event_args_get_old_item (CollectionChangedEventArgs *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetOldItem ();
}


void
collection_changed_event_args_set_changed_action (CollectionChangedEventArgs *instance, CollectionChangedAction action)
{
	if (instance == NULL)
		return;
	
	instance->SetChangedAction (action);
}


void
collection_changed_event_args_set_index (CollectionChangedEventArgs *instance, int index)
{
	if (instance == NULL)
		return;
	
	instance->SetIndex (index);
}


void
collection_changed_event_args_set_new_item (CollectionChangedEventArgs *instance, Value *item)
{
	if (instance == NULL)
		return;
	
	instance->SetNewItem (item);
}


void
collection_changed_event_args_set_old_item (CollectionChangedEventArgs *instance, Value *item)
{
	if (instance == NULL)
		return;
	
	instance->SetOldItem (item);
}


/**
 * CollectionIterator
 **/
void
collection_iterator_destroy (CollectionIterator *iterator)
{
	CollectionIterator::Destroy (iterator);
}


Value *
collection_iterator_get_current (CollectionIterator *instance, int *error)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetCurrent (error);
}


int
collection_iterator_next (CollectionIterator *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->Next ();
}


bool
collection_iterator_reset (CollectionIterator *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->Reset ();
}


/**
 * ColorAnimation
 **/
ColorAnimation *
color_animation_new (void)
{
	return new ColorAnimation ();
}


/**
 * ColorAnimationUsingKeyFrames
 **/
ColorAnimationUsingKeyFrames *
color_animation_using_key_frames_new (void)
{
	return new ColorAnimationUsingKeyFrames ();
}


/**
 * ColorKeyFrame
 **/
ColorKeyFrame *
color_key_frame_new (void)
{
	return new ColorKeyFrame ();
}


/**
 * ColorKeyFrameCollection
 **/
ColorKeyFrameCollection *
color_key_frame_collection_new (void)
{
	return new ColorKeyFrameCollection ();
}


#if SL_2_0
/**
 * ColumnDefinition
 **/
ColumnDefinition *
column_definition_new (void)
{
	return new ColumnDefinition ();
}
#endif


#if SL_2_0
double
column_definition_get_actual_width (ColumnDefinition *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (double) 0;
	
	return instance->GetActualWidth ();
}
#endif


#if SL_2_0
/**
 * ColumnDefinitionCollection
 **/
ColumnDefinitionCollection *
column_definition_collection_new (void)
{
	return new ColumnDefinitionCollection ();
}
#endif


#if SL_2_0
/**
 * ContentControl
 **/
ContentControl *
content_control_new (void)
{
	return new ContentControl ();
}
#endif


#if SL_2_0
/**
 * Control
 **/
bool
control_apply_template (Control *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->ApplyTemplate ();
}
#endif


#if SL_2_0
Control *
control_new (void)
{
	return new Control ();
}
#endif


#if SL_2_0
/**
 * ControlTemplate
 **/
ControlTemplate *
control_template_new (void)
{
	return new ControlTemplate ();
}
#endif


#if SL_2_0
/**
 * DeepZoomImageTileSource
 **/
DeepZoomImageTileSource *
deep_zoom_image_tile_source_new (void)
{
	return new DeepZoomImageTileSource ();
}
#endif


#if SL_2_0
void
deep_zoom_image_tile_source_download_urisource (DeepZoomImageTileSource *instance, const char *uri, downloaded_cb callback)
{
	if (instance == NULL)
		return;
	
	instance->download_urisource (uri, callback);
}
#endif


#if SL_2_0
/**
 * DependencyObject
 **/
void
dependency_object_clear_value (DependencyObject *instance, DependencyProperty *property, bool notify_listeners)
{
	if (instance == NULL)
		return;
	
	instance->ClearValue (property, notify_listeners);
}
#endif


DependencyObject *
dependency_object_new (void)
{
	return new DependencyObject ();
}


DependencyObject *
dependency_object_find_name (DependencyObject *instance, const char *name, Type::Kind *element_kind)
{
	if (instance == NULL)
		return NULL;
	
	return instance->FindName (name, element_kind);
}


#if SL_2_0
Value *
dependency_object_get_default_value_with_error (DependencyObject *instance, Types *additional_types, DependencyProperty *property, MoonError *error)
{
	if (instance == NULL)
		return NULL;
	
	if (error == NULL)
		g_warning ("Moonlight: Called dependency_object_get_default_value_with_error () with error == NULL.");
	return instance->GetDefaultValueWithError (additional_types, property, error);
}
#endif


const char *
dependency_object_get_name (DependencyObject *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetName ();
}


Type::Kind
dependency_object_get_object_type (DependencyObject *instance)
{
	if (instance == NULL)
		return Type::INVALID;
	
	return instance->GetObjectType ();
}


#if SL_2_0
Value *
dependency_object_get_value_no_default_with_error (DependencyObject *instance, Types *additional_types, DependencyProperty *property, MoonError *error)
{
	if (instance == NULL)
		return NULL;
	
	if (error == NULL)
		g_warning ("Moonlight: Called dependency_object_get_value_no_default_with_error () with error == NULL.");
	return instance->GetValueNoDefaultWithError (additional_types, property, error);
}
#endif


#if SL_2_0
Value *
dependency_object_get_value_with_error (DependencyObject *instance, Types *additional_types, Type::Kind whatami, DependencyProperty *property, MoonError *error)
{
	if (instance == NULL)
		return NULL;
	
	if (error == NULL)
		g_warning ("Moonlight: Called dependency_object_get_value_with_error () with error == NULL.");
	return instance->GetValueWithError (additional_types, whatami, property, error);
}
#endif


void
dependency_object_set_name (DependencyObject *instance, const char *name)
{
	if (instance == NULL)
		return;
	
	instance->SetName (name);
}


bool
dependency_object_set_value_with_error (DependencyObject *instance, Types *additional_types, DependencyProperty *property, Value *value, MoonError *error)
{
	if (instance == NULL)
		return false;
	
	if (error == NULL)
		g_warning ("Moonlight: Called dependency_object_set_value_with_error () with error == NULL.");
	return instance->SetValueWithError (additional_types, property, value, error);
}


/**
 * DependencyObjectCollection
 **/
DependencyObjectCollection *
dependency_object_collection_new (void)
{
	return new DependencyObjectCollection ();
}


/**
 * DependencyProperty
 **/
DependencyProperty *
dependency_property_get_dependency_property (Type::Kind type, const char *name)
{
	return DependencyProperty::GetDependencyProperty (type, name);
}


const char *
dependency_property_get_name (DependencyProperty *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetName ();
}


Type::Kind
dependency_property_get_property_type (DependencyProperty *instance)
{
	if (instance == NULL)
		return Type::INVALID;
	
	return instance->GetPropertyType ();
}


bool
dependency_property_is_attached (DependencyProperty *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->IsAttached ();
}


bool
dependency_property_is_nullable (DependencyProperty *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->IsNullable ();
}


DependencyProperty *
dependency_property_register (Type::Kind type, const char *name, Value *default_value)
{
	return DependencyProperty::Register (type, name, default_value);
}


#if SL_2_0
DependencyProperty *
dependency_property_register_full (Types *additional_types, Type::Kind type, const char *name, Value *default_value, Type::Kind vtype, bool attached, bool read_only, bool always_change, NativePropertyChangedHandler *changed_callback)
{
	return DependencyProperty::RegisterFull (additional_types, type, name, default_value, vtype, attached, read_only, always_change, changed_callback);
}
#endif


#if SL_2_0
DependencyProperty *
dependency_property_register_managed_property (Types *additional_types, const char *name, Type::Kind property_type, Type::Kind owner_type, bool attached, NativePropertyChangedHandler *callback)
{
	return DependencyProperty::RegisterManagedProperty (additional_types, name, property_type, owner_type, attached, callback);
}
#endif


#if SL_2_0
/**
 * Deployment
 **/
Deployment *
deployment_new (void)
{
	return new Deployment ();
}
#endif


/**
 * DiscreteColorKeyFrame
 **/
DiscreteColorKeyFrame *
discrete_color_key_frame_new (void)
{
	return new DiscreteColorKeyFrame ();
}


/**
 * DiscreteDoubleKeyFrame
 **/
DiscreteDoubleKeyFrame *
discrete_double_key_frame_new (void)
{
	return new DiscreteDoubleKeyFrame ();
}


#if SL_2_0
/**
 * DiscreteObjectKeyFrame
 **/
DiscreteObjectKeyFrame *
discrete_object_key_frame_new (void)
{
	return new DiscreteObjectKeyFrame ();
}
#endif


/**
 * DiscretePointKeyFrame
 **/
DiscretePointKeyFrame *
discrete_point_key_frame_new (void)
{
	return new DiscretePointKeyFrame ();
}


/**
 * DoubleAnimation
 **/
DoubleAnimation *
double_animation_new (void)
{
	return new DoubleAnimation ();
}


/**
 * DoubleAnimationUsingKeyFrames
 **/
DoubleAnimationUsingKeyFrames *
double_animation_using_key_frames_new (void)
{
	return new DoubleAnimationUsingKeyFrames ();
}


/**
 * DoubleCollection
 **/
DoubleCollection *
double_collection_new (void)
{
	return new DoubleCollection ();
}


/**
 * DoubleKeyFrame
 **/
DoubleKeyFrame *
double_key_frame_new (void)
{
	return new DoubleKeyFrame ();
}


/**
 * DoubleKeyFrameCollection
 **/
DoubleKeyFrameCollection *
double_key_frame_collection_new (void)
{
	return new DoubleKeyFrameCollection ();
}


/**
 * Downloader
 **/
Downloader *
downloader_new (void)
{
	return new Downloader ();
}


/**
 * DrawingAttributes
 **/
DrawingAttributes *
drawing_attributes_new (void)
{
	return new DrawingAttributes ();
}


/**
 * Ellipse
 **/
Ellipse *
ellipse_new (void)
{
	return new Ellipse ();
}


/**
 * EllipseGeometry
 **/
EllipseGeometry *
ellipse_geometry_new (void)
{
	return new EllipseGeometry ();
}


/**
 * EventObject
 **/
int
event_object_add_handler (EventObject *instance, const char *event_name, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->AddHandler (event_name, handler, data, data_dtor);
}


int
event_object_add_xaml_handler (EventObject *instance, const char *event_name, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->AddXamlHandler (event_name, handler, data, data_dtor);
}


void
event_object_drain_unrefs (void)
{
	EventObject::DrainUnrefs ();
}


Surface *
event_object_get_surface (EventObject *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetSurface ();
}


const char *
event_object_get_type_name (EventObject *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetTypeName ();
}


void
event_object_ref (EventObject *instance)
{
	if (instance == NULL)
		return;
	
	instance->ref ();
}


void
event_object_remove_handler (EventObject *instance, const char *event_name, EventHandler handler, gpointer data)
{
	if (instance == NULL)
		return;
	
	instance->RemoveHandler (event_name, handler, data);
}


void
event_object_unref (EventObject *instance)
{
	if (instance == NULL)
		return;
	
	instance->unref ();
}


/**
 * EventTrigger
 **/
EventTrigger *
event_trigger_new (void)
{
	return new EventTrigger ();
}


/**
 * FrameworkElement
 **/
Size
framework_element_arrange_override (FrameworkElement *instance, Size finalSize)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (Size) 0;
	
	return instance->ArrangeOverride (finalSize);
}


FrameworkElement *
framework_element_new (void)
{
	return new FrameworkElement ();
}


Size
framework_element_measure_override (FrameworkElement *instance, Size availableSize)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (Size) 0;
	
	return instance->MeasureOverride (availableSize);
}


void
framework_element_register_managed_overrides (FrameworkElement *instance, MeasureOverrideCallback measure_cb, ArrangeOverrideCallback arrange_cb)
{
	if (instance == NULL)
		return;
	
	instance->RegisterManagedOverrides (measure_cb, arrange_cb);
}


#if SL_2_0
/**
 * FrameworkTemplate
 **/
FrameworkTemplate *
framework_template_new (void)
{
	return new FrameworkTemplate ();
}
#endif


/**
 * GeneralTransform
 **/
GeneralTransform *
general_transform_new (void)
{
	return new GeneralTransform ();
}


/**
 * Geometry
 **/
Geometry *
geometry_new (void)
{
	return new Geometry ();
}


/**
 * GeometryCollection
 **/
GeometryCollection *
geometry_collection_new (void)
{
	return new GeometryCollection ();
}


/**
 * GeometryGroup
 **/
GeometryGroup *
geometry_group_new (void)
{
	return new GeometryGroup ();
}


/**
 * Glyphs
 **/
Glyphs *
glyphs_new (void)
{
	return new Glyphs ();
}


/**
 * GradientBrush
 **/
GradientBrush *
gradient_brush_new (void)
{
	return new GradientBrush ();
}


/**
 * GradientStop
 **/
GradientStop *
gradient_stop_new (void)
{
	return new GradientStop ();
}


/**
 * GradientStopCollection
 **/
GradientStopCollection *
gradient_stop_collection_new (void)
{
	return new GradientStopCollection ();
}


#if SL_2_0
/**
 * Grid
 **/
Grid *
grid_new (void)
{
	return new Grid ();
}
#endif


/**
 * Image
 **/
Image *
image_new (void)
{
	return new Image ();
}


#if SL_2_0
void
image_set_stream_source (Image *instance, ManagedStreamCallbacks *stream)
{
	if (instance == NULL)
		return;
	
	instance->SetStreamSource (stream);
}
#endif


/**
 * ImageBrush
 **/
ImageBrush *
image_brush_new (void)
{
	return new ImageBrush ();
}


/**
 * InkPresenter
 **/
InkPresenter *
ink_presenter_new (void)
{
	return new InkPresenter ();
}


/**
 * Inline
 **/
Inline *
inline_new (void)
{
	return new Inline ();
}


/**
 * InlineCollection
 **/
InlineCollection *
inline_collection_new (void)
{
	return new InlineCollection ();
}


/**
 * Keyboard
 **/
ModifierKeys
keyboard_get_modifiers (void)
{
	return Keyboard::GetModifiers ();
}


/**
 * KeyEventArgs
 **/
int
key_event_args_get_key (KeyEventArgs *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetKey ();
}


int
key_event_args_get_platform_key_code (KeyEventArgs *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetPlatformKeyCode ();
}


KeyEventArgs *
key_event_args_new (void)
{
	return new KeyEventArgs ();
}


/**
 * KeyFrameCollection
 **/
KeyFrameCollection *
key_frame_collection_new (void)
{
	return new KeyFrameCollection ();
}


/**
 * KeySpline
 **/
KeySpline *
key_spline_new (void)
{
	return new KeySpline ();
}


/**
 * Line
 **/
Line *
line_new (void)
{
	return new Line ();
}


/**
 * LinearColorKeyFrame
 **/
LinearColorKeyFrame *
linear_color_key_frame_new (void)
{
	return new LinearColorKeyFrame ();
}


/**
 * LinearDoubleKeyFrame
 **/
LinearDoubleKeyFrame *
linear_double_key_frame_new (void)
{
	return new LinearDoubleKeyFrame ();
}


/**
 * LinearGradientBrush
 **/
LinearGradientBrush *
linear_gradient_brush_new (void)
{
	return new LinearGradientBrush ();
}


/**
 * LinearPointKeyFrame
 **/
LinearPointKeyFrame *
linear_point_key_frame_new (void)
{
	return new LinearPointKeyFrame ();
}


/**
 * LineBreak
 **/
LineBreak *
line_break_new (void)
{
	return new LineBreak ();
}


/**
 * LineGeometry
 **/
LineGeometry *
line_geometry_new (void)
{
	return new LineGeometry ();
}


/**
 * LineSegment
 **/
LineSegment *
line_segment_new (void)
{
	return new LineSegment ();
}


/**
 * Matrix
 **/
Matrix *
matrix_new (void)
{
	return new Matrix ();
}


/**
 * MatrixTransform
 **/
MatrixTransform *
matrix_transform_new (void)
{
	return new MatrixTransform ();
}


/**
 * MediaAttribute
 **/
MediaAttribute *
media_attribute_new (void)
{
	return new MediaAttribute ();
}


/**
 * MediaAttributeCollection
 **/
MediaAttribute *
media_attribute_collection_get_item_by_name (MediaAttributeCollection *instance, const char *name)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetItemByName (name);
}


MediaAttributeCollection *
media_attribute_collection_new (void)
{
	return new MediaAttributeCollection ();
}


/**
 * MediaBase
 **/
MediaBase *
media_base_new (void)
{
	return new MediaBase ();
}


void
media_base_set_source (MediaBase *instance, const char *uri)
{
	if (instance == NULL)
		return;
	
	instance->SetSource (uri);
}


/**
 * MediaElement
 **/
MediaElement *
media_element_new (void)
{
	return new MediaElement ();
}


void
media_element_pause (MediaElement *instance)
{
	if (instance == NULL)
		return;
	
	instance->Pause ();
}


void
media_element_play (MediaElement *instance)
{
	if (instance == NULL)
		return;
	
	instance->Play ();
}


#if SL_2_0
void
media_element_set_stream_source (MediaElement *instance, ManagedStreamCallbacks *stream)
{
	if (instance == NULL)
		return;
	
	instance->SetStreamSource (stream);
}
#endif


void
media_element_stop (MediaElement *instance)
{
	if (instance == NULL)
		return;
	
	instance->Stop ();
}


/**
 * MoonWindow
 **/
bool
moon_window_get_transparent (MoonWindow *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->GetTransparent ();
}


void
moon_window_set_transparent (MoonWindow *instance, bool flag)
{
	if (instance == NULL)
		return;
	
	instance->SetTransparent (flag);
}


/**
 * MoonWindowGtk
 **/
GtkWidget *
moon_window_gtk_get_widget (MoonWindowGtk *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetWidget ();
}


MoonWindowGtk *
moon_window_gtk_new (bool fullscreen, int w, int h, MoonWindow *parent)
{
	return new MoonWindowGtk (fullscreen, w, h, parent);
}


/**
 * MouseEventArgs
 **/
void
mouse_event_args_get_position (MouseEventArgs *instance, UIElement *relative_to, double *x, double *y)
{
	if (instance == NULL)
		return;
	
	instance->GetPosition (relative_to, x, y);
}


StylusPointCollection *
mouse_event_args_get_stylus_points (MouseEventArgs *instance, UIElement *ink_presenter)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetStylusPoints (ink_presenter);
}


MouseEventArgs *
mouse_event_args_new (void)
{
	return new MouseEventArgs ();
}


#if SL_2_0
/**
 * MultiScaleImage
 **/
MultiScaleImage *
multi_scale_image_new (void)
{
	return new MultiScaleImage ();
}
#endif


#if SL_2_0
void
multi_scale_image_zoom_about_logical_point (MultiScaleImage *instance, double zoomIncrementFactor, double zoomCenterLogicalX, double zoomCenterLogicalY)
{
	if (instance == NULL)
		return;
	
	instance->ZoomAboutLogicalPoint (zoomIncrementFactor, zoomCenterLogicalX, zoomCenterLogicalY);
}
#endif


#if SL_2_0
/**
 * MultiScaleSubImage
 **/
MultiScaleSubImage *
multi_scale_sub_image_new (void)
{
	return new MultiScaleSubImage ();
}
#endif


#if SL_2_0
/**
 * MultiScaleTileSource
 **/
int
multi_scale_tile_source_get_image_height (MultiScaleTileSource *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetImageHeight ();
}
#endif


#if SL_2_0
int
multi_scale_tile_source_get_image_width (MultiScaleTileSource *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetImageWidth ();
}
#endif


#if SL_2_0
int
multi_scale_tile_source_get_tile_height (MultiScaleTileSource *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetTileHeight ();
}
#endif


#if SL_2_0
int
multi_scale_tile_source_get_tile_overlap (MultiScaleTileSource *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetTileOverlap ();
}
#endif


#if SL_2_0
int
multi_scale_tile_source_get_tile_width (MultiScaleTileSource *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (int) 0;
	
	return instance->GetTileWidth ();
}
#endif


#if SL_2_0
MultiScaleTileSource *
multi_scale_tile_source_new (void)
{
	return new MultiScaleTileSource ();
}
#endif


#if SL_2_0
void
multi_scale_tile_source_set_image_height (MultiScaleTileSource *instance, int height)
{
	if (instance == NULL)
		return;
	
	instance->SetImageHeight (height);
}
#endif


#if SL_2_0
void
multi_scale_tile_source_set_image_width (MultiScaleTileSource *instance, int width)
{
	if (instance == NULL)
		return;
	
	instance->SetImageWidth (width);
}
#endif


#if SL_2_0
void
multi_scale_tile_source_set_tile_height (MultiScaleTileSource *instance, int height)
{
	if (instance == NULL)
		return;
	
	instance->SetTileHeight (height);
}
#endif


#if SL_2_0
void
multi_scale_tile_source_set_tile_overlap (MultiScaleTileSource *instance, int overlap)
{
	if (instance == NULL)
		return;
	
	instance->SetTileOverlap (overlap);
}
#endif


#if SL_2_0
void
multi_scale_tile_source_set_tile_width (MultiScaleTileSource *instance, int width)
{
	if (instance == NULL)
		return;
	
	instance->SetTileWidth (width);
}
#endif


#if SL_2_0
/**
 * ObjectAnimationUsingKeyFrames
 **/
ObjectAnimationUsingKeyFrames *
object_animation_using_key_frames_new (void)
{
	return new ObjectAnimationUsingKeyFrames ();
}
#endif


#if SL_2_0
/**
 * ObjectKeyFrame
 **/
ObjectKeyFrame *
object_key_frame_new (void)
{
	return new ObjectKeyFrame ();
}
#endif


#if SL_2_0
/**
 * ObjectKeyFrameCollection
 **/
ObjectKeyFrameCollection *
object_key_frame_collection_new (void)
{
	return new ObjectKeyFrameCollection ();
}
#endif


/**
 * Panel
 **/
Panel *
panel_new (void)
{
	return new Panel ();
}


/**
 * ParallelTimeline
 **/
ParallelTimeline *
parallel_timeline_new (void)
{
	return new ParallelTimeline ();
}


/**
 * Path
 **/
Path *
path_new (void)
{
	return new Path ();
}


/**
 * PathFigure
 **/
PathFigure *
path_figure_new (void)
{
	return new PathFigure ();
}


/**
 * PathFigureCollection
 **/
PathFigureCollection *
path_figure_collection_new (void)
{
	return new PathFigureCollection ();
}


/**
 * PathGeometry
 **/
PathGeometry *
path_geometry_new (void)
{
	return new PathGeometry ();
}


/**
 * PathSegment
 **/
PathSegment *
path_segment_new (void)
{
	return new PathSegment ();
}


/**
 * PathSegmentCollection
 **/
PathSegmentCollection *
path_segment_collection_new (void)
{
	return new PathSegmentCollection ();
}


/**
 * PointAnimation
 **/
PointAnimation *
point_animation_new (void)
{
	return new PointAnimation ();
}


/**
 * PointAnimationUsingKeyFrames
 **/
PointAnimationUsingKeyFrames *
point_animation_using_key_frames_new (void)
{
	return new PointAnimationUsingKeyFrames ();
}


/**
 * PointCollection
 **/
PointCollection *
point_collection_new (void)
{
	return new PointCollection ();
}


/**
 * PointKeyFrame
 **/
PointKeyFrame *
point_key_frame_new (void)
{
	return new PointKeyFrame ();
}


/**
 * PointKeyFrameCollection
 **/
PointKeyFrameCollection *
point_key_frame_collection_new (void)
{
	return new PointKeyFrameCollection ();
}


/**
 * PolyBezierSegment
 **/
PolyBezierSegment *
poly_bezier_segment_new (void)
{
	return new PolyBezierSegment ();
}


void
poly_bezier_segment_set_points (PolyBezierSegment *instance, PointCollection *points)
{
	if (instance == NULL)
		return;
	
	instance->SetPoints (points);
}


/**
 * Polygon
 **/
Polygon *
polygon_new (void)
{
	return new Polygon ();
}


/**
 * Polyline
 **/
Polyline *
polyline_new (void)
{
	return new Polyline ();
}


/**
 * PolyLineSegment
 **/
PolyLineSegment *
poly_line_segment_new (void)
{
	return new PolyLineSegment ();
}


/**
 * PolyQuadraticBezierSegment
 **/
PolyQuadraticBezierSegment *
poly_quadratic_bezier_segment_new (void)
{
	return new PolyQuadraticBezierSegment ();
}


/**
 * QuadraticBezierSegment
 **/
QuadraticBezierSegment *
quadratic_bezier_segment_new (void)
{
	return new QuadraticBezierSegment ();
}


/**
 * RadialGradientBrush
 **/
RadialGradientBrush *
radial_gradient_brush_new (void)
{
	return new RadialGradientBrush ();
}


/**
 * Rectangle
 **/
Rectangle *
rectangle_new (void)
{
	return new Rectangle ();
}


/**
 * RectangleGeometry
 **/
RectangleGeometry *
rectangle_geometry_new (void)
{
	return new RectangleGeometry ();
}


/**
 * ResourceDictionary
 **/
bool
resource_dictionary_add_with_error (ResourceDictionary *instance, const char *key, Value *value, MoonError *error)
{
	if (instance == NULL)
		return false;
	
	if (error == NULL)
		g_warning ("Moonlight: Called resource_dictionary_add_with_error () with error == NULL.");
	return instance->AddWithError (key, value, error);
}


bool
resource_dictionary_clear (ResourceDictionary *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->Clear ();
}


bool
resource_dictionary_contains_key (ResourceDictionary *instance, const char *key)
{
	if (instance == NULL)
		return false;
	
	return instance->ContainsKey (key);
}


Value *
resource_dictionary_get (ResourceDictionary *instance, const char *key, bool *exists)
{
	if (instance == NULL)
		return NULL;
	
	return instance->Get (key, exists);
}


bool
resource_dictionary_remove (ResourceDictionary *instance, const char *key)
{
	if (instance == NULL)
		return false;
	
	return instance->Remove (key);
}


ResourceDictionary *
resource_dictionary_new (void)
{
	return new ResourceDictionary ();
}


bool
resource_dictionary_set (ResourceDictionary *instance, const char *key, Value *value)
{
	if (instance == NULL)
		return false;
	
	return instance->Set (key, value);
}


/**
 * RotateTransform
 **/
RotateTransform *
rotate_transform_new (void)
{
	return new RotateTransform ();
}


/**
 * RoutedEventArgs
 **/
bool
routed_event_args_get_handled (RoutedEventArgs *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->GetHandled ();
}


DependencyObject *
routed_event_args_get_source (RoutedEventArgs *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetSource ();
}


RoutedEventArgs *
routed_event_args_new (void)
{
	return new RoutedEventArgs ();
}


void
routed_event_args_set_handled (RoutedEventArgs *instance, bool handled)
{
	if (instance == NULL)
		return;
	
	instance->SetHandled (handled);
}


void
routed_event_args_set_source (RoutedEventArgs *instance, DependencyObject *el)
{
	if (instance == NULL)
		return;
	
	instance->SetSource (el);
}


#if SL_2_0
/**
 * RowDefinition
 **/
double
row_definition_get_actual_height (RowDefinition *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (double) 0;
	
	return instance->GetActualHeight ();
}
#endif


#if SL_2_0
RowDefinition *
row_definition_new (void)
{
	return new RowDefinition ();
}
#endif


#if SL_2_0
/**
 * RowDefinitionCollection
 **/
RowDefinitionCollection *
row_definition_collection_new (void)
{
	return new RowDefinitionCollection ();
}
#endif


/**
 * Run
 **/
Run *
run_new (void)
{
	return new Run ();
}


/**
 * ScaleTransform
 **/
ScaleTransform *
scale_transform_new (void)
{
	return new ScaleTransform ();
}


#if SL_2_0
/**
 * SelectionChangedEventArgs
 **/
GPtrArray *
selection_changed_event_args_get_added_items (SelectionChangedEventArgs *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetAddedItems ();
}
#endif


#if SL_2_0
GPtrArray *
selection_changed_event_args_get_removed_items (SelectionChangedEventArgs *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetRemovedItems ();
}
#endif


#if SL_2_0
SelectionChangedEventArgs *
selection_changed_event_args_new (void)
{
	return new SelectionChangedEventArgs ();
}
#endif


#if SL_2_0
void
selection_changed_event_args_set_added_items (SelectionChangedEventArgs *instance, GPtrArray *addedItems)
{
	if (instance == NULL)
		return;
	
	instance->SetAddedItems (addedItems);
}
#endif


#if SL_2_0
void
selection_changed_event_args_set_removed_items (SelectionChangedEventArgs *instance, GPtrArray *removedItems)
{
	if (instance == NULL)
		return;
	
	instance->SetRemovedItems (removedItems);
}
#endif


#if SL_2_0
/**
 * Setter
 **/
Setter *
setter_new (void)
{
	return new Setter ();
}
#endif


#if SL_2_0
/**
 * SetterBase
 **/
SetterBase *
setter_base_new (void)
{
	return new SetterBase ();
}
#endif


#if SL_2_0
/**
 * SetterBaseCollection
 **/
SetterBaseCollection *
setter_base_collection_new (void)
{
	return new SetterBaseCollection ();
}
#endif


/**
 * Shape
 **/
Shape *
shape_new (void)
{
	return new Shape ();
}


#if SL_2_0
/**
 * SizeChangedEventArgs
 **/
SizeChangedEventArgs *
size_changed_event_args_new (void)
{
	return new SizeChangedEventArgs ();
}
#endif


/**
 * SkewTransform
 **/
SkewTransform *
skew_transform_new (void)
{
	return new SkewTransform ();
}


/**
 * SolidColorBrush
 **/
SolidColorBrush *
solid_color_brush_new (void)
{
	return new SolidColorBrush ();
}


/**
 * SplineColorKeyFrame
 **/
SplineColorKeyFrame *
spline_color_key_frame_new (void)
{
	return new SplineColorKeyFrame ();
}


/**
 * SplineDoubleKeyFrame
 **/
SplineDoubleKeyFrame *
spline_double_key_frame_new (void)
{
	return new SplineDoubleKeyFrame ();
}


/**
 * SplinePointKeyFrame
 **/
SplinePointKeyFrame *
spline_point_key_frame_new (void)
{
	return new SplinePointKeyFrame ();
}


#if SL_2_0
/**
 * StackPanel
 **/
StackPanel *
stack_panel_new (void)
{
	return new StackPanel ();
}
#endif


/**
 * Storyboard
 **/
bool
storyboard_begin (Storyboard *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->Begin ();
}


void
storyboard_pause (Storyboard *instance)
{
	if (instance == NULL)
		return;
	
	instance->Pause ();
}


void
storyboard_resume (Storyboard *instance)
{
	if (instance == NULL)
		return;
	
	instance->Resume ();
}


void
storyboard_seek (Storyboard *instance, TimeSpan timespan)
{
	if (instance == NULL)
		return;
	
	instance->Seek (timespan);
}


void
storyboard_stop (Storyboard *instance)
{
	if (instance == NULL)
		return;
	
	instance->Stop ();
}


Storyboard *
storyboard_new (void)
{
	return new Storyboard ();
}


/**
 * Stroke
 **/
bool
stroke_hit_test (Stroke *instance, StylusPointCollection *stylusPoints)
{
	if (instance == NULL)
		return false;
	
	return instance->HitTest (stylusPoints);
}


Stroke *
stroke_new (void)
{
	return new Stroke ();
}


/**
 * StrokeCollection
 **/
StrokeCollection *
stroke_collection_hit_test (StrokeCollection *instance, StylusPointCollection *stylusPoints)
{
	if (instance == NULL)
		return NULL;
	
	return instance->HitTest (stylusPoints);
}


StrokeCollection *
stroke_collection_new (void)
{
	return new StrokeCollection ();
}


#if SL_2_0
/**
 * Style
 **/
Style *
style_new (void)
{
	return new Style ();
}
#endif


/**
 * StylusInfo
 **/
StylusInfo *
stylus_info_new (void)
{
	return new StylusInfo ();
}


/**
 * StylusPoint
 **/
StylusPoint *
stylus_point_new (void)
{
	return new StylusPoint ();
}


/**
 * StylusPointCollection
 **/
StylusPointCollection *
stylus_point_collection_new (void)
{
	return new StylusPointCollection ();
}


/**
 * Surface
 **/
void
surface_attach (Surface *instance, UIElement *toplevel)
{
	if (instance == NULL)
		return;
	
	instance->Attach (toplevel);
}


Downloader *
surface_create_downloader (Surface *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->CreateDownloader ();
}


#if SL_2_0
bool
surface_focus_element (Surface *instance, UIElement *element)
{
	if (instance == NULL)
		return false;
	
	return instance->FocusElement (element);
}
#endif


#if SL_2_0
UIElement *
surface_get_focused_element (Surface *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetFocusedElement ();
}
#endif


TimeManager *
surface_get_time_manager (Surface *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetTimeManager ();
}


MoonWindow *
surface_get_window (Surface *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetWindow ();
}


bool
surface_in_main_thread (void)
{
	return Surface::InMainThread ();
}


void
surface_paint (Surface *instance, cairo_t *ctx, int x, int y, int width, int height)
{
	if (instance == NULL)
		return;
	
	instance->Paint (ctx, x, y, width, height);
}


void
surface_resize (Surface *instance, int width, int height)
{
	if (instance == NULL)
		return;
	
	instance->Resize (width, height);
}


Surface *
surface_new (MoonWindow *window, bool silverlight2)
{
	return new Surface (window, silverlight2);
}


/**
 * TextBlock
 **/
TextBlock *
text_block_new (void)
{
	return new TextBlock ();
}


#if SL_2_0
/**
 * TextBox
 **/
void
text_box_select (TextBox *instance, int start, int length)
{
	if (instance == NULL)
		return;
	
	instance->Select (start, length);
}
#endif


#if SL_2_0
TextBox *
text_box_new (void)
{
	return new TextBox ();
}
#endif


#if SL_2_0
/**
 * TextChangedEventArgs
 **/
TextChangedEventArgs *
text_changed_event_args_new (void)
{
	return new TextChangedEventArgs ();
}
#endif


/**
 * TileBrush
 **/
TileBrush *
tile_brush_new (void)
{
	return new TileBrush ();
}


/**
 * Timeline
 **/
void
timeline_set_manual_target (Timeline *instance, DependencyObject *o)
{
	if (instance == NULL)
		return;
	
	instance->SetManualTarget (o);
}


Timeline *
timeline_new (void)
{
	return new Timeline ();
}


/**
 * TimelineCollection
 **/
TimelineCollection *
timeline_collection_new (void)
{
	return new TimelineCollection ();
}


/**
 * TimelineGroup
 **/
TimelineGroup *
timeline_group_new (void)
{
	return new TimelineGroup ();
}


/**
 * TimelineMarker
 **/
TimelineMarker *
timeline_marker_new (void)
{
	return new TimelineMarker ();
}


/**
 * TimelineMarkerCollection
 **/
TimelineMarkerCollection *
timeline_marker_collection_new (void)
{
	return new TimelineMarkerCollection ();
}


/**
 * Transform
 **/
Transform *
transform_new (void)
{
	return new Transform ();
}


/**
 * TransformCollection
 **/
TransformCollection *
transform_collection_new (void)
{
	return new TransformCollection ();
}


/**
 * TransformGroup
 **/
TransformGroup *
transform_group_new (void)
{
	return new TransformGroup ();
}


/**
 * TranslateTransform
 **/
TranslateTransform *
translate_transform_new (void)
{
	return new TranslateTransform ();
}


/**
 * TriggerAction
 **/
void
trigger_action_fire (TriggerAction *instance)
{
	if (instance == NULL)
		return;
	
	instance->Fire ();
}


TriggerAction *
trigger_action_new (void)
{
	return new TriggerAction ();
}


/**
 * TriggerActionCollection
 **/
TriggerActionCollection *
trigger_action_collection_new (void)
{
	return new TriggerActionCollection ();
}


/**
 * TriggerCollection
 **/
TriggerCollection *
trigger_collection_new (void)
{
	return new TriggerCollection ();
}


#if SL_2_0
/**
 * Types
 **/
void
types_free (Types *instance)
{
	delete instance;
}
#endif


#if SL_2_0
Type *
types_find (Types *instance, Type::Kind type)
{
	if (instance == NULL)
		return NULL;
	
	return instance->Find (type);
}
#endif


#if SL_2_0
Type::Kind
types_register_type (Types *instance, const char *name, void *gc_handle, Type::Kind parent)
{
	if (instance == NULL)
		return Type::INVALID;
	
	return instance->RegisterType (name, gc_handle, parent);
}
#endif


#if SL_2_0
Types *
types_new (void)
{
	return new Types ();
}
#endif


/**
 * UIElement
 **/
void
uielement_arrange (UIElement *instance, Rect finalRect)
{
	if (instance == NULL)
		return;
	
	instance->Arrange (finalRect);
}


bool
uielement_capture_mouse (UIElement *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->CaptureMouse ();
}


Size
uielement_get_desired_size (UIElement *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (Size) 0;
	
	return instance->GetDesiredSize ();
}


Size
uielement_get_render_size (UIElement *instance)
{
	if (instance == NULL)
		// Need to find a property way to get the default value for the specified type and return that if instance is NULL.
		return (Size) 0;
	
	return instance->GetRenderSize ();
}


DependencyObject *
uielement_get_subtree_object (UIElement *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetSubtreeObject ();
}


#if SL_2_0
GeneralTransform *
uielement_get_transform_to_uielement (UIElement *instance, UIElement *to_element)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetTransformToUIElement (to_element);
}
#endif


UIElement *
uielement_get_visual_parent (UIElement *instance)
{
	if (instance == NULL)
		return NULL;
	
	return instance->GetVisualParent ();
}


void
uielement_invalidate_arrange (UIElement *instance)
{
	if (instance == NULL)
		return;
	
	instance->InvalidateArrange ();
}


void
uielement_invalidate_measure (UIElement *instance)
{
	if (instance == NULL)
		return;
	
	instance->InvalidateMeasure ();
}


void
uielement_measure (UIElement *instance, Size availableSize)
{
	if (instance == NULL)
		return;
	
	instance->Measure (availableSize);
}


void
uielement_release_mouse_capture (UIElement *instance)
{
	if (instance == NULL)
		return;
	
	instance->ReleaseMouseCapture ();
}


bool
uielement_update_layout (UIElement *instance)
{
	if (instance == NULL)
		return false;
	
	return instance->UpdateLayout ();
}


/**
 * UIElementCollection
 **/
UIElementCollection *
uielement_collection_new (void)
{
	return new UIElementCollection ();
}


#if SL_2_0
/**
 * UserControl
 **/
UserControl *
user_control_new (void)
{
	return new UserControl ();
}
#endif


/**
 * VideoBrush
 **/
VideoBrush *
video_brush_new (void)
{
	return new VideoBrush ();
}


/**
 * VisualBrush
 **/
VisualBrush *
visual_brush_new (void)
{
	return new VisualBrush ();
}


/**
 * XamlLoader
 **/
DependencyObject *
xaml_loader_create_from_file_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, Type::Kind *element_type, MoonError *error)
{
	if (instance == NULL)
		return NULL;
	
	if (error == NULL)
		g_warning ("Moonlight: Called xaml_loader_create_from_file_with_error () with error == NULL.");
	return instance->CreateFromFileWithError (xaml, create_namescope, element_type, error);
}


DependencyObject *
xaml_loader_create_from_string_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, Type::Kind *element_type, MoonError *error)
{
	if (instance == NULL)
		return NULL;
	
	if (error == NULL)
		g_warning ("Moonlight: Called xaml_loader_create_from_string_with_error () with error == NULL.");
	return instance->CreateFromStringWithError (xaml, create_namescope, element_type, error);
}


DependencyObject *
xaml_loader_hydrate_from_string_with_error (XamlLoader *instance, const char *default_asm_name, const char *default_asm_path, const char *xaml, DependencyObject *obj, bool create_namescope, Type::Kind *element_type, MoonError *error)
{
	if (instance == NULL)
		return NULL;
	
	if (error == NULL)
		g_warning ("Moonlight: Called xaml_loader_hydrate_from_string_with_error () with error == NULL.");
	return instance->HydrateFromStringWithError (default_asm_name, default_asm_path, xaml, obj, create_namescope, element_type, error);
}


#if SL_2_0
/**
 * Xap
 **/
char *
xap_unpack (const char *fname)
{
	return Xap::Unpack (fname);
}
#endif


