2009-08-26 Chris Toshok <toshok@ximian.com>
[moon.git] / src / cbinding.cpp
blob855b9e6f42ba365f2c710aa13bd07296300bf2d4
1 /*
2 * Automatically generated, do not edit this file directly
3 */
5 #include <config.h>
7 #include <stdio.h>
8 #include <stdlib.h>
10 #include "cbinding.h"
12 #include "animation.h"
13 #include "application.h"
14 #include "bitmapimage.h"
15 #include "bitmapsource.h"
16 #include "border.h"
17 #include "brush.h"
18 #include "canvas.h"
19 #include "collection.h"
20 #include "contentcontrol.h"
21 #include "control.h"
22 #include "deepzoomimagetilesource.h"
23 #include "dependencyobject.h"
24 #include "dependencyproperty.h"
25 #include "deployment.h"
26 #include "downloader.h"
27 #include "easing.h"
28 #include "error.h"
29 #include "eventargs.h"
30 #include "frameworkelement.h"
31 #include "geometry.h"
32 #include "glyphs.h"
33 #include "grid.h"
34 #include "imagesource.h"
35 #include "keyboard.h"
36 #include "media.h"
37 #include "mediaelement.h"
38 #include "multiscaleimage.h"
39 #include "multiscalesubimage.h"
40 #include "namescope.h"
41 #include "panel.h"
42 #include "pipeline.h"
43 #include "popup.h"
44 #include "resources.h"
45 #include "runtime.h"
46 #include "shape.h"
47 #include "size.h"
48 #include "style.h"
49 #include "stylus.h"
50 #include "tabnavigationwalker.h"
51 #include "template.h"
52 #include "textblock.h"
53 #include "textbox.h"
54 #include "tilesource.h"
55 #include "timeline.h"
56 #include "timemanager.h"
57 #include "transform.h"
58 #include "trigger.h"
59 #include "type.h"
60 #include "uielement.h"
61 #include "uri.h"
62 #include "usercontrol.h"
63 #include "window.h"
64 #include "window-gtk.h"
65 #include "writeablebitmap.h"
66 #include "xaml.h"
67 #include "xap.h"
68 /**
69 * Application
70 **/
71 Application *
72 application_new (void)
74 return new Application ();
78 Application *
79 application_get_current (void)
81 return Application::GetCurrent ();
85 void
86 application_register_callbacks (Application *instance, ApplyDefaultStyleCallback apply_default_style_cb, ApplyStyleCallback apply_style_cb, GetResourceCallback get_resource_cb, ConvertKeyframeValueCallback convert_keyframe_callback, GetDefaultTemplateRootCallback get_default_template_root_cb)
88 if (instance == NULL)
89 return;
91 instance->RegisterCallbacks (apply_default_style_cb, apply_style_cb, get_resource_cb, convert_keyframe_callback, get_default_template_root_cb);
95 void
96 application_set_current (Application *current)
98 Application::SetCurrent (current);
103 * ArcSegment
105 ArcSegment *
106 arc_segment_new (void)
108 return new ArcSegment ();
113 * AssemblyPart
115 AssemblyPart *
116 assembly_part_new (void)
118 return new AssemblyPart ();
123 * AssemblyPartCollection
125 AssemblyPartCollection *
126 assembly_part_collection_new (void)
128 return new AssemblyPartCollection ();
133 * AudioStream
135 AudioStream *
136 audio_stream_new (Media *media, int codec_id, int bits_per_sample, int block_align, int sample_rate, int channels, int bit_rate, gpointer extra_data, guint32 extra_data_size)
138 return new AudioStream (media, codec_id, bits_per_sample, block_align, sample_rate, channels, bit_rate, extra_data, extra_data_size);
143 audio_stream_get_bit_rate (AudioStream *instance)
145 if (instance == NULL)
146 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
147 return (int) 0;
149 return instance->GetBitRate ();
154 audio_stream_get_bits_per_sample (AudioStream *instance)
156 if (instance == NULL)
157 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
158 return (int) 0;
160 return instance->GetBitsPerSample ();
165 audio_stream_get_block_align (AudioStream *instance)
167 if (instance == NULL)
168 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
169 return (int) 0;
171 return instance->GetBlockAlign ();
176 audio_stream_get_channels (AudioStream *instance)
178 if (instance == NULL)
179 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
180 return (int) 0;
182 return instance->GetChannels ();
187 audio_stream_get_input_bit_rate (AudioStream *instance)
189 if (instance == NULL)
190 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
191 return (int) 0;
193 return instance->GetInputBitRate ();
198 audio_stream_get_input_bits_per_sample (AudioStream *instance)
200 if (instance == NULL)
201 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
202 return (int) 0;
204 return instance->GetInputBitsPerSample ();
209 audio_stream_get_input_block_align (AudioStream *instance)
211 if (instance == NULL)
212 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
213 return (int) 0;
215 return instance->GetInputBlockAlign ();
220 audio_stream_get_input_channels (AudioStream *instance)
222 if (instance == NULL)
223 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
224 return (int) 0;
226 return instance->GetInputChannels ();
231 audio_stream_get_input_sample_rate (AudioStream *instance)
233 if (instance == NULL)
234 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
235 return (int) 0;
237 return instance->GetInputSampleRate ();
242 audio_stream_get_output_bit_rate (AudioStream *instance)
244 if (instance == NULL)
245 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
246 return (int) 0;
248 return instance->GetOutputBitRate ();
253 audio_stream_get_output_bits_per_sample (AudioStream *instance)
255 if (instance == NULL)
256 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
257 return (int) 0;
259 return instance->GetOutputBitsPerSample ();
264 audio_stream_get_output_block_align (AudioStream *instance)
266 if (instance == NULL)
267 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
268 return (int) 0;
270 return instance->GetOutputBlockAlign ();
275 audio_stream_get_output_channels (AudioStream *instance)
277 if (instance == NULL)
278 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
279 return (int) 0;
281 return instance->GetOutputChannels ();
286 audio_stream_get_output_sample_rate (AudioStream *instance)
288 if (instance == NULL)
289 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
290 return (int) 0;
292 return instance->GetOutputSampleRate ();
297 audio_stream_get_sample_rate (AudioStream *instance)
299 if (instance == NULL)
300 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
301 return (int) 0;
303 return instance->GetSampleRate ();
307 void
308 audio_stream_set_bit_rate (AudioStream *instance, int value)
310 if (instance == NULL)
311 return;
313 instance->SetBitRate (value);
317 void
318 audio_stream_set_bits_per_sample (AudioStream *instance, int value)
320 if (instance == NULL)
321 return;
323 instance->SetBitsPerSample (value);
327 void
328 audio_stream_set_block_align (AudioStream *instance, int value)
330 if (instance == NULL)
331 return;
333 instance->SetBlockAlign (value);
337 void
338 audio_stream_set_channels (AudioStream *instance, int value)
340 if (instance == NULL)
341 return;
343 instance->SetChannels (value);
347 void
348 audio_stream_set_input_bit_rate (AudioStream *instance, int value)
350 if (instance == NULL)
351 return;
353 instance->SetInputBitRate (value);
357 void
358 audio_stream_set_input_bits_per_sample (AudioStream *instance, int value)
360 if (instance == NULL)
361 return;
363 instance->SetInputBitsPerSample (value);
367 void
368 audio_stream_set_input_block_align (AudioStream *instance, int value)
370 if (instance == NULL)
371 return;
373 instance->SetInputBlockAlign (value);
377 void
378 audio_stream_set_input_channels (AudioStream *instance, int value)
380 if (instance == NULL)
381 return;
383 instance->SetInputChannels (value);
387 void
388 audio_stream_set_input_sample_rate (AudioStream *instance, int value)
390 if (instance == NULL)
391 return;
393 instance->SetInputSampleRate (value);
397 void
398 audio_stream_set_output_bit_rate (AudioStream *instance, int value)
400 if (instance == NULL)
401 return;
403 instance->SetOutputBitRate (value);
407 void
408 audio_stream_set_output_bits_per_sample (AudioStream *instance, int value)
410 if (instance == NULL)
411 return;
413 instance->SetOutputBitsPerSample (value);
417 void
418 audio_stream_set_output_block_align (AudioStream *instance, int value)
420 if (instance == NULL)
421 return;
423 instance->SetOutputBlockAlign (value);
427 void
428 audio_stream_set_output_channels (AudioStream *instance, int value)
430 if (instance == NULL)
431 return;
433 instance->SetOutputChannels (value);
437 void
438 audio_stream_set_output_sample_rate (AudioStream *instance, int value)
440 if (instance == NULL)
441 return;
443 instance->SetOutputSampleRate (value);
447 void
448 audio_stream_set_sample_rate (AudioStream *instance, int value)
450 if (instance == NULL)
451 return;
453 instance->SetSampleRate (value);
458 * BackEase
460 BackEase *
461 back_ease_new (void)
463 return new BackEase ();
467 double
468 back_ease_ease_in_core (BackEase *instance, double normalizedTime)
470 if (instance == NULL)
471 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
472 return (double) 0;
474 return instance->EaseInCore (normalizedTime);
479 * BeginStoryboard
481 BeginStoryboard *
482 begin_storyboard_new (void)
484 return new BeginStoryboard ();
489 * BezierSegment
491 BezierSegment *
492 bezier_segment_new (void)
494 return new BezierSegment ();
499 * BitmapImage
501 BitmapImage *
502 bitmap_image_new (void)
504 return new BitmapImage ();
508 void
509 bitmap_image_pixbuf_write (BitmapImage *instance, gpointer buffer, gint32 offset, gint32 n)
511 if (instance == NULL)
512 return;
514 instance->PixbufWrite (buffer, offset, n);
518 void
519 bitmap_image_pixmap_complete (BitmapImage *instance)
521 if (instance == NULL)
522 return;
524 instance->PixmapComplete ();
529 * BitmapSource
531 BitmapSource *
532 bitmap_source_new (void)
534 return new BitmapSource ();
538 gpointer
539 bitmap_source_get_bitmap_data (BitmapSource *instance)
541 if (instance == NULL)
542 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
543 return (gpointer) 0;
545 return instance->GetBitmapData ();
549 void
550 bitmap_source_invalidate (BitmapSource *instance)
552 if (instance == NULL)
553 return;
555 instance->Invalidate ();
559 void
560 bitmap_source_set_bitmap_data (BitmapSource *instance, gpointer data, bool own)
562 if (instance == NULL)
563 return;
565 instance->SetBitmapData (data, own);
570 * Border
572 Border *
573 border_new (void)
575 return new Border ();
580 * BounceEase
582 BounceEase *
583 bounce_ease_new (void)
585 return new BounceEase ();
589 double
590 bounce_ease_ease_in_core (BounceEase *instance, double normalizedTime)
592 if (instance == NULL)
593 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
594 return (double) 0;
596 return instance->EaseInCore (normalizedTime);
601 * Brush
603 Brush *
604 brush_new (void)
606 return new Brush ();
611 * Canvas
613 Canvas *
614 canvas_new (void)
616 return new Canvas ();
621 * CircleEase
623 CircleEase *
624 circle_ease_new (void)
626 return new CircleEase ();
630 double
631 circle_ease_ease_in_core (CircleEase *instance, double normalizedTime)
633 if (instance == NULL)
634 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
635 return (double) 0;
637 return instance->EaseInCore (normalizedTime);
642 * Collection
645 collection_add_with_error (Collection *instance, Value *value, MoonError *error)
647 if (instance == NULL)
648 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
649 return (int) 0;
651 if (error == NULL)
652 g_warning ("Moonlight: Called collection_add_with_error () with error == NULL.");
653 return instance->AddWithError (value, error);
657 bool
658 collection_clear (Collection *instance)
660 if (instance == NULL)
661 return false;
663 return instance->Clear ();
667 bool
668 collection_contains (Collection *instance, Value *value)
670 if (instance == NULL)
671 return false;
673 return instance->Contains (value);
678 collection_get_count (Collection *instance)
680 if (instance == NULL)
681 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
682 return (int) 0;
684 return instance->GetCount ();
689 collection_get_element_type (Collection *instance)
691 if (instance == NULL)
692 return Type::INVALID;
694 return instance->GetElementType ();
698 CollectionIterator *
699 collection_get_iterator (Collection *instance)
701 if (instance == NULL)
702 return NULL;
704 return instance->GetIterator ();
708 Value *
709 collection_get_value_at_with_error (Collection *instance, int index, MoonError *error)
711 if (instance == NULL)
712 return NULL;
714 if (error == NULL)
715 g_warning ("Moonlight: Called collection_get_value_at_with_error () with error == NULL.");
716 return instance->GetValueAtWithError (index, error);
721 collection_index_of (Collection *instance, Value *value)
723 if (instance == NULL)
724 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
725 return (int) 0;
727 return instance->IndexOf (value);
731 bool
732 collection_insert_with_error (Collection *instance, int index, Value *value, MoonError *error)
734 if (instance == NULL)
735 return false;
737 if (error == NULL)
738 g_warning ("Moonlight: Called collection_insert_with_error () with error == NULL.");
739 return instance->InsertWithError (index, value, error);
743 bool
744 collection_remove (Collection *instance, Value *value)
746 if (instance == NULL)
747 return false;
749 return instance->Remove (value);
753 bool
754 collection_remove_at_with_error (Collection *instance, int index, MoonError *error)
756 if (instance == NULL)
757 return false;
759 if (error == NULL)
760 g_warning ("Moonlight: Called collection_remove_at_with_error () with error == NULL.");
761 return instance->RemoveAtWithError (index, error);
765 bool
766 collection_set_value_at_with_error (Collection *instance, int index, Value *value, MoonError *error)
768 if (instance == NULL)
769 return false;
771 if (error == NULL)
772 g_warning ("Moonlight: Called collection_set_value_at_with_error () with error == NULL.");
773 return instance->SetValueAtWithError (index, value, error);
778 * CollectionChangedEventArgs
780 CollectionChangedEventArgs *
781 collection_changed_event_args_new (void)
783 return new CollectionChangedEventArgs ();
788 collection_changed_event_args_get_changed_action (CollectionChangedEventArgs *instance)
790 if (instance == NULL)
791 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
792 return (CollectionChangedAction) 0;
794 return instance->GetChangedAction ();
799 collection_changed_event_args_get_index (CollectionChangedEventArgs *instance)
801 if (instance == NULL)
802 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
803 return (int) 0;
805 return instance->GetIndex ();
809 Value *
810 collection_changed_event_args_get_new_item (CollectionChangedEventArgs *instance)
812 if (instance == NULL)
813 return NULL;
815 return instance->GetNewItem ();
819 Value *
820 collection_changed_event_args_get_old_item (CollectionChangedEventArgs *instance)
822 if (instance == NULL)
823 return NULL;
825 return instance->GetOldItem ();
829 void
830 collection_changed_event_args_set_changed_action (CollectionChangedEventArgs *instance, int action)
832 if (instance == NULL)
833 return;
835 instance->SetChangedAction ((CollectionChangedAction) action);
839 void
840 collection_changed_event_args_set_index (CollectionChangedEventArgs *instance, int index)
842 if (instance == NULL)
843 return;
845 instance->SetIndex (index);
849 void
850 collection_changed_event_args_set_new_item (CollectionChangedEventArgs *instance, Value *item)
852 if (instance == NULL)
853 return;
855 instance->SetNewItem (item);
859 void
860 collection_changed_event_args_set_old_item (CollectionChangedEventArgs *instance, Value *item)
862 if (instance == NULL)
863 return;
865 instance->SetOldItem (item);
870 * CollectionIterator
872 void
873 collection_iterator_destroy (CollectionIterator *iterator)
875 CollectionIterator::Destroy (iterator);
879 Value *
880 collection_iterator_get_current (CollectionIterator *instance, int *error)
882 if (instance == NULL)
883 return NULL;
885 return instance->GetCurrent (error);
890 collection_iterator_next (CollectionIterator *instance)
892 if (instance == NULL)
893 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
894 return (int) 0;
896 return instance->Next ();
900 bool
901 collection_iterator_reset (CollectionIterator *instance)
903 if (instance == NULL)
904 return false;
906 return instance->Reset ();
911 * ColorAnimation
913 ColorAnimation *
914 color_animation_new (void)
916 return new ColorAnimation ();
921 * ColorAnimationUsingKeyFrames
923 ColorAnimationUsingKeyFrames *
924 color_animation_using_key_frames_new (void)
926 return new ColorAnimationUsingKeyFrames ();
931 * ColorKeyFrame
933 ColorKeyFrame *
934 color_key_frame_new (void)
936 return new ColorKeyFrame ();
941 * ColorKeyFrameCollection
943 ColorKeyFrameCollection *
944 color_key_frame_collection_new (void)
946 return new ColorKeyFrameCollection ();
951 * ColumnDefinition
953 ColumnDefinition *
954 column_definition_new (void)
956 return new ColumnDefinition ();
961 * ColumnDefinitionCollection
963 ColumnDefinitionCollection *
964 column_definition_collection_new (void)
966 return new ColumnDefinitionCollection ();
971 * ContentChangedEventArgs
973 Value *
974 content_changed_event_args_get_new_content (ContentChangedEventArgs *instance)
976 if (instance == NULL)
977 return NULL;
979 return instance->GetNewContent ();
983 Value *
984 content_changed_event_args_get_old_content (ContentChangedEventArgs *instance)
986 if (instance == NULL)
987 return NULL;
989 return instance->GetOldContent ();
994 * ContentControl
996 ContentControl *
997 content_control_new (void)
999 return new ContentControl ();
1003 bool
1004 content_control_get_content_sets_parent (ContentControl *instance)
1006 if (instance == NULL)
1007 return false;
1009 return instance->GetContentSetsParent ();
1013 void
1014 content_control_set_content_sets_parent (ContentControl *instance, bool value)
1016 if (instance == NULL)
1017 return;
1019 instance->SetContentSetsParent (value);
1024 * Control
1026 bool
1027 control_apply_template (Control *instance)
1029 if (instance == NULL)
1030 return false;
1032 return instance->ApplyTemplate ();
1036 Control *
1037 control_new (void)
1039 return new Control ();
1043 DependencyObject *
1044 control_get_template_child (Control *instance, const char *name)
1046 if (instance == NULL)
1047 return NULL;
1049 return instance->GetTemplateChild (name);
1054 * ControlTemplate
1056 ControlTemplate *
1057 control_template_new (void)
1059 return new ControlTemplate ();
1064 * CubicEase
1066 CubicEase *
1067 cubic_ease_new (void)
1069 return new CubicEase ();
1073 double
1074 cubic_ease_ease_in_core (CubicEase *instance, double normalizedTime)
1076 if (instance == NULL)
1077 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1078 return (double) 0;
1080 return instance->EaseInCore (normalizedTime);
1085 * CursorPositionChangedEventArgs
1087 CursorPositionChangedEventArgs *
1088 cursor_position_changed_event_args_new (void)
1090 return new CursorPositionChangedEventArgs ();
1094 double
1095 cursor_position_changed_event_args_get_cursor_height (CursorPositionChangedEventArgs *instance)
1097 if (instance == NULL)
1098 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1099 return (double) 0;
1101 return instance->GetCursorHeight ();
1105 double
1106 cursor_position_changed_event_args_get_cursor_x (CursorPositionChangedEventArgs *instance)
1108 if (instance == NULL)
1109 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1110 return (double) 0;
1112 return instance->GetCursorX ();
1116 double
1117 cursor_position_changed_event_args_get_cursor_y (CursorPositionChangedEventArgs *instance)
1119 if (instance == NULL)
1120 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1121 return (double) 0;
1123 return instance->GetCursorY ();
1128 * DataTemplate
1130 DataTemplate *
1131 data_template_new (void)
1133 return new DataTemplate ();
1138 * DeepZoomImageTileSource
1140 DeepZoomImageTileSource *
1141 deep_zoom_image_tile_source_new (void)
1143 return new DeepZoomImageTileSource ();
1148 * DependencyObject
1150 void
1151 dependency_object_add_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb, gpointer closure)
1153 if (instance == NULL)
1154 return;
1156 instance->AddPropertyChangeHandler (property, cb, closure);
1160 void
1161 dependency_object_clear_value (DependencyObject *instance, DependencyProperty *property, bool notify_listeners, MoonError *error)
1163 if (instance == NULL)
1164 return;
1166 if (error == NULL)
1167 g_warning ("Moonlight: Called dependency_object_clear_value () with error == NULL.");
1168 instance->ClearValue (property, notify_listeners, error);
1172 DependencyObject *
1173 dependency_object_new (void)
1175 return new DependencyObject ();
1179 DependencyObject *
1180 dependency_object_find_name (DependencyObject *instance, const char *name, int *element_kind)
1182 if (instance == NULL)
1183 return NULL;
1185 return instance->FindName (name, (Type::Kind*) element_kind);
1189 const char *
1190 dependency_object_get_name (DependencyObject *instance)
1192 if (instance == NULL)
1193 return NULL;
1195 return instance->GetName ();
1199 Value *
1200 dependency_object_get_value_no_default_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1202 if (instance == NULL)
1203 return NULL;
1205 if (error == NULL)
1206 g_warning ("Moonlight: Called dependency_object_get_value_no_default_with_error () with error == NULL.");
1207 return instance->GetValueNoDefaultWithError (property, error);
1211 Value *
1212 dependency_object_get_value_with_error (DependencyObject *instance, int whatami, DependencyProperty *property, MoonError *error)
1214 if (instance == NULL)
1215 return NULL;
1217 if (error == NULL)
1218 g_warning ("Moonlight: Called dependency_object_get_value_with_error () with error == NULL.");
1219 return instance->GetValueWithError ((Type::Kind) whatami, property, error);
1223 Value *
1224 dependency_object_read_local_value_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1226 if (instance == NULL)
1227 return NULL;
1229 if (error == NULL)
1230 g_warning ("Moonlight: Called dependency_object_read_local_value_with_error () with error == NULL.");
1231 return instance->ReadLocalValueWithError (property, error);
1235 void
1236 dependency_object_remove_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb)
1238 if (instance == NULL)
1239 return;
1241 instance->RemovePropertyChangeHandler (property, cb);
1245 void
1246 dependency_object_set_name (DependencyObject *instance, const char *name)
1248 if (instance == NULL)
1249 return;
1251 instance->SetName (name);
1255 void
1256 dependency_object_set_parent (DependencyObject *instance, DependencyObject *parent, MoonError *error)
1258 if (instance == NULL)
1259 return;
1261 if (error == NULL)
1262 g_warning ("Moonlight: Called dependency_object_set_parent () with error == NULL.");
1263 instance->SetParent (parent, error);
1267 bool
1268 dependency_object_set_value_with_error (DependencyObject *instance, DependencyProperty *property, Value *value, MoonError *error)
1270 if (instance == NULL)
1271 return false;
1273 if (error == NULL)
1274 g_warning ("Moonlight: Called dependency_object_set_value_with_error () with error == NULL.");
1275 return instance->SetValueWithError (property, value, error);
1280 * DependencyObjectCollection
1282 DependencyObjectCollection *
1283 dependency_object_collection_new (void)
1285 return new DependencyObjectCollection ();
1290 * DependencyProperty
1292 Value *
1293 dependency_property_get_default_value (DependencyProperty *instance)
1295 if (instance == NULL)
1296 return NULL;
1298 return instance->GetDefaultValue ();
1302 DependencyProperty *
1303 dependency_property_get_dependency_property (int type, const char *name)
1305 return DependencyProperty::GetDependencyProperty ((Type::Kind) type, name);
1309 DependencyProperty *
1310 dependency_property_get_dependency_property_full (int type, const char *name, bool inherits)
1312 return DependencyProperty::GetDependencyPropertyFull ((Type::Kind) type, name, inherits);
1316 const char *
1317 dependency_property_get_name (DependencyProperty *instance)
1319 if (instance == NULL)
1320 return NULL;
1322 return instance->GetName ();
1327 dependency_property_get_property_type (DependencyProperty *instance)
1329 if (instance == NULL)
1330 return Type::INVALID;
1332 return instance->GetPropertyType ();
1336 bool
1337 dependency_property_is_attached (DependencyProperty *instance)
1339 if (instance == NULL)
1340 return false;
1342 return instance->IsAttached ();
1346 bool
1347 dependency_property_is_nullable (DependencyProperty *instance)
1349 if (instance == NULL)
1350 return false;
1352 return instance->IsNullable ();
1356 bool
1357 dependency_property_is_read_only (DependencyProperty *instance)
1359 if (instance == NULL)
1360 return false;
1362 return instance->IsReadOnly ();
1366 DependencyProperty *
1367 dependency_property_register_core_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1369 return DependencyProperty::RegisterCoreProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1373 DependencyProperty *
1374 dependency_property_register_custom_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1376 return DependencyProperty::RegisterCustomProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1380 void
1381 dependency_property_set_is_nullable (DependencyProperty *instance, bool value)
1383 if (instance == NULL)
1384 return;
1386 instance->SetIsNullable (value);
1390 void
1391 dependency_property_set_property_changed_callback (DependencyProperty *instance, PropertyChangeHandler changed_callback)
1393 if (instance == NULL)
1394 return;
1396 instance->SetPropertyChangedCallback (changed_callback);
1401 * Deployment
1403 Deployment *
1404 deployment_new (void)
1406 return new Deployment ();
1410 Deployment *
1411 deployment_get_current (void)
1413 return Deployment::GetCurrent ();
1417 Types *
1418 deployment_get_types (Deployment *instance)
1420 if (instance == NULL)
1421 return NULL;
1423 return instance->GetTypes ();
1427 void
1428 deployment_set_current (Deployment *value)
1430 Deployment::SetCurrent (value);
1434 void
1435 deployment_set_current_application (Deployment *instance, Application *value)
1437 if (instance == NULL)
1438 return;
1440 instance->SetCurrentApplication (value);
1444 void
1445 deployment_set_is_loaded_from_xap (Deployment *instance, bool flag)
1447 if (instance == NULL)
1448 return;
1450 instance->SetIsLoadedFromXap (flag);
1455 * DiscreteColorKeyFrame
1457 DiscreteColorKeyFrame *
1458 discrete_color_key_frame_new (void)
1460 return new DiscreteColorKeyFrame ();
1465 * DiscreteDoubleKeyFrame
1467 DiscreteDoubleKeyFrame *
1468 discrete_double_key_frame_new (void)
1470 return new DiscreteDoubleKeyFrame ();
1475 * DiscreteObjectKeyFrame
1477 DiscreteObjectKeyFrame *
1478 discrete_object_key_frame_new (void)
1480 return new DiscreteObjectKeyFrame ();
1485 * DiscretePointKeyFrame
1487 DiscretePointKeyFrame *
1488 discrete_point_key_frame_new (void)
1490 return new DiscretePointKeyFrame ();
1495 * DispatcherTimer
1497 DispatcherTimer *
1498 dispatcher_timer_new (void)
1500 return new DispatcherTimer ();
1504 void
1505 dispatcher_timer_start (DispatcherTimer *instance)
1507 if (instance == NULL)
1508 return;
1510 instance->Start ();
1514 void
1515 dispatcher_timer_stop (DispatcherTimer *instance)
1517 if (instance == NULL)
1518 return;
1520 instance->Stop ();
1525 * DoubleAnimation
1527 DoubleAnimation *
1528 double_animation_new (void)
1530 return new DoubleAnimation ();
1535 * DoubleAnimationUsingKeyFrames
1537 DoubleAnimationUsingKeyFrames *
1538 double_animation_using_key_frames_new (void)
1540 return new DoubleAnimationUsingKeyFrames ();
1545 * DoubleCollection
1547 DoubleCollection *
1548 double_collection_new (void)
1550 return new DoubleCollection ();
1555 * DoubleKeyFrame
1557 DoubleKeyFrame *
1558 double_key_frame_new (void)
1560 return new DoubleKeyFrame ();
1565 * DoubleKeyFrameCollection
1567 DoubleKeyFrameCollection *
1568 double_key_frame_collection_new (void)
1570 return new DoubleKeyFrameCollection ();
1575 * Downloader
1577 void *
1578 downloader_create_web_request (Downloader *instance, const char *method, const char *uri)
1580 if (instance == NULL)
1581 return NULL;
1583 return instance->CreateWebRequest (method, uri);
1587 Downloader *
1588 downloader_new (void)
1590 return new Downloader ();
1594 void
1595 downloader_notify_failed (Downloader *instance, const char *msg)
1597 if (instance == NULL)
1598 return;
1600 instance->NotifyFailed (msg);
1604 void
1605 downloader_notify_finished (Downloader *instance, const char *final_uri)
1607 if (instance == NULL)
1608 return;
1610 instance->NotifyFinished (final_uri);
1614 void
1615 downloader_notify_size (Downloader *instance, gint64 size)
1617 if (instance == NULL)
1618 return;
1620 instance->NotifySize (size);
1624 void
1625 downloader_set_functions (DownloaderCreateStateFunc create_state, DownloaderDestroyStateFunc destroy_state, DownloaderOpenFunc open, DownloaderSendFunc send, DownloaderAbortFunc abort, DownloaderHeaderFunc header, DownloaderBodyFunc body, DownloaderCreateWebRequestFunc request, DownloaderSetResponseHeaderCallbackFunc response_header_callback, DownloaderGetResponseFunc get_response)
1627 Downloader::SetFunctions (create_state, destroy_state, open, send, abort, header, body, request, response_header_callback, get_response);
1631 void
1632 downloader_write (Downloader *instance, void *buf, gint32 offset, gint32 n)
1634 if (instance == NULL)
1635 return;
1637 instance->Write (buf, offset, n);
1642 * DownloaderRequest
1644 void
1645 downloader_request_free (DownloaderRequest *instance)
1647 delete instance;
1651 void
1652 downloader_request_abort (DownloaderRequest *instance)
1654 if (instance == NULL)
1655 return;
1657 instance->Abort ();
1661 DownloaderResponse *
1662 downloader_request_get_downloader_response (DownloaderRequest *instance)
1664 if (instance == NULL)
1665 return NULL;
1667 return instance->GetDownloaderResponse ();
1671 bool
1672 downloader_request_get_response (DownloaderRequest *instance, DownloaderResponseStartedHandler started, DownloaderResponseDataAvailableHandler available, DownloaderResponseFinishedHandler finished, gpointer context)
1674 if (instance == NULL)
1675 return false;
1677 return instance->GetResponse (started, available, finished, context);
1681 const bool
1682 downloader_request_is_aborted (DownloaderRequest *instance)
1684 if (instance == NULL)
1685 return false;
1687 return instance->IsAborted ();
1691 void
1692 downloader_request_set_body (DownloaderRequest *instance, void *body, int size)
1694 if (instance == NULL)
1695 return;
1697 instance->SetBody (body, size);
1701 void
1702 downloader_request_set_http_header (DownloaderRequest *instance, const char *name, const char *value)
1704 if (instance == NULL)
1705 return;
1707 instance->SetHttpHeader (name, value);
1712 * DownloaderResponse
1714 void
1715 downloader_response_free (DownloaderResponse *instance)
1717 delete instance;
1721 void
1722 downloader_response_abort (DownloaderResponse *instance)
1724 if (instance == NULL)
1725 return;
1727 instance->Abort ();
1732 downloader_response_get_response_status (DownloaderResponse *instance)
1734 if (instance == NULL)
1735 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1736 return (int) 0;
1738 return instance->GetResponseStatus ();
1742 const char *
1743 downloader_response_get_response_status_text (DownloaderResponse *instance)
1745 if (instance == NULL)
1746 return NULL;
1748 return instance->GetResponseStatusText ();
1752 void
1753 downloader_response_set_header_visitor (DownloaderResponse *instance, DownloaderResponseHeaderCallback visitor, gpointer context)
1755 if (instance == NULL)
1756 return;
1758 instance->SetHeaderVisitor (visitor, context);
1763 * DownloadProgressEventArgs
1765 double
1766 download_progress_event_args_get_progress (DownloadProgressEventArgs *instance)
1768 if (instance == NULL)
1769 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1770 return (double) 0;
1772 return instance->GetProgress ();
1777 * DrawingAttributes
1779 DrawingAttributes *
1780 drawing_attributes_new (void)
1782 return new DrawingAttributes ();
1787 * EasingColorKeyFrame
1789 EasingColorKeyFrame *
1790 easing_color_key_frame_new (void)
1792 return new EasingColorKeyFrame ();
1797 * EasingDoubleKeyFrame
1799 EasingDoubleKeyFrame *
1800 easing_double_key_frame_new (void)
1802 return new EasingDoubleKeyFrame ();
1807 * EasingFunctionBase
1809 EasingFunctionBase *
1810 easing_function_base_new (void)
1812 return new EasingFunctionBase ();
1816 void
1817 easing_function_base_set_easing_function (EasingFunctionBase *instance, EasingFunction value)
1819 if (instance == NULL)
1820 return;
1822 instance->SetEasingFunction (value);
1827 * EasingPointKeyFrame
1829 EasingPointKeyFrame *
1830 easing_point_key_frame_new (void)
1832 return new EasingPointKeyFrame ();
1837 * ElasticEase
1839 double
1840 elastic_ease_ease_in_core (ElasticEase *instance, double normalizedTime)
1842 if (instance == NULL)
1843 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1844 return (double) 0;
1846 return instance->EaseInCore (normalizedTime);
1850 ElasticEase *
1851 elastic_ease_new (void)
1853 return new ElasticEase ();
1858 * Ellipse
1860 Ellipse *
1861 ellipse_new (void)
1863 return new Ellipse ();
1868 * EllipseGeometry
1870 EllipseGeometry *
1871 ellipse_geometry_new (void)
1873 return new EllipseGeometry ();
1878 * ErrorEventArgs
1881 error_event_args_get_error_code (ErrorEventArgs *instance)
1883 if (instance == NULL)
1884 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1885 return (int) 0;
1887 return instance->GetErrorCode ();
1891 const char *
1892 error_event_args_get_error_message (ErrorEventArgs *instance)
1894 if (instance == NULL)
1895 return NULL;
1897 return instance->GetErrorMessage ();
1902 error_event_args_get_error_type (ErrorEventArgs *instance)
1904 if (instance == NULL)
1905 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1906 return (int) 0;
1908 return instance->GetErrorType ();
1913 * EventObject
1916 event_object_add_handler (EventObject *instance, const char *event_name, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1918 if (instance == NULL)
1919 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1920 return (int) 0;
1922 return instance->AddHandler (event_name, handler, data, data_dtor);
1926 void
1927 event_object_add_toggle_ref_notifier (EventObject *instance, ToggleNotifyHandler tr)
1929 if (instance == NULL)
1930 return;
1932 instance->AddToggleRefNotifier (tr);
1937 event_object_add_xaml_handler (EventObject *instance, const char *event_name, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1939 if (instance == NULL)
1940 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1941 return (int) 0;
1943 return instance->AddXamlHandler (event_name, handler, data, data_dtor);
1948 event_object_get_object_type (EventObject *instance)
1950 if (instance == NULL)
1951 return Type::INVALID;
1953 return instance->GetObjectType ();
1957 Surface *
1958 event_object_get_surface (EventObject *instance)
1960 if (instance == NULL)
1961 return NULL;
1963 return instance->GetSurface ();
1967 const char *
1968 event_object_get_type_name (EventObject *instance)
1970 if (instance == NULL)
1971 return NULL;
1973 return instance->GetTypeName ();
1977 void
1978 event_object_ref (EventObject *instance)
1980 if (instance == NULL)
1981 return;
1983 instance->ref ();
1987 void
1988 event_object_remove_handler (EventObject *instance, const char *event_name, EventHandler handler, gpointer data)
1990 if (instance == NULL)
1991 return;
1993 instance->RemoveHandler (event_name, handler, data);
1997 void
1998 event_object_remove_toggle_ref_notifier (EventObject *instance)
2000 if (instance == NULL)
2001 return;
2003 instance->RemoveToggleRefNotifier ();
2007 void
2008 event_object_set_object_type (EventObject *instance, int value)
2010 if (instance == NULL)
2011 return;
2013 instance->SetObjectType ((Type::Kind) value);
2017 void
2018 event_object_unref (EventObject *instance)
2020 if (instance == NULL)
2021 return;
2023 instance->unref ();
2028 * EventTrigger
2030 EventTrigger *
2031 event_trigger_new (void)
2033 return new EventTrigger ();
2038 * ExponentialEase
2040 double
2041 exponential_ease_ease_in_core (ExponentialEase *instance, double normalizedTime)
2043 if (instance == NULL)
2044 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2045 return (double) 0;
2047 return instance->EaseInCore (normalizedTime);
2051 ExponentialEase *
2052 exponential_ease_new (void)
2054 return new ExponentialEase ();
2059 * ExternalDecoder
2061 ExternalDecoder *
2062 external_decoder_new (Media *media, IMediaStream *stream, void *instance, const char *name, ExternalDecoder_DecodeFrameAsyncCallback decode_frame_async, ExternalDecoder_OpenDecoderAsyncCallback open_decoder_async, ExternalDecoder_CleanupCallback cleanup, ExternalDecoder_CleanStateCallback clean_state, ExternalDecoder_HasDelayedFrameCallback has_delayed_frame, ExternalDecoder_DisposeCallback dispose, ExternalDecoder_DtorCallback dtor)
2064 return new ExternalDecoder (media, stream, instance, name, decode_frame_async, open_decoder_async, cleanup, clean_state, has_delayed_frame, dispose, dtor);
2069 * ExternalDecoderInfo
2071 ExternalDecoderInfo *
2072 external_decoder_info_new (void *instance, const char *name, ExternalDecoderInfo_SupportsCallback supports, ExternalDecoderInfo_Create create, ExternalDecoderInfo_dtor dtor)
2074 return new ExternalDecoderInfo (instance, name, supports, create, dtor);
2079 * ExternalDemuxer
2081 gint32
2082 external_demuxer_add_stream (ExternalDemuxer *instance, IMediaStream *stream)
2084 if (instance == NULL)
2085 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2086 return (gint32) 0;
2088 return instance->AddStream (stream);
2092 void
2093 external_demuxer_set_can_seek (ExternalDemuxer *instance, bool value)
2095 if (instance == NULL)
2096 return;
2098 instance->SetCanSeek (value);
2103 * FrameworkElement
2105 Size
2106 framework_element_arrange_override (FrameworkElement *instance, Size finalSize)
2108 if (instance == NULL)
2109 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2110 return (Size) 0;
2112 return instance->ArrangeOverride (finalSize);
2116 FrameworkElement *
2117 framework_element_new (void)
2119 return new FrameworkElement ();
2123 DependencyObject *
2124 framework_element_get_logical_parent (FrameworkElement *instance)
2126 if (instance == NULL)
2127 return NULL;
2129 return instance->GetLogicalParent ();
2133 Size
2134 framework_element_measure_override (FrameworkElement *instance, Size availableSize)
2136 if (instance == NULL)
2137 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2138 return (Size) 0;
2140 return instance->MeasureOverride (availableSize);
2144 void
2145 framework_element_register_managed_overrides (FrameworkElement *instance, MeasureOverrideCallback measure_cb, ArrangeOverrideCallback arrange_cb)
2147 if (instance == NULL)
2148 return;
2150 instance->RegisterManagedOverrides (measure_cb, arrange_cb);
2154 void
2155 framework_element_set_default_style (FrameworkElement *instance, Style *value)
2157 if (instance == NULL)
2158 return;
2160 instance->SetDefaultStyle (value);
2164 void
2165 framework_element_set_logical_parent (FrameworkElement *instance, DependencyObject *logical_parent, MoonError *error)
2167 if (instance == NULL)
2168 return;
2170 if (error == NULL)
2171 g_warning ("Moonlight: Called framework_element_set_logical_parent () with error == NULL.");
2172 instance->SetLogicalParent (logical_parent, error);
2177 * FrameworkTemplate
2179 FrameworkTemplate *
2180 framework_template_new (void)
2182 return new FrameworkTemplate ();
2186 DependencyObject *
2187 framework_template_get_visual_tree (FrameworkTemplate *instance, FrameworkElement *templateBindingSource)
2189 if (instance == NULL)
2190 return NULL;
2192 return instance->GetVisualTree (templateBindingSource);
2197 * GeneralTransform
2199 GeneralTransform *
2200 general_transform_new (void)
2202 return new GeneralTransform ();
2206 Matrix *
2207 general_transform_get_matrix (GeneralTransform *instance)
2209 if (instance == NULL)
2210 return NULL;
2212 return instance->GetMatrix ();
2217 * Geometry
2219 Geometry *
2220 geometry_new (void)
2222 return new Geometry ();
2226 Rect
2227 geometry_get_bounds (Geometry *instance)
2229 if (instance == NULL)
2230 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2231 return (Rect) 0;
2233 return instance->GetBounds ();
2238 * GeometryCollection
2240 GeometryCollection *
2241 geometry_collection_new (void)
2243 return new GeometryCollection ();
2248 * GeometryGroup
2250 GeometryGroup *
2251 geometry_group_new (void)
2253 return new GeometryGroup ();
2258 * Glyphs
2260 Glyphs *
2261 glyphs_new (void)
2263 return new Glyphs ();
2268 * GradientBrush
2270 GradientBrush *
2271 gradient_brush_new (void)
2273 return new GradientBrush ();
2278 * GradientStop
2280 GradientStop *
2281 gradient_stop_new (void)
2283 return new GradientStop ();
2288 * GradientStopCollection
2290 GradientStopCollection *
2291 gradient_stop_collection_new (void)
2293 return new GradientStopCollection ();
2298 * Grid
2300 Grid *
2301 grid_new (void)
2303 return new Grid ();
2308 * HitTestCollection
2310 HitTestCollection *
2311 hit_test_collection_new (void)
2313 return new HitTestCollection ();
2318 * Image
2320 Image *
2321 image_new (void)
2323 return new Image ();
2327 void
2328 image_set_source (Image *instance, ImageSource *source)
2330 if (instance == NULL)
2331 return;
2333 instance->SetSource (source);
2338 * ImageBrush
2340 ImageBrush *
2341 image_brush_new (void)
2343 return new ImageBrush ();
2348 * ImageSource
2350 ImageSource *
2351 image_source_new (void)
2353 return new ImageSource ();
2358 * IMediaDecoder
2360 void
2361 imedia_decoder_report_decode_frame_completed (IMediaDecoder *instance, MediaFrame *frame)
2363 if (instance == NULL)
2364 return;
2366 instance->ReportDecodeFrameCompleted (frame);
2370 void
2371 imedia_decoder_report_open_decoder_completed (IMediaDecoder *instance)
2373 if (instance == NULL)
2374 return;
2376 instance->ReportOpenDecoderCompleted ();
2380 void
2381 imedia_decoder_set_pixel_format (IMediaDecoder *instance, int value)
2383 if (instance == NULL)
2384 return;
2386 instance->SetPixelFormat ((MoonPixelFormat) value);
2391 * IMediaDemuxer
2393 void
2394 imedia_demuxer_report_get_diagnostic_completed (IMediaDemuxer *instance, int diagnosticKind, gint64 diagnosticValue)
2396 if (instance == NULL)
2397 return;
2399 instance->ReportGetDiagnosticCompleted ((MediaStreamSourceDiagnosticKind) diagnosticKind, diagnosticValue);
2403 void
2404 imedia_demuxer_report_get_frame_completed (IMediaDemuxer *instance, MediaFrame *frame)
2406 if (instance == NULL)
2407 return;
2409 instance->ReportGetFrameCompleted (frame);
2413 void
2414 imedia_demuxer_report_get_frame_progress (IMediaDemuxer *instance, double bufferingProgress)
2416 if (instance == NULL)
2417 return;
2419 instance->ReportGetFrameProgress (bufferingProgress);
2423 void
2424 imedia_demuxer_report_open_demuxer_completed (IMediaDemuxer *instance)
2426 if (instance == NULL)
2427 return;
2429 instance->ReportOpenDemuxerCompleted ();
2433 void
2434 imedia_demuxer_report_seek_completed (IMediaDemuxer *instance, guint64 pts)
2436 if (instance == NULL)
2437 return;
2439 instance->ReportSeekCompleted (pts);
2443 void
2444 imedia_demuxer_report_switch_media_stream_completed (IMediaDemuxer *instance, IMediaStream *stream)
2446 if (instance == NULL)
2447 return;
2449 instance->ReportSwitchMediaStreamCompleted (stream);
2454 * IMediaObject
2456 Media *
2457 imedia_object_get_media_reffed (IMediaObject *instance)
2459 if (instance == NULL)
2460 return NULL;
2462 return instance->GetMediaReffed ();
2466 void
2467 imedia_object_report_error_occurred (IMediaObject *instance, const char *message)
2469 if (instance == NULL)
2470 return;
2472 instance->ReportErrorOccurred (message);
2477 * IMediaStream
2479 const char *
2480 imedia_stream_get_codec (IMediaStream *instance)
2482 if (instance == NULL)
2483 return NULL;
2485 return instance->GetCodec ();
2490 imedia_stream_get_codec_id (IMediaStream *instance)
2492 if (instance == NULL)
2493 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2494 return (int) 0;
2496 return instance->GetCodecId ();
2500 guint64
2501 imedia_stream_get_duration (IMediaStream *instance)
2503 if (instance == NULL)
2504 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2505 return (guint64) 0;
2507 return instance->GetDuration ();
2511 void *
2512 imedia_stream_get_extra_data (IMediaStream *instance)
2514 if (instance == NULL)
2515 return NULL;
2517 return instance->GetExtraData ();
2522 imedia_stream_get_extra_data_size (IMediaStream *instance)
2524 if (instance == NULL)
2525 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2526 return (int) 0;
2528 return instance->GetExtraDataSize ();
2533 imedia_stream_get_stream_type (IMediaStream *instance)
2535 if (instance == NULL)
2536 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2537 return (MediaStreamType) 0;
2539 return instance->GetStreamType ();
2543 void
2544 imedia_stream_set_codec_id (IMediaStream *instance, int value)
2546 if (instance == NULL)
2547 return;
2549 instance->SetCodecId (value);
2553 void
2554 imedia_stream_set_duration (IMediaStream *instance, guint64 value)
2556 if (instance == NULL)
2557 return;
2559 instance->SetDuration (value);
2563 void
2564 imedia_stream_set_extra_data (IMediaStream *instance, void *value)
2566 if (instance == NULL)
2567 return;
2569 instance->SetExtraData (value);
2573 void
2574 imedia_stream_set_extra_data_size (IMediaStream *instance, int value)
2576 if (instance == NULL)
2577 return;
2579 instance->SetExtraDataSize (value);
2584 * InkPresenter
2586 InkPresenter *
2587 ink_presenter_new (void)
2589 return new InkPresenter ();
2594 * Inline
2596 Inline *
2597 inline_new (void)
2599 return new Inline ();
2604 * InlineCollection
2606 InlineCollection *
2607 inline_collection_new (void)
2609 return new InlineCollection ();
2614 * InputMethod
2616 InputMethod *
2617 input_method_new (void)
2619 return new InputMethod ();
2624 * ItemCollection
2626 ItemCollection *
2627 item_collection_new (void)
2629 return new ItemCollection ();
2634 * Keyboard
2637 keyboard_get_modifiers (void)
2639 return Keyboard::GetModifiers ();
2644 * KeyEventArgs
2647 key_event_args_get_key (KeyEventArgs *instance)
2649 if (instance == NULL)
2650 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2651 return (int) 0;
2653 return instance->GetKey ();
2658 key_event_args_get_platform_key_code (KeyEventArgs *instance)
2660 if (instance == NULL)
2661 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2662 return (int) 0;
2664 return instance->GetPlatformKeyCode ();
2668 KeyEventArgs *
2669 key_event_args_new (void)
2671 return new KeyEventArgs ();
2676 * KeyFrameCollection
2678 KeyFrameCollection *
2679 key_frame_collection_new (void)
2681 return new KeyFrameCollection ();
2686 * KeySpline
2688 KeySpline *
2689 key_spline_new (void)
2691 return new KeySpline ();
2696 * Line
2698 Line *
2699 line_new (void)
2701 return new Line ();
2706 * LinearColorKeyFrame
2708 LinearColorKeyFrame *
2709 linear_color_key_frame_new (void)
2711 return new LinearColorKeyFrame ();
2716 * LinearDoubleKeyFrame
2718 LinearDoubleKeyFrame *
2719 linear_double_key_frame_new (void)
2721 return new LinearDoubleKeyFrame ();
2726 * LinearGradientBrush
2728 LinearGradientBrush *
2729 linear_gradient_brush_new (void)
2731 return new LinearGradientBrush ();
2736 * LinearPointKeyFrame
2738 LinearPointKeyFrame *
2739 linear_point_key_frame_new (void)
2741 return new LinearPointKeyFrame ();
2746 * LineBreak
2748 LineBreak *
2749 line_break_new (void)
2751 return new LineBreak ();
2756 * LineGeometry
2758 LineGeometry *
2759 line_geometry_new (void)
2761 return new LineGeometry ();
2766 * LineSegment
2768 LineSegment *
2769 line_segment_new (void)
2771 return new LineSegment ();
2776 * MarkerReachedEventArgs
2778 TimelineMarker *
2779 marker_reached_event_args_get_marker (MarkerReachedEventArgs *instance)
2781 if (instance == NULL)
2782 return NULL;
2784 return instance->GetMarker ();
2789 * Matrix
2791 cairo_matrix_t *
2792 matrix_get_matrix_values (Matrix *instance)
2794 if (instance == NULL)
2795 return NULL;
2797 return instance->GetMatrixValues ();
2801 Matrix *
2802 matrix_new (void)
2804 return new Matrix ();
2809 * MatrixTransform
2811 MatrixTransform *
2812 matrix_transform_new (void)
2814 return new MatrixTransform ();
2819 * Media
2821 void
2822 media_register_decoder (DecoderInfo *info)
2824 Media::RegisterDecoder (info);
2829 * MediaAttribute
2831 MediaAttribute *
2832 media_attribute_new (void)
2834 return new MediaAttribute ();
2839 * MediaAttributeCollection
2841 MediaAttribute *
2842 media_attribute_collection_get_item_by_name (MediaAttributeCollection *instance, const char *name)
2844 if (instance == NULL)
2845 return NULL;
2847 return instance->GetItemByName (name);
2851 MediaAttributeCollection *
2852 media_attribute_collection_new (void)
2854 return new MediaAttributeCollection ();
2859 * MediaBase
2861 MediaBase *
2862 media_base_new (void)
2864 return new MediaBase ();
2868 void
2869 media_base_set_source (MediaBase *instance, const char *uri)
2871 if (instance == NULL)
2872 return;
2874 instance->SetSource (uri);
2879 * MediaElement
2881 MediaElement *
2882 media_element_new (void)
2884 return new MediaElement ();
2888 void
2889 media_element_pause (MediaElement *instance)
2891 if (instance == NULL)
2892 return;
2894 instance->Pause ();
2898 void
2899 media_element_play (MediaElement *instance)
2901 if (instance == NULL)
2902 return;
2904 instance->Play ();
2908 void
2909 media_element_report_error_occurred (MediaElement *instance, const char *args)
2911 if (instance == NULL)
2912 return;
2914 instance->ReportErrorOccurred (args);
2918 IMediaDemuxer *
2919 media_element_set_demuxer_source (MediaElement *instance, void *context, CloseDemuxerCallback close_demuxer, GetDiagnosticAsyncCallback get_diagnostic, GetFrameAsyncCallback get_sample, OpenDemuxerAsyncCallback open_demuxer, SeekAsyncCallback seek, SwitchMediaStreamAsyncCallback switch_media_stream)
2921 if (instance == NULL)
2922 return NULL;
2924 return instance->SetDemuxerSource (context, close_demuxer, get_diagnostic, get_sample, open_demuxer, seek, switch_media_stream);
2928 void
2929 media_element_set_stream_source (MediaElement *instance, ManagedStreamCallbacks *stream)
2931 if (instance == NULL)
2932 return;
2934 instance->SetStreamSource (stream);
2938 void
2939 media_element_stop (MediaElement *instance)
2941 if (instance == NULL)
2942 return;
2944 instance->Stop ();
2949 * MediaFrame
2951 void
2952 media_frame_add_state (MediaFrame *instance, int state)
2954 if (instance == NULL)
2955 return;
2957 instance->AddState ((MediaFrameState) state);
2961 guint8 *
2962 media_frame_get_buffer (MediaFrame *instance)
2964 if (instance == NULL)
2965 return NULL;
2967 return instance->GetBuffer ();
2971 guint32
2972 media_frame_get_buf_len (MediaFrame *instance)
2974 if (instance == NULL)
2975 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2976 return (guint32) 0;
2978 return instance->GetBufLen ();
2982 gint32
2983 media_frame_get_height (MediaFrame *instance)
2985 if (instance == NULL)
2986 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2987 return (gint32) 0;
2989 return instance->GetHeight ();
2993 guint64
2994 media_frame_get_pts (MediaFrame *instance)
2996 if (instance == NULL)
2997 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2998 return (guint64) 0;
3000 return instance->GetPts ();
3004 gint32
3005 media_frame_get_width (MediaFrame *instance)
3007 if (instance == NULL)
3008 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3009 return (gint32) 0;
3011 return instance->GetWidth ();
3015 bool
3016 media_frame_is_key_frame (MediaFrame *instance)
3018 if (instance == NULL)
3019 return false;
3021 return instance->IsKeyFrame ();
3025 MediaFrame *
3026 media_frame_new (IMediaStream *stream, guint8 *buffer, guint32 buflen, guint64 pts, bool keyframe)
3028 return new MediaFrame (stream, buffer, buflen, pts, keyframe);
3032 void
3033 media_frame_set_buffer (MediaFrame *instance, guint8 *value)
3035 if (instance == NULL)
3036 return;
3038 instance->SetBuffer (value);
3042 void
3043 media_frame_set_buf_len (MediaFrame *instance, guint32 value)
3045 if (instance == NULL)
3046 return;
3048 instance->SetBufLen (value);
3052 void
3053 media_frame_set_data_stride (MediaFrame *instance, guint8 *a, guint8 *b, guint8 *c, guint8 *d)
3055 if (instance == NULL)
3056 return;
3058 instance->SetDataStride (a, b, c, d);
3062 void
3063 media_frame_set_decoder_specific_data (MediaFrame *instance, void *value)
3065 if (instance == NULL)
3066 return;
3068 instance->SetDecoderSpecificData (value);
3072 void
3073 media_frame_set_height (MediaFrame *instance, gint32 value)
3075 if (instance == NULL)
3076 return;
3078 instance->SetHeight (value);
3082 void
3083 media_frame_set_pts (MediaFrame *instance, guint64 value)
3085 if (instance == NULL)
3086 return;
3088 instance->SetPts (value);
3092 void
3093 media_frame_set_src_slide_h (MediaFrame *instance, int value)
3095 if (instance == NULL)
3096 return;
3098 instance->SetSrcSlideH (value);
3102 void
3103 media_frame_set_src_slide_y (MediaFrame *instance, int value)
3105 if (instance == NULL)
3106 return;
3108 instance->SetSrcSlideY (value);
3112 void
3113 media_frame_set_src_stride (MediaFrame *instance, int a, int b, int c, int d)
3115 if (instance == NULL)
3116 return;
3118 instance->SetSrcStride (a, b, c, d);
3122 void
3123 media_frame_set_width (MediaFrame *instance, gint32 value)
3125 if (instance == NULL)
3126 return;
3128 instance->SetWidth (value);
3133 * MoonWindow
3135 bool
3136 moon_window_get_transparent (MoonWindow *instance)
3138 if (instance == NULL)
3139 return false;
3141 return instance->GetTransparent ();
3145 void
3146 moon_window_set_transparent (MoonWindow *instance, bool flag)
3148 if (instance == NULL)
3149 return;
3151 instance->SetTransparent (flag);
3156 * MoonWindowGtk
3158 void *
3159 moon_window_gtk_get_native_widget (MoonWindowGtk *instance)
3161 if (instance == NULL)
3162 return NULL;
3164 return instance->GetNativeWidget ();
3168 MoonWindowGtk *
3169 moon_window_gtk_new (bool fullscreen, int w, int h, MoonWindow *parent)
3171 return new MoonWindowGtk (fullscreen, w, h, parent);
3176 * MouseEventArgs
3178 void
3179 mouse_event_args_get_position (MouseEventArgs *instance, UIElement *relative_to, double *x, double *y)
3181 if (instance == NULL)
3182 return;
3184 instance->GetPosition (relative_to, x, y);
3188 StylusInfo *
3189 mouse_event_args_get_stylus_info (MouseEventArgs *instance)
3191 if (instance == NULL)
3192 return NULL;
3194 return instance->GetStylusInfo ();
3198 StylusPointCollection *
3199 mouse_event_args_get_stylus_points (MouseEventArgs *instance, UIElement *ink_presenter)
3201 if (instance == NULL)
3202 return NULL;
3204 return instance->GetStylusPoints (ink_presenter);
3208 MouseEventArgs *
3209 mouse_event_args_new (void)
3211 return new MouseEventArgs ();
3216 * MouseWheelEventArgs
3219 mouse_wheel_event_args_get_wheel_delta (MouseWheelEventArgs *instance)
3221 if (instance == NULL)
3222 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3223 return (int) 0;
3225 return instance->GetWheelDelta ();
3229 MouseWheelEventArgs *
3230 mouse_wheel_event_args_new (void)
3232 return new MouseWheelEventArgs ();
3237 * MultiScaleImage
3239 Point
3240 multi_scale_image_element_to_logical_point (MultiScaleImage *instance, Point elementPoint)
3242 if (instance == NULL)
3243 return Point (0, 0);
3245 return instance->ElementToLogicalPoint (elementPoint);
3249 Point
3250 multi_scale_image_logical_to_element_point (MultiScaleImage *instance, Point logicalPoint)
3252 if (instance == NULL)
3253 return Point (0, 0);
3255 return instance->LogicalToElementPoint (logicalPoint);
3259 MultiScaleImage *
3260 multi_scale_image_new (void)
3262 return new MultiScaleImage ();
3266 void
3267 multi_scale_image_zoom_about_logical_point (MultiScaleImage *instance, double zoomIncrementFactor, double zoomCenterLogicalX, double zoomCenterLogicalY)
3269 if (instance == NULL)
3270 return;
3272 instance->ZoomAboutLogicalPoint (zoomIncrementFactor, zoomCenterLogicalX, zoomCenterLogicalY);
3277 * MultiScaleSubImage
3279 gint32
3280 multi_scale_sub_image_get_zindex (MultiScaleSubImage *instance)
3282 if (instance == NULL)
3283 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3284 return (gint32) 0;
3286 return instance->GetZIndex ();
3290 MultiScaleSubImage *
3291 multi_scale_sub_image_new (void)
3293 return new MultiScaleSubImage ();
3298 * MultiScaleSubImageCollection
3300 MultiScaleSubImageCollection *
3301 multi_scale_sub_image_collection_new (void)
3303 return new MultiScaleSubImageCollection ();
3308 * MultiScaleTileSource
3310 double
3311 multi_scale_tile_source_get_image_height (MultiScaleTileSource *instance)
3313 if (instance == NULL)
3314 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3315 return (double) 0;
3317 return instance->GetImageHeight ();
3321 double
3322 multi_scale_tile_source_get_image_width (MultiScaleTileSource *instance)
3324 if (instance == NULL)
3325 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3326 return (double) 0;
3328 return instance->GetImageWidth ();
3333 multi_scale_tile_source_get_tile_height (MultiScaleTileSource *instance)
3335 if (instance == NULL)
3336 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3337 return (int) 0;
3339 return instance->GetTileHeight ();
3344 multi_scale_tile_source_get_tile_overlap (MultiScaleTileSource *instance)
3346 if (instance == NULL)
3347 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3348 return (int) 0;
3350 return instance->GetTileOverlap ();
3355 multi_scale_tile_source_get_tile_width (MultiScaleTileSource *instance)
3357 if (instance == NULL)
3358 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3359 return (int) 0;
3361 return instance->GetTileWidth ();
3365 void
3366 multi_scale_tile_source_invalidate_tile_layer (MultiScaleTileSource *instance, int level, int tilePositionX, int tilePositionY, int tileLayer)
3368 if (instance == NULL)
3369 return;
3371 instance->InvalidateTileLayer (level, tilePositionX, tilePositionY, tileLayer);
3375 MultiScaleTileSource *
3376 multi_scale_tile_source_new (void)
3378 return new MultiScaleTileSource ();
3382 void
3383 multi_scale_tile_source_set_image_uri_func (MultiScaleTileSource *instance, get_image_uri_func func)
3385 if (instance == NULL)
3386 return;
3388 instance->set_image_uri_func (func);
3392 void
3393 multi_scale_tile_source_set_image_height (MultiScaleTileSource *instance, double height)
3395 if (instance == NULL)
3396 return;
3398 instance->SetImageHeight (height);
3402 void
3403 multi_scale_tile_source_set_image_width (MultiScaleTileSource *instance, double width)
3405 if (instance == NULL)
3406 return;
3408 instance->SetImageWidth (width);
3412 void
3413 multi_scale_tile_source_set_tile_height (MultiScaleTileSource *instance, int height)
3415 if (instance == NULL)
3416 return;
3418 instance->SetTileHeight (height);
3422 void
3423 multi_scale_tile_source_set_tile_overlap (MultiScaleTileSource *instance, int overlap)
3425 if (instance == NULL)
3426 return;
3428 instance->SetTileOverlap (overlap);
3432 void
3433 multi_scale_tile_source_set_tile_width (MultiScaleTileSource *instance, int width)
3435 if (instance == NULL)
3436 return;
3438 instance->SetTileWidth (width);
3443 * NameScope
3445 NameScope *
3446 name_scope_new (void)
3448 return new NameScope ();
3453 * ObjectAnimationUsingKeyFrames
3455 ObjectAnimationUsingKeyFrames *
3456 object_animation_using_key_frames_new (void)
3458 return new ObjectAnimationUsingKeyFrames ();
3463 * ObjectKeyFrame
3465 ObjectKeyFrame *
3466 object_key_frame_new (void)
3468 return new ObjectKeyFrame ();
3473 * ObjectKeyFrameCollection
3475 ObjectKeyFrameCollection *
3476 object_key_frame_collection_new (void)
3478 return new ObjectKeyFrameCollection ();
3483 * Panel
3485 Panel *
3486 panel_new (void)
3488 return new Panel ();
3493 * ParallelTimeline
3495 ParallelTimeline *
3496 parallel_timeline_new (void)
3498 return new ParallelTimeline ();
3503 * PasswordBox
3505 PasswordBox *
3506 password_box_new (void)
3508 return new PasswordBox ();
3513 * Path
3515 Path *
3516 path_new (void)
3518 return new Path ();
3523 * PathFigure
3525 PathFigure *
3526 path_figure_new (void)
3528 return new PathFigure ();
3533 * PathFigureCollection
3535 PathFigureCollection *
3536 path_figure_collection_new (void)
3538 return new PathFigureCollection ();
3543 * PathGeometry
3545 PathGeometry *
3546 path_geometry_new (void)
3548 return new PathGeometry ();
3553 * PathSegment
3555 PathSegment *
3556 path_segment_new (void)
3558 return new PathSegment ();
3563 * PathSegmentCollection
3565 PathSegmentCollection *
3566 path_segment_collection_new (void)
3568 return new PathSegmentCollection ();
3573 * PointAnimation
3575 PointAnimation *
3576 point_animation_new (void)
3578 return new PointAnimation ();
3583 * PointAnimationUsingKeyFrames
3585 PointAnimationUsingKeyFrames *
3586 point_animation_using_key_frames_new (void)
3588 return new PointAnimationUsingKeyFrames ();
3593 * PointCollection
3595 PointCollection *
3596 point_collection_new (void)
3598 return new PointCollection ();
3603 * PointKeyFrame
3605 PointKeyFrame *
3606 point_key_frame_new (void)
3608 return new PointKeyFrame ();
3613 * PointKeyFrameCollection
3615 PointKeyFrameCollection *
3616 point_key_frame_collection_new (void)
3618 return new PointKeyFrameCollection ();
3623 * PolyBezierSegment
3625 PolyBezierSegment *
3626 poly_bezier_segment_new (void)
3628 return new PolyBezierSegment ();
3632 void
3633 poly_bezier_segment_set_points (PolyBezierSegment *instance, PointCollection *points)
3635 if (instance == NULL)
3636 return;
3638 instance->SetPoints (points);
3643 * Polygon
3645 Polygon *
3646 polygon_new (void)
3648 return new Polygon ();
3653 * Polyline
3655 Polyline *
3656 polyline_new (void)
3658 return new Polyline ();
3663 * PolyLineSegment
3665 PolyLineSegment *
3666 poly_line_segment_new (void)
3668 return new PolyLineSegment ();
3673 * PolyQuadraticBezierSegment
3675 PolyQuadraticBezierSegment *
3676 poly_quadratic_bezier_segment_new (void)
3678 return new PolyQuadraticBezierSegment ();
3683 * Popup
3685 Popup *
3686 popup_new (void)
3688 return new Popup ();
3693 * PowerEase
3695 double
3696 power_ease_ease_in_core (PowerEase *instance, double normalizedTime)
3698 if (instance == NULL)
3699 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3700 return (double) 0;
3702 return instance->EaseInCore (normalizedTime);
3706 PowerEase *
3707 power_ease_new (void)
3709 return new PowerEase ();
3714 * QuadraticBezierSegment
3716 QuadraticBezierSegment *
3717 quadratic_bezier_segment_new (void)
3719 return new QuadraticBezierSegment ();
3724 * QuadraticEase
3726 double
3727 quadratic_ease_ease_in_core (QuadraticEase *instance, double normalizedTime)
3729 if (instance == NULL)
3730 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3731 return (double) 0;
3733 return instance->EaseInCore (normalizedTime);
3737 QuadraticEase *
3738 quadratic_ease_new (void)
3740 return new QuadraticEase ();
3745 * QuarticEase
3747 double
3748 quartic_ease_ease_in_core (QuarticEase *instance, double normalizedTime)
3750 if (instance == NULL)
3751 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3752 return (double) 0;
3754 return instance->EaseInCore (normalizedTime);
3758 QuarticEase *
3759 quartic_ease_new (void)
3761 return new QuarticEase ();
3766 * QuinticEase
3768 double
3769 quintic_ease_ease_in_core (QuinticEase *instance, double normalizedTime)
3771 if (instance == NULL)
3772 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3773 return (double) 0;
3775 return instance->EaseInCore (normalizedTime);
3779 QuinticEase *
3780 quintic_ease_new (void)
3782 return new QuinticEase ();
3787 * RadialGradientBrush
3789 RadialGradientBrush *
3790 radial_gradient_brush_new (void)
3792 return new RadialGradientBrush ();
3797 * Rectangle
3799 Rectangle *
3800 rectangle_new (void)
3802 return new Rectangle ();
3807 * RectangleGeometry
3809 RectangleGeometry *
3810 rectangle_geometry_new (void)
3812 return new RectangleGeometry ();
3817 * RenderingEventArgs
3819 TimeSpan
3820 rendering_event_args_get_rendering_time (RenderingEventArgs *instance)
3822 if (instance == NULL)
3823 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3824 return (TimeSpan) 0;
3826 return instance->GetRenderingTime ();
3831 * ResourceDictionary
3833 bool
3834 resource_dictionary_add_with_error (ResourceDictionary *instance, const char *key, Value *value, MoonError *error)
3836 if (instance == NULL)
3837 return false;
3839 if (error == NULL)
3840 g_warning ("Moonlight: Called resource_dictionary_add_with_error () with error == NULL.");
3841 return instance->AddWithError (key, value, error);
3845 bool
3846 resource_dictionary_clear (ResourceDictionary *instance)
3848 if (instance == NULL)
3849 return false;
3851 return instance->Clear ();
3855 bool
3856 resource_dictionary_contains_key (ResourceDictionary *instance, const char *key)
3858 if (instance == NULL)
3859 return false;
3861 return instance->ContainsKey (key);
3865 Value *
3866 resource_dictionary_get (ResourceDictionary *instance, const char *key, bool *exists)
3868 if (instance == NULL)
3869 return NULL;
3871 return instance->Get (key, exists);
3875 bool
3876 resource_dictionary_remove (ResourceDictionary *instance, const char *key)
3878 if (instance == NULL)
3879 return false;
3881 return instance->Remove (key);
3885 ResourceDictionary *
3886 resource_dictionary_new (void)
3888 return new ResourceDictionary ();
3892 bool
3893 resource_dictionary_set (ResourceDictionary *instance, const char *key, Value *value)
3895 if (instance == NULL)
3896 return false;
3898 return instance->Set (key, value);
3903 * RotateTransform
3905 RotateTransform *
3906 rotate_transform_new (void)
3908 return new RotateTransform ();
3913 * RoutedEventArgs
3915 bool
3916 routed_event_args_get_handled (RoutedEventArgs *instance)
3918 if (instance == NULL)
3919 return false;
3921 return instance->GetHandled ();
3925 DependencyObject *
3926 routed_event_args_get_source (RoutedEventArgs *instance)
3928 if (instance == NULL)
3929 return NULL;
3931 return instance->GetSource ();
3935 RoutedEventArgs *
3936 routed_event_args_new (void)
3938 return new RoutedEventArgs ();
3942 void
3943 routed_event_args_set_handled (RoutedEventArgs *instance, bool handled)
3945 if (instance == NULL)
3946 return;
3948 instance->SetHandled (handled);
3952 void
3953 routed_event_args_set_source (RoutedEventArgs *instance, DependencyObject *el)
3955 if (instance == NULL)
3956 return;
3958 instance->SetSource (el);
3963 * RowDefinition
3965 RowDefinition *
3966 row_definition_new (void)
3968 return new RowDefinition ();
3973 * RowDefinitionCollection
3975 RowDefinitionCollection *
3976 row_definition_collection_new (void)
3978 return new RowDefinitionCollection ();
3983 * Run
3985 Run *
3986 run_new (void)
3988 return new Run ();
3993 * ScaleTransform
3995 ScaleTransform *
3996 scale_transform_new (void)
3998 return new ScaleTransform ();
4003 * Setter
4005 Setter *
4006 setter_new (void)
4008 return new Setter ();
4013 * SetterBase
4015 SetterBase *
4016 setter_base_new (void)
4018 return new SetterBase ();
4023 * SetterBaseCollection
4025 SetterBaseCollection *
4026 setter_base_collection_new (void)
4028 return new SetterBaseCollection ();
4033 * Shape
4035 Transform *
4036 shape_get_geometry_transform (Shape *instance)
4038 if (instance == NULL)
4039 return NULL;
4041 return instance->GetGeometryTransform ();
4045 Shape *
4046 shape_new (void)
4048 return new Shape ();
4053 * SineEase
4055 double
4056 sine_ease_ease_in_core (SineEase *instance, double normalizedTime)
4058 if (instance == NULL)
4059 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4060 return (double) 0;
4062 return instance->EaseInCore (normalizedTime);
4066 SineEase *
4067 sine_ease_new (void)
4069 return new SineEase ();
4074 * SizeChangedEventArgs
4076 SizeChangedEventArgs *
4077 size_changed_event_args_new (void)
4079 return new SizeChangedEventArgs ();
4084 * SkewTransform
4086 SkewTransform *
4087 skew_transform_new (void)
4089 return new SkewTransform ();
4094 * SolidColorBrush
4096 SolidColorBrush *
4097 solid_color_brush_new (void)
4099 return new SolidColorBrush ();
4104 * SplineColorKeyFrame
4106 SplineColorKeyFrame *
4107 spline_color_key_frame_new (void)
4109 return new SplineColorKeyFrame ();
4114 * SplineDoubleKeyFrame
4116 SplineDoubleKeyFrame *
4117 spline_double_key_frame_new (void)
4119 return new SplineDoubleKeyFrame ();
4124 * SplinePointKeyFrame
4126 SplinePointKeyFrame *
4127 spline_point_key_frame_new (void)
4129 return new SplinePointKeyFrame ();
4134 * Storyboard
4136 bool
4137 storyboard_begin_with_error (Storyboard *instance, MoonError *error)
4139 if (instance == NULL)
4140 return false;
4142 if (error == NULL)
4143 g_warning ("Moonlight: Called storyboard_begin_with_error () with error == NULL.");
4144 return instance->BeginWithError (error);
4149 storyboard_get_current_state (Storyboard *instance)
4151 if (instance == NULL)
4152 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4153 return (int) 0;
4155 return instance->GetCurrentState ();
4159 TimeSpan
4160 storyboard_get_current_time (Storyboard *instance)
4162 if (instance == NULL)
4163 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4164 return (TimeSpan) 0;
4166 return instance->GetCurrentTime ();
4170 DependencyProperty *
4171 storyboard_get_target_dependency_property (Storyboard *instance)
4173 if (instance == NULL)
4174 return NULL;
4176 return instance->GetTargetDependencyProperty ();
4180 void
4181 storyboard_pause_with_error (Storyboard *instance, MoonError *error)
4183 if (instance == NULL)
4184 return;
4186 if (error == NULL)
4187 g_warning ("Moonlight: Called storyboard_pause_with_error () with error == NULL.");
4188 instance->PauseWithError (error);
4192 void
4193 storyboard_resume_with_error (Storyboard *instance, MoonError *error)
4195 if (instance == NULL)
4196 return;
4198 if (error == NULL)
4199 g_warning ("Moonlight: Called storyboard_resume_with_error () with error == NULL.");
4200 instance->ResumeWithError (error);
4204 void
4205 storyboard_seek_aligned_to_last_tick_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4207 if (instance == NULL)
4208 return;
4210 if (error == NULL)
4211 g_warning ("Moonlight: Called storyboard_seek_aligned_to_last_tick_with_error () with error == NULL.");
4212 instance->SeekAlignedToLastTickWithError (timespan, error);
4216 void
4217 storyboard_seek_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4219 if (instance == NULL)
4220 return;
4222 if (error == NULL)
4223 g_warning ("Moonlight: Called storyboard_seek_with_error () with error == NULL.");
4224 instance->SeekWithError (timespan, error);
4228 void
4229 storyboard_skip_to_fill_with_error (Storyboard *instance, MoonError *error)
4231 if (instance == NULL)
4232 return;
4234 if (error == NULL)
4235 g_warning ("Moonlight: Called storyboard_skip_to_fill_with_error () with error == NULL.");
4236 instance->SkipToFillWithError (error);
4240 void
4241 storyboard_stop_with_error (Storyboard *instance, MoonError *error)
4243 if (instance == NULL)
4244 return;
4246 if (error == NULL)
4247 g_warning ("Moonlight: Called storyboard_stop_with_error () with error == NULL.");
4248 instance->StopWithError (error);
4252 Storyboard *
4253 storyboard_new (void)
4255 return new Storyboard ();
4260 * Stroke
4262 bool
4263 stroke_hit_test (Stroke *instance, StylusPointCollection *stylusPoints)
4265 if (instance == NULL)
4266 return false;
4268 return instance->HitTest (stylusPoints);
4272 Stroke *
4273 stroke_new (void)
4275 return new Stroke ();
4280 * StrokeCollection
4282 StrokeCollection *
4283 stroke_collection_hit_test (StrokeCollection *instance, StylusPointCollection *stylusPoints)
4285 if (instance == NULL)
4286 return NULL;
4288 return instance->HitTest (stylusPoints);
4292 StrokeCollection *
4293 stroke_collection_new (void)
4295 return new StrokeCollection ();
4300 * Style
4302 void
4303 style_seal (Style *instance)
4305 if (instance == NULL)
4306 return;
4308 instance->Seal ();
4312 Style *
4313 style_new (void)
4315 return new Style ();
4320 * StylusInfo
4322 StylusInfo *
4323 stylus_info_new (void)
4325 return new StylusInfo ();
4330 * StylusPoint
4332 double
4333 stylus_point_get_pressure_factor (StylusPoint *instance)
4335 if (instance == NULL)
4336 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4337 return (double) 0;
4339 return instance->GetPressureFactor ();
4343 double
4344 stylus_point_get_x (StylusPoint *instance)
4346 if (instance == NULL)
4347 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4348 return (double) 0;
4350 return instance->GetX ();
4354 double
4355 stylus_point_get_y (StylusPoint *instance)
4357 if (instance == NULL)
4358 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4359 return (double) 0;
4361 return instance->GetY ();
4365 void
4366 stylus_point_set_pressure_factor (StylusPoint *instance, double factor)
4368 if (instance == NULL)
4369 return;
4371 instance->SetPressureFactor (factor);
4375 void
4376 stylus_point_set_x (StylusPoint *instance, double x)
4378 if (instance == NULL)
4379 return;
4381 instance->SetX (x);
4385 void
4386 stylus_point_set_y (StylusPoint *instance, double y)
4388 if (instance == NULL)
4389 return;
4391 instance->SetY (y);
4395 StylusPoint *
4396 stylus_point_new (void)
4398 return new StylusPoint ();
4403 * StylusPointCollection
4405 double
4406 stylus_point_collection_add_stylus_points (StylusPointCollection *instance, StylusPointCollection *stylusPointCollection)
4408 if (instance == NULL)
4409 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4410 return (double) 0;
4412 return instance->AddStylusPoints (stylusPointCollection);
4416 StylusPointCollection *
4417 stylus_point_collection_new (void)
4419 return new StylusPointCollection ();
4424 * Surface
4426 void
4427 surface_attach (Surface *instance, UIElement *toplevel)
4429 if (instance == NULL)
4430 return;
4432 instance->Attach (toplevel);
4436 Downloader *
4437 surface_create_downloader (Surface *instance)
4439 if (instance == NULL)
4440 return NULL;
4442 return instance->CreateDownloader ();
4446 void
4447 surface_emit_error (Surface *instance, int number, int code, const char *message)
4449 if (instance == NULL)
4450 return;
4452 instance->EmitError (number, code, message);
4456 Color *
4457 surface_get_background_color (Surface *instance)
4459 if (instance == NULL)
4460 return NULL;
4462 return instance->GetBackgroundColor ();
4466 UIElement *
4467 surface_get_focused_element (Surface *instance)
4469 if (instance == NULL)
4470 return NULL;
4472 return instance->GetFocusedElement ();
4476 bool
4477 surface_get_full_screen (Surface *instance)
4479 if (instance == NULL)
4480 return false;
4482 return instance->GetFullScreen ();
4486 TimeManager *
4487 surface_get_time_manager (Surface *instance)
4489 if (instance == NULL)
4490 return NULL;
4492 return instance->GetTimeManager ();
4496 UIElement *
4497 surface_get_toplevel (Surface *instance)
4499 if (instance == NULL)
4500 return NULL;
4502 return instance->GetToplevel ();
4506 MoonWindow *
4507 surface_get_window (Surface *instance)
4509 if (instance == NULL)
4510 return NULL;
4512 return instance->GetWindow ();
4516 bool
4517 surface_in_main_thread (void)
4519 return Surface::InMainThread ();
4523 bool
4524 surface_is_loaded (Surface *instance)
4526 if (instance == NULL)
4527 return false;
4529 return instance->IsLoaded ();
4533 bool
4534 surface_is_user_initiated_event (Surface *instance)
4536 if (instance == NULL)
4537 return false;
4539 return instance->IsUserInitiatedEvent ();
4543 bool
4544 surface_is_version_supported (const char *version)
4546 return Surface::IsVersionSupported (version);
4550 void
4551 surface_paint (Surface *instance, cairo_t *ctx, int x, int y, int width, int height)
4553 if (instance == NULL)
4554 return;
4556 instance->Paint (ctx, x, y, width, height);
4560 void
4561 surface_resize (Surface *instance, int width, int height)
4563 if (instance == NULL)
4564 return;
4566 instance->Resize (width, height);
4570 void
4571 surface_set_full_screen (Surface *instance, bool value)
4573 if (instance == NULL)
4574 return;
4576 instance->SetFullScreen (value);
4580 Surface *
4581 surface_new (MoonWindow *window)
4583 return new Surface (window);
4588 * TabNavigationWalker
4590 bool
4591 tab_navigation_walker_focus (UIElement *element, bool forwards)
4593 return TabNavigationWalker::Focus (element, forwards);
4598 * TextBlock
4600 TextBlock *
4601 text_block_new (void)
4603 return new TextBlock ();
4608 * TextBox
4610 TextBox *
4611 text_box_new (void)
4613 return new TextBox ();
4618 * TextBoxBase
4620 void
4621 text_box_base_on_character_key_down (TextBoxBase *instance, KeyEventArgs *args)
4623 if (instance == NULL)
4624 return;
4626 instance->OnCharacterKeyDown (args);
4630 void
4631 text_box_base_on_key_down (TextBoxBase *instance, KeyEventArgs *args)
4633 if (instance == NULL)
4634 return;
4636 instance->OnKeyDown (args);
4640 void
4641 text_box_base_on_key_up (TextBoxBase *instance, KeyEventArgs *args)
4643 if (instance == NULL)
4644 return;
4646 instance->OnKeyUp (args);
4650 void
4651 text_box_base_select_all (TextBoxBase *instance)
4653 if (instance == NULL)
4654 return;
4656 instance->SelectAll ();
4660 bool
4661 text_box_base_select_with_error (TextBoxBase *instance, int start, int length, MoonError *error)
4663 if (instance == NULL)
4664 return false;
4666 if (error == NULL)
4667 g_warning ("Moonlight: Called text_box_base_select_with_error () with error == NULL.");
4668 return instance->SelectWithError (start, length, error);
4673 * TextBoxView
4675 TextBoxView *
4676 text_box_view_new (void)
4678 return new TextBoxView ();
4683 * TextChangedEventArgs
4685 TextChangedEventArgs *
4686 text_changed_event_args_new (void)
4688 return new TextChangedEventArgs ();
4693 * TileBrush
4695 TileBrush *
4696 tile_brush_new (void)
4698 return new TileBrush ();
4703 * Timeline
4705 DependencyObject *
4706 timeline_get_manual_target (Timeline *instance)
4708 if (instance == NULL)
4709 return NULL;
4711 return instance->GetManualTarget ();
4715 void
4716 timeline_set_manual_target (Timeline *instance, DependencyObject *o)
4718 if (instance == NULL)
4719 return;
4721 instance->SetManualTarget (o);
4725 Timeline *
4726 timeline_new (void)
4728 return new Timeline ();
4733 * TimelineCollection
4735 TimelineCollection *
4736 timeline_collection_new (void)
4738 return new TimelineCollection ();
4743 * TimelineGroup
4745 TimelineGroup *
4746 timeline_group_new (void)
4748 return new TimelineGroup ();
4753 * TimelineMarker
4755 TimelineMarker *
4756 timeline_marker_new (void)
4758 return new TimelineMarker ();
4763 * TimelineMarkerCollection
4765 TimelineMarkerCollection *
4766 timeline_marker_collection_new (void)
4768 return new TimelineMarkerCollection ();
4773 * TimeManager
4775 void
4776 time_manager_add_tick_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
4778 if (instance == NULL)
4779 return;
4781 instance->AddTickCall (handler, tick_data);
4785 guint
4786 time_manager_add_timeout (TimeManager *instance, gint priority, guint ms_interval, GSourceFunc func, gpointer timeout_data)
4788 if (instance == NULL)
4789 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4790 return (guint) 0;
4792 return instance->AddTimeout (priority, ms_interval, func, timeout_data);
4797 time_manager_get_maximum_refresh_rate (TimeManager *instance)
4799 if (instance == NULL)
4800 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4801 return (int) 0;
4803 return instance->GetMaximumRefreshRate ();
4807 void
4808 time_manager_remove_tick_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
4810 if (instance == NULL)
4811 return;
4813 instance->RemoveTickCall (handler, tick_data);
4817 void
4818 time_manager_remove_timeout (TimeManager *instance, guint timeout_id)
4820 if (instance == NULL)
4821 return;
4823 instance->RemoveTimeout (timeout_id);
4827 void
4828 time_manager_set_maximum_refresh_rate (TimeManager *instance, int hz)
4830 if (instance == NULL)
4831 return;
4833 instance->SetMaximumRefreshRate (hz);
4838 * Transform
4840 Transform *
4841 transform_new (void)
4843 return new Transform ();
4848 * TransformCollection
4850 TransformCollection *
4851 transform_collection_new (void)
4853 return new TransformCollection ();
4858 * TransformGroup
4860 TransformGroup *
4861 transform_group_new (void)
4863 return new TransformGroup ();
4868 * TranslateTransform
4870 TranslateTransform *
4871 translate_transform_new (void)
4873 return new TranslateTransform ();
4878 * TriggerAction
4880 void
4881 trigger_action_fire (TriggerAction *instance)
4883 if (instance == NULL)
4884 return;
4886 instance->Fire ();
4890 TriggerAction *
4891 trigger_action_new (void)
4893 return new TriggerAction ();
4898 * TriggerActionCollection
4900 TriggerActionCollection *
4901 trigger_action_collection_new (void)
4903 return new TriggerActionCollection ();
4908 * TriggerBase
4910 TriggerBase *
4911 trigger_base_new (void)
4913 return new TriggerBase ();
4918 * TriggerCollection
4920 TriggerCollection *
4921 trigger_collection_new (void)
4923 return new TriggerCollection ();
4928 * Types
4930 void
4931 types_free (Types *instance)
4933 delete instance;
4937 Type *
4938 types_find (Types *instance, int type)
4940 if (instance == NULL)
4941 return NULL;
4943 return instance->Find ((Type::Kind) type);
4948 types_register_type (Types *instance, const char *name, void *gc_handle, int parent, bool is_interface, bool ctor_visible, int *interfaces, int interface_count)
4950 if (instance == NULL)
4951 return Type::INVALID;
4953 return instance->RegisterType (name, gc_handle, (Type::Kind) parent, is_interface, ctor_visible, (Type::Kind*) interfaces, interface_count);
4957 Types *
4958 types_new (void)
4960 return new Types ();
4965 * UIElement
4967 void
4968 uielement_arrange (UIElement *instance, Rect finalRect)
4970 if (instance == NULL)
4971 return;
4973 instance->Arrange (finalRect);
4977 bool
4978 uielement_capture_mouse (UIElement *instance)
4980 if (instance == NULL)
4981 return false;
4983 return instance->CaptureMouse ();
4987 void
4988 uielement_element_added (UIElement *instance, UIElement *obj)
4990 if (instance == NULL)
4991 return;
4993 instance->ElementAdded (obj);
4997 void
4998 uielement_element_removed (UIElement *instance, UIElement *obj)
5000 if (instance == NULL)
5001 return;
5003 instance->ElementRemoved (obj);
5007 void
5008 uielement_find_elements_in_host_coordinates_p (UIElement *instance, Point p, HitTestCollection *uielement_list)
5010 if (instance == NULL)
5011 return;
5013 instance->FindElementsInHostCoordinates_p (p, uielement_list);
5017 void
5018 uielement_find_elements_in_host_coordinates_r (UIElement *instance, Rect p, HitTestCollection *uielement_list)
5020 if (instance == NULL)
5021 return;
5023 instance->FindElementsInHostCoordinates_r (p, uielement_list);
5027 bool
5028 uielement_focus (UIElement *instance, bool recurse)
5030 if (instance == NULL)
5031 return false;
5033 return instance->Focus (recurse);
5037 Size
5038 uielement_get_desired_size (UIElement *instance)
5040 if (instance == NULL)
5041 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5042 return (Size) 0;
5044 return instance->GetDesiredSize ();
5048 Size
5049 uielement_get_render_size (UIElement *instance)
5051 if (instance == NULL)
5052 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5053 return (Size) 0;
5055 return instance->GetRenderSize ();
5059 DependencyObject *
5060 uielement_get_subtree_object (UIElement *instance)
5062 if (instance == NULL)
5063 return NULL;
5065 return instance->GetSubtreeObject ();
5069 GeneralTransform *
5070 uielement_get_transform_to_uielement_with_error (UIElement *instance, UIElement *to_element, MoonError *error)
5072 if (instance == NULL)
5073 return NULL;
5075 if (error == NULL)
5076 g_warning ("Moonlight: Called uielement_get_transform_to_uielement_with_error () with error == NULL.");
5077 return instance->GetTransformToUIElementWithError (to_element, error);
5081 UIElement *
5082 uielement_get_visual_parent (UIElement *instance)
5084 if (instance == NULL)
5085 return NULL;
5087 return instance->GetVisualParent ();
5091 void
5092 uielement_invalidate_arrange (UIElement *instance)
5094 if (instance == NULL)
5095 return;
5097 instance->InvalidateArrange ();
5101 void
5102 uielement_invalidate_measure (UIElement *instance)
5104 if (instance == NULL)
5105 return;
5107 instance->InvalidateMeasure ();
5111 void
5112 uielement_measure (UIElement *instance, Size availableSize)
5114 if (instance == NULL)
5115 return;
5117 instance->Measure (availableSize);
5121 void
5122 uielement_release_mouse_capture (UIElement *instance)
5124 if (instance == NULL)
5125 return;
5127 instance->ReleaseMouseCapture ();
5131 void
5132 uielement_set_subtree_object (UIElement *instance, DependencyObject *value)
5134 if (instance == NULL)
5135 return;
5137 instance->SetSubtreeObject (value);
5141 void
5142 uielement_update_layout (UIElement *instance)
5144 if (instance == NULL)
5145 return;
5147 instance->UpdateLayout ();
5152 * UIElementCollection
5154 UIElementCollection *
5155 uielement_collection_new (void)
5157 return new UIElementCollection ();
5162 * UnmanagedMatrix
5164 UnmanagedMatrix *
5165 unmanaged_matrix_new (void)
5167 return new UnmanagedMatrix ();
5172 * Uri
5174 bool
5175 uri_equals (const Uri *left, const Uri *right)
5177 return Uri::Equals (left, right);
5181 void
5182 uri_free (Uri *instance)
5184 if (instance == NULL)
5185 return;
5187 instance->Free ();
5191 guint
5192 uri_get_hash_code (Uri *instance)
5194 if (instance == NULL)
5195 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5196 return (guint) 0;
5198 return instance->GetHashCode ();
5202 bool
5203 uri_parse (Uri *instance, const char *uri, bool allow_trailing_sep)
5205 if (instance == NULL)
5206 return false;
5208 return instance->Parse (uri, allow_trailing_sep);
5213 * UserControl
5215 UserControl *
5216 user_control_new (void)
5218 return new UserControl ();
5223 * VideoBrush
5225 void
5226 video_brush_set_source (VideoBrush *instance, MediaElement *source)
5228 if (instance == NULL)
5229 return;
5231 instance->SetSource (source);
5235 VideoBrush *
5236 video_brush_new (void)
5238 return new VideoBrush ();
5243 * VideoStream
5245 guint32
5246 video_stream_get_height (VideoStream *instance)
5248 if (instance == NULL)
5249 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5250 return (guint32) 0;
5252 return instance->GetHeight ();
5256 guint32
5257 video_stream_get_width (VideoStream *instance)
5259 if (instance == NULL)
5260 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5261 return (guint32) 0;
5263 return instance->GetWidth ();
5267 VideoStream *
5268 video_stream_new (Media *media, int codec_id, guint32 width, guint32 height, guint64 duration, gpointer extra_data, guint32 extra_data_size)
5270 return new VideoStream (media, codec_id, width, height, duration, extra_data, extra_data_size);
5275 * VisualBrush
5277 VisualBrush *
5278 visual_brush_new (void)
5280 return new VisualBrush ();
5285 * WriteableBitmap
5287 gpointer
5288 writeable_bitmap_initialize_from_bitmap_source (WriteableBitmap *instance, BitmapSource *source)
5290 if (instance == NULL)
5291 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5292 return (gpointer) 0;
5294 return instance->InitializeFromBitmapSource (source);
5298 void
5299 writeable_bitmap_lock (WriteableBitmap *instance)
5301 if (instance == NULL)
5302 return;
5304 instance->Lock ();
5308 void
5309 writeable_bitmap_render (WriteableBitmap *instance, UIElement *element, Transform *transform)
5311 if (instance == NULL)
5312 return;
5314 instance->Render (element, transform);
5318 void
5319 writeable_bitmap_unlock (WriteableBitmap *instance)
5321 if (instance == NULL)
5322 return;
5324 instance->Unlock ();
5328 WriteableBitmap *
5329 writeable_bitmap_new (void)
5331 return new WriteableBitmap ();
5336 * XamlContext
5338 DependencyObject *
5339 xaml_context_get_template_binding_source (XamlContext *instance)
5341 if (instance == NULL)
5342 return NULL;
5344 return instance->GetTemplateBindingSource ();
5349 * XamlLoader
5351 Value *
5352 xaml_loader_create_from_file_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, int *element_type, MoonError *error)
5354 if (instance == NULL)
5355 return NULL;
5357 if (error == NULL)
5358 g_warning ("Moonlight: Called xaml_loader_create_from_file_with_error () with error == NULL.");
5359 return instance->CreateFromFileWithError (xaml, create_namescope, (Type::Kind*) element_type, error);
5363 Value *
5364 xaml_loader_create_from_string_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, bool validate_templates, int *element_type, MoonError *error)
5366 if (instance == NULL)
5367 return NULL;
5369 if (error == NULL)
5370 g_warning ("Moonlight: Called xaml_loader_create_from_string_with_error () with error == NULL.");
5371 return instance->CreateFromStringWithError (xaml, create_namescope, validate_templates, (Type::Kind*) element_type, error);
5375 XamlContext *
5376 xaml_loader_get_context (XamlLoader *instance)
5378 if (instance == NULL)
5379 return NULL;
5381 return instance->GetContext ();
5385 Value *
5386 xaml_loader_hydrate_from_string_with_error (XamlLoader *instance, const char *xaml, Value *obj, bool create_namescope, bool validate_templates, int *element_type, MoonError *error)
5388 if (instance == NULL)
5389 return NULL;
5391 if (error == NULL)
5392 g_warning ("Moonlight: Called xaml_loader_hydrate_from_string_with_error () with error == NULL.");
5393 return instance->HydrateFromStringWithError (xaml, obj, create_namescope, validate_templates, (Type::Kind*) element_type, error);
5398 * Xap
5400 char *
5401 xap_unpack (const char *fname)
5403 return Xap::Unpack (fname);