fixed the build
[moon.git] / src / cbinding.cpp
blob517fdbfe6e58fae573fef6f10f692448c94379ce
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 "eventargs.h"
29 #include "frameworkelement.h"
30 #include "geometry.h"
31 #include "glyphs.h"
32 #include "grid.h"
33 #include "imagesource.h"
34 #include "keyboard.h"
35 #include "media.h"
36 #include "mediaelement.h"
37 #include "multiscaleimage.h"
38 #include "multiscalesubimage.h"
39 #include "namescope.h"
40 #include "panel.h"
41 #include "pipeline.h"
42 #include "popup.h"
43 #include "resources.h"
44 #include "runtime.h"
45 #include "shape.h"
46 #include "size.h"
47 #include "style.h"
48 #include "stylus.h"
49 #include "tabnavigationwalker.h"
50 #include "template.h"
51 #include "textblock.h"
52 #include "textbox.h"
53 #include "tilesource.h"
54 #include "timeline.h"
55 #include "timemanager.h"
56 #include "transform.h"
57 #include "trigger.h"
58 #include "type.h"
59 #include "uielement.h"
60 #include "uri.h"
61 #include "usercontrol.h"
62 #include "window.h"
63 #include "window-gtk.h"
64 #include "writeablebitmap.h"
65 #include "xaml.h"
66 #include "xap.h"
67 /**
68 * Application
69 **/
70 Application *
71 application_new (void)
73 return new Application ();
77 Application *
78 application_get_current (void)
80 return Application::GetCurrent ();
84 void
85 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)
87 if (instance == NULL)
88 return;
90 instance->RegisterCallbacks (apply_default_style_cb, apply_style_cb, get_resource_cb, convert_keyframe_callback, get_default_template_root_cb);
94 void
95 application_set_current (Application *current)
97 Application::SetCurrent (current);
102 * ArcSegment
104 ArcSegment *
105 arc_segment_new (void)
107 return new ArcSegment ();
112 * AssemblyPart
114 AssemblyPart *
115 assembly_part_new (void)
117 return new AssemblyPart ();
122 * AssemblyPartCollection
124 AssemblyPartCollection *
125 assembly_part_collection_new (void)
127 return new AssemblyPartCollection ();
132 * AudioStream
134 AudioStream *
135 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)
137 return new AudioStream (media, codec_id, bits_per_sample, block_align, sample_rate, channels, bit_rate, extra_data, extra_data_size);
142 audio_stream_get_bit_rate (AudioStream *instance)
144 if (instance == NULL)
145 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
146 return (int) 0;
148 return instance->GetBitRate ();
153 audio_stream_get_bits_per_sample (AudioStream *instance)
155 if (instance == NULL)
156 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
157 return (int) 0;
159 return instance->GetBitsPerSample ();
164 audio_stream_get_block_align (AudioStream *instance)
166 if (instance == NULL)
167 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
168 return (int) 0;
170 return instance->GetBlockAlign ();
175 audio_stream_get_channels (AudioStream *instance)
177 if (instance == NULL)
178 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
179 return (int) 0;
181 return instance->GetChannels ();
186 audio_stream_get_input_bit_rate (AudioStream *instance)
188 if (instance == NULL)
189 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
190 return (int) 0;
192 return instance->GetInputBitRate ();
197 audio_stream_get_input_bits_per_sample (AudioStream *instance)
199 if (instance == NULL)
200 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
201 return (int) 0;
203 return instance->GetInputBitsPerSample ();
208 audio_stream_get_input_block_align (AudioStream *instance)
210 if (instance == NULL)
211 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
212 return (int) 0;
214 return instance->GetInputBlockAlign ();
219 audio_stream_get_input_channels (AudioStream *instance)
221 if (instance == NULL)
222 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
223 return (int) 0;
225 return instance->GetInputChannels ();
230 audio_stream_get_input_sample_rate (AudioStream *instance)
232 if (instance == NULL)
233 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
234 return (int) 0;
236 return instance->GetInputSampleRate ();
241 audio_stream_get_output_bit_rate (AudioStream *instance)
243 if (instance == NULL)
244 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
245 return (int) 0;
247 return instance->GetOutputBitRate ();
252 audio_stream_get_output_bits_per_sample (AudioStream *instance)
254 if (instance == NULL)
255 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
256 return (int) 0;
258 return instance->GetOutputBitsPerSample ();
263 audio_stream_get_output_block_align (AudioStream *instance)
265 if (instance == NULL)
266 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
267 return (int) 0;
269 return instance->GetOutputBlockAlign ();
274 audio_stream_get_output_channels (AudioStream *instance)
276 if (instance == NULL)
277 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
278 return (int) 0;
280 return instance->GetOutputChannels ();
285 audio_stream_get_output_sample_rate (AudioStream *instance)
287 if (instance == NULL)
288 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
289 return (int) 0;
291 return instance->GetOutputSampleRate ();
296 audio_stream_get_sample_rate (AudioStream *instance)
298 if (instance == NULL)
299 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
300 return (int) 0;
302 return instance->GetSampleRate ();
306 void
307 audio_stream_set_bit_rate (AudioStream *instance, int value)
309 if (instance == NULL)
310 return;
312 instance->SetBitRate (value);
316 void
317 audio_stream_set_bits_per_sample (AudioStream *instance, int value)
319 if (instance == NULL)
320 return;
322 instance->SetBitsPerSample (value);
326 void
327 audio_stream_set_block_align (AudioStream *instance, int value)
329 if (instance == NULL)
330 return;
332 instance->SetBlockAlign (value);
336 void
337 audio_stream_set_channels (AudioStream *instance, int value)
339 if (instance == NULL)
340 return;
342 instance->SetChannels (value);
346 void
347 audio_stream_set_input_bit_rate (AudioStream *instance, int value)
349 if (instance == NULL)
350 return;
352 instance->SetInputBitRate (value);
356 void
357 audio_stream_set_input_bits_per_sample (AudioStream *instance, int value)
359 if (instance == NULL)
360 return;
362 instance->SetInputBitsPerSample (value);
366 void
367 audio_stream_set_input_block_align (AudioStream *instance, int value)
369 if (instance == NULL)
370 return;
372 instance->SetInputBlockAlign (value);
376 void
377 audio_stream_set_input_channels (AudioStream *instance, int value)
379 if (instance == NULL)
380 return;
382 instance->SetInputChannels (value);
386 void
387 audio_stream_set_input_sample_rate (AudioStream *instance, int value)
389 if (instance == NULL)
390 return;
392 instance->SetInputSampleRate (value);
396 void
397 audio_stream_set_output_bit_rate (AudioStream *instance, int value)
399 if (instance == NULL)
400 return;
402 instance->SetOutputBitRate (value);
406 void
407 audio_stream_set_output_bits_per_sample (AudioStream *instance, int value)
409 if (instance == NULL)
410 return;
412 instance->SetOutputBitsPerSample (value);
416 void
417 audio_stream_set_output_block_align (AudioStream *instance, int value)
419 if (instance == NULL)
420 return;
422 instance->SetOutputBlockAlign (value);
426 void
427 audio_stream_set_output_channels (AudioStream *instance, int value)
429 if (instance == NULL)
430 return;
432 instance->SetOutputChannels (value);
436 void
437 audio_stream_set_output_sample_rate (AudioStream *instance, int value)
439 if (instance == NULL)
440 return;
442 instance->SetOutputSampleRate (value);
446 void
447 audio_stream_set_sample_rate (AudioStream *instance, int value)
449 if (instance == NULL)
450 return;
452 instance->SetSampleRate (value);
457 * BackEase
459 BackEase *
460 back_ease_new (void)
462 return new BackEase ();
466 double
467 back_ease_ease_in_core (BackEase *instance, double normalizedTime)
469 if (instance == NULL)
470 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
471 return (double) 0;
473 return instance->EaseInCore (normalizedTime);
478 * BeginStoryboard
480 BeginStoryboard *
481 begin_storyboard_new (void)
483 return new BeginStoryboard ();
488 * BezierSegment
490 BezierSegment *
491 bezier_segment_new (void)
493 return new BezierSegment ();
498 * BitmapImage
500 BitmapImage *
501 bitmap_image_new (void)
503 return new BitmapImage ();
507 void
508 bitmap_image_pixbuf_write (BitmapImage *instance, gpointer buffer, gint32 offset, gint32 n)
510 if (instance == NULL)
511 return;
513 instance->PixbufWrite (buffer, offset, n);
517 void
518 bitmap_image_pixmap_complete (BitmapImage *instance)
520 if (instance == NULL)
521 return;
523 instance->PixmapComplete ();
528 * BitmapSource
530 BitmapSource *
531 bitmap_source_new (void)
533 return new BitmapSource ();
537 gpointer
538 bitmap_source_get_bitmap_data (BitmapSource *instance)
540 if (instance == NULL)
541 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
542 return (gpointer) 0;
544 return instance->GetBitmapData ();
548 void
549 bitmap_source_invalidate (BitmapSource *instance)
551 if (instance == NULL)
552 return;
554 instance->Invalidate ();
558 void
559 bitmap_source_set_bitmap_data (BitmapSource *instance, gpointer data, bool own)
561 if (instance == NULL)
562 return;
564 instance->SetBitmapData (data, own);
569 * Border
571 Border *
572 border_new (void)
574 return new Border ();
579 * BounceEase
581 BounceEase *
582 bounce_ease_new (void)
584 return new BounceEase ();
588 double
589 bounce_ease_ease_in_core (BounceEase *instance, double normalizedTime)
591 if (instance == NULL)
592 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
593 return (double) 0;
595 return instance->EaseInCore (normalizedTime);
600 * Brush
602 Brush *
603 brush_new (void)
605 return new Brush ();
610 * Canvas
612 Canvas *
613 canvas_new (void)
615 return new Canvas ();
620 * CircleEase
622 CircleEase *
623 circle_ease_new (void)
625 return new CircleEase ();
629 double
630 circle_ease_ease_in_core (CircleEase *instance, double normalizedTime)
632 if (instance == NULL)
633 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
634 return (double) 0;
636 return instance->EaseInCore (normalizedTime);
641 * Collection
644 collection_add_with_error (Collection *instance, Value *value, MoonError *error)
646 if (instance == NULL)
647 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
648 return (int) 0;
650 if (error == NULL)
651 g_warning ("Moonlight: Called collection_add_with_error () with error == NULL.");
652 return instance->AddWithError (value, error);
656 bool
657 collection_clear (Collection *instance)
659 if (instance == NULL)
660 return false;
662 return instance->Clear ();
666 bool
667 collection_contains (Collection *instance, Value *value)
669 if (instance == NULL)
670 return false;
672 return instance->Contains (value);
677 collection_get_count (Collection *instance)
679 if (instance == NULL)
680 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
681 return (int) 0;
683 return instance->GetCount ();
688 collection_get_element_type (Collection *instance)
690 if (instance == NULL)
691 return Type::INVALID;
693 return instance->GetElementType ();
697 CollectionIterator *
698 collection_get_iterator (Collection *instance)
700 if (instance == NULL)
701 return NULL;
703 return instance->GetIterator ();
707 Value *
708 collection_get_value_at_with_error (Collection *instance, int index, MoonError *error)
710 if (instance == NULL)
711 return NULL;
713 if (error == NULL)
714 g_warning ("Moonlight: Called collection_get_value_at_with_error () with error == NULL.");
715 return instance->GetValueAtWithError (index, error);
720 collection_index_of (Collection *instance, Value *value)
722 if (instance == NULL)
723 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
724 return (int) 0;
726 return instance->IndexOf (value);
730 bool
731 collection_insert_with_error (Collection *instance, int index, Value *value, MoonError *error)
733 if (instance == NULL)
734 return false;
736 if (error == NULL)
737 g_warning ("Moonlight: Called collection_insert_with_error () with error == NULL.");
738 return instance->InsertWithError (index, value, error);
742 bool
743 collection_remove (Collection *instance, Value *value)
745 if (instance == NULL)
746 return false;
748 return instance->Remove (value);
752 bool
753 collection_remove_at_with_error (Collection *instance, int index, MoonError *error)
755 if (instance == NULL)
756 return false;
758 if (error == NULL)
759 g_warning ("Moonlight: Called collection_remove_at_with_error () with error == NULL.");
760 return instance->RemoveAtWithError (index, error);
764 bool
765 collection_set_value_at_with_error (Collection *instance, int index, Value *value, MoonError *error)
767 if (instance == NULL)
768 return false;
770 if (error == NULL)
771 g_warning ("Moonlight: Called collection_set_value_at_with_error () with error == NULL.");
772 return instance->SetValueAtWithError (index, value, error);
777 * CollectionChangedEventArgs
779 CollectionChangedEventArgs *
780 collection_changed_event_args_new (void)
782 return new CollectionChangedEventArgs ();
787 collection_changed_event_args_get_changed_action (CollectionChangedEventArgs *instance)
789 if (instance == NULL)
790 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
791 return (CollectionChangedAction) 0;
793 return instance->GetChangedAction ();
798 collection_changed_event_args_get_index (CollectionChangedEventArgs *instance)
800 if (instance == NULL)
801 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
802 return (int) 0;
804 return instance->GetIndex ();
808 Value *
809 collection_changed_event_args_get_new_item (CollectionChangedEventArgs *instance)
811 if (instance == NULL)
812 return NULL;
814 return instance->GetNewItem ();
818 Value *
819 collection_changed_event_args_get_old_item (CollectionChangedEventArgs *instance)
821 if (instance == NULL)
822 return NULL;
824 return instance->GetOldItem ();
828 void
829 collection_changed_event_args_set_changed_action (CollectionChangedEventArgs *instance, int action)
831 if (instance == NULL)
832 return;
834 instance->SetChangedAction ((CollectionChangedAction) action);
838 void
839 collection_changed_event_args_set_index (CollectionChangedEventArgs *instance, int index)
841 if (instance == NULL)
842 return;
844 instance->SetIndex (index);
848 void
849 collection_changed_event_args_set_new_item (CollectionChangedEventArgs *instance, Value *item)
851 if (instance == NULL)
852 return;
854 instance->SetNewItem (item);
858 void
859 collection_changed_event_args_set_old_item (CollectionChangedEventArgs *instance, Value *item)
861 if (instance == NULL)
862 return;
864 instance->SetOldItem (item);
869 * CollectionIterator
871 void
872 collection_iterator_destroy (CollectionIterator *iterator)
874 CollectionIterator::Destroy (iterator);
878 Value *
879 collection_iterator_get_current (CollectionIterator *instance, int *error)
881 if (instance == NULL)
882 return NULL;
884 return instance->GetCurrent (error);
889 collection_iterator_next (CollectionIterator *instance)
891 if (instance == NULL)
892 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
893 return (int) 0;
895 return instance->Next ();
899 bool
900 collection_iterator_reset (CollectionIterator *instance)
902 if (instance == NULL)
903 return false;
905 return instance->Reset ();
910 * ColorAnimation
912 ColorAnimation *
913 color_animation_new (void)
915 return new ColorAnimation ();
920 * ColorAnimationUsingKeyFrames
922 ColorAnimationUsingKeyFrames *
923 color_animation_using_key_frames_new (void)
925 return new ColorAnimationUsingKeyFrames ();
930 * ColorKeyFrame
932 ColorKeyFrame *
933 color_key_frame_new (void)
935 return new ColorKeyFrame ();
940 * ColorKeyFrameCollection
942 ColorKeyFrameCollection *
943 color_key_frame_collection_new (void)
945 return new ColorKeyFrameCollection ();
950 * ColumnDefinition
952 ColumnDefinition *
953 column_definition_new (void)
955 return new ColumnDefinition ();
960 * ColumnDefinitionCollection
962 ColumnDefinitionCollection *
963 column_definition_collection_new (void)
965 return new ColumnDefinitionCollection ();
970 * ContentChangedEventArgs
972 Value *
973 content_changed_event_args_get_new_content (ContentChangedEventArgs *instance)
975 if (instance == NULL)
976 return NULL;
978 return instance->GetNewContent ();
982 Value *
983 content_changed_event_args_get_old_content (ContentChangedEventArgs *instance)
985 if (instance == NULL)
986 return NULL;
988 return instance->GetOldContent ();
993 * ContentControl
995 ContentControl *
996 content_control_new (void)
998 return new ContentControl ();
1002 bool
1003 content_control_get_content_sets_parent (ContentControl *instance)
1005 if (instance == NULL)
1006 return false;
1008 return instance->GetContentSetsParent ();
1012 void
1013 content_control_set_content_sets_parent (ContentControl *instance, bool value)
1015 if (instance == NULL)
1016 return;
1018 instance->SetContentSetsParent (value);
1023 * Control
1025 bool
1026 control_apply_template (Control *instance)
1028 if (instance == NULL)
1029 return false;
1031 return instance->ApplyTemplate ();
1035 Control *
1036 control_new (void)
1038 return new Control ();
1042 DependencyObject *
1043 control_get_template_child (Control *instance, const char *name)
1045 if (instance == NULL)
1046 return NULL;
1048 return instance->GetTemplateChild (name);
1053 * ControlTemplate
1055 ControlTemplate *
1056 control_template_new (void)
1058 return new ControlTemplate ();
1063 * CubicEase
1065 CubicEase *
1066 cubic_ease_new (void)
1068 return new CubicEase ();
1072 double
1073 cubic_ease_ease_in_core (CubicEase *instance, double normalizedTime)
1075 if (instance == NULL)
1076 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1077 return (double) 0;
1079 return instance->EaseInCore (normalizedTime);
1084 * CursorPositionChangedEventArgs
1086 CursorPositionChangedEventArgs *
1087 cursor_position_changed_event_args_new (void)
1089 return new CursorPositionChangedEventArgs ();
1093 double
1094 cursor_position_changed_event_args_get_cursor_height (CursorPositionChangedEventArgs *instance)
1096 if (instance == NULL)
1097 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1098 return (double) 0;
1100 return instance->GetCursorHeight ();
1104 double
1105 cursor_position_changed_event_args_get_cursor_x (CursorPositionChangedEventArgs *instance)
1107 if (instance == NULL)
1108 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1109 return (double) 0;
1111 return instance->GetCursorX ();
1115 double
1116 cursor_position_changed_event_args_get_cursor_y (CursorPositionChangedEventArgs *instance)
1118 if (instance == NULL)
1119 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1120 return (double) 0;
1122 return instance->GetCursorY ();
1127 * DataTemplate
1129 DataTemplate *
1130 data_template_new (void)
1132 return new DataTemplate ();
1137 * DeepZoomImageTileSource
1139 DeepZoomImageTileSource *
1140 deep_zoom_image_tile_source_new (void)
1142 return new DeepZoomImageTileSource ();
1147 * DependencyObject
1149 void
1150 dependency_object_add_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb, gpointer closure)
1152 if (instance == NULL)
1153 return;
1155 instance->AddPropertyChangeHandler (property, cb, closure);
1159 void
1160 dependency_object_clear_value (DependencyObject *instance, DependencyProperty *property, bool notify_listeners, MoonError *error)
1162 if (instance == NULL)
1163 return;
1165 if (error == NULL)
1166 g_warning ("Moonlight: Called dependency_object_clear_value () with error == NULL.");
1167 instance->ClearValue (property, notify_listeners, error);
1171 DependencyObject *
1172 dependency_object_new (void)
1174 return new DependencyObject ();
1178 DependencyObject *
1179 dependency_object_find_name (DependencyObject *instance, const char *name, int *element_kind)
1181 if (instance == NULL)
1182 return NULL;
1184 return instance->FindName (name, (Type::Kind*) element_kind);
1188 const char *
1189 dependency_object_get_name (DependencyObject *instance)
1191 if (instance == NULL)
1192 return NULL;
1194 return instance->GetName ();
1198 Value *
1199 dependency_object_get_value_no_default_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1201 if (instance == NULL)
1202 return NULL;
1204 if (error == NULL)
1205 g_warning ("Moonlight: Called dependency_object_get_value_no_default_with_error () with error == NULL.");
1206 return instance->GetValueNoDefaultWithError (property, error);
1210 Value *
1211 dependency_object_get_value_with_error (DependencyObject *instance, int whatami, DependencyProperty *property, MoonError *error)
1213 if (instance == NULL)
1214 return NULL;
1216 if (error == NULL)
1217 g_warning ("Moonlight: Called dependency_object_get_value_with_error () with error == NULL.");
1218 return instance->GetValueWithError ((Type::Kind) whatami, property, error);
1222 Value *
1223 dependency_object_read_local_value_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1225 if (instance == NULL)
1226 return NULL;
1228 if (error == NULL)
1229 g_warning ("Moonlight: Called dependency_object_read_local_value_with_error () with error == NULL.");
1230 return instance->ReadLocalValueWithError (property, error);
1234 void
1235 dependency_object_remove_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb)
1237 if (instance == NULL)
1238 return;
1240 instance->RemovePropertyChangeHandler (property, cb);
1244 void
1245 dependency_object_set_name (DependencyObject *instance, const char *name)
1247 if (instance == NULL)
1248 return;
1250 instance->SetName (name);
1254 void
1255 dependency_object_set_parent (DependencyObject *instance, DependencyObject *parent, MoonError *error)
1257 if (instance == NULL)
1258 return;
1260 if (error == NULL)
1261 g_warning ("Moonlight: Called dependency_object_set_parent () with error == NULL.");
1262 instance->SetParent (parent, error);
1266 bool
1267 dependency_object_set_value_with_error (DependencyObject *instance, DependencyProperty *property, Value *value, MoonError *error)
1269 if (instance == NULL)
1270 return false;
1272 if (error == NULL)
1273 g_warning ("Moonlight: Called dependency_object_set_value_with_error () with error == NULL.");
1274 return instance->SetValueWithError (property, value, error);
1279 * DependencyObjectCollection
1281 DependencyObjectCollection *
1282 dependency_object_collection_new (void)
1284 return new DependencyObjectCollection ();
1289 * DependencyProperty
1291 Value *
1292 dependency_property_get_default_value (DependencyProperty *instance)
1294 if (instance == NULL)
1295 return NULL;
1297 return instance->GetDefaultValue ();
1301 DependencyProperty *
1302 dependency_property_get_dependency_property (int type, const char *name)
1304 return DependencyProperty::GetDependencyProperty ((Type::Kind) type, name);
1308 DependencyProperty *
1309 dependency_property_get_dependency_property_full (int type, const char *name, bool inherits)
1311 return DependencyProperty::GetDependencyPropertyFull ((Type::Kind) type, name, inherits);
1315 const char *
1316 dependency_property_get_name (DependencyProperty *instance)
1318 if (instance == NULL)
1319 return NULL;
1321 return instance->GetName ();
1326 dependency_property_get_property_type (DependencyProperty *instance)
1328 if (instance == NULL)
1329 return Type::INVALID;
1331 return instance->GetPropertyType ();
1335 bool
1336 dependency_property_is_attached (DependencyProperty *instance)
1338 if (instance == NULL)
1339 return false;
1341 return instance->IsAttached ();
1345 bool
1346 dependency_property_is_nullable (DependencyProperty *instance)
1348 if (instance == NULL)
1349 return false;
1351 return instance->IsNullable ();
1355 bool
1356 dependency_property_is_read_only (DependencyProperty *instance)
1358 if (instance == NULL)
1359 return false;
1361 return instance->IsReadOnly ();
1365 DependencyProperty *
1366 dependency_property_register_core_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1368 return DependencyProperty::RegisterCoreProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1372 DependencyProperty *
1373 dependency_property_register_custom_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1375 return DependencyProperty::RegisterCustomProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1379 void
1380 dependency_property_set_is_nullable (DependencyProperty *instance, bool value)
1382 if (instance == NULL)
1383 return;
1385 instance->SetIsNullable (value);
1389 void
1390 dependency_property_set_property_changed_callback (DependencyProperty *instance, PropertyChangeHandler changed_callback)
1392 if (instance == NULL)
1393 return;
1395 instance->SetPropertyChangedCallback (changed_callback);
1400 * Deployment
1402 Deployment *
1403 deployment_new (void)
1405 return new Deployment ();
1409 Deployment *
1410 deployment_get_current (void)
1412 return Deployment::GetCurrent ();
1416 Types *
1417 deployment_get_types (Deployment *instance)
1419 if (instance == NULL)
1420 return NULL;
1422 return instance->GetTypes ();
1426 void
1427 deployment_set_current (Deployment *value)
1429 Deployment::SetCurrent (value);
1433 void
1434 deployment_set_current_application (Deployment *instance, Application *value)
1436 if (instance == NULL)
1437 return;
1439 instance->SetCurrentApplication (value);
1443 void
1444 deployment_set_is_loaded_from_xap (Deployment *instance, bool flag)
1446 if (instance == NULL)
1447 return;
1449 instance->SetIsLoadedFromXap (flag);
1454 * DiscreteColorKeyFrame
1456 DiscreteColorKeyFrame *
1457 discrete_color_key_frame_new (void)
1459 return new DiscreteColorKeyFrame ();
1464 * DiscreteDoubleKeyFrame
1466 DiscreteDoubleKeyFrame *
1467 discrete_double_key_frame_new (void)
1469 return new DiscreteDoubleKeyFrame ();
1474 * DiscreteObjectKeyFrame
1476 DiscreteObjectKeyFrame *
1477 discrete_object_key_frame_new (void)
1479 return new DiscreteObjectKeyFrame ();
1484 * DiscretePointKeyFrame
1486 DiscretePointKeyFrame *
1487 discrete_point_key_frame_new (void)
1489 return new DiscretePointKeyFrame ();
1494 * DispatcherTimer
1496 DispatcherTimer *
1497 dispatcher_timer_new (void)
1499 return new DispatcherTimer ();
1503 void
1504 dispatcher_timer_start (DispatcherTimer *instance)
1506 if (instance == NULL)
1507 return;
1509 instance->Start ();
1513 void
1514 dispatcher_timer_stop (DispatcherTimer *instance)
1516 if (instance == NULL)
1517 return;
1519 instance->Stop ();
1524 * DoubleAnimation
1526 DoubleAnimation *
1527 double_animation_new (void)
1529 return new DoubleAnimation ();
1534 * DoubleAnimationUsingKeyFrames
1536 DoubleAnimationUsingKeyFrames *
1537 double_animation_using_key_frames_new (void)
1539 return new DoubleAnimationUsingKeyFrames ();
1544 * DoubleCollection
1546 DoubleCollection *
1547 double_collection_new (void)
1549 return new DoubleCollection ();
1554 * DoubleKeyFrame
1556 DoubleKeyFrame *
1557 double_key_frame_new (void)
1559 return new DoubleKeyFrame ();
1564 * DoubleKeyFrameCollection
1566 DoubleKeyFrameCollection *
1567 double_key_frame_collection_new (void)
1569 return new DoubleKeyFrameCollection ();
1574 * Downloader
1576 void *
1577 downloader_create_web_request (Downloader *instance, const char *method, const char *uri)
1579 if (instance == NULL)
1580 return NULL;
1582 return instance->CreateWebRequest (method, uri);
1586 Downloader *
1587 downloader_new (void)
1589 return new Downloader ();
1593 void
1594 downloader_notify_failed (Downloader *instance, const char *msg)
1596 if (instance == NULL)
1597 return;
1599 instance->NotifyFailed (msg);
1603 void
1604 downloader_notify_finished (Downloader *instance, const char *final_uri)
1606 if (instance == NULL)
1607 return;
1609 instance->NotifyFinished (final_uri);
1613 void
1614 downloader_notify_size (Downloader *instance, gint64 size)
1616 if (instance == NULL)
1617 return;
1619 instance->NotifySize (size);
1623 void
1624 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)
1626 Downloader::SetFunctions (create_state, destroy_state, open, send, abort, header, body, request, response_header_callback, get_response);
1630 void
1631 downloader_write (Downloader *instance, void *buf, gint32 offset, gint32 n)
1633 if (instance == NULL)
1634 return;
1636 instance->Write (buf, offset, n);
1641 * DownloaderRequest
1643 void
1644 downloader_request_free (DownloaderRequest *instance)
1646 delete instance;
1650 void
1651 downloader_request_abort (DownloaderRequest *instance)
1653 if (instance == NULL)
1654 return;
1656 instance->Abort ();
1660 DownloaderResponse *
1661 downloader_request_get_downloader_response (DownloaderRequest *instance)
1663 if (instance == NULL)
1664 return NULL;
1666 return instance->GetDownloaderResponse ();
1670 bool
1671 downloader_request_get_response (DownloaderRequest *instance, DownloaderResponseStartedHandler started, DownloaderResponseDataAvailableHandler available, DownloaderResponseFinishedHandler finished, gpointer context)
1673 if (instance == NULL)
1674 return false;
1676 return instance->GetResponse (started, available, finished, context);
1680 const bool
1681 downloader_request_is_aborted (DownloaderRequest *instance)
1683 if (instance == NULL)
1684 return false;
1686 return instance->IsAborted ();
1690 void
1691 downloader_request_set_body (DownloaderRequest *instance, void *body, int size)
1693 if (instance == NULL)
1694 return;
1696 instance->SetBody (body, size);
1700 void
1701 downloader_request_set_http_header (DownloaderRequest *instance, const char *name, const char *value)
1703 if (instance == NULL)
1704 return;
1706 instance->SetHttpHeader (name, value);
1711 * DownloaderResponse
1713 void
1714 downloader_response_free (DownloaderResponse *instance)
1716 delete instance;
1720 void
1721 downloader_response_abort (DownloaderResponse *instance)
1723 if (instance == NULL)
1724 return;
1726 instance->Abort ();
1731 downloader_response_get_response_status (DownloaderResponse *instance)
1733 if (instance == NULL)
1734 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1735 return (int) 0;
1737 return instance->GetResponseStatus ();
1741 const char *
1742 downloader_response_get_response_status_text (DownloaderResponse *instance)
1744 if (instance == NULL)
1745 return NULL;
1747 return instance->GetResponseStatusText ();
1751 void
1752 downloader_response_set_header_visitor (DownloaderResponse *instance, DownloaderResponseHeaderCallback visitor, gpointer context)
1754 if (instance == NULL)
1755 return;
1757 instance->SetHeaderVisitor (visitor, context);
1762 * DownloadProgressEventArgs
1764 double
1765 download_progress_event_args_get_progress (DownloadProgressEventArgs *instance)
1767 if (instance == NULL)
1768 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1769 return (double) 0;
1771 return instance->GetProgress ();
1776 * DrawingAttributes
1778 DrawingAttributes *
1779 drawing_attributes_new (void)
1781 return new DrawingAttributes ();
1786 * EasingColorKeyFrame
1788 EasingColorKeyFrame *
1789 easing_color_key_frame_new (void)
1791 return new EasingColorKeyFrame ();
1796 * EasingDoubleKeyFrame
1798 EasingDoubleKeyFrame *
1799 easing_double_key_frame_new (void)
1801 return new EasingDoubleKeyFrame ();
1806 * EasingFunctionBase
1808 EasingFunctionBase *
1809 easing_function_base_new (void)
1811 return new EasingFunctionBase ();
1815 void
1816 easing_function_base_set_easing_function (EasingFunctionBase *instance, EasingFunction value)
1818 if (instance == NULL)
1819 return;
1821 instance->SetEasingFunction (value);
1826 * EasingPointKeyFrame
1828 EasingPointKeyFrame *
1829 easing_point_key_frame_new (void)
1831 return new EasingPointKeyFrame ();
1836 * ElasticEase
1838 double
1839 elastic_ease_ease_in_core (ElasticEase *instance, double normalizedTime)
1841 if (instance == NULL)
1842 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1843 return (double) 0;
1845 return instance->EaseInCore (normalizedTime);
1849 ElasticEase *
1850 elastic_ease_new (void)
1852 return new ElasticEase ();
1857 * Ellipse
1859 Ellipse *
1860 ellipse_new (void)
1862 return new Ellipse ();
1867 * EllipseGeometry
1869 EllipseGeometry *
1870 ellipse_geometry_new (void)
1872 return new EllipseGeometry ();
1877 * ErrorEventArgs
1880 error_event_args_get_error_code (ErrorEventArgs *instance)
1882 if (instance == NULL)
1883 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1884 return (int) 0;
1886 return instance->GetErrorCode ();
1890 const char *
1891 error_event_args_get_error_message (ErrorEventArgs *instance)
1893 if (instance == NULL)
1894 return NULL;
1896 return instance->GetErrorMessage ();
1901 error_event_args_get_error_type (ErrorEventArgs *instance)
1903 if (instance == NULL)
1904 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1905 return (int) 0;
1907 return instance->GetErrorType ();
1911 gpointer
1912 error_event_args_get_moon_error (ErrorEventArgs *instance)
1914 if (instance == NULL)
1915 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1916 return (gpointer) 0;
1918 return instance->GetMoonError ();
1923 * EventObject
1926 event_object_add_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1928 if (instance == NULL)
1929 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1930 return (int) 0;
1932 return instance->AddHandler (event_id, handler, data, data_dtor);
1936 void
1937 event_object_add_on_event_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1939 if (instance == NULL)
1940 return;
1942 instance->AddOnEventHandler (event_id, handler, data, data_dtor);
1946 void
1947 event_object_add_toggle_ref_notifier (EventObject *instance, ToggleNotifyHandler tr)
1949 if (instance == NULL)
1950 return;
1952 instance->AddToggleRefNotifier (tr);
1957 event_object_add_xaml_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1959 if (instance == NULL)
1960 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1961 return (int) 0;
1963 return instance->AddXamlHandler (event_id, handler, data, data_dtor);
1967 void
1968 event_object_do_emit_current_context (EventObject *instance, int event_id, EventArgs *calldata)
1970 if (instance == NULL)
1971 return;
1973 instance->DoEmitCurrentContext (event_id, calldata);
1978 event_object_get_object_type (EventObject *instance)
1980 if (instance == NULL)
1981 return Type::INVALID;
1983 return instance->GetObjectType ();
1987 Surface *
1988 event_object_get_surface (EventObject *instance)
1990 if (instance == NULL)
1991 return NULL;
1993 return instance->GetSurface ();
1997 const char *
1998 event_object_get_type_name (EventObject *instance)
2000 if (instance == NULL)
2001 return NULL;
2003 return instance->GetTypeName ();
2007 void
2008 event_object_ref (EventObject *instance)
2010 if (instance == NULL)
2011 return;
2013 instance->ref ();
2017 void
2018 event_object_remove_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data)
2020 if (instance == NULL)
2021 return;
2023 instance->RemoveHandler (event_id, handler, data);
2027 void
2028 event_object_remove_on_event_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data)
2030 if (instance == NULL)
2031 return;
2033 instance->RemoveOnEventHandler (event_id, handler, data);
2037 void
2038 event_object_remove_toggle_ref_notifier (EventObject *instance)
2040 if (instance == NULL)
2041 return;
2043 instance->RemoveToggleRefNotifier ();
2047 void
2048 event_object_set_object_type (EventObject *instance, int value)
2050 if (instance == NULL)
2051 return;
2053 instance->SetObjectType ((Type::Kind) value);
2057 void
2058 event_object_unref (EventObject *instance)
2060 if (instance == NULL)
2061 return;
2063 instance->unref ();
2068 * EventTrigger
2070 EventTrigger *
2071 event_trigger_new (void)
2073 return new EventTrigger ();
2078 * ExponentialEase
2080 double
2081 exponential_ease_ease_in_core (ExponentialEase *instance, double normalizedTime)
2083 if (instance == NULL)
2084 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2085 return (double) 0;
2087 return instance->EaseInCore (normalizedTime);
2091 ExponentialEase *
2092 exponential_ease_new (void)
2094 return new ExponentialEase ();
2099 * ExtensionPart
2101 ExtensionPart *
2102 extension_part_new (void)
2104 return new ExtensionPart ();
2109 * ExternalDecoder
2111 ExternalDecoder *
2112 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)
2114 return new ExternalDecoder (media, stream, instance, name, decode_frame_async, open_decoder_async, cleanup, clean_state, has_delayed_frame, dispose, dtor);
2119 * ExternalDecoderInfo
2121 ExternalDecoderInfo *
2122 external_decoder_info_new (void *instance, const char *name, ExternalDecoderInfo_SupportsCallback supports, ExternalDecoderInfo_Create create, ExternalDecoderInfo_dtor dtor)
2124 return new ExternalDecoderInfo (instance, name, supports, create, dtor);
2129 * ExternalDemuxer
2131 gint32
2132 external_demuxer_add_stream (ExternalDemuxer *instance, IMediaStream *stream)
2134 if (instance == NULL)
2135 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2136 return (gint32) 0;
2138 return instance->AddStream (stream);
2142 void
2143 external_demuxer_clear_callbacks (ExternalDemuxer *instance)
2145 if (instance == NULL)
2146 return;
2148 instance->ClearCallbacks ();
2152 void
2153 external_demuxer_set_can_seek (ExternalDemuxer *instance, bool value)
2155 if (instance == NULL)
2156 return;
2158 instance->SetCanSeek (value);
2163 * ExternalPart
2165 ExternalPart *
2166 external_part_new (void)
2168 return new ExternalPart ();
2173 * ExternalPartCollection
2175 ExternalPartCollection *
2176 external_part_collection_new (void)
2178 return new ExternalPartCollection ();
2183 * FrameworkElement
2185 Size
2186 framework_element_arrange_override (FrameworkElement *instance, Size finalSize)
2188 if (instance == NULL)
2189 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2190 return (Size) 0;
2192 return instance->ArrangeOverride (finalSize);
2196 FrameworkElement *
2197 framework_element_new (void)
2199 return new FrameworkElement ();
2203 DependencyObject *
2204 framework_element_get_logical_parent (FrameworkElement *instance)
2206 if (instance == NULL)
2207 return NULL;
2209 return instance->GetLogicalParent ();
2213 Size
2214 framework_element_measure_override (FrameworkElement *instance, Size availableSize)
2216 if (instance == NULL)
2217 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2218 return (Size) 0;
2220 return instance->MeasureOverride (availableSize);
2224 void
2225 framework_element_register_managed_overrides (FrameworkElement *instance, MeasureOverrideCallback measure_cb, ArrangeOverrideCallback arrange_cb)
2227 if (instance == NULL)
2228 return;
2230 instance->RegisterManagedOverrides (measure_cb, arrange_cb);
2234 void
2235 framework_element_set_default_style (FrameworkElement *instance, Style *value)
2237 if (instance == NULL)
2238 return;
2240 instance->SetDefaultStyle (value);
2244 void
2245 framework_element_set_logical_parent (FrameworkElement *instance, DependencyObject *logical_parent, MoonError *error)
2247 if (instance == NULL)
2248 return;
2250 if (error == NULL)
2251 g_warning ("Moonlight: Called framework_element_set_logical_parent () with error == NULL.");
2252 instance->SetLogicalParent (logical_parent, error);
2257 * FrameworkTemplate
2259 FrameworkTemplate *
2260 framework_template_new (void)
2262 return new FrameworkTemplate ();
2266 DependencyObject *
2267 framework_template_get_visual_tree (FrameworkTemplate *instance, FrameworkElement *templateBindingSource)
2269 if (instance == NULL)
2270 return NULL;
2272 return instance->GetVisualTree (templateBindingSource);
2277 * GeneralTransform
2279 GeneralTransform *
2280 general_transform_new (void)
2282 return new GeneralTransform ();
2286 Matrix *
2287 general_transform_get_matrix (GeneralTransform *instance)
2289 if (instance == NULL)
2290 return NULL;
2292 return instance->GetMatrix ();
2297 * Geometry
2299 Geometry *
2300 geometry_new (void)
2302 return new Geometry ();
2306 Rect
2307 geometry_get_bounds (Geometry *instance)
2309 if (instance == NULL)
2310 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2311 return (Rect) 0;
2313 return instance->GetBounds ();
2318 * GeometryCollection
2320 GeometryCollection *
2321 geometry_collection_new (void)
2323 return new GeometryCollection ();
2328 * GeometryGroup
2330 GeometryGroup *
2331 geometry_group_new (void)
2333 return new GeometryGroup ();
2338 * Glyphs
2340 Glyphs *
2341 glyphs_new (void)
2343 return new Glyphs ();
2348 * GradientBrush
2350 GradientBrush *
2351 gradient_brush_new (void)
2353 return new GradientBrush ();
2358 * GradientStop
2360 GradientStop *
2361 gradient_stop_new (void)
2363 return new GradientStop ();
2368 * GradientStopCollection
2370 GradientStopCollection *
2371 gradient_stop_collection_new (void)
2373 return new GradientStopCollection ();
2378 * Grid
2380 Grid *
2381 grid_new (void)
2383 return new Grid ();
2388 * HitTestCollection
2390 HitTestCollection *
2391 hit_test_collection_new (void)
2393 return new HitTestCollection ();
2398 * Image
2400 Image *
2401 image_new (void)
2403 return new Image ();
2407 void
2408 image_set_source (Image *instance, ImageSource *source)
2410 if (instance == NULL)
2411 return;
2413 instance->SetSource (source);
2418 * ImageBrush
2420 ImageBrush *
2421 image_brush_new (void)
2423 return new ImageBrush ();
2428 * ImageSource
2430 ImageSource *
2431 image_source_new (void)
2433 return new ImageSource ();
2438 * IMediaDecoder
2440 void
2441 imedia_decoder_report_decode_frame_completed (IMediaDecoder *instance, MediaFrame *frame)
2443 if (instance == NULL)
2444 return;
2446 instance->ReportDecodeFrameCompleted (frame);
2450 void
2451 imedia_decoder_report_open_decoder_completed (IMediaDecoder *instance)
2453 if (instance == NULL)
2454 return;
2456 instance->ReportOpenDecoderCompleted ();
2460 void
2461 imedia_decoder_set_pixel_format (IMediaDecoder *instance, int value)
2463 if (instance == NULL)
2464 return;
2466 instance->SetPixelFormat ((MoonPixelFormat) value);
2471 * IMediaDemuxer
2473 void
2474 imedia_demuxer_report_get_diagnostic_completed (IMediaDemuxer *instance, int diagnosticKind, gint64 diagnosticValue)
2476 if (instance == NULL)
2477 return;
2479 instance->ReportGetDiagnosticCompleted ((MediaStreamSourceDiagnosticKind) diagnosticKind, diagnosticValue);
2483 void
2484 imedia_demuxer_report_get_frame_completed (IMediaDemuxer *instance, MediaFrame *frame)
2486 if (instance == NULL)
2487 return;
2489 instance->ReportGetFrameCompleted (frame);
2493 void
2494 imedia_demuxer_report_get_frame_progress (IMediaDemuxer *instance, double bufferingProgress)
2496 if (instance == NULL)
2497 return;
2499 instance->ReportGetFrameProgress (bufferingProgress);
2503 void
2504 imedia_demuxer_report_open_demuxer_completed (IMediaDemuxer *instance)
2506 if (instance == NULL)
2507 return;
2509 instance->ReportOpenDemuxerCompleted ();
2513 void
2514 imedia_demuxer_report_seek_completed (IMediaDemuxer *instance, guint64 pts)
2516 if (instance == NULL)
2517 return;
2519 instance->ReportSeekCompleted (pts);
2523 void
2524 imedia_demuxer_report_switch_media_stream_completed (IMediaDemuxer *instance, IMediaStream *stream)
2526 if (instance == NULL)
2527 return;
2529 instance->ReportSwitchMediaStreamCompleted (stream);
2534 * IMediaObject
2536 Media *
2537 imedia_object_get_media_reffed (IMediaObject *instance)
2539 if (instance == NULL)
2540 return NULL;
2542 return instance->GetMediaReffed ();
2546 void
2547 imedia_object_report_error_occurred (IMediaObject *instance, const char *message)
2549 if (instance == NULL)
2550 return;
2552 instance->ReportErrorOccurred (message);
2557 * IMediaStream
2559 const char *
2560 imedia_stream_get_codec (IMediaStream *instance)
2562 if (instance == NULL)
2563 return NULL;
2565 return instance->GetCodec ();
2570 imedia_stream_get_codec_id (IMediaStream *instance)
2572 if (instance == NULL)
2573 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2574 return (int) 0;
2576 return instance->GetCodecId ();
2580 guint64
2581 imedia_stream_get_duration (IMediaStream *instance)
2583 if (instance == NULL)
2584 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2585 return (guint64) 0;
2587 return instance->GetDuration ();
2591 void *
2592 imedia_stream_get_extra_data (IMediaStream *instance)
2594 if (instance == NULL)
2595 return NULL;
2597 return instance->GetExtraData ();
2602 imedia_stream_get_extra_data_size (IMediaStream *instance)
2604 if (instance == NULL)
2605 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2606 return (int) 0;
2608 return instance->GetExtraDataSize ();
2613 imedia_stream_get_stream_type (IMediaStream *instance)
2615 if (instance == NULL)
2616 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2617 return (MediaStreamType) 0;
2619 return instance->GetStreamType ();
2623 void
2624 imedia_stream_set_codec_id (IMediaStream *instance, int value)
2626 if (instance == NULL)
2627 return;
2629 instance->SetCodecId (value);
2633 void
2634 imedia_stream_set_duration (IMediaStream *instance, guint64 value)
2636 if (instance == NULL)
2637 return;
2639 instance->SetDuration (value);
2643 void
2644 imedia_stream_set_extra_data (IMediaStream *instance, void *value)
2646 if (instance == NULL)
2647 return;
2649 instance->SetExtraData (value);
2653 void
2654 imedia_stream_set_extra_data_size (IMediaStream *instance, int value)
2656 if (instance == NULL)
2657 return;
2659 instance->SetExtraDataSize (value);
2664 * InkPresenter
2666 InkPresenter *
2667 ink_presenter_new (void)
2669 return new InkPresenter ();
2674 * Inline
2676 Inline *
2677 inline_new (void)
2679 return new Inline ();
2684 * InlineCollection
2686 InlineCollection *
2687 inline_collection_new (void)
2689 return new InlineCollection ();
2694 * InputMethod
2696 InputMethod *
2697 input_method_new (void)
2699 return new InputMethod ();
2704 * ItemCollection
2706 ItemCollection *
2707 item_collection_new (void)
2709 return new ItemCollection ();
2714 * Keyboard
2717 keyboard_get_modifiers (void)
2719 return Keyboard::GetModifiers ();
2724 * KeyEventArgs
2727 key_event_args_get_key (KeyEventArgs *instance)
2729 if (instance == NULL)
2730 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2731 return (int) 0;
2733 return instance->GetKey ();
2738 key_event_args_get_platform_key_code (KeyEventArgs *instance)
2740 if (instance == NULL)
2741 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2742 return (int) 0;
2744 return instance->GetPlatformKeyCode ();
2748 KeyEventArgs *
2749 key_event_args_new (void)
2751 return new KeyEventArgs ();
2756 * KeyFrameCollection
2758 KeyFrameCollection *
2759 key_frame_collection_new (void)
2761 return new KeyFrameCollection ();
2766 * KeySpline
2768 KeySpline *
2769 key_spline_new (void)
2771 return new KeySpline ();
2776 * Line
2778 Line *
2779 line_new (void)
2781 return new Line ();
2786 * LinearColorKeyFrame
2788 LinearColorKeyFrame *
2789 linear_color_key_frame_new (void)
2791 return new LinearColorKeyFrame ();
2796 * LinearDoubleKeyFrame
2798 LinearDoubleKeyFrame *
2799 linear_double_key_frame_new (void)
2801 return new LinearDoubleKeyFrame ();
2806 * LinearGradientBrush
2808 LinearGradientBrush *
2809 linear_gradient_brush_new (void)
2811 return new LinearGradientBrush ();
2816 * LinearPointKeyFrame
2818 LinearPointKeyFrame *
2819 linear_point_key_frame_new (void)
2821 return new LinearPointKeyFrame ();
2826 * LineBreak
2828 LineBreak *
2829 line_break_new (void)
2831 return new LineBreak ();
2836 * LineGeometry
2838 LineGeometry *
2839 line_geometry_new (void)
2841 return new LineGeometry ();
2846 * LineSegment
2848 LineSegment *
2849 line_segment_new (void)
2851 return new LineSegment ();
2856 * MarkerReachedEventArgs
2858 TimelineMarker *
2859 marker_reached_event_args_get_marker (MarkerReachedEventArgs *instance)
2861 if (instance == NULL)
2862 return NULL;
2864 return instance->GetMarker ();
2869 * Matrix
2871 cairo_matrix_t *
2872 matrix_get_matrix_values (Matrix *instance)
2874 if (instance == NULL)
2875 return NULL;
2877 return instance->GetMatrixValues ();
2881 Matrix *
2882 matrix_new (void)
2884 return new Matrix ();
2889 * MatrixTransform
2891 MatrixTransform *
2892 matrix_transform_new (void)
2894 return new MatrixTransform ();
2899 * Media
2901 void
2902 media_register_decoder (DecoderInfo *info)
2904 Media::RegisterDecoder (info);
2909 * MediaAttribute
2911 MediaAttribute *
2912 media_attribute_new (void)
2914 return new MediaAttribute ();
2919 * MediaAttributeCollection
2921 MediaAttribute *
2922 media_attribute_collection_get_item_by_name (MediaAttributeCollection *instance, const char *name)
2924 if (instance == NULL)
2925 return NULL;
2927 return instance->GetItemByName (name);
2931 MediaAttributeCollection *
2932 media_attribute_collection_new (void)
2934 return new MediaAttributeCollection ();
2939 * MediaBase
2941 MediaBase *
2942 media_base_new (void)
2944 return new MediaBase ();
2948 void
2949 media_base_set_source (MediaBase *instance, const char *uri)
2951 if (instance == NULL)
2952 return;
2954 instance->SetSource (uri);
2959 * MediaElement
2961 MediaElement *
2962 media_element_new (void)
2964 return new MediaElement ();
2968 void
2969 media_element_pause (MediaElement *instance)
2971 if (instance == NULL)
2972 return;
2974 instance->Pause ();
2978 void
2979 media_element_play (MediaElement *instance)
2981 if (instance == NULL)
2982 return;
2984 instance->Play ();
2988 void
2989 media_element_report_error_occurred (MediaElement *instance, const char *args)
2991 if (instance == NULL)
2992 return;
2994 instance->ReportErrorOccurred (args);
2998 IMediaDemuxer *
2999 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)
3001 if (instance == NULL)
3002 return NULL;
3004 return instance->SetDemuxerSource (context, close_demuxer, get_diagnostic, get_sample, open_demuxer, seek, switch_media_stream);
3008 void
3009 media_element_set_stream_source (MediaElement *instance, ManagedStreamCallbacks *stream)
3011 if (instance == NULL)
3012 return;
3014 instance->SetStreamSource (stream);
3018 void
3019 media_element_stop (MediaElement *instance)
3021 if (instance == NULL)
3022 return;
3024 instance->Stop ();
3029 * MediaFrame
3031 void
3032 media_frame_add_state (MediaFrame *instance, int state)
3034 if (instance == NULL)
3035 return;
3037 instance->AddState ((MediaFrameState) state);
3041 guint8 *
3042 media_frame_get_buffer (MediaFrame *instance)
3044 if (instance == NULL)
3045 return NULL;
3047 return instance->GetBuffer ();
3051 guint32
3052 media_frame_get_buf_len (MediaFrame *instance)
3054 if (instance == NULL)
3055 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3056 return (guint32) 0;
3058 return instance->GetBufLen ();
3062 gint32
3063 media_frame_get_height (MediaFrame *instance)
3065 if (instance == NULL)
3066 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3067 return (gint32) 0;
3069 return instance->GetHeight ();
3073 guint64
3074 media_frame_get_pts (MediaFrame *instance)
3076 if (instance == NULL)
3077 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3078 return (guint64) 0;
3080 return instance->GetPts ();
3084 gint32
3085 media_frame_get_width (MediaFrame *instance)
3087 if (instance == NULL)
3088 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3089 return (gint32) 0;
3091 return instance->GetWidth ();
3095 bool
3096 media_frame_is_key_frame (MediaFrame *instance)
3098 if (instance == NULL)
3099 return false;
3101 return instance->IsKeyFrame ();
3105 MediaFrame *
3106 media_frame_new (IMediaStream *stream, guint8 *buffer, guint32 buflen, guint64 pts, bool keyframe)
3108 return new MediaFrame (stream, buffer, buflen, pts, keyframe);
3112 void
3113 media_frame_set_buffer (MediaFrame *instance, guint8 *value)
3115 if (instance == NULL)
3116 return;
3118 instance->SetBuffer (value);
3122 void
3123 media_frame_set_buf_len (MediaFrame *instance, guint32 value)
3125 if (instance == NULL)
3126 return;
3128 instance->SetBufLen (value);
3132 void
3133 media_frame_set_data_stride (MediaFrame *instance, guint8 *a, guint8 *b, guint8 *c, guint8 *d)
3135 if (instance == NULL)
3136 return;
3138 instance->SetDataStride (a, b, c, d);
3142 void
3143 media_frame_set_decoder_specific_data (MediaFrame *instance, void *value)
3145 if (instance == NULL)
3146 return;
3148 instance->SetDecoderSpecificData (value);
3152 void
3153 media_frame_set_height (MediaFrame *instance, gint32 value)
3155 if (instance == NULL)
3156 return;
3158 instance->SetHeight (value);
3162 void
3163 media_frame_set_pts (MediaFrame *instance, guint64 value)
3165 if (instance == NULL)
3166 return;
3168 instance->SetPts (value);
3172 void
3173 media_frame_set_src_slide_h (MediaFrame *instance, int value)
3175 if (instance == NULL)
3176 return;
3178 instance->SetSrcSlideH (value);
3182 void
3183 media_frame_set_src_slide_y (MediaFrame *instance, int value)
3185 if (instance == NULL)
3186 return;
3188 instance->SetSrcSlideY (value);
3192 void
3193 media_frame_set_src_stride (MediaFrame *instance, int a, int b, int c, int d)
3195 if (instance == NULL)
3196 return;
3198 instance->SetSrcStride (a, b, c, d);
3202 void
3203 media_frame_set_width (MediaFrame *instance, gint32 value)
3205 if (instance == NULL)
3206 return;
3208 instance->SetWidth (value);
3213 * MoonWindow
3215 bool
3216 moon_window_get_transparent (MoonWindow *instance)
3218 if (instance == NULL)
3219 return false;
3221 return instance->GetTransparent ();
3225 void
3226 moon_window_set_transparent (MoonWindow *instance, bool flag)
3228 if (instance == NULL)
3229 return;
3231 instance->SetTransparent (flag);
3236 * MoonWindowGtk
3238 void *
3239 moon_window_gtk_get_native_widget (MoonWindowGtk *instance)
3241 if (instance == NULL)
3242 return NULL;
3244 return instance->GetNativeWidget ();
3248 MoonWindowGtk *
3249 moon_window_gtk_new (bool fullscreen, int w, int h, MoonWindow *parent)
3251 return new MoonWindowGtk (fullscreen, w, h, parent);
3256 * MouseButtonEventArgs
3258 MouseButtonEventArgs *
3259 mouse_button_event_args_new (void)
3261 return new MouseButtonEventArgs ();
3266 * MouseEventArgs
3268 void
3269 mouse_event_args_get_position (MouseEventArgs *instance, UIElement *relative_to, double *x, double *y)
3271 if (instance == NULL)
3272 return;
3274 instance->GetPosition (relative_to, x, y);
3278 StylusInfo *
3279 mouse_event_args_get_stylus_info (MouseEventArgs *instance)
3281 if (instance == NULL)
3282 return NULL;
3284 return instance->GetStylusInfo ();
3288 StylusPointCollection *
3289 mouse_event_args_get_stylus_points (MouseEventArgs *instance, UIElement *ink_presenter)
3291 if (instance == NULL)
3292 return NULL;
3294 return instance->GetStylusPoints (ink_presenter);
3298 MouseEventArgs *
3299 mouse_event_args_new (void)
3301 return new MouseEventArgs ();
3306 * MouseWheelEventArgs
3309 mouse_wheel_event_args_get_wheel_delta (MouseWheelEventArgs *instance)
3311 if (instance == NULL)
3312 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3313 return (int) 0;
3315 return instance->GetWheelDelta ();
3319 MouseWheelEventArgs *
3320 mouse_wheel_event_args_new (void)
3322 return new MouseWheelEventArgs ();
3327 * MultiScaleImage
3329 Point
3330 multi_scale_image_element_to_logical_point (MultiScaleImage *instance, Point elementPoint)
3332 if (instance == NULL)
3333 return Point (0, 0);
3335 return instance->ElementToLogicalPoint (elementPoint);
3339 void
3340 multi_scale_image_emit_image_failed (MultiScaleImage *instance)
3342 if (instance == NULL)
3343 return;
3345 instance->EmitImageFailed ();
3349 void
3350 multi_scale_image_emit_image_open_failed (MultiScaleImage *instance)
3352 if (instance == NULL)
3353 return;
3355 instance->EmitImageOpenFailed ();
3359 void
3360 multi_scale_image_emit_motion_finished (MultiScaleImage *instance)
3362 if (instance == NULL)
3363 return;
3365 instance->EmitMotionFinished ();
3369 void
3370 multi_scale_image_handle_dz_parsed (MultiScaleImage *instance)
3372 if (instance == NULL)
3373 return;
3375 instance->HandleDzParsed ();
3379 void
3380 multi_scale_image_invalidate_tile_layer (MultiScaleImage *instance, int level, int tilePositionX, int tilePositionY, int tileLayer)
3382 if (instance == NULL)
3383 return;
3385 instance->InvalidateTileLayer (level, tilePositionX, tilePositionY, tileLayer);
3389 Point
3390 multi_scale_image_logical_to_element_point (MultiScaleImage *instance, Point logicalPoint)
3392 if (instance == NULL)
3393 return Point (0, 0);
3395 return instance->LogicalToElementPoint (logicalPoint);
3399 MultiScaleImage *
3400 multi_scale_image_new (void)
3402 return new MultiScaleImage ();
3406 void
3407 multi_scale_image_on_source_property_changed (MultiScaleImage *instance)
3409 if (instance == NULL)
3410 return;
3412 instance->OnSourcePropertyChanged ();
3416 void
3417 multi_scale_image_zoom_about_logical_point (MultiScaleImage *instance, double zoomIncrementFactor, double zoomCenterLogicalX, double zoomCenterLogicalY)
3419 if (instance == NULL)
3420 return;
3422 instance->ZoomAboutLogicalPoint (zoomIncrementFactor, zoomCenterLogicalX, zoomCenterLogicalY);
3427 * MultiScaleSubImage
3429 gint32
3430 multi_scale_sub_image_get_zindex (MultiScaleSubImage *instance)
3432 if (instance == NULL)
3433 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3434 return (gint32) 0;
3436 return instance->GetZIndex ();
3440 MultiScaleSubImage *
3441 multi_scale_sub_image_new (void)
3443 return new MultiScaleSubImage ();
3448 * MultiScaleSubImageCollection
3450 MultiScaleSubImageCollection *
3451 multi_scale_sub_image_collection_new (void)
3453 return new MultiScaleSubImageCollection ();
3458 * MultiScaleTileSource
3460 void
3461 multi_scale_tile_source_invalidate_tile_layer (MultiScaleTileSource *instance, int level, int tilePositionX, int tilePositionY, int tileLayer)
3463 if (instance == NULL)
3464 return;
3466 instance->InvalidateTileLayer (level, tilePositionX, tilePositionY, tileLayer);
3470 MultiScaleTileSource *
3471 multi_scale_tile_source_new (void)
3473 return new MultiScaleTileSource ();
3477 void
3478 multi_scale_tile_source_set_image_uri_func (MultiScaleTileSource *instance, get_image_uri_func func)
3480 if (instance == NULL)
3481 return;
3483 instance->set_image_uri_func (func);
3488 * NameScope
3490 NameScope *
3491 name_scope_new (void)
3493 return new NameScope ();
3498 * ObjectAnimationUsingKeyFrames
3500 ObjectAnimationUsingKeyFrames *
3501 object_animation_using_key_frames_new (void)
3503 return new ObjectAnimationUsingKeyFrames ();
3508 * ObjectKeyFrame
3510 ObjectKeyFrame *
3511 object_key_frame_new (void)
3513 return new ObjectKeyFrame ();
3518 * ObjectKeyFrameCollection
3520 ObjectKeyFrameCollection *
3521 object_key_frame_collection_new (void)
3523 return new ObjectKeyFrameCollection ();
3528 * OutOfBrowserSettings
3530 OutOfBrowserSettings *
3531 out_of_browser_settings_new (void)
3533 return new OutOfBrowserSettings ();
3538 * Panel
3540 Panel *
3541 panel_new (void)
3543 return new Panel ();
3548 * ParallelTimeline
3550 ParallelTimeline *
3551 parallel_timeline_new (void)
3553 return new ParallelTimeline ();
3558 * PasswordBox
3560 PasswordBox *
3561 password_box_new (void)
3563 return new PasswordBox ();
3568 * Path
3570 Path *
3571 path_new (void)
3573 return new Path ();
3578 * PathFigure
3580 PathFigure *
3581 path_figure_new (void)
3583 return new PathFigure ();
3588 * PathFigureCollection
3590 PathFigureCollection *
3591 path_figure_collection_new (void)
3593 return new PathFigureCollection ();
3598 * PathGeometry
3600 PathGeometry *
3601 path_geometry_new (void)
3603 return new PathGeometry ();
3608 * PathSegment
3610 PathSegment *
3611 path_segment_new (void)
3613 return new PathSegment ();
3618 * PathSegmentCollection
3620 PathSegmentCollection *
3621 path_segment_collection_new (void)
3623 return new PathSegmentCollection ();
3628 * PointAnimation
3630 PointAnimation *
3631 point_animation_new (void)
3633 return new PointAnimation ();
3638 * PointAnimationUsingKeyFrames
3640 PointAnimationUsingKeyFrames *
3641 point_animation_using_key_frames_new (void)
3643 return new PointAnimationUsingKeyFrames ();
3648 * PointCollection
3650 PointCollection *
3651 point_collection_new (void)
3653 return new PointCollection ();
3658 * PointKeyFrame
3660 PointKeyFrame *
3661 point_key_frame_new (void)
3663 return new PointKeyFrame ();
3668 * PointKeyFrameCollection
3670 PointKeyFrameCollection *
3671 point_key_frame_collection_new (void)
3673 return new PointKeyFrameCollection ();
3678 * PolyBezierSegment
3680 PolyBezierSegment *
3681 poly_bezier_segment_new (void)
3683 return new PolyBezierSegment ();
3687 void
3688 poly_bezier_segment_set_points (PolyBezierSegment *instance, PointCollection *points)
3690 if (instance == NULL)
3691 return;
3693 instance->SetPoints (points);
3698 * Polygon
3700 Polygon *
3701 polygon_new (void)
3703 return new Polygon ();
3708 * Polyline
3710 Polyline *
3711 polyline_new (void)
3713 return new Polyline ();
3718 * PolyLineSegment
3720 PolyLineSegment *
3721 poly_line_segment_new (void)
3723 return new PolyLineSegment ();
3728 * PolyQuadraticBezierSegment
3730 PolyQuadraticBezierSegment *
3731 poly_quadratic_bezier_segment_new (void)
3733 return new PolyQuadraticBezierSegment ();
3738 * Popup
3740 Popup *
3741 popup_new (void)
3743 return new Popup ();
3748 * PowerEase
3750 double
3751 power_ease_ease_in_core (PowerEase *instance, double normalizedTime)
3753 if (instance == NULL)
3754 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3755 return (double) 0;
3757 return instance->EaseInCore (normalizedTime);
3761 PowerEase *
3762 power_ease_new (void)
3764 return new PowerEase ();
3769 * PropertyChangedEventArgs
3772 property_changed_event_args_get_id (PropertyChangedEventArgs *instance)
3774 if (instance == NULL)
3775 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3776 return (int) 0;
3778 return instance->GetId ();
3782 Value *
3783 property_changed_event_args_get_new_value (PropertyChangedEventArgs *instance)
3785 if (instance == NULL)
3786 return NULL;
3788 return instance->GetNewValue ();
3792 Value *
3793 property_changed_event_args_get_old_value (PropertyChangedEventArgs *instance)
3795 if (instance == NULL)
3796 return NULL;
3798 return instance->GetOldValue ();
3802 DependencyProperty *
3803 property_changed_event_args_get_property (PropertyChangedEventArgs *instance)
3805 if (instance == NULL)
3806 return NULL;
3808 return instance->GetProperty ();
3813 * QuadraticBezierSegment
3815 QuadraticBezierSegment *
3816 quadratic_bezier_segment_new (void)
3818 return new QuadraticBezierSegment ();
3823 * QuadraticEase
3825 double
3826 quadratic_ease_ease_in_core (QuadraticEase *instance, double normalizedTime)
3828 if (instance == NULL)
3829 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3830 return (double) 0;
3832 return instance->EaseInCore (normalizedTime);
3836 QuadraticEase *
3837 quadratic_ease_new (void)
3839 return new QuadraticEase ();
3844 * QuarticEase
3846 double
3847 quartic_ease_ease_in_core (QuarticEase *instance, double normalizedTime)
3849 if (instance == NULL)
3850 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3851 return (double) 0;
3853 return instance->EaseInCore (normalizedTime);
3857 QuarticEase *
3858 quartic_ease_new (void)
3860 return new QuarticEase ();
3865 * QuinticEase
3867 double
3868 quintic_ease_ease_in_core (QuinticEase *instance, double normalizedTime)
3870 if (instance == NULL)
3871 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3872 return (double) 0;
3874 return instance->EaseInCore (normalizedTime);
3878 QuinticEase *
3879 quintic_ease_new (void)
3881 return new QuinticEase ();
3886 * RadialGradientBrush
3888 RadialGradientBrush *
3889 radial_gradient_brush_new (void)
3891 return new RadialGradientBrush ();
3896 * Rectangle
3898 Rectangle *
3899 rectangle_new (void)
3901 return new Rectangle ();
3906 * RectangleGeometry
3908 RectangleGeometry *
3909 rectangle_geometry_new (void)
3911 return new RectangleGeometry ();
3916 * RenderingEventArgs
3918 TimeSpan
3919 rendering_event_args_get_rendering_time (RenderingEventArgs *instance)
3921 if (instance == NULL)
3922 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3923 return (TimeSpan) 0;
3925 return instance->GetRenderingTime ();
3930 * ResourceDictionary
3932 bool
3933 resource_dictionary_add_with_error (ResourceDictionary *instance, const char *key, Value *value, MoonError *error)
3935 if (instance == NULL)
3936 return false;
3938 if (error == NULL)
3939 g_warning ("Moonlight: Called resource_dictionary_add_with_error () with error == NULL.");
3940 return instance->AddWithError (key, value, error);
3944 bool
3945 resource_dictionary_clear (ResourceDictionary *instance)
3947 if (instance == NULL)
3948 return false;
3950 return instance->Clear ();
3954 bool
3955 resource_dictionary_contains_key (ResourceDictionary *instance, const char *key)
3957 if (instance == NULL)
3958 return false;
3960 return instance->ContainsKey (key);
3964 Value *
3965 resource_dictionary_get (ResourceDictionary *instance, const char *key, bool *exists)
3967 if (instance == NULL)
3968 return NULL;
3970 return instance->Get (key, exists);
3974 bool
3975 resource_dictionary_remove (ResourceDictionary *instance, const char *key)
3977 if (instance == NULL)
3978 return false;
3980 return instance->Remove (key);
3984 ResourceDictionary *
3985 resource_dictionary_new (void)
3987 return new ResourceDictionary ();
3991 bool
3992 resource_dictionary_set (ResourceDictionary *instance, const char *key, Value *value)
3994 if (instance == NULL)
3995 return false;
3997 return instance->Set (key, value);
4002 * ResourceDictionaryCollection
4004 ResourceDictionaryCollection *
4005 resource_dictionary_collection_new (void)
4007 return new ResourceDictionaryCollection ();
4012 * RotateTransform
4014 RotateTransform *
4015 rotate_transform_new (void)
4017 return new RotateTransform ();
4022 * RoutedEventArgs
4024 bool
4025 routed_event_args_get_handled (RoutedEventArgs *instance)
4027 if (instance == NULL)
4028 return false;
4030 return instance->GetHandled ();
4034 DependencyObject *
4035 routed_event_args_get_source (RoutedEventArgs *instance)
4037 if (instance == NULL)
4038 return NULL;
4040 return instance->GetSource ();
4044 RoutedEventArgs *
4045 routed_event_args_new (void)
4047 return new RoutedEventArgs ();
4051 void
4052 routed_event_args_set_handled (RoutedEventArgs *instance, bool handled)
4054 if (instance == NULL)
4055 return;
4057 instance->SetHandled (handled);
4061 void
4062 routed_event_args_set_source (RoutedEventArgs *instance, DependencyObject *el)
4064 if (instance == NULL)
4065 return;
4067 instance->SetSource (el);
4072 * RowDefinition
4074 RowDefinition *
4075 row_definition_new (void)
4077 return new RowDefinition ();
4082 * RowDefinitionCollection
4084 RowDefinitionCollection *
4085 row_definition_collection_new (void)
4087 return new RowDefinitionCollection ();
4092 * Run
4094 Run *
4095 run_new (void)
4097 return new Run ();
4102 * ScaleTransform
4104 ScaleTransform *
4105 scale_transform_new (void)
4107 return new ScaleTransform ();
4112 * Setter
4114 Setter *
4115 setter_new (void)
4117 return new Setter ();
4122 * SetterBase
4124 SetterBase *
4125 setter_base_new (void)
4127 return new SetterBase ();
4132 * SetterBaseCollection
4134 SetterBaseCollection *
4135 setter_base_collection_new (void)
4137 return new SetterBaseCollection ();
4142 * Shape
4144 Transform *
4145 shape_get_geometry_transform (Shape *instance)
4147 if (instance == NULL)
4148 return NULL;
4150 return instance->GetGeometryTransform ();
4154 Shape *
4155 shape_new (void)
4157 return new Shape ();
4162 * SineEase
4164 double
4165 sine_ease_ease_in_core (SineEase *instance, double normalizedTime)
4167 if (instance == NULL)
4168 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4169 return (double) 0;
4171 return instance->EaseInCore (normalizedTime);
4175 SineEase *
4176 sine_ease_new (void)
4178 return new SineEase ();
4183 * SizeChangedEventArgs
4185 SizeChangedEventArgs *
4186 size_changed_event_args_new (void)
4188 return new SizeChangedEventArgs ();
4193 * SkewTransform
4195 SkewTransform *
4196 skew_transform_new (void)
4198 return new SkewTransform ();
4203 * SolidColorBrush
4205 SolidColorBrush *
4206 solid_color_brush_new (void)
4208 return new SolidColorBrush ();
4213 * SplineColorKeyFrame
4215 SplineColorKeyFrame *
4216 spline_color_key_frame_new (void)
4218 return new SplineColorKeyFrame ();
4223 * SplineDoubleKeyFrame
4225 SplineDoubleKeyFrame *
4226 spline_double_key_frame_new (void)
4228 return new SplineDoubleKeyFrame ();
4233 * SplinePointKeyFrame
4235 SplinePointKeyFrame *
4236 spline_point_key_frame_new (void)
4238 return new SplinePointKeyFrame ();
4243 * Storyboard
4245 bool
4246 storyboard_begin_with_error (Storyboard *instance, MoonError *error)
4248 if (instance == NULL)
4249 return false;
4251 if (error == NULL)
4252 g_warning ("Moonlight: Called storyboard_begin_with_error () with error == NULL.");
4253 return instance->BeginWithError (error);
4258 storyboard_get_current_state (Storyboard *instance)
4260 if (instance == NULL)
4261 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4262 return (int) 0;
4264 return instance->GetCurrentState ();
4268 TimeSpan
4269 storyboard_get_current_time (Storyboard *instance)
4271 if (instance == NULL)
4272 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4273 return (TimeSpan) 0;
4275 return instance->GetCurrentTime ();
4279 DependencyProperty *
4280 storyboard_get_target_dependency_property (Storyboard *instance)
4282 if (instance == NULL)
4283 return NULL;
4285 return instance->GetTargetDependencyProperty ();
4289 void
4290 storyboard_pause_with_error (Storyboard *instance, MoonError *error)
4292 if (instance == NULL)
4293 return;
4295 if (error == NULL)
4296 g_warning ("Moonlight: Called storyboard_pause_with_error () with error == NULL.");
4297 instance->PauseWithError (error);
4301 void
4302 storyboard_resume_with_error (Storyboard *instance, MoonError *error)
4304 if (instance == NULL)
4305 return;
4307 if (error == NULL)
4308 g_warning ("Moonlight: Called storyboard_resume_with_error () with error == NULL.");
4309 instance->ResumeWithError (error);
4313 void
4314 storyboard_seek_aligned_to_last_tick_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4316 if (instance == NULL)
4317 return;
4319 if (error == NULL)
4320 g_warning ("Moonlight: Called storyboard_seek_aligned_to_last_tick_with_error () with error == NULL.");
4321 instance->SeekAlignedToLastTickWithError (timespan, error);
4325 void
4326 storyboard_seek_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4328 if (instance == NULL)
4329 return;
4331 if (error == NULL)
4332 g_warning ("Moonlight: Called storyboard_seek_with_error () with error == NULL.");
4333 instance->SeekWithError (timespan, error);
4337 void
4338 storyboard_skip_to_fill_with_error (Storyboard *instance, MoonError *error)
4340 if (instance == NULL)
4341 return;
4343 if (error == NULL)
4344 g_warning ("Moonlight: Called storyboard_skip_to_fill_with_error () with error == NULL.");
4345 instance->SkipToFillWithError (error);
4349 void
4350 storyboard_stop_with_error (Storyboard *instance, MoonError *error)
4352 if (instance == NULL)
4353 return;
4355 if (error == NULL)
4356 g_warning ("Moonlight: Called storyboard_stop_with_error () with error == NULL.");
4357 instance->StopWithError (error);
4361 Storyboard *
4362 storyboard_new (void)
4364 return new Storyboard ();
4369 * Stroke
4371 bool
4372 stroke_hit_test (Stroke *instance, StylusPointCollection *stylusPoints)
4374 if (instance == NULL)
4375 return false;
4377 return instance->HitTest (stylusPoints);
4381 Stroke *
4382 stroke_new (void)
4384 return new Stroke ();
4389 * StrokeCollection
4391 StrokeCollection *
4392 stroke_collection_hit_test (StrokeCollection *instance, StylusPointCollection *stylusPoints)
4394 if (instance == NULL)
4395 return NULL;
4397 return instance->HitTest (stylusPoints);
4401 StrokeCollection *
4402 stroke_collection_new (void)
4404 return new StrokeCollection ();
4409 * Style
4411 void
4412 style_seal (Style *instance)
4414 if (instance == NULL)
4415 return;
4417 instance->Seal ();
4421 Style *
4422 style_new (void)
4424 return new Style ();
4429 * StylusInfo
4431 StylusInfo *
4432 stylus_info_new (void)
4434 return new StylusInfo ();
4439 * StylusPoint
4441 double
4442 stylus_point_get_pressure_factor (StylusPoint *instance)
4444 if (instance == NULL)
4445 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4446 return (double) 0;
4448 return instance->GetPressureFactor ();
4452 double
4453 stylus_point_get_x (StylusPoint *instance)
4455 if (instance == NULL)
4456 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4457 return (double) 0;
4459 return instance->GetX ();
4463 double
4464 stylus_point_get_y (StylusPoint *instance)
4466 if (instance == NULL)
4467 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4468 return (double) 0;
4470 return instance->GetY ();
4474 void
4475 stylus_point_set_pressure_factor (StylusPoint *instance, double factor)
4477 if (instance == NULL)
4478 return;
4480 instance->SetPressureFactor (factor);
4484 void
4485 stylus_point_set_x (StylusPoint *instance, double x)
4487 if (instance == NULL)
4488 return;
4490 instance->SetX (x);
4494 void
4495 stylus_point_set_y (StylusPoint *instance, double y)
4497 if (instance == NULL)
4498 return;
4500 instance->SetY (y);
4504 StylusPoint *
4505 stylus_point_new (void)
4507 return new StylusPoint ();
4512 * StylusPointCollection
4514 double
4515 stylus_point_collection_add_stylus_points (StylusPointCollection *instance, StylusPointCollection *stylusPointCollection)
4517 if (instance == NULL)
4518 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4519 return (double) 0;
4521 return instance->AddStylusPoints (stylusPointCollection);
4525 StylusPointCollection *
4526 stylus_point_collection_new (void)
4528 return new StylusPointCollection ();
4533 * Surface
4535 void
4536 surface_attach (Surface *instance, UIElement *toplevel)
4538 if (instance == NULL)
4539 return;
4541 instance->Attach (toplevel);
4545 Downloader *
4546 surface_create_downloader (Surface *instance)
4548 if (instance == NULL)
4549 return NULL;
4551 return instance->CreateDownloader ();
4555 void
4556 surface_emit_error (Surface *instance, int number, int code, const char *message)
4558 if (instance == NULL)
4559 return;
4561 instance->EmitError (number, code, message);
4565 Color *
4566 surface_get_background_color (Surface *instance)
4568 if (instance == NULL)
4569 return NULL;
4571 return instance->GetBackgroundColor ();
4575 UIElement *
4576 surface_get_focused_element (Surface *instance)
4578 if (instance == NULL)
4579 return NULL;
4581 return instance->GetFocusedElement ();
4585 bool
4586 surface_get_full_screen (Surface *instance)
4588 if (instance == NULL)
4589 return false;
4591 return instance->GetFullScreen ();
4595 TimeManager *
4596 surface_get_time_manager (Surface *instance)
4598 if (instance == NULL)
4599 return NULL;
4601 return instance->GetTimeManager ();
4605 UIElement *
4606 surface_get_toplevel (Surface *instance)
4608 if (instance == NULL)
4609 return NULL;
4611 return instance->GetToplevel ();
4615 MoonWindow *
4616 surface_get_window (Surface *instance)
4618 if (instance == NULL)
4619 return NULL;
4621 return instance->GetWindow ();
4625 bool
4626 surface_in_main_thread (void)
4628 return Surface::InMainThread ();
4632 bool
4633 surface_is_loaded (Surface *instance)
4635 if (instance == NULL)
4636 return false;
4638 return instance->IsLoaded ();
4642 bool
4643 surface_is_user_initiated_event (Surface *instance)
4645 if (instance == NULL)
4646 return false;
4648 return instance->IsUserInitiatedEvent ();
4652 bool
4653 surface_is_version_supported (const char *version)
4655 return Surface::IsVersionSupported (version);
4659 void
4660 surface_paint (Surface *instance, cairo_t *ctx, int x, int y, int width, int height)
4662 if (instance == NULL)
4663 return;
4665 instance->Paint (ctx, x, y, width, height);
4669 void
4670 surface_resize (Surface *instance, int width, int height)
4672 if (instance == NULL)
4673 return;
4675 instance->Resize (width, height);
4679 void
4680 surface_set_full_screen (Surface *instance, bool value)
4682 if (instance == NULL)
4683 return;
4685 instance->SetFullScreen (value);
4689 Surface *
4690 surface_new (MoonWindow *window)
4692 return new Surface (window);
4697 * TabNavigationWalker
4699 bool
4700 tab_navigation_walker_focus (UIElement *element, bool forwards)
4702 return TabNavigationWalker::Focus (element, forwards);
4707 * TextBlock
4709 TextBlock *
4710 text_block_new (void)
4712 return new TextBlock ();
4717 * TextBox
4719 TextBox *
4720 text_box_new (void)
4722 return new TextBox ();
4727 * TextBoxBase
4729 void
4730 text_box_base_on_got_focus (TextBoxBase *instance, RoutedEventArgs *args)
4732 if (instance == NULL)
4733 return;
4735 instance->OnGotFocus (args);
4739 void
4740 text_box_base_on_key_down (TextBoxBase *instance, KeyEventArgs *args)
4742 if (instance == NULL)
4743 return;
4745 instance->OnKeyDown (args);
4749 void
4750 text_box_base_on_key_up (TextBoxBase *instance, KeyEventArgs *args)
4752 if (instance == NULL)
4753 return;
4755 instance->OnKeyUp (args);
4759 void
4760 text_box_base_on_lost_focus (TextBoxBase *instance, RoutedEventArgs *args)
4762 if (instance == NULL)
4763 return;
4765 instance->OnLostFocus (args);
4769 void
4770 text_box_base_on_mouse_left_button_down (TextBoxBase *instance, MouseButtonEventArgs *args)
4772 if (instance == NULL)
4773 return;
4775 instance->OnMouseLeftButtonDown (args);
4779 void
4780 text_box_base_on_mouse_left_button_up (TextBoxBase *instance, MouseButtonEventArgs *args)
4782 if (instance == NULL)
4783 return;
4785 instance->OnMouseLeftButtonUp (args);
4789 void
4790 text_box_base_on_mouse_move (TextBoxBase *instance, MouseEventArgs *args)
4792 if (instance == NULL)
4793 return;
4795 instance->OnMouseMove (args);
4799 void
4800 text_box_base_post_on_key_down (TextBoxBase *instance, KeyEventArgs *args)
4802 if (instance == NULL)
4803 return;
4805 instance->PostOnKeyDown (args);
4809 void
4810 text_box_base_select_all (TextBoxBase *instance)
4812 if (instance == NULL)
4813 return;
4815 instance->SelectAll ();
4819 bool
4820 text_box_base_select_with_error (TextBoxBase *instance, int start, int length, MoonError *error)
4822 if (instance == NULL)
4823 return false;
4825 if (error == NULL)
4826 g_warning ("Moonlight: Called text_box_base_select_with_error () with error == NULL.");
4827 return instance->SelectWithError (start, length, error);
4832 * TextBoxView
4834 TextBoxView *
4835 text_box_view_new (void)
4837 return new TextBoxView ();
4842 * TextChangedEventArgs
4844 TextChangedEventArgs *
4845 text_changed_event_args_new (void)
4847 return new TextChangedEventArgs ();
4852 * TileBrush
4854 TileBrush *
4855 tile_brush_new (void)
4857 return new TileBrush ();
4862 * Timeline
4864 DependencyObject *
4865 timeline_get_manual_target (Timeline *instance)
4867 if (instance == NULL)
4868 return NULL;
4870 return instance->GetManualTarget ();
4874 void
4875 timeline_set_manual_target (Timeline *instance, DependencyObject *o)
4877 if (instance == NULL)
4878 return;
4880 instance->SetManualTarget (o);
4884 Timeline *
4885 timeline_new (void)
4887 return new Timeline ();
4892 * TimelineCollection
4894 TimelineCollection *
4895 timeline_collection_new (void)
4897 return new TimelineCollection ();
4902 * TimelineGroup
4904 TimelineGroup *
4905 timeline_group_new (void)
4907 return new TimelineGroup ();
4912 * TimelineMarker
4914 TimelineMarker *
4915 timeline_marker_new (void)
4917 return new TimelineMarker ();
4922 * TimelineMarkerCollection
4924 TimelineMarkerCollection *
4925 timeline_marker_collection_new (void)
4927 return new TimelineMarkerCollection ();
4932 * TimeManager
4934 void
4935 time_manager_add_dispatcher_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
4937 if (instance == NULL)
4938 return;
4940 instance->AddDispatcherCall (handler, tick_data);
4944 void
4945 time_manager_add_tick_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
4947 if (instance == NULL)
4948 return;
4950 instance->AddTickCall (handler, tick_data);
4954 guint
4955 time_manager_add_timeout (TimeManager *instance, gint priority, guint ms_interval, GSourceFunc func, gpointer timeout_data)
4957 if (instance == NULL)
4958 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4959 return (guint) 0;
4961 return instance->AddTimeout (priority, ms_interval, func, timeout_data);
4966 time_manager_get_maximum_refresh_rate (TimeManager *instance)
4968 if (instance == NULL)
4969 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4970 return (int) 0;
4972 return instance->GetMaximumRefreshRate ();
4976 void
4977 time_manager_remove_tick_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
4979 if (instance == NULL)
4980 return;
4982 instance->RemoveTickCall (handler, tick_data);
4986 void
4987 time_manager_remove_timeout (TimeManager *instance, guint timeout_id)
4989 if (instance == NULL)
4990 return;
4992 instance->RemoveTimeout (timeout_id);
4996 void
4997 time_manager_set_maximum_refresh_rate (TimeManager *instance, int hz)
4999 if (instance == NULL)
5000 return;
5002 instance->SetMaximumRefreshRate (hz);
5007 * Transform
5009 Transform *
5010 transform_new (void)
5012 return new Transform ();
5017 * TransformCollection
5019 TransformCollection *
5020 transform_collection_new (void)
5022 return new TransformCollection ();
5027 * TransformGroup
5029 TransformGroup *
5030 transform_group_new (void)
5032 return new TransformGroup ();
5037 * TranslateTransform
5039 TranslateTransform *
5040 translate_transform_new (void)
5042 return new TranslateTransform ();
5047 * TriggerAction
5049 void
5050 trigger_action_fire (TriggerAction *instance)
5052 if (instance == NULL)
5053 return;
5055 instance->Fire ();
5059 TriggerAction *
5060 trigger_action_new (void)
5062 return new TriggerAction ();
5067 * TriggerActionCollection
5069 TriggerActionCollection *
5070 trigger_action_collection_new (void)
5072 return new TriggerActionCollection ();
5077 * TriggerBase
5079 TriggerBase *
5080 trigger_base_new (void)
5082 return new TriggerBase ();
5087 * TriggerCollection
5089 TriggerCollection *
5090 trigger_collection_new (void)
5092 return new TriggerCollection ();
5097 * Types
5099 void
5100 types_free (Types *instance)
5102 delete instance;
5106 Type *
5107 types_find (Types *instance, int type)
5109 if (instance == NULL)
5110 return NULL;
5112 return instance->Find ((Type::Kind) type);
5117 types_register_type (Types *instance, const char *name, void *gc_handle, int parent, bool is_interface, bool ctor_visible, int *interfaces, int interface_count)
5119 if (instance == NULL)
5120 return Type::INVALID;
5122 return instance->RegisterType (name, gc_handle, (Type::Kind) parent, is_interface, ctor_visible, (Type::Kind*) interfaces, interface_count);
5126 Types *
5127 types_new (void)
5129 return new Types ();
5134 * UIElement
5136 void
5137 uielement_arrange (UIElement *instance, Rect finalRect)
5139 if (instance == NULL)
5140 return;
5142 instance->Arrange (finalRect);
5146 bool
5147 uielement_capture_mouse (UIElement *instance)
5149 if (instance == NULL)
5150 return false;
5152 return instance->CaptureMouse ();
5156 void
5157 uielement_element_added (UIElement *instance, UIElement *obj)
5159 if (instance == NULL)
5160 return;
5162 instance->ElementAdded (obj);
5166 void
5167 uielement_element_removed (UIElement *instance, UIElement *obj)
5169 if (instance == NULL)
5170 return;
5172 instance->ElementRemoved (obj);
5176 void
5177 uielement_find_elements_in_host_coordinates_p (UIElement *instance, Point p, HitTestCollection *uielement_list)
5179 if (instance == NULL)
5180 return;
5182 instance->FindElementsInHostCoordinates_p (p, uielement_list);
5186 void
5187 uielement_find_elements_in_host_coordinates_r (UIElement *instance, Rect p, HitTestCollection *uielement_list)
5189 if (instance == NULL)
5190 return;
5192 instance->FindElementsInHostCoordinates_r (p, uielement_list);
5196 bool
5197 uielement_focus (UIElement *instance, bool recurse)
5199 if (instance == NULL)
5200 return false;
5202 return instance->Focus (recurse);
5206 Size
5207 uielement_get_desired_size (UIElement *instance)
5209 if (instance == NULL)
5210 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5211 return (Size) 0;
5213 return instance->GetDesiredSize ();
5217 Size
5218 uielement_get_render_size (UIElement *instance)
5220 if (instance == NULL)
5221 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5222 return (Size) 0;
5224 return instance->GetRenderSize ();
5228 DependencyObject *
5229 uielement_get_subtree_object (UIElement *instance)
5231 if (instance == NULL)
5232 return NULL;
5234 return instance->GetSubtreeObject ();
5238 GeneralTransform *
5239 uielement_get_transform_to_uielement_with_error (UIElement *instance, UIElement *to_element, MoonError *error)
5241 if (instance == NULL)
5242 return NULL;
5244 if (error == NULL)
5245 g_warning ("Moonlight: Called uielement_get_transform_to_uielement_with_error () with error == NULL.");
5246 return instance->GetTransformToUIElementWithError (to_element, error);
5250 UIElement *
5251 uielement_get_visual_parent (UIElement *instance)
5253 if (instance == NULL)
5254 return NULL;
5256 return instance->GetVisualParent ();
5260 void
5261 uielement_invalidate (UIElement *instance)
5263 if (instance == NULL)
5264 return;
5266 instance->Invalidate ();
5270 void
5271 uielement_invalidate_arrange (UIElement *instance)
5273 if (instance == NULL)
5274 return;
5276 instance->InvalidateArrange ();
5280 void
5281 uielement_invalidate_measure (UIElement *instance)
5283 if (instance == NULL)
5284 return;
5286 instance->InvalidateMeasure ();
5290 void
5291 uielement_measure (UIElement *instance, Size availableSize)
5293 if (instance == NULL)
5294 return;
5296 instance->Measure (availableSize);
5300 void
5301 uielement_release_mouse_capture (UIElement *instance)
5303 if (instance == NULL)
5304 return;
5306 instance->ReleaseMouseCapture ();
5310 void
5311 uielement_set_subtree_object (UIElement *instance, DependencyObject *value)
5313 if (instance == NULL)
5314 return;
5316 instance->SetSubtreeObject (value);
5320 void
5321 uielement_update_layout (UIElement *instance)
5323 if (instance == NULL)
5324 return;
5326 instance->UpdateLayout ();
5331 * UIElementCollection
5333 UIElementCollection *
5334 uielement_collection_new (void)
5336 return new UIElementCollection ();
5341 * UnmanagedMatrix
5343 UnmanagedMatrix *
5344 unmanaged_matrix_new (void)
5346 return new UnmanagedMatrix ();
5351 * Uri
5353 bool
5354 uri_equals (const Uri *left, const Uri *right)
5356 return Uri::Equals (left, right);
5360 void
5361 uri_free (Uri *instance)
5363 if (instance == NULL)
5364 return;
5366 instance->Free ();
5370 guint
5371 uri_get_hash_code (Uri *instance)
5373 if (instance == NULL)
5374 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5375 return (guint) 0;
5377 return instance->GetHashCode ();
5381 bool
5382 uri_parse (Uri *instance, const char *uri, bool allow_trailing_sep)
5384 if (instance == NULL)
5385 return false;
5387 return instance->Parse (uri, allow_trailing_sep);
5392 * UserControl
5394 UserControl *
5395 user_control_new (void)
5397 return new UserControl ();
5402 * VideoBrush
5404 void
5405 video_brush_set_source (VideoBrush *instance, MediaElement *source)
5407 if (instance == NULL)
5408 return;
5410 instance->SetSource (source);
5414 VideoBrush *
5415 video_brush_new (void)
5417 return new VideoBrush ();
5422 * VideoStream
5424 guint32
5425 video_stream_get_height (VideoStream *instance)
5427 if (instance == NULL)
5428 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5429 return (guint32) 0;
5431 return instance->GetHeight ();
5435 guint32
5436 video_stream_get_width (VideoStream *instance)
5438 if (instance == NULL)
5439 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5440 return (guint32) 0;
5442 return instance->GetWidth ();
5446 VideoStream *
5447 video_stream_new (Media *media, int codec_id, guint32 width, guint32 height, guint64 duration, gpointer extra_data, guint32 extra_data_size)
5449 return new VideoStream (media, codec_id, width, height, duration, extra_data, extra_data_size);
5454 * VisualBrush
5456 VisualBrush *
5457 visual_brush_new (void)
5459 return new VisualBrush ();
5464 * WriteableBitmap
5466 gpointer
5467 writeable_bitmap_initialize_from_bitmap_source (WriteableBitmap *instance, BitmapSource *source)
5469 if (instance == NULL)
5470 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5471 return (gpointer) 0;
5473 return instance->InitializeFromBitmapSource (source);
5477 void
5478 writeable_bitmap_lock (WriteableBitmap *instance)
5480 if (instance == NULL)
5481 return;
5483 instance->Lock ();
5487 void
5488 writeable_bitmap_render (WriteableBitmap *instance, UIElement *element, Transform *transform)
5490 if (instance == NULL)
5491 return;
5493 instance->Render (element, transform);
5497 void
5498 writeable_bitmap_unlock (WriteableBitmap *instance)
5500 if (instance == NULL)
5501 return;
5503 instance->Unlock ();
5507 WriteableBitmap *
5508 writeable_bitmap_new (void)
5510 return new WriteableBitmap ();
5515 * XamlContext
5517 DependencyObject *
5518 xaml_context_get_template_binding_source (XamlContext *instance)
5520 if (instance == NULL)
5521 return NULL;
5523 return instance->GetTemplateBindingSource ();
5528 * XamlLoader
5530 Value *
5531 xaml_loader_create_from_file_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, int *element_type, MoonError *error)
5533 if (instance == NULL)
5534 return NULL;
5536 if (error == NULL)
5537 g_warning ("Moonlight: Called xaml_loader_create_from_file_with_error () with error == NULL.");
5538 return instance->CreateFromFileWithError (xaml, create_namescope, (Type::Kind*) element_type, error);
5542 Value *
5543 xaml_loader_create_from_string_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, int *element_type, int flags, MoonError *error)
5545 if (instance == NULL)
5546 return NULL;
5548 if (error == NULL)
5549 g_warning ("Moonlight: Called xaml_loader_create_from_string_with_error () with error == NULL.");
5550 return instance->CreateFromStringWithError (xaml, create_namescope, (Type::Kind*) element_type, flags, error);
5554 XamlContext *
5555 xaml_loader_get_context (XamlLoader *instance)
5557 if (instance == NULL)
5558 return NULL;
5560 return instance->GetContext ();
5564 Value *
5565 xaml_loader_hydrate_from_string_with_error (XamlLoader *instance, const char *xaml, Value *obj, bool create_namescope, int *element_type, int flags, MoonError *error)
5567 if (instance == NULL)
5568 return NULL;
5570 if (error == NULL)
5571 g_warning ("Moonlight: Called xaml_loader_hydrate_from_string_with_error () with error == NULL.");
5572 return instance->HydrateFromStringWithError (xaml, obj, create_namescope, (Type::Kind*) element_type, flags, error);
5577 * Xap
5579 char *
5580 xap_unpack (const char *fname)
5582 return Xap::Unpack (fname);