2009-10-09 Chris Toshok <toshok@ximian.com>
[moon.git] / src / cbinding.cpp
bloba0d27242dec9fcc0aedef5b4c79c797513cde8df
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 ();
1146 void
1147 deep_zoom_image_tile_source_strip_and_set_uri (DeepZoomImageTileSource *instance, Uri *uri)
1149 if (instance == NULL)
1150 return;
1152 instance->strip_and_set_uri (uri);
1157 * DependencyObject
1159 void
1160 dependency_object_add_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb, gpointer closure)
1162 if (instance == NULL)
1163 return;
1165 instance->AddPropertyChangeHandler (property, cb, closure);
1169 void
1170 dependency_object_clear_value (DependencyObject *instance, DependencyProperty *property, bool notify_listeners, MoonError *error)
1172 if (instance == NULL)
1173 return;
1175 if (error == NULL)
1176 g_warning ("Moonlight: Called dependency_object_clear_value () with error == NULL.");
1177 instance->ClearValue (property, notify_listeners, error);
1181 DependencyObject *
1182 dependency_object_new (void)
1184 return new DependencyObject ();
1188 DependencyObject *
1189 dependency_object_find_name (DependencyObject *instance, const char *name, int *element_kind)
1191 if (instance == NULL)
1192 return NULL;
1194 return instance->FindName (name, (Type::Kind*) element_kind);
1198 const char *
1199 dependency_object_get_name (DependencyObject *instance)
1201 if (instance == NULL)
1202 return NULL;
1204 return instance->GetName ();
1208 Value *
1209 dependency_object_get_value_no_default_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1211 if (instance == NULL)
1212 return NULL;
1214 if (error == NULL)
1215 g_warning ("Moonlight: Called dependency_object_get_value_no_default_with_error () with error == NULL.");
1216 return instance->GetValueNoDefaultWithError (property, error);
1220 Value *
1221 dependency_object_get_value_with_error (DependencyObject *instance, int whatami, DependencyProperty *property, MoonError *error)
1223 if (instance == NULL)
1224 return NULL;
1226 if (error == NULL)
1227 g_warning ("Moonlight: Called dependency_object_get_value_with_error () with error == NULL.");
1228 return instance->GetValueWithError ((Type::Kind) whatami, property, error);
1232 Value *
1233 dependency_object_read_local_value_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1235 if (instance == NULL)
1236 return NULL;
1238 if (error == NULL)
1239 g_warning ("Moonlight: Called dependency_object_read_local_value_with_error () with error == NULL.");
1240 return instance->ReadLocalValueWithError (property, error);
1244 void
1245 dependency_object_remove_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb)
1247 if (instance == NULL)
1248 return;
1250 instance->RemovePropertyChangeHandler (property, cb);
1254 void
1255 dependency_object_set_name (DependencyObject *instance, const char *name)
1257 if (instance == NULL)
1258 return;
1260 instance->SetName (name);
1264 void
1265 dependency_object_set_parent (DependencyObject *instance, DependencyObject *parent, MoonError *error)
1267 if (instance == NULL)
1268 return;
1270 if (error == NULL)
1271 g_warning ("Moonlight: Called dependency_object_set_parent () with error == NULL.");
1272 instance->SetParent (parent, error);
1276 bool
1277 dependency_object_set_value_with_error (DependencyObject *instance, DependencyProperty *property, Value *value, MoonError *error)
1279 if (instance == NULL)
1280 return false;
1282 if (error == NULL)
1283 g_warning ("Moonlight: Called dependency_object_set_value_with_error () with error == NULL.");
1284 return instance->SetValueWithError (property, value, error);
1289 * DependencyObjectCollection
1291 DependencyObjectCollection *
1292 dependency_object_collection_new (void)
1294 return new DependencyObjectCollection ();
1299 * DependencyProperty
1301 Value *
1302 dependency_property_get_default_value (DependencyProperty *instance)
1304 if (instance == NULL)
1305 return NULL;
1307 return instance->GetDefaultValue ();
1311 DependencyProperty *
1312 dependency_property_get_dependency_property (int type, const char *name)
1314 return DependencyProperty::GetDependencyProperty ((Type::Kind) type, name);
1318 DependencyProperty *
1319 dependency_property_get_dependency_property_full (int type, const char *name, bool inherits)
1321 return DependencyProperty::GetDependencyPropertyFull ((Type::Kind) type, name, inherits);
1325 const char *
1326 dependency_property_get_name (DependencyProperty *instance)
1328 if (instance == NULL)
1329 return NULL;
1331 return instance->GetName ();
1336 dependency_property_get_property_type (DependencyProperty *instance)
1338 if (instance == NULL)
1339 return Type::INVALID;
1341 return instance->GetPropertyType ();
1345 bool
1346 dependency_property_is_attached (DependencyProperty *instance)
1348 if (instance == NULL)
1349 return false;
1351 return instance->IsAttached ();
1355 bool
1356 dependency_property_is_nullable (DependencyProperty *instance)
1358 if (instance == NULL)
1359 return false;
1361 return instance->IsNullable ();
1365 bool
1366 dependency_property_is_read_only (DependencyProperty *instance)
1368 if (instance == NULL)
1369 return false;
1371 return instance->IsReadOnly ();
1375 DependencyProperty *
1376 dependency_property_register_core_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1378 return DependencyProperty::RegisterCoreProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1382 DependencyProperty *
1383 dependency_property_register_custom_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1385 return DependencyProperty::RegisterCustomProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1389 void
1390 dependency_property_set_is_nullable (DependencyProperty *instance, bool value)
1392 if (instance == NULL)
1393 return;
1395 instance->SetIsNullable (value);
1399 void
1400 dependency_property_set_property_changed_callback (DependencyProperty *instance, PropertyChangeHandler changed_callback)
1402 if (instance == NULL)
1403 return;
1405 instance->SetPropertyChangedCallback (changed_callback);
1410 * Deployment
1412 Deployment *
1413 deployment_new (void)
1415 return new Deployment ();
1419 Deployment *
1420 deployment_get_current (void)
1422 return Deployment::GetCurrent ();
1426 Types *
1427 deployment_get_types (Deployment *instance)
1429 if (instance == NULL)
1430 return NULL;
1432 return instance->GetTypes ();
1436 void
1437 deployment_set_current (Deployment *value)
1439 Deployment::SetCurrent (value);
1443 void
1444 deployment_set_current_application (Deployment *instance, Application *value)
1446 if (instance == NULL)
1447 return;
1449 instance->SetCurrentApplication (value);
1453 void
1454 deployment_set_is_loaded_from_xap (Deployment *instance, bool flag)
1456 if (instance == NULL)
1457 return;
1459 instance->SetIsLoadedFromXap (flag);
1464 * DiscreteColorKeyFrame
1466 DiscreteColorKeyFrame *
1467 discrete_color_key_frame_new (void)
1469 return new DiscreteColorKeyFrame ();
1474 * DiscreteDoubleKeyFrame
1476 DiscreteDoubleKeyFrame *
1477 discrete_double_key_frame_new (void)
1479 return new DiscreteDoubleKeyFrame ();
1484 * DiscreteObjectKeyFrame
1486 DiscreteObjectKeyFrame *
1487 discrete_object_key_frame_new (void)
1489 return new DiscreteObjectKeyFrame ();
1494 * DiscretePointKeyFrame
1496 DiscretePointKeyFrame *
1497 discrete_point_key_frame_new (void)
1499 return new DiscretePointKeyFrame ();
1504 * DispatcherTimer
1506 DispatcherTimer *
1507 dispatcher_timer_new (void)
1509 return new DispatcherTimer ();
1513 void
1514 dispatcher_timer_start (DispatcherTimer *instance)
1516 if (instance == NULL)
1517 return;
1519 instance->Start ();
1523 void
1524 dispatcher_timer_stop (DispatcherTimer *instance)
1526 if (instance == NULL)
1527 return;
1529 instance->Stop ();
1534 * DoubleAnimation
1536 DoubleAnimation *
1537 double_animation_new (void)
1539 return new DoubleAnimation ();
1544 * DoubleAnimationUsingKeyFrames
1546 DoubleAnimationUsingKeyFrames *
1547 double_animation_using_key_frames_new (void)
1549 return new DoubleAnimationUsingKeyFrames ();
1554 * DoubleCollection
1556 DoubleCollection *
1557 double_collection_new (void)
1559 return new DoubleCollection ();
1564 * DoubleKeyFrame
1566 DoubleKeyFrame *
1567 double_key_frame_new (void)
1569 return new DoubleKeyFrame ();
1574 * DoubleKeyFrameCollection
1576 DoubleKeyFrameCollection *
1577 double_key_frame_collection_new (void)
1579 return new DoubleKeyFrameCollection ();
1584 * Downloader
1586 void *
1587 downloader_create_web_request (Downloader *instance, const char *method, const char *uri)
1589 if (instance == NULL)
1590 return NULL;
1592 return instance->CreateWebRequest (method, uri);
1596 Downloader *
1597 downloader_new (void)
1599 return new Downloader ();
1603 void
1604 downloader_notify_failed (Downloader *instance, const char *msg)
1606 if (instance == NULL)
1607 return;
1609 instance->NotifyFailed (msg);
1613 void
1614 downloader_notify_finished (Downloader *instance, const char *final_uri)
1616 if (instance == NULL)
1617 return;
1619 instance->NotifyFinished (final_uri);
1623 void
1624 downloader_notify_size (Downloader *instance, gint64 size)
1626 if (instance == NULL)
1627 return;
1629 instance->NotifySize (size);
1633 void
1634 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)
1636 Downloader::SetFunctions (create_state, destroy_state, open, send, abort, header, body, request, response_header_callback, get_response);
1640 void
1641 downloader_write (Downloader *instance, void *buf, gint32 offset, gint32 n)
1643 if (instance == NULL)
1644 return;
1646 instance->Write (buf, offset, n);
1651 * DownloaderRequest
1653 void
1654 downloader_request_free (DownloaderRequest *instance)
1656 delete instance;
1660 void
1661 downloader_request_abort (DownloaderRequest *instance)
1663 if (instance == NULL)
1664 return;
1666 instance->Abort ();
1670 DownloaderResponse *
1671 downloader_request_get_downloader_response (DownloaderRequest *instance)
1673 if (instance == NULL)
1674 return NULL;
1676 return instance->GetDownloaderResponse ();
1680 bool
1681 downloader_request_get_response (DownloaderRequest *instance, DownloaderResponseStartedHandler started, DownloaderResponseDataAvailableHandler available, DownloaderResponseFinishedHandler finished, gpointer context)
1683 if (instance == NULL)
1684 return false;
1686 return instance->GetResponse (started, available, finished, context);
1690 const bool
1691 downloader_request_is_aborted (DownloaderRequest *instance)
1693 if (instance == NULL)
1694 return false;
1696 return instance->IsAborted ();
1700 void
1701 downloader_request_set_body (DownloaderRequest *instance, void *body, int size)
1703 if (instance == NULL)
1704 return;
1706 instance->SetBody (body, size);
1710 void
1711 downloader_request_set_http_header (DownloaderRequest *instance, const char *name, const char *value)
1713 if (instance == NULL)
1714 return;
1716 instance->SetHttpHeader (name, value);
1721 * DownloaderResponse
1723 void
1724 downloader_response_free (DownloaderResponse *instance)
1726 delete instance;
1730 void
1731 downloader_response_abort (DownloaderResponse *instance)
1733 if (instance == NULL)
1734 return;
1736 instance->Abort ();
1741 downloader_response_get_response_status (DownloaderResponse *instance)
1743 if (instance == NULL)
1744 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1745 return (int) 0;
1747 return instance->GetResponseStatus ();
1751 const char *
1752 downloader_response_get_response_status_text (DownloaderResponse *instance)
1754 if (instance == NULL)
1755 return NULL;
1757 return instance->GetResponseStatusText ();
1761 void
1762 downloader_response_set_header_visitor (DownloaderResponse *instance, DownloaderResponseHeaderCallback visitor, gpointer context)
1764 if (instance == NULL)
1765 return;
1767 instance->SetHeaderVisitor (visitor, context);
1772 * DownloadProgressEventArgs
1774 double
1775 download_progress_event_args_get_progress (DownloadProgressEventArgs *instance)
1777 if (instance == NULL)
1778 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1779 return (double) 0;
1781 return instance->GetProgress ();
1786 * DrawingAttributes
1788 DrawingAttributes *
1789 drawing_attributes_new (void)
1791 return new DrawingAttributes ();
1796 * EasingColorKeyFrame
1798 EasingColorKeyFrame *
1799 easing_color_key_frame_new (void)
1801 return new EasingColorKeyFrame ();
1806 * EasingDoubleKeyFrame
1808 EasingDoubleKeyFrame *
1809 easing_double_key_frame_new (void)
1811 return new EasingDoubleKeyFrame ();
1816 * EasingFunctionBase
1818 EasingFunctionBase *
1819 easing_function_base_new (void)
1821 return new EasingFunctionBase ();
1825 void
1826 easing_function_base_set_easing_function (EasingFunctionBase *instance, EasingFunction value)
1828 if (instance == NULL)
1829 return;
1831 instance->SetEasingFunction (value);
1836 * EasingPointKeyFrame
1838 EasingPointKeyFrame *
1839 easing_point_key_frame_new (void)
1841 return new EasingPointKeyFrame ();
1846 * ElasticEase
1848 double
1849 elastic_ease_ease_in_core (ElasticEase *instance, double normalizedTime)
1851 if (instance == NULL)
1852 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1853 return (double) 0;
1855 return instance->EaseInCore (normalizedTime);
1859 ElasticEase *
1860 elastic_ease_new (void)
1862 return new ElasticEase ();
1867 * Ellipse
1869 Ellipse *
1870 ellipse_new (void)
1872 return new Ellipse ();
1877 * EllipseGeometry
1879 EllipseGeometry *
1880 ellipse_geometry_new (void)
1882 return new EllipseGeometry ();
1887 * ErrorEventArgs
1890 error_event_args_get_error_code (ErrorEventArgs *instance)
1892 if (instance == NULL)
1893 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1894 return (int) 0;
1896 return instance->GetErrorCode ();
1900 const char *
1901 error_event_args_get_error_message (ErrorEventArgs *instance)
1903 if (instance == NULL)
1904 return NULL;
1906 return instance->GetErrorMessage ();
1911 error_event_args_get_error_type (ErrorEventArgs *instance)
1913 if (instance == NULL)
1914 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1915 return (int) 0;
1917 return instance->GetErrorType ();
1921 gpointer
1922 error_event_args_get_moon_error (ErrorEventArgs *instance)
1924 if (instance == NULL)
1925 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1926 return (gpointer) 0;
1928 return instance->GetMoonError ();
1933 * EventObject
1936 event_object_add_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1938 if (instance == NULL)
1939 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1940 return (int) 0;
1942 return instance->AddHandler (event_id, handler, data, data_dtor);
1946 void
1947 event_object_add_on_event_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1949 if (instance == NULL)
1950 return;
1952 instance->AddOnEventHandler (event_id, handler, data, data_dtor);
1956 void
1957 event_object_add_toggle_ref_notifier (EventObject *instance, ToggleNotifyHandler tr)
1959 if (instance == NULL)
1960 return;
1962 instance->AddToggleRefNotifier (tr);
1967 event_object_add_xaml_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1969 if (instance == NULL)
1970 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1971 return (int) 0;
1973 return instance->AddXamlHandler (event_id, handler, data, data_dtor);
1977 void
1978 event_object_do_emit_current_context (EventObject *instance, int event_id, EventArgs *calldata)
1980 if (instance == NULL)
1981 return;
1983 instance->DoEmitCurrentContext (event_id, calldata);
1988 event_object_get_object_type (EventObject *instance)
1990 if (instance == NULL)
1991 return Type::INVALID;
1993 return instance->GetObjectType ();
1997 Surface *
1998 event_object_get_surface (EventObject *instance)
2000 if (instance == NULL)
2001 return NULL;
2003 return instance->GetSurface ();
2007 const char *
2008 event_object_get_type_name (EventObject *instance)
2010 if (instance == NULL)
2011 return NULL;
2013 return instance->GetTypeName ();
2017 void
2018 event_object_ref (EventObject *instance)
2020 if (instance == NULL)
2021 return;
2023 instance->ref ();
2027 void
2028 event_object_remove_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data)
2030 if (instance == NULL)
2031 return;
2033 instance->RemoveHandler (event_id, handler, data);
2037 void
2038 event_object_remove_on_event_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data)
2040 if (instance == NULL)
2041 return;
2043 instance->RemoveOnEventHandler (event_id, handler, data);
2047 void
2048 event_object_remove_toggle_ref_notifier (EventObject *instance)
2050 if (instance == NULL)
2051 return;
2053 instance->RemoveToggleRefNotifier ();
2057 void
2058 event_object_set_object_type (EventObject *instance, int value)
2060 if (instance == NULL)
2061 return;
2063 instance->SetObjectType ((Type::Kind) value);
2067 void
2068 event_object_unref (EventObject *instance)
2070 if (instance == NULL)
2071 return;
2073 instance->unref ();
2078 * EventTrigger
2080 EventTrigger *
2081 event_trigger_new (void)
2083 return new EventTrigger ();
2088 * ExponentialEase
2090 double
2091 exponential_ease_ease_in_core (ExponentialEase *instance, double normalizedTime)
2093 if (instance == NULL)
2094 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2095 return (double) 0;
2097 return instance->EaseInCore (normalizedTime);
2101 ExponentialEase *
2102 exponential_ease_new (void)
2104 return new ExponentialEase ();
2109 * ExtensionPart
2111 ExtensionPart *
2112 extension_part_new (void)
2114 return new ExtensionPart ();
2119 * ExternalDecoder
2121 ExternalDecoder *
2122 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)
2124 return new ExternalDecoder (media, stream, instance, name, decode_frame_async, open_decoder_async, cleanup, clean_state, has_delayed_frame, dispose, dtor);
2129 * ExternalDecoderInfo
2131 ExternalDecoderInfo *
2132 external_decoder_info_new (void *instance, const char *name, ExternalDecoderInfo_SupportsCallback supports, ExternalDecoderInfo_Create create, ExternalDecoderInfo_dtor dtor)
2134 return new ExternalDecoderInfo (instance, name, supports, create, dtor);
2139 * ExternalDemuxer
2141 gint32
2142 external_demuxer_add_stream (ExternalDemuxer *instance, IMediaStream *stream)
2144 if (instance == NULL)
2145 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2146 return (gint32) 0;
2148 return instance->AddStream (stream);
2152 void
2153 external_demuxer_clear_callbacks (ExternalDemuxer *instance)
2155 if (instance == NULL)
2156 return;
2158 instance->ClearCallbacks ();
2162 void
2163 external_demuxer_set_can_seek (ExternalDemuxer *instance, bool value)
2165 if (instance == NULL)
2166 return;
2168 instance->SetCanSeek (value);
2173 * ExternalPart
2175 ExternalPart *
2176 external_part_new (void)
2178 return new ExternalPart ();
2183 * ExternalPartCollection
2185 ExternalPartCollection *
2186 external_part_collection_new (void)
2188 return new ExternalPartCollection ();
2193 * FrameworkElement
2195 Size
2196 framework_element_arrange_override (FrameworkElement *instance, Size finalSize)
2198 if (instance == NULL)
2199 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2200 return (Size) 0;
2202 return instance->ArrangeOverride (finalSize);
2206 FrameworkElement *
2207 framework_element_new (void)
2209 return new FrameworkElement ();
2213 DependencyObject *
2214 framework_element_get_logical_parent (FrameworkElement *instance)
2216 if (instance == NULL)
2217 return NULL;
2219 return instance->GetLogicalParent ();
2223 Size
2224 framework_element_measure_override (FrameworkElement *instance, Size availableSize)
2226 if (instance == NULL)
2227 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2228 return (Size) 0;
2230 return instance->MeasureOverride (availableSize);
2234 void
2235 framework_element_register_managed_overrides (FrameworkElement *instance, MeasureOverrideCallback measure_cb, ArrangeOverrideCallback arrange_cb)
2237 if (instance == NULL)
2238 return;
2240 instance->RegisterManagedOverrides (measure_cb, arrange_cb);
2244 void
2245 framework_element_set_default_style (FrameworkElement *instance, Style *value)
2247 if (instance == NULL)
2248 return;
2250 instance->SetDefaultStyle (value);
2254 void
2255 framework_element_set_logical_parent (FrameworkElement *instance, DependencyObject *logical_parent, MoonError *error)
2257 if (instance == NULL)
2258 return;
2260 if (error == NULL)
2261 g_warning ("Moonlight: Called framework_element_set_logical_parent () with error == NULL.");
2262 instance->SetLogicalParent (logical_parent, error);
2267 * FrameworkTemplate
2269 FrameworkTemplate *
2270 framework_template_new (void)
2272 return new FrameworkTemplate ();
2276 DependencyObject *
2277 framework_template_get_visual_tree (FrameworkTemplate *instance, FrameworkElement *templateBindingSource)
2279 if (instance == NULL)
2280 return NULL;
2282 return instance->GetVisualTree (templateBindingSource);
2287 * GeneralTransform
2289 GeneralTransform *
2290 general_transform_new (void)
2292 return new GeneralTransform ();
2296 Matrix *
2297 general_transform_get_matrix (GeneralTransform *instance)
2299 if (instance == NULL)
2300 return NULL;
2302 return instance->GetMatrix ();
2307 * Geometry
2309 Geometry *
2310 geometry_new (void)
2312 return new Geometry ();
2316 Rect
2317 geometry_get_bounds (Geometry *instance)
2319 if (instance == NULL)
2320 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2321 return (Rect) 0;
2323 return instance->GetBounds ();
2328 * GeometryCollection
2330 GeometryCollection *
2331 geometry_collection_new (void)
2333 return new GeometryCollection ();
2338 * GeometryGroup
2340 GeometryGroup *
2341 geometry_group_new (void)
2343 return new GeometryGroup ();
2348 * Glyphs
2350 Glyphs *
2351 glyphs_new (void)
2353 return new Glyphs ();
2358 * GradientBrush
2360 GradientBrush *
2361 gradient_brush_new (void)
2363 return new GradientBrush ();
2368 * GradientStop
2370 GradientStop *
2371 gradient_stop_new (void)
2373 return new GradientStop ();
2378 * GradientStopCollection
2380 GradientStopCollection *
2381 gradient_stop_collection_new (void)
2383 return new GradientStopCollection ();
2388 * Grid
2390 Grid *
2391 grid_new (void)
2393 return new Grid ();
2398 * HitTestCollection
2400 HitTestCollection *
2401 hit_test_collection_new (void)
2403 return new HitTestCollection ();
2408 * Image
2410 Image *
2411 image_new (void)
2413 return new Image ();
2417 void
2418 image_set_source (Image *instance, ImageSource *source)
2420 if (instance == NULL)
2421 return;
2423 instance->SetSource (source);
2428 * ImageBrush
2430 ImageBrush *
2431 image_brush_new (void)
2433 return new ImageBrush ();
2438 * ImageSource
2440 ImageSource *
2441 image_source_new (void)
2443 return new ImageSource ();
2448 * IMediaDecoder
2450 void
2451 imedia_decoder_report_decode_frame_completed (IMediaDecoder *instance, MediaFrame *frame)
2453 if (instance == NULL)
2454 return;
2456 instance->ReportDecodeFrameCompleted (frame);
2460 void
2461 imedia_decoder_report_open_decoder_completed (IMediaDecoder *instance)
2463 if (instance == NULL)
2464 return;
2466 instance->ReportOpenDecoderCompleted ();
2470 void
2471 imedia_decoder_set_pixel_format (IMediaDecoder *instance, int value)
2473 if (instance == NULL)
2474 return;
2476 instance->SetPixelFormat ((MoonPixelFormat) value);
2481 * IMediaDemuxer
2483 void
2484 imedia_demuxer_report_get_diagnostic_completed (IMediaDemuxer *instance, int diagnosticKind, gint64 diagnosticValue)
2486 if (instance == NULL)
2487 return;
2489 instance->ReportGetDiagnosticCompleted ((MediaStreamSourceDiagnosticKind) diagnosticKind, diagnosticValue);
2493 void
2494 imedia_demuxer_report_get_frame_completed (IMediaDemuxer *instance, MediaFrame *frame)
2496 if (instance == NULL)
2497 return;
2499 instance->ReportGetFrameCompleted (frame);
2503 void
2504 imedia_demuxer_report_get_frame_progress (IMediaDemuxer *instance, double bufferingProgress)
2506 if (instance == NULL)
2507 return;
2509 instance->ReportGetFrameProgress (bufferingProgress);
2513 void
2514 imedia_demuxer_report_open_demuxer_completed (IMediaDemuxer *instance)
2516 if (instance == NULL)
2517 return;
2519 instance->ReportOpenDemuxerCompleted ();
2523 void
2524 imedia_demuxer_report_seek_completed (IMediaDemuxer *instance, guint64 pts)
2526 if (instance == NULL)
2527 return;
2529 instance->ReportSeekCompleted (pts);
2533 void
2534 imedia_demuxer_report_switch_media_stream_completed (IMediaDemuxer *instance, IMediaStream *stream)
2536 if (instance == NULL)
2537 return;
2539 instance->ReportSwitchMediaStreamCompleted (stream);
2544 * IMediaObject
2546 Media *
2547 imedia_object_get_media_reffed (IMediaObject *instance)
2549 if (instance == NULL)
2550 return NULL;
2552 return instance->GetMediaReffed ();
2556 void
2557 imedia_object_report_error_occurred (IMediaObject *instance, const char *message)
2559 if (instance == NULL)
2560 return;
2562 instance->ReportErrorOccurred (message);
2567 * IMediaStream
2569 const char *
2570 imedia_stream_get_codec (IMediaStream *instance)
2572 if (instance == NULL)
2573 return NULL;
2575 return instance->GetCodec ();
2580 imedia_stream_get_codec_id (IMediaStream *instance)
2582 if (instance == NULL)
2583 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2584 return (int) 0;
2586 return instance->GetCodecId ();
2590 guint64
2591 imedia_stream_get_duration (IMediaStream *instance)
2593 if (instance == NULL)
2594 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2595 return (guint64) 0;
2597 return instance->GetDuration ();
2601 void *
2602 imedia_stream_get_extra_data (IMediaStream *instance)
2604 if (instance == NULL)
2605 return NULL;
2607 return instance->GetExtraData ();
2612 imedia_stream_get_extra_data_size (IMediaStream *instance)
2614 if (instance == NULL)
2615 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2616 return (int) 0;
2618 return instance->GetExtraDataSize ();
2623 imedia_stream_get_stream_type (IMediaStream *instance)
2625 if (instance == NULL)
2626 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2627 return (MediaStreamType) 0;
2629 return instance->GetStreamType ();
2633 void
2634 imedia_stream_set_codec_id (IMediaStream *instance, int value)
2636 if (instance == NULL)
2637 return;
2639 instance->SetCodecId (value);
2643 void
2644 imedia_stream_set_duration (IMediaStream *instance, guint64 value)
2646 if (instance == NULL)
2647 return;
2649 instance->SetDuration (value);
2653 void
2654 imedia_stream_set_extra_data (IMediaStream *instance, void *value)
2656 if (instance == NULL)
2657 return;
2659 instance->SetExtraData (value);
2663 void
2664 imedia_stream_set_extra_data_size (IMediaStream *instance, int value)
2666 if (instance == NULL)
2667 return;
2669 instance->SetExtraDataSize (value);
2674 * InkPresenter
2676 InkPresenter *
2677 ink_presenter_new (void)
2679 return new InkPresenter ();
2684 * Inline
2686 Inline *
2687 inline_new (void)
2689 return new Inline ();
2694 * InlineCollection
2696 InlineCollection *
2697 inline_collection_new (void)
2699 return new InlineCollection ();
2704 * InputMethod
2706 InputMethod *
2707 input_method_new (void)
2709 return new InputMethod ();
2714 * ItemCollection
2716 ItemCollection *
2717 item_collection_new (void)
2719 return new ItemCollection ();
2724 * Keyboard
2727 keyboard_get_modifiers (void)
2729 return Keyboard::GetModifiers ();
2734 * KeyEventArgs
2737 key_event_args_get_key (KeyEventArgs *instance)
2739 if (instance == NULL)
2740 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2741 return (int) 0;
2743 return instance->GetKey ();
2748 key_event_args_get_platform_key_code (KeyEventArgs *instance)
2750 if (instance == NULL)
2751 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2752 return (int) 0;
2754 return instance->GetPlatformKeyCode ();
2758 KeyEventArgs *
2759 key_event_args_new (void)
2761 return new KeyEventArgs ();
2766 * KeyFrameCollection
2768 KeyFrameCollection *
2769 key_frame_collection_new (void)
2771 return new KeyFrameCollection ();
2776 * KeySpline
2778 KeySpline *
2779 key_spline_new (void)
2781 return new KeySpline ();
2786 * Line
2788 Line *
2789 line_new (void)
2791 return new Line ();
2796 * LinearColorKeyFrame
2798 LinearColorKeyFrame *
2799 linear_color_key_frame_new (void)
2801 return new LinearColorKeyFrame ();
2806 * LinearDoubleKeyFrame
2808 LinearDoubleKeyFrame *
2809 linear_double_key_frame_new (void)
2811 return new LinearDoubleKeyFrame ();
2816 * LinearGradientBrush
2818 LinearGradientBrush *
2819 linear_gradient_brush_new (void)
2821 return new LinearGradientBrush ();
2826 * LinearPointKeyFrame
2828 LinearPointKeyFrame *
2829 linear_point_key_frame_new (void)
2831 return new LinearPointKeyFrame ();
2836 * LineBreak
2838 LineBreak *
2839 line_break_new (void)
2841 return new LineBreak ();
2846 * LineGeometry
2848 LineGeometry *
2849 line_geometry_new (void)
2851 return new LineGeometry ();
2856 * LineSegment
2858 LineSegment *
2859 line_segment_new (void)
2861 return new LineSegment ();
2866 * MarkerReachedEventArgs
2868 TimelineMarker *
2869 marker_reached_event_args_get_marker (MarkerReachedEventArgs *instance)
2871 if (instance == NULL)
2872 return NULL;
2874 return instance->GetMarker ();
2879 * Matrix
2881 cairo_matrix_t *
2882 matrix_get_matrix_values (Matrix *instance)
2884 if (instance == NULL)
2885 return NULL;
2887 return instance->GetMatrixValues ();
2891 Matrix *
2892 matrix_new (void)
2894 return new Matrix ();
2899 * MatrixTransform
2901 MatrixTransform *
2902 matrix_transform_new (void)
2904 return new MatrixTransform ();
2909 * Media
2911 void
2912 media_register_decoder (DecoderInfo *info)
2914 Media::RegisterDecoder (info);
2919 * MediaAttribute
2921 MediaAttribute *
2922 media_attribute_new (void)
2924 return new MediaAttribute ();
2929 * MediaAttributeCollection
2931 MediaAttribute *
2932 media_attribute_collection_get_item_by_name (MediaAttributeCollection *instance, const char *name)
2934 if (instance == NULL)
2935 return NULL;
2937 return instance->GetItemByName (name);
2941 MediaAttributeCollection *
2942 media_attribute_collection_new (void)
2944 return new MediaAttributeCollection ();
2949 * MediaBase
2951 MediaBase *
2952 media_base_new (void)
2954 return new MediaBase ();
2958 void
2959 media_base_set_source (MediaBase *instance, const char *uri)
2961 if (instance == NULL)
2962 return;
2964 instance->SetSource (uri);
2969 * MediaElement
2971 MediaElement *
2972 media_element_new (void)
2974 return new MediaElement ();
2978 void
2979 media_element_pause (MediaElement *instance)
2981 if (instance == NULL)
2982 return;
2984 instance->Pause ();
2988 void
2989 media_element_play (MediaElement *instance)
2991 if (instance == NULL)
2992 return;
2994 instance->Play ();
2998 void
2999 media_element_report_error_occurred (MediaElement *instance, const char *args)
3001 if (instance == NULL)
3002 return;
3004 instance->ReportErrorOccurred (args);
3008 IMediaDemuxer *
3009 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)
3011 if (instance == NULL)
3012 return NULL;
3014 return instance->SetDemuxerSource (context, close_demuxer, get_diagnostic, get_sample, open_demuxer, seek, switch_media_stream);
3018 void
3019 media_element_set_stream_source (MediaElement *instance, ManagedStreamCallbacks *stream)
3021 if (instance == NULL)
3022 return;
3024 instance->SetStreamSource (stream);
3028 void
3029 media_element_stop (MediaElement *instance)
3031 if (instance == NULL)
3032 return;
3034 instance->Stop ();
3039 * MediaFrame
3041 void
3042 media_frame_add_state (MediaFrame *instance, int state)
3044 if (instance == NULL)
3045 return;
3047 instance->AddState ((MediaFrameState) state);
3051 guint8 *
3052 media_frame_get_buffer (MediaFrame *instance)
3054 if (instance == NULL)
3055 return NULL;
3057 return instance->GetBuffer ();
3061 guint32
3062 media_frame_get_buf_len (MediaFrame *instance)
3064 if (instance == NULL)
3065 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3066 return (guint32) 0;
3068 return instance->GetBufLen ();
3072 gint32
3073 media_frame_get_height (MediaFrame *instance)
3075 if (instance == NULL)
3076 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3077 return (gint32) 0;
3079 return instance->GetHeight ();
3083 guint64
3084 media_frame_get_pts (MediaFrame *instance)
3086 if (instance == NULL)
3087 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3088 return (guint64) 0;
3090 return instance->GetPts ();
3094 gint32
3095 media_frame_get_width (MediaFrame *instance)
3097 if (instance == NULL)
3098 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3099 return (gint32) 0;
3101 return instance->GetWidth ();
3105 bool
3106 media_frame_is_key_frame (MediaFrame *instance)
3108 if (instance == NULL)
3109 return false;
3111 return instance->IsKeyFrame ();
3115 MediaFrame *
3116 media_frame_new (IMediaStream *stream, guint8 *buffer, guint32 buflen, guint64 pts, bool keyframe)
3118 return new MediaFrame (stream, buffer, buflen, pts, keyframe);
3122 void
3123 media_frame_set_buffer (MediaFrame *instance, guint8 *value)
3125 if (instance == NULL)
3126 return;
3128 instance->SetBuffer (value);
3132 void
3133 media_frame_set_buf_len (MediaFrame *instance, guint32 value)
3135 if (instance == NULL)
3136 return;
3138 instance->SetBufLen (value);
3142 void
3143 media_frame_set_data_stride (MediaFrame *instance, guint8 *a, guint8 *b, guint8 *c, guint8 *d)
3145 if (instance == NULL)
3146 return;
3148 instance->SetDataStride (a, b, c, d);
3152 void
3153 media_frame_set_decoder_specific_data (MediaFrame *instance, void *value)
3155 if (instance == NULL)
3156 return;
3158 instance->SetDecoderSpecificData (value);
3162 void
3163 media_frame_set_height (MediaFrame *instance, gint32 value)
3165 if (instance == NULL)
3166 return;
3168 instance->SetHeight (value);
3172 void
3173 media_frame_set_pts (MediaFrame *instance, guint64 value)
3175 if (instance == NULL)
3176 return;
3178 instance->SetPts (value);
3182 void
3183 media_frame_set_src_slide_h (MediaFrame *instance, int value)
3185 if (instance == NULL)
3186 return;
3188 instance->SetSrcSlideH (value);
3192 void
3193 media_frame_set_src_slide_y (MediaFrame *instance, int value)
3195 if (instance == NULL)
3196 return;
3198 instance->SetSrcSlideY (value);
3202 void
3203 media_frame_set_src_stride (MediaFrame *instance, int a, int b, int c, int d)
3205 if (instance == NULL)
3206 return;
3208 instance->SetSrcStride (a, b, c, d);
3212 void
3213 media_frame_set_width (MediaFrame *instance, gint32 value)
3215 if (instance == NULL)
3216 return;
3218 instance->SetWidth (value);
3223 * MoonWindow
3225 bool
3226 moon_window_get_transparent (MoonWindow *instance)
3228 if (instance == NULL)
3229 return false;
3231 return instance->GetTransparent ();
3235 void
3236 moon_window_set_transparent (MoonWindow *instance, bool flag)
3238 if (instance == NULL)
3239 return;
3241 instance->SetTransparent (flag);
3246 * MoonWindowGtk
3248 void *
3249 moon_window_gtk_get_native_widget (MoonWindowGtk *instance)
3251 if (instance == NULL)
3252 return NULL;
3254 return instance->GetNativeWidget ();
3258 MoonWindowGtk *
3259 moon_window_gtk_new (bool fullscreen, int w, int h, MoonWindow *parent)
3261 return new MoonWindowGtk (fullscreen, w, h, parent);
3266 * MouseButtonEventArgs
3268 MouseButtonEventArgs *
3269 mouse_button_event_args_new (void)
3271 return new MouseButtonEventArgs ();
3276 * MouseEventArgs
3278 void
3279 mouse_event_args_get_position (MouseEventArgs *instance, UIElement *relative_to, double *x, double *y)
3281 if (instance == NULL)
3282 return;
3284 instance->GetPosition (relative_to, x, y);
3288 StylusInfo *
3289 mouse_event_args_get_stylus_info (MouseEventArgs *instance)
3291 if (instance == NULL)
3292 return NULL;
3294 return instance->GetStylusInfo ();
3298 StylusPointCollection *
3299 mouse_event_args_get_stylus_points (MouseEventArgs *instance, UIElement *ink_presenter)
3301 if (instance == NULL)
3302 return NULL;
3304 return instance->GetStylusPoints (ink_presenter);
3308 MouseEventArgs *
3309 mouse_event_args_new (void)
3311 return new MouseEventArgs ();
3316 * MouseWheelEventArgs
3319 mouse_wheel_event_args_get_wheel_delta (MouseWheelEventArgs *instance)
3321 if (instance == NULL)
3322 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3323 return (int) 0;
3325 return instance->GetWheelDelta ();
3329 MouseWheelEventArgs *
3330 mouse_wheel_event_args_new (void)
3332 return new MouseWheelEventArgs ();
3337 * MultiScaleImage
3339 Point
3340 multi_scale_image_element_to_logical_point (MultiScaleImage *instance, Point elementPoint)
3342 if (instance == NULL)
3343 return Point (0, 0);
3345 return instance->ElementToLogicalPoint (elementPoint);
3349 void
3350 multi_scale_image_emit_image_failed (MultiScaleImage *instance)
3352 if (instance == NULL)
3353 return;
3355 instance->EmitImageFailed ();
3359 void
3360 multi_scale_image_emit_image_open_failed (MultiScaleImage *instance)
3362 if (instance == NULL)
3363 return;
3365 instance->EmitImageOpenFailed ();
3369 void
3370 multi_scale_image_emit_motion_finished (MultiScaleImage *instance)
3372 if (instance == NULL)
3373 return;
3375 instance->EmitMotionFinished ();
3379 void
3380 multi_scale_image_handle_dz_parsed (MultiScaleImage *instance)
3382 if (instance == NULL)
3383 return;
3385 instance->HandleDzParsed ();
3389 void
3390 multi_scale_image_invalidate_tile_layer (MultiScaleImage *instance, int level, int tilePositionX, int tilePositionY, int tileLayer)
3392 if (instance == NULL)
3393 return;
3395 instance->InvalidateTileLayer (level, tilePositionX, tilePositionY, tileLayer);
3399 Point
3400 multi_scale_image_logical_to_element_point (MultiScaleImage *instance, Point logicalPoint)
3402 if (instance == NULL)
3403 return Point (0, 0);
3405 return instance->LogicalToElementPoint (logicalPoint);
3409 MultiScaleImage *
3410 multi_scale_image_new (void)
3412 return new MultiScaleImage ();
3416 void
3417 multi_scale_image_on_source_property_changed (MultiScaleImage *instance)
3419 if (instance == NULL)
3420 return;
3422 instance->OnSourcePropertyChanged ();
3426 void
3427 multi_scale_image_zoom_about_logical_point (MultiScaleImage *instance, double zoomIncrementFactor, double zoomCenterLogicalX, double zoomCenterLogicalY)
3429 if (instance == NULL)
3430 return;
3432 instance->ZoomAboutLogicalPoint (zoomIncrementFactor, zoomCenterLogicalX, zoomCenterLogicalY);
3437 * MultiScaleSubImage
3439 gint32
3440 multi_scale_sub_image_get_zindex (MultiScaleSubImage *instance)
3442 if (instance == NULL)
3443 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3444 return (gint32) 0;
3446 return instance->GetZIndex ();
3450 MultiScaleSubImage *
3451 multi_scale_sub_image_new (void)
3453 return new MultiScaleSubImage ();
3458 * MultiScaleSubImageCollection
3460 MultiScaleSubImageCollection *
3461 multi_scale_sub_image_collection_new (void)
3463 return new MultiScaleSubImageCollection ();
3468 * MultiScaleTileSource
3470 void
3471 multi_scale_tile_source_invalidate_tile_layer (MultiScaleTileSource *instance, int level, int tilePositionX, int tilePositionY, int tileLayer)
3473 if (instance == NULL)
3474 return;
3476 instance->InvalidateTileLayer (level, tilePositionX, tilePositionY, tileLayer);
3480 MultiScaleTileSource *
3481 multi_scale_tile_source_new (void)
3483 return new MultiScaleTileSource ();
3487 void
3488 multi_scale_tile_source_set_image_uri_func (MultiScaleTileSource *instance, get_image_uri_func func)
3490 if (instance == NULL)
3491 return;
3493 instance->set_image_uri_func (func);
3498 * NameScope
3500 NameScope *
3501 name_scope_new (void)
3503 return new NameScope ();
3508 * ObjectAnimationUsingKeyFrames
3510 ObjectAnimationUsingKeyFrames *
3511 object_animation_using_key_frames_new (void)
3513 return new ObjectAnimationUsingKeyFrames ();
3518 * ObjectKeyFrame
3520 ObjectKeyFrame *
3521 object_key_frame_new (void)
3523 return new ObjectKeyFrame ();
3528 * ObjectKeyFrameCollection
3530 ObjectKeyFrameCollection *
3531 object_key_frame_collection_new (void)
3533 return new ObjectKeyFrameCollection ();
3538 * OutOfBrowserSettings
3540 OutOfBrowserSettings *
3541 out_of_browser_settings_new (void)
3543 return new OutOfBrowserSettings ();
3548 * Panel
3550 Panel *
3551 panel_new (void)
3553 return new Panel ();
3558 * ParallelTimeline
3560 ParallelTimeline *
3561 parallel_timeline_new (void)
3563 return new ParallelTimeline ();
3568 * PasswordBox
3570 PasswordBox *
3571 password_box_new (void)
3573 return new PasswordBox ();
3578 * Path
3580 Path *
3581 path_new (void)
3583 return new Path ();
3588 * PathFigure
3590 PathFigure *
3591 path_figure_new (void)
3593 return new PathFigure ();
3598 * PathFigureCollection
3600 PathFigureCollection *
3601 path_figure_collection_new (void)
3603 return new PathFigureCollection ();
3608 * PathGeometry
3610 PathGeometry *
3611 path_geometry_new (void)
3613 return new PathGeometry ();
3618 * PathSegment
3620 PathSegment *
3621 path_segment_new (void)
3623 return new PathSegment ();
3628 * PathSegmentCollection
3630 PathSegmentCollection *
3631 path_segment_collection_new (void)
3633 return new PathSegmentCollection ();
3638 * PointAnimation
3640 PointAnimation *
3641 point_animation_new (void)
3643 return new PointAnimation ();
3648 * PointAnimationUsingKeyFrames
3650 PointAnimationUsingKeyFrames *
3651 point_animation_using_key_frames_new (void)
3653 return new PointAnimationUsingKeyFrames ();
3658 * PointCollection
3660 PointCollection *
3661 point_collection_new (void)
3663 return new PointCollection ();
3668 * PointKeyFrame
3670 PointKeyFrame *
3671 point_key_frame_new (void)
3673 return new PointKeyFrame ();
3678 * PointKeyFrameCollection
3680 PointKeyFrameCollection *
3681 point_key_frame_collection_new (void)
3683 return new PointKeyFrameCollection ();
3688 * PolyBezierSegment
3690 PolyBezierSegment *
3691 poly_bezier_segment_new (void)
3693 return new PolyBezierSegment ();
3697 void
3698 poly_bezier_segment_set_points (PolyBezierSegment *instance, PointCollection *points)
3700 if (instance == NULL)
3701 return;
3703 instance->SetPoints (points);
3708 * Polygon
3710 Polygon *
3711 polygon_new (void)
3713 return new Polygon ();
3718 * Polyline
3720 Polyline *
3721 polyline_new (void)
3723 return new Polyline ();
3728 * PolyLineSegment
3730 PolyLineSegment *
3731 poly_line_segment_new (void)
3733 return new PolyLineSegment ();
3738 * PolyQuadraticBezierSegment
3740 PolyQuadraticBezierSegment *
3741 poly_quadratic_bezier_segment_new (void)
3743 return new PolyQuadraticBezierSegment ();
3748 * Popup
3750 Popup *
3751 popup_new (void)
3753 return new Popup ();
3758 * PowerEase
3760 double
3761 power_ease_ease_in_core (PowerEase *instance, double normalizedTime)
3763 if (instance == NULL)
3764 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3765 return (double) 0;
3767 return instance->EaseInCore (normalizedTime);
3771 PowerEase *
3772 power_ease_new (void)
3774 return new PowerEase ();
3779 * PropertyChangedEventArgs
3782 property_changed_event_args_get_id (PropertyChangedEventArgs *instance)
3784 if (instance == NULL)
3785 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3786 return (int) 0;
3788 return instance->GetId ();
3792 Value *
3793 property_changed_event_args_get_new_value (PropertyChangedEventArgs *instance)
3795 if (instance == NULL)
3796 return NULL;
3798 return instance->GetNewValue ();
3802 Value *
3803 property_changed_event_args_get_old_value (PropertyChangedEventArgs *instance)
3805 if (instance == NULL)
3806 return NULL;
3808 return instance->GetOldValue ();
3812 DependencyProperty *
3813 property_changed_event_args_get_property (PropertyChangedEventArgs *instance)
3815 if (instance == NULL)
3816 return NULL;
3818 return instance->GetProperty ();
3823 * QuadraticBezierSegment
3825 QuadraticBezierSegment *
3826 quadratic_bezier_segment_new (void)
3828 return new QuadraticBezierSegment ();
3833 * QuadraticEase
3835 double
3836 quadratic_ease_ease_in_core (QuadraticEase *instance, double normalizedTime)
3838 if (instance == NULL)
3839 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3840 return (double) 0;
3842 return instance->EaseInCore (normalizedTime);
3846 QuadraticEase *
3847 quadratic_ease_new (void)
3849 return new QuadraticEase ();
3854 * QuarticEase
3856 double
3857 quartic_ease_ease_in_core (QuarticEase *instance, double normalizedTime)
3859 if (instance == NULL)
3860 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3861 return (double) 0;
3863 return instance->EaseInCore (normalizedTime);
3867 QuarticEase *
3868 quartic_ease_new (void)
3870 return new QuarticEase ();
3875 * QuinticEase
3877 double
3878 quintic_ease_ease_in_core (QuinticEase *instance, double normalizedTime)
3880 if (instance == NULL)
3881 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3882 return (double) 0;
3884 return instance->EaseInCore (normalizedTime);
3888 QuinticEase *
3889 quintic_ease_new (void)
3891 return new QuinticEase ();
3896 * RadialGradientBrush
3898 RadialGradientBrush *
3899 radial_gradient_brush_new (void)
3901 return new RadialGradientBrush ();
3906 * Rectangle
3908 Rectangle *
3909 rectangle_new (void)
3911 return new Rectangle ();
3916 * RectangleGeometry
3918 RectangleGeometry *
3919 rectangle_geometry_new (void)
3921 return new RectangleGeometry ();
3926 * RenderingEventArgs
3928 TimeSpan
3929 rendering_event_args_get_rendering_time (RenderingEventArgs *instance)
3931 if (instance == NULL)
3932 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3933 return (TimeSpan) 0;
3935 return instance->GetRenderingTime ();
3940 * ResourceDictionary
3942 bool
3943 resource_dictionary_add_with_error (ResourceDictionary *instance, const char *key, Value *value, MoonError *error)
3945 if (instance == NULL)
3946 return false;
3948 if (error == NULL)
3949 g_warning ("Moonlight: Called resource_dictionary_add_with_error () with error == NULL.");
3950 return instance->AddWithError (key, value, error);
3954 bool
3955 resource_dictionary_clear (ResourceDictionary *instance)
3957 if (instance == NULL)
3958 return false;
3960 return instance->Clear ();
3964 bool
3965 resource_dictionary_contains_key (ResourceDictionary *instance, const char *key)
3967 if (instance == NULL)
3968 return false;
3970 return instance->ContainsKey (key);
3974 Value *
3975 resource_dictionary_get (ResourceDictionary *instance, const char *key, bool *exists)
3977 if (instance == NULL)
3978 return NULL;
3980 return instance->Get (key, exists);
3984 bool
3985 resource_dictionary_remove (ResourceDictionary *instance, const char *key)
3987 if (instance == NULL)
3988 return false;
3990 return instance->Remove (key);
3994 ResourceDictionary *
3995 resource_dictionary_new (void)
3997 return new ResourceDictionary ();
4001 bool
4002 resource_dictionary_set (ResourceDictionary *instance, const char *key, Value *value)
4004 if (instance == NULL)
4005 return false;
4007 return instance->Set (key, value);
4012 * ResourceDictionaryCollection
4014 ResourceDictionaryCollection *
4015 resource_dictionary_collection_new (void)
4017 return new ResourceDictionaryCollection ();
4022 * RotateTransform
4024 RotateTransform *
4025 rotate_transform_new (void)
4027 return new RotateTransform ();
4032 * RoutedEventArgs
4034 bool
4035 routed_event_args_get_handled (RoutedEventArgs *instance)
4037 if (instance == NULL)
4038 return false;
4040 return instance->GetHandled ();
4044 DependencyObject *
4045 routed_event_args_get_source (RoutedEventArgs *instance)
4047 if (instance == NULL)
4048 return NULL;
4050 return instance->GetSource ();
4054 RoutedEventArgs *
4055 routed_event_args_new (void)
4057 return new RoutedEventArgs ();
4061 void
4062 routed_event_args_set_handled (RoutedEventArgs *instance, bool handled)
4064 if (instance == NULL)
4065 return;
4067 instance->SetHandled (handled);
4071 void
4072 routed_event_args_set_source (RoutedEventArgs *instance, DependencyObject *el)
4074 if (instance == NULL)
4075 return;
4077 instance->SetSource (el);
4082 * RowDefinition
4084 RowDefinition *
4085 row_definition_new (void)
4087 return new RowDefinition ();
4092 * RowDefinitionCollection
4094 RowDefinitionCollection *
4095 row_definition_collection_new (void)
4097 return new RowDefinitionCollection ();
4102 * Run
4104 Run *
4105 run_new (void)
4107 return new Run ();
4112 * ScaleTransform
4114 ScaleTransform *
4115 scale_transform_new (void)
4117 return new ScaleTransform ();
4122 * Setter
4124 Setter *
4125 setter_new (void)
4127 return new Setter ();
4132 * SetterBase
4134 SetterBase *
4135 setter_base_new (void)
4137 return new SetterBase ();
4142 * SetterBaseCollection
4144 SetterBaseCollection *
4145 setter_base_collection_new (void)
4147 return new SetterBaseCollection ();
4152 * Shape
4154 Transform *
4155 shape_get_geometry_transform (Shape *instance)
4157 if (instance == NULL)
4158 return NULL;
4160 return instance->GetGeometryTransform ();
4164 Shape *
4165 shape_new (void)
4167 return new Shape ();
4172 * SineEase
4174 double
4175 sine_ease_ease_in_core (SineEase *instance, double normalizedTime)
4177 if (instance == NULL)
4178 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4179 return (double) 0;
4181 return instance->EaseInCore (normalizedTime);
4185 SineEase *
4186 sine_ease_new (void)
4188 return new SineEase ();
4193 * SizeChangedEventArgs
4195 SizeChangedEventArgs *
4196 size_changed_event_args_new (void)
4198 return new SizeChangedEventArgs ();
4203 * SkewTransform
4205 SkewTransform *
4206 skew_transform_new (void)
4208 return new SkewTransform ();
4213 * SolidColorBrush
4215 SolidColorBrush *
4216 solid_color_brush_new (void)
4218 return new SolidColorBrush ();
4223 * SplineColorKeyFrame
4225 SplineColorKeyFrame *
4226 spline_color_key_frame_new (void)
4228 return new SplineColorKeyFrame ();
4233 * SplineDoubleKeyFrame
4235 SplineDoubleKeyFrame *
4236 spline_double_key_frame_new (void)
4238 return new SplineDoubleKeyFrame ();
4243 * SplinePointKeyFrame
4245 SplinePointKeyFrame *
4246 spline_point_key_frame_new (void)
4248 return new SplinePointKeyFrame ();
4253 * Storyboard
4255 bool
4256 storyboard_begin_with_error (Storyboard *instance, MoonError *error)
4258 if (instance == NULL)
4259 return false;
4261 if (error == NULL)
4262 g_warning ("Moonlight: Called storyboard_begin_with_error () with error == NULL.");
4263 return instance->BeginWithError (error);
4268 storyboard_get_current_state (Storyboard *instance)
4270 if (instance == NULL)
4271 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4272 return (int) 0;
4274 return instance->GetCurrentState ();
4278 TimeSpan
4279 storyboard_get_current_time (Storyboard *instance)
4281 if (instance == NULL)
4282 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4283 return (TimeSpan) 0;
4285 return instance->GetCurrentTime ();
4289 DependencyProperty *
4290 storyboard_get_target_dependency_property (Storyboard *instance)
4292 if (instance == NULL)
4293 return NULL;
4295 return instance->GetTargetDependencyProperty ();
4299 void
4300 storyboard_pause_with_error (Storyboard *instance, MoonError *error)
4302 if (instance == NULL)
4303 return;
4305 if (error == NULL)
4306 g_warning ("Moonlight: Called storyboard_pause_with_error () with error == NULL.");
4307 instance->PauseWithError (error);
4311 void
4312 storyboard_resume_with_error (Storyboard *instance, MoonError *error)
4314 if (instance == NULL)
4315 return;
4317 if (error == NULL)
4318 g_warning ("Moonlight: Called storyboard_resume_with_error () with error == NULL.");
4319 instance->ResumeWithError (error);
4323 void
4324 storyboard_seek_aligned_to_last_tick_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4326 if (instance == NULL)
4327 return;
4329 if (error == NULL)
4330 g_warning ("Moonlight: Called storyboard_seek_aligned_to_last_tick_with_error () with error == NULL.");
4331 instance->SeekAlignedToLastTickWithError (timespan, error);
4335 void
4336 storyboard_seek_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4338 if (instance == NULL)
4339 return;
4341 if (error == NULL)
4342 g_warning ("Moonlight: Called storyboard_seek_with_error () with error == NULL.");
4343 instance->SeekWithError (timespan, error);
4347 void
4348 storyboard_skip_to_fill_with_error (Storyboard *instance, MoonError *error)
4350 if (instance == NULL)
4351 return;
4353 if (error == NULL)
4354 g_warning ("Moonlight: Called storyboard_skip_to_fill_with_error () with error == NULL.");
4355 instance->SkipToFillWithError (error);
4359 void
4360 storyboard_stop_with_error (Storyboard *instance, MoonError *error)
4362 if (instance == NULL)
4363 return;
4365 if (error == NULL)
4366 g_warning ("Moonlight: Called storyboard_stop_with_error () with error == NULL.");
4367 instance->StopWithError (error);
4371 Storyboard *
4372 storyboard_new (void)
4374 return new Storyboard ();
4379 * Stroke
4381 bool
4382 stroke_hit_test (Stroke *instance, StylusPointCollection *stylusPoints)
4384 if (instance == NULL)
4385 return false;
4387 return instance->HitTest (stylusPoints);
4391 Stroke *
4392 stroke_new (void)
4394 return new Stroke ();
4399 * StrokeCollection
4401 StrokeCollection *
4402 stroke_collection_hit_test (StrokeCollection *instance, StylusPointCollection *stylusPoints)
4404 if (instance == NULL)
4405 return NULL;
4407 return instance->HitTest (stylusPoints);
4411 StrokeCollection *
4412 stroke_collection_new (void)
4414 return new StrokeCollection ();
4419 * Style
4421 void
4422 style_seal (Style *instance)
4424 if (instance == NULL)
4425 return;
4427 instance->Seal ();
4431 Style *
4432 style_new (void)
4434 return new Style ();
4439 * StylusInfo
4441 StylusInfo *
4442 stylus_info_new (void)
4444 return new StylusInfo ();
4449 * StylusPoint
4451 double
4452 stylus_point_get_pressure_factor (StylusPoint *instance)
4454 if (instance == NULL)
4455 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4456 return (double) 0;
4458 return instance->GetPressureFactor ();
4462 double
4463 stylus_point_get_x (StylusPoint *instance)
4465 if (instance == NULL)
4466 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4467 return (double) 0;
4469 return instance->GetX ();
4473 double
4474 stylus_point_get_y (StylusPoint *instance)
4476 if (instance == NULL)
4477 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4478 return (double) 0;
4480 return instance->GetY ();
4484 void
4485 stylus_point_set_pressure_factor (StylusPoint *instance, double factor)
4487 if (instance == NULL)
4488 return;
4490 instance->SetPressureFactor (factor);
4494 void
4495 stylus_point_set_x (StylusPoint *instance, double x)
4497 if (instance == NULL)
4498 return;
4500 instance->SetX (x);
4504 void
4505 stylus_point_set_y (StylusPoint *instance, double y)
4507 if (instance == NULL)
4508 return;
4510 instance->SetY (y);
4514 StylusPoint *
4515 stylus_point_new (void)
4517 return new StylusPoint ();
4522 * StylusPointCollection
4524 double
4525 stylus_point_collection_add_stylus_points (StylusPointCollection *instance, StylusPointCollection *stylusPointCollection)
4527 if (instance == NULL)
4528 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4529 return (double) 0;
4531 return instance->AddStylusPoints (stylusPointCollection);
4535 StylusPointCollection *
4536 stylus_point_collection_new (void)
4538 return new StylusPointCollection ();
4543 * Surface
4545 void
4546 surface_attach (Surface *instance, UIElement *toplevel)
4548 if (instance == NULL)
4549 return;
4551 instance->Attach (toplevel);
4555 Downloader *
4556 surface_create_downloader (Surface *instance)
4558 if (instance == NULL)
4559 return NULL;
4561 return instance->CreateDownloader ();
4565 void
4566 surface_emit_error (Surface *instance, int number, int code, const char *message)
4568 if (instance == NULL)
4569 return;
4571 instance->EmitError (number, code, message);
4575 Color *
4576 surface_get_background_color (Surface *instance)
4578 if (instance == NULL)
4579 return NULL;
4581 return instance->GetBackgroundColor ();
4585 UIElement *
4586 surface_get_focused_element (Surface *instance)
4588 if (instance == NULL)
4589 return NULL;
4591 return instance->GetFocusedElement ();
4595 bool
4596 surface_get_full_screen (Surface *instance)
4598 if (instance == NULL)
4599 return false;
4601 return instance->GetFullScreen ();
4605 TimeManager *
4606 surface_get_time_manager (Surface *instance)
4608 if (instance == NULL)
4609 return NULL;
4611 return instance->GetTimeManager ();
4615 UIElement *
4616 surface_get_toplevel (Surface *instance)
4618 if (instance == NULL)
4619 return NULL;
4621 return instance->GetToplevel ();
4625 MoonWindow *
4626 surface_get_window (Surface *instance)
4628 if (instance == NULL)
4629 return NULL;
4631 return instance->GetWindow ();
4635 bool
4636 surface_in_main_thread (void)
4638 return Surface::InMainThread ();
4642 bool
4643 surface_is_loaded (Surface *instance)
4645 if (instance == NULL)
4646 return false;
4648 return instance->IsLoaded ();
4652 bool
4653 surface_is_user_initiated_event (Surface *instance)
4655 if (instance == NULL)
4656 return false;
4658 return instance->IsUserInitiatedEvent ();
4662 bool
4663 surface_is_version_supported (const char *version)
4665 return Surface::IsVersionSupported (version);
4669 void
4670 surface_paint (Surface *instance, cairo_t *ctx, int x, int y, int width, int height)
4672 if (instance == NULL)
4673 return;
4675 instance->Paint (ctx, x, y, width, height);
4679 void
4680 surface_resize (Surface *instance, int width, int height)
4682 if (instance == NULL)
4683 return;
4685 instance->Resize (width, height);
4689 void
4690 surface_set_full_screen (Surface *instance, bool value)
4692 if (instance == NULL)
4693 return;
4695 instance->SetFullScreen (value);
4699 Surface *
4700 surface_new (MoonWindow *window)
4702 return new Surface (window);
4707 * TabNavigationWalker
4709 bool
4710 tab_navigation_walker_focus (UIElement *element, bool forwards)
4712 return TabNavigationWalker::Focus (element, forwards);
4717 * TextBlock
4719 TextBlock *
4720 text_block_new (void)
4722 return new TextBlock ();
4727 * TextBox
4729 TextBox *
4730 text_box_new (void)
4732 return new TextBox ();
4737 * TextBoxBase
4739 void
4740 text_box_base_on_got_focus (TextBoxBase *instance, RoutedEventArgs *args)
4742 if (instance == NULL)
4743 return;
4745 instance->OnGotFocus (args);
4749 void
4750 text_box_base_on_key_down (TextBoxBase *instance, KeyEventArgs *args)
4752 if (instance == NULL)
4753 return;
4755 instance->OnKeyDown (args);
4759 void
4760 text_box_base_on_key_up (TextBoxBase *instance, KeyEventArgs *args)
4762 if (instance == NULL)
4763 return;
4765 instance->OnKeyUp (args);
4769 void
4770 text_box_base_on_lost_focus (TextBoxBase *instance, RoutedEventArgs *args)
4772 if (instance == NULL)
4773 return;
4775 instance->OnLostFocus (args);
4779 void
4780 text_box_base_on_mouse_left_button_down (TextBoxBase *instance, MouseButtonEventArgs *args)
4782 if (instance == NULL)
4783 return;
4785 instance->OnMouseLeftButtonDown (args);
4789 void
4790 text_box_base_on_mouse_left_button_up (TextBoxBase *instance, MouseButtonEventArgs *args)
4792 if (instance == NULL)
4793 return;
4795 instance->OnMouseLeftButtonUp (args);
4799 void
4800 text_box_base_on_mouse_move (TextBoxBase *instance, MouseEventArgs *args)
4802 if (instance == NULL)
4803 return;
4805 instance->OnMouseMove (args);
4809 void
4810 text_box_base_post_on_key_down (TextBoxBase *instance, KeyEventArgs *args)
4812 if (instance == NULL)
4813 return;
4815 instance->PostOnKeyDown (args);
4819 void
4820 text_box_base_select_all (TextBoxBase *instance)
4822 if (instance == NULL)
4823 return;
4825 instance->SelectAll ();
4829 bool
4830 text_box_base_select_with_error (TextBoxBase *instance, int start, int length, MoonError *error)
4832 if (instance == NULL)
4833 return false;
4835 if (error == NULL)
4836 g_warning ("Moonlight: Called text_box_base_select_with_error () with error == NULL.");
4837 return instance->SelectWithError (start, length, error);
4842 * TextBoxView
4844 TextBoxView *
4845 text_box_view_new (void)
4847 return new TextBoxView ();
4852 * TextChangedEventArgs
4854 TextChangedEventArgs *
4855 text_changed_event_args_new (void)
4857 return new TextChangedEventArgs ();
4862 * TileBrush
4864 TileBrush *
4865 tile_brush_new (void)
4867 return new TileBrush ();
4872 * Timeline
4874 DependencyObject *
4875 timeline_get_manual_target (Timeline *instance)
4877 if (instance == NULL)
4878 return NULL;
4880 return instance->GetManualTarget ();
4884 void
4885 timeline_set_manual_target (Timeline *instance, DependencyObject *o)
4887 if (instance == NULL)
4888 return;
4890 instance->SetManualTarget (o);
4894 Timeline *
4895 timeline_new (void)
4897 return new Timeline ();
4902 * TimelineCollection
4904 TimelineCollection *
4905 timeline_collection_new (void)
4907 return new TimelineCollection ();
4912 * TimelineGroup
4914 TimelineGroup *
4915 timeline_group_new (void)
4917 return new TimelineGroup ();
4922 * TimelineMarker
4924 TimelineMarker *
4925 timeline_marker_new (void)
4927 return new TimelineMarker ();
4932 * TimelineMarkerCollection
4934 TimelineMarkerCollection *
4935 timeline_marker_collection_new (void)
4937 return new TimelineMarkerCollection ();
4942 * TimeManager
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);