2009-11-13 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / src / cbinding.cpp
blobfcca5f7035e5126c0f650b94acfcdc0495f496a5
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 "bitmapcache.h"
15 #include "bitmapimage.h"
16 #include "bitmapsource.h"
17 #include "border.h"
18 #include "brush.h"
19 #include "canvas.h"
20 #include "collection.h"
21 #include "contentcontrol.h"
22 #include "control.h"
23 #include "deepzoomimagetilesource.h"
24 #include "dependencyobject.h"
25 #include "dependencyproperty.h"
26 #include "deployment.h"
27 #include "downloader.h"
28 #include "easing.h"
29 #include "effect.h"
30 #include "eventargs.h"
31 #include "frameworkelement.h"
32 #include "geometry.h"
33 #include "glyphs.h"
34 #include "grid.h"
35 #include "imagesource.h"
36 #include "keyboard.h"
37 #include "media.h"
38 #include "mediaelement.h"
39 #include "multiscaleimage.h"
40 #include "multiscalesubimage.h"
41 #include "namescope.h"
42 #include "panel.h"
43 #include "pipeline.h"
44 #include "popup.h"
45 #include "resources.h"
46 #include "runtime.h"
47 #include "shape.h"
48 #include "size.h"
49 #include "style.h"
50 #include "stylus.h"
51 #include "tabnavigationwalker.h"
52 #include "template.h"
53 #include "textblock.h"
54 #include "textbox.h"
55 #include "tilesource.h"
56 #include "timeline.h"
57 #include "timemanager.h"
58 #include "transform.h"
59 #include "trigger.h"
60 #include "type.h"
61 #include "uielement.h"
62 #include "uri.h"
63 #include "usercontrol.h"
64 #include "window.h"
65 #include "window-gtk.h"
66 #include "writeablebitmap.h"
67 #include "xaml.h"
68 #include "xap.h"
69 /**
70 * Application
71 **/
72 Application *
73 application_new (void)
75 return new Application ();
79 Application *
80 application_get_current (void)
82 return Application::GetCurrent ();
86 void
87 application_register_callbacks (Application *instance, ApplyDefaultStyleCallback apply_default_style_cb, ApplyStyleCallback apply_style_cb, GetResourceCallback get_resource_cb, ConvertKeyframeValueCallback convert_keyframe_callback)
89 if (instance == NULL)
90 return;
92 instance->RegisterCallbacks (apply_default_style_cb, apply_style_cb, get_resource_cb, convert_keyframe_callback);
96 void
97 application_set_current (Application *current)
99 Application::SetCurrent (current);
104 * ArcSegment
106 ArcSegment *
107 arc_segment_new (void)
109 return new ArcSegment ();
114 * AssemblyPart
116 AssemblyPart *
117 assembly_part_new (void)
119 return new AssemblyPart ();
124 * AssemblyPartCollection
126 AssemblyPartCollection *
127 assembly_part_collection_new (void)
129 return new AssemblyPartCollection ();
134 * AudioStream
136 AudioStream *
137 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)
139 return new AudioStream (media, codec_id, bits_per_sample, block_align, sample_rate, channels, bit_rate, extra_data, extra_data_size);
144 audio_stream_get_bit_rate (AudioStream *instance)
146 if (instance == NULL)
147 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
148 return (int) 0;
150 return instance->GetBitRate ();
155 audio_stream_get_bits_per_sample (AudioStream *instance)
157 if (instance == NULL)
158 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
159 return (int) 0;
161 return instance->GetBitsPerSample ();
166 audio_stream_get_block_align (AudioStream *instance)
168 if (instance == NULL)
169 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
170 return (int) 0;
172 return instance->GetBlockAlign ();
177 audio_stream_get_channels (AudioStream *instance)
179 if (instance == NULL)
180 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
181 return (int) 0;
183 return instance->GetChannels ();
188 audio_stream_get_input_bit_rate (AudioStream *instance)
190 if (instance == NULL)
191 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
192 return (int) 0;
194 return instance->GetInputBitRate ();
199 audio_stream_get_input_bits_per_sample (AudioStream *instance)
201 if (instance == NULL)
202 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
203 return (int) 0;
205 return instance->GetInputBitsPerSample ();
210 audio_stream_get_input_block_align (AudioStream *instance)
212 if (instance == NULL)
213 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
214 return (int) 0;
216 return instance->GetInputBlockAlign ();
221 audio_stream_get_input_channels (AudioStream *instance)
223 if (instance == NULL)
224 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
225 return (int) 0;
227 return instance->GetInputChannels ();
232 audio_stream_get_input_sample_rate (AudioStream *instance)
234 if (instance == NULL)
235 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
236 return (int) 0;
238 return instance->GetInputSampleRate ();
243 audio_stream_get_output_bit_rate (AudioStream *instance)
245 if (instance == NULL)
246 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
247 return (int) 0;
249 return instance->GetOutputBitRate ();
254 audio_stream_get_output_bits_per_sample (AudioStream *instance)
256 if (instance == NULL)
257 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
258 return (int) 0;
260 return instance->GetOutputBitsPerSample ();
265 audio_stream_get_output_block_align (AudioStream *instance)
267 if (instance == NULL)
268 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
269 return (int) 0;
271 return instance->GetOutputBlockAlign ();
276 audio_stream_get_output_channels (AudioStream *instance)
278 if (instance == NULL)
279 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
280 return (int) 0;
282 return instance->GetOutputChannels ();
287 audio_stream_get_output_sample_rate (AudioStream *instance)
289 if (instance == NULL)
290 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
291 return (int) 0;
293 return instance->GetOutputSampleRate ();
298 audio_stream_get_sample_rate (AudioStream *instance)
300 if (instance == NULL)
301 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
302 return (int) 0;
304 return instance->GetSampleRate ();
308 void
309 audio_stream_set_bit_rate (AudioStream *instance, int value)
311 if (instance == NULL)
312 return;
314 instance->SetBitRate (value);
318 void
319 audio_stream_set_bits_per_sample (AudioStream *instance, int value)
321 if (instance == NULL)
322 return;
324 instance->SetBitsPerSample (value);
328 void
329 audio_stream_set_block_align (AudioStream *instance, int value)
331 if (instance == NULL)
332 return;
334 instance->SetBlockAlign (value);
338 void
339 audio_stream_set_channels (AudioStream *instance, int value)
341 if (instance == NULL)
342 return;
344 instance->SetChannels (value);
348 void
349 audio_stream_set_input_bit_rate (AudioStream *instance, int value)
351 if (instance == NULL)
352 return;
354 instance->SetInputBitRate (value);
358 void
359 audio_stream_set_input_bits_per_sample (AudioStream *instance, int value)
361 if (instance == NULL)
362 return;
364 instance->SetInputBitsPerSample (value);
368 void
369 audio_stream_set_input_block_align (AudioStream *instance, int value)
371 if (instance == NULL)
372 return;
374 instance->SetInputBlockAlign (value);
378 void
379 audio_stream_set_input_channels (AudioStream *instance, int value)
381 if (instance == NULL)
382 return;
384 instance->SetInputChannels (value);
388 void
389 audio_stream_set_input_sample_rate (AudioStream *instance, int value)
391 if (instance == NULL)
392 return;
394 instance->SetInputSampleRate (value);
398 void
399 audio_stream_set_output_bit_rate (AudioStream *instance, int value)
401 if (instance == NULL)
402 return;
404 instance->SetOutputBitRate (value);
408 void
409 audio_stream_set_output_bits_per_sample (AudioStream *instance, int value)
411 if (instance == NULL)
412 return;
414 instance->SetOutputBitsPerSample (value);
418 void
419 audio_stream_set_output_block_align (AudioStream *instance, int value)
421 if (instance == NULL)
422 return;
424 instance->SetOutputBlockAlign (value);
428 void
429 audio_stream_set_output_channels (AudioStream *instance, int value)
431 if (instance == NULL)
432 return;
434 instance->SetOutputChannels (value);
438 void
439 audio_stream_set_output_sample_rate (AudioStream *instance, int value)
441 if (instance == NULL)
442 return;
444 instance->SetOutputSampleRate (value);
448 void
449 audio_stream_set_sample_rate (AudioStream *instance, int value)
451 if (instance == NULL)
452 return;
454 instance->SetSampleRate (value);
459 * BackEase
461 BackEase *
462 back_ease_new (void)
464 return new BackEase ();
468 double
469 back_ease_ease_in_core (BackEase *instance, double normalizedTime)
471 if (instance == NULL)
472 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
473 return (double) 0;
475 return instance->EaseInCore (normalizedTime);
480 * BeginStoryboard
482 BeginStoryboard *
483 begin_storyboard_new (void)
485 return new BeginStoryboard ();
490 * BezierSegment
492 BezierSegment *
493 bezier_segment_new (void)
495 return new BezierSegment ();
500 * BitmapCache
502 BitmapCache *
503 bitmap_cache_new (void)
505 return new BitmapCache ();
510 * BitmapImage
512 BitmapImage *
513 bitmap_image_new (void)
515 return new BitmapImage ();
519 void
520 bitmap_image_pixbuf_write (BitmapImage *instance, gpointer buffer, gint32 offset, gint32 n)
522 if (instance == NULL)
523 return;
525 instance->PixbufWrite (buffer, offset, n);
529 void
530 bitmap_image_pixmap_complete (BitmapImage *instance)
532 if (instance == NULL)
533 return;
535 instance->PixmapComplete ();
540 * BitmapSource
542 BitmapSource *
543 bitmap_source_new (void)
545 return new BitmapSource ();
549 gpointer
550 bitmap_source_get_bitmap_data (BitmapSource *instance)
552 if (instance == NULL)
553 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
554 return (gpointer) 0;
556 return instance->GetBitmapData ();
560 void
561 bitmap_source_invalidate (BitmapSource *instance)
563 if (instance == NULL)
564 return;
566 instance->Invalidate ();
570 void
571 bitmap_source_set_bitmap_data (BitmapSource *instance, gpointer data, bool own)
573 if (instance == NULL)
574 return;
576 instance->SetBitmapData (data, own);
581 * BlurEffect
583 BlurEffect *
584 blur_effect_new (void)
586 return new BlurEffect ();
591 * Border
593 Border *
594 border_new (void)
596 return new Border ();
601 * BounceEase
603 BounceEase *
604 bounce_ease_new (void)
606 return new BounceEase ();
610 double
611 bounce_ease_ease_in_core (BounceEase *instance, double normalizedTime)
613 if (instance == NULL)
614 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
615 return (double) 0;
617 return instance->EaseInCore (normalizedTime);
622 * Brush
624 Brush *
625 brush_new (void)
627 return new Brush ();
632 * CacheMode
634 CacheMode *
635 cache_mode_new (void)
637 return new CacheMode ();
642 * Canvas
644 Canvas *
645 canvas_new (void)
647 return new Canvas ();
652 * CircleEase
654 CircleEase *
655 circle_ease_new (void)
657 return new CircleEase ();
661 double
662 circle_ease_ease_in_core (CircleEase *instance, double normalizedTime)
664 if (instance == NULL)
665 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
666 return (double) 0;
668 return instance->EaseInCore (normalizedTime);
673 * Collection
676 collection_add_with_error (Collection *instance, Value *value, MoonError *error)
678 if (instance == NULL)
679 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
680 return (int) 0;
682 if (error == NULL)
683 g_warning ("Moonlight: Called collection_add_with_error () with error == NULL.");
684 return instance->AddWithError (value, error);
688 bool
689 collection_clear (Collection *instance)
691 if (instance == NULL)
692 return false;
694 return instance->Clear ();
698 bool
699 collection_contains (Collection *instance, Value *value)
701 if (instance == NULL)
702 return false;
704 return instance->Contains (value);
709 collection_get_count (Collection *instance)
711 if (instance == NULL)
712 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
713 return (int) 0;
715 return instance->GetCount ();
720 collection_get_element_type (Collection *instance)
722 if (instance == NULL)
723 return Type::INVALID;
725 return instance->GetElementType ();
729 CollectionIterator *
730 collection_get_iterator (Collection *instance)
732 if (instance == NULL)
733 return NULL;
735 return instance->GetIterator ();
739 Value *
740 collection_get_value_at_with_error (Collection *instance, int index, MoonError *error)
742 if (instance == NULL)
743 return NULL;
745 if (error == NULL)
746 g_warning ("Moonlight: Called collection_get_value_at_with_error () with error == NULL.");
747 return instance->GetValueAtWithError (index, error);
752 collection_index_of (Collection *instance, Value *value)
754 if (instance == NULL)
755 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
756 return (int) 0;
758 return instance->IndexOf (value);
762 bool
763 collection_insert_with_error (Collection *instance, int index, Value *value, MoonError *error)
765 if (instance == NULL)
766 return false;
768 if (error == NULL)
769 g_warning ("Moonlight: Called collection_insert_with_error () with error == NULL.");
770 return instance->InsertWithError (index, value, error);
774 bool
775 collection_remove (Collection *instance, Value *value)
777 if (instance == NULL)
778 return false;
780 return instance->Remove (value);
784 bool
785 collection_remove_at_with_error (Collection *instance, int index, MoonError *error)
787 if (instance == NULL)
788 return false;
790 if (error == NULL)
791 g_warning ("Moonlight: Called collection_remove_at_with_error () with error == NULL.");
792 return instance->RemoveAtWithError (index, error);
796 bool
797 collection_set_value_at_with_error (Collection *instance, int index, Value *value, MoonError *error)
799 if (instance == NULL)
800 return false;
802 if (error == NULL)
803 g_warning ("Moonlight: Called collection_set_value_at_with_error () with error == NULL.");
804 return instance->SetValueAtWithError (index, value, error);
809 * CollectionChangedEventArgs
811 CollectionChangedEventArgs *
812 collection_changed_event_args_new (void)
814 return new CollectionChangedEventArgs ();
819 collection_changed_event_args_get_changed_action (CollectionChangedEventArgs *instance)
821 if (instance == NULL)
822 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
823 return (CollectionChangedAction) 0;
825 return instance->GetChangedAction ();
830 collection_changed_event_args_get_index (CollectionChangedEventArgs *instance)
832 if (instance == NULL)
833 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
834 return (int) 0;
836 return instance->GetIndex ();
840 Value *
841 collection_changed_event_args_get_new_item (CollectionChangedEventArgs *instance)
843 if (instance == NULL)
844 return NULL;
846 return instance->GetNewItem ();
850 Value *
851 collection_changed_event_args_get_old_item (CollectionChangedEventArgs *instance)
853 if (instance == NULL)
854 return NULL;
856 return instance->GetOldItem ();
860 void
861 collection_changed_event_args_set_changed_action (CollectionChangedEventArgs *instance, int action)
863 if (instance == NULL)
864 return;
866 instance->SetChangedAction ((CollectionChangedAction) action);
870 void
871 collection_changed_event_args_set_index (CollectionChangedEventArgs *instance, int index)
873 if (instance == NULL)
874 return;
876 instance->SetIndex (index);
880 void
881 collection_changed_event_args_set_new_item (CollectionChangedEventArgs *instance, Value *item)
883 if (instance == NULL)
884 return;
886 instance->SetNewItem (item);
890 void
891 collection_changed_event_args_set_old_item (CollectionChangedEventArgs *instance, Value *item)
893 if (instance == NULL)
894 return;
896 instance->SetOldItem (item);
901 * CollectionIterator
903 void
904 collection_iterator_destroy (CollectionIterator *iterator)
906 CollectionIterator::Destroy (iterator);
910 Value *
911 collection_iterator_get_current (CollectionIterator *instance, int *error)
913 if (instance == NULL)
914 return NULL;
916 return instance->GetCurrent (error);
921 collection_iterator_next (CollectionIterator *instance)
923 if (instance == NULL)
924 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
925 return (int) 0;
927 return instance->Next ();
931 bool
932 collection_iterator_reset (CollectionIterator *instance)
934 if (instance == NULL)
935 return false;
937 return instance->Reset ();
942 * ColorAnimation
944 ColorAnimation *
945 color_animation_new (void)
947 return new ColorAnimation ();
952 * ColorAnimationUsingKeyFrames
954 ColorAnimationUsingKeyFrames *
955 color_animation_using_key_frames_new (void)
957 return new ColorAnimationUsingKeyFrames ();
962 * ColorKeyFrame
964 ColorKeyFrame *
965 color_key_frame_new (void)
967 return new ColorKeyFrame ();
972 * ColorKeyFrameCollection
974 ColorKeyFrameCollection *
975 color_key_frame_collection_new (void)
977 return new ColorKeyFrameCollection ();
982 * ColumnDefinition
984 ColumnDefinition *
985 column_definition_new (void)
987 return new ColumnDefinition ();
992 * ColumnDefinitionCollection
994 ColumnDefinitionCollection *
995 column_definition_collection_new (void)
997 return new ColumnDefinitionCollection ();
1002 * ContentChangedEventArgs
1004 Value *
1005 content_changed_event_args_get_new_content (ContentChangedEventArgs *instance)
1007 if (instance == NULL)
1008 return NULL;
1010 return instance->GetNewContent ();
1014 Value *
1015 content_changed_event_args_get_old_content (ContentChangedEventArgs *instance)
1017 if (instance == NULL)
1018 return NULL;
1020 return instance->GetOldContent ();
1025 * ContentControl
1027 ContentControl *
1028 content_control_new (void)
1030 return new ContentControl ();
1034 bool
1035 content_control_get_content_sets_parent (ContentControl *instance)
1037 if (instance == NULL)
1038 return false;
1040 return instance->GetContentSetsParent ();
1044 void
1045 content_control_set_content_sets_parent (ContentControl *instance, bool value)
1047 if (instance == NULL)
1048 return;
1050 instance->SetContentSetsParent (value);
1055 * Control
1057 Control *
1058 control_new (void)
1060 return new Control ();
1064 DependencyObject *
1065 control_get_template_child (Control *instance, const char *name)
1067 if (instance == NULL)
1068 return NULL;
1070 return instance->GetTemplateChild (name);
1075 * ControlTemplate
1077 ControlTemplate *
1078 control_template_new (void)
1080 return new ControlTemplate ();
1085 * CubicEase
1087 CubicEase *
1088 cubic_ease_new (void)
1090 return new CubicEase ();
1094 double
1095 cubic_ease_ease_in_core (CubicEase *instance, double normalizedTime)
1097 if (instance == NULL)
1098 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1099 return (double) 0;
1101 return instance->EaseInCore (normalizedTime);
1106 * CursorPositionChangedEventArgs
1108 CursorPositionChangedEventArgs *
1109 cursor_position_changed_event_args_new (void)
1111 return new CursorPositionChangedEventArgs ();
1115 double
1116 cursor_position_changed_event_args_get_cursor_height (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->GetCursorHeight ();
1126 double
1127 cursor_position_changed_event_args_get_cursor_x (CursorPositionChangedEventArgs *instance)
1129 if (instance == NULL)
1130 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1131 return (double) 0;
1133 return instance->GetCursorX ();
1137 double
1138 cursor_position_changed_event_args_get_cursor_y (CursorPositionChangedEventArgs *instance)
1140 if (instance == NULL)
1141 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1142 return (double) 0;
1144 return instance->GetCursorY ();
1149 * DataTemplate
1151 DataTemplate *
1152 data_template_new (void)
1154 return new DataTemplate ();
1159 * DeepZoomImageTileSource
1161 DeepZoomImageTileSource *
1162 deep_zoom_image_tile_source_new (void)
1164 return new DeepZoomImageTileSource ();
1169 * DependencyObject
1171 void
1172 dependency_object_add_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb, gpointer closure)
1174 if (instance == NULL)
1175 return;
1177 instance->AddPropertyChangeHandler (property, cb, closure);
1181 void
1182 dependency_object_clear_value (DependencyObject *instance, DependencyProperty *property, bool notify_listeners, MoonError *error)
1184 if (instance == NULL)
1185 return;
1187 if (error == NULL)
1188 g_warning ("Moonlight: Called dependency_object_clear_value () with error == NULL.");
1189 instance->ClearValue (property, notify_listeners, error);
1193 DependencyObject *
1194 dependency_object_new (void)
1196 return new DependencyObject ();
1200 DependencyObject *
1201 dependency_object_find_name (DependencyObject *instance, const char *name, int *element_kind)
1203 if (instance == NULL)
1204 return NULL;
1206 return instance->FindName (name, (Type::Kind*) element_kind);
1210 const char *
1211 dependency_object_get_name (DependencyObject *instance)
1213 if (instance == NULL)
1214 return NULL;
1216 return instance->GetName ();
1220 Value *
1221 dependency_object_get_value_no_default_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1223 if (instance == NULL)
1224 return NULL;
1226 if (error == NULL)
1227 g_warning ("Moonlight: Called dependency_object_get_value_no_default_with_error () with error == NULL.");
1228 return instance->GetValueNoDefaultWithError (property, error);
1232 Value *
1233 dependency_object_get_value_with_error (DependencyObject *instance, int whatami, DependencyProperty *property, MoonError *error)
1235 if (instance == NULL)
1236 return NULL;
1238 if (error == NULL)
1239 g_warning ("Moonlight: Called dependency_object_get_value_with_error () with error == NULL.");
1240 return instance->GetValueWithError ((Type::Kind) whatami, property, error);
1244 Value *
1245 dependency_object_read_local_value_with_error (DependencyObject *instance, DependencyProperty *property, MoonError *error)
1247 if (instance == NULL)
1248 return NULL;
1250 if (error == NULL)
1251 g_warning ("Moonlight: Called dependency_object_read_local_value_with_error () with error == NULL.");
1252 return instance->ReadLocalValueWithError (property, error);
1256 void
1257 dependency_object_remove_property_change_handler (DependencyObject *instance, DependencyProperty *property, PropertyChangeHandler cb)
1259 if (instance == NULL)
1260 return;
1262 instance->RemovePropertyChangeHandler (property, cb);
1266 void
1267 dependency_object_set_name (DependencyObject *instance, const char *name)
1269 if (instance == NULL)
1270 return;
1272 instance->SetName (name);
1276 void
1277 dependency_object_set_parent (DependencyObject *instance, DependencyObject *parent, MoonError *error)
1279 if (instance == NULL)
1280 return;
1282 if (error == NULL)
1283 g_warning ("Moonlight: Called dependency_object_set_parent () with error == NULL.");
1284 instance->SetParent (parent, error);
1288 bool
1289 dependency_object_set_value_with_error (DependencyObject *instance, DependencyProperty *property, Value *value, MoonError *error)
1291 if (instance == NULL)
1292 return false;
1294 if (error == NULL)
1295 g_warning ("Moonlight: Called dependency_object_set_value_with_error () with error == NULL.");
1296 return instance->SetValueWithError (property, value, error);
1301 * DependencyObjectCollection
1303 DependencyObjectCollection *
1304 dependency_object_collection_new (void)
1306 return new DependencyObjectCollection ();
1311 * DependencyProperty
1313 Value *
1314 dependency_property_get_default_value (DependencyProperty *instance)
1316 if (instance == NULL)
1317 return NULL;
1319 return instance->GetDefaultValue ();
1323 DependencyProperty *
1324 dependency_property_get_dependency_property (int type, const char *name)
1326 return DependencyProperty::GetDependencyProperty ((Type::Kind) type, name);
1330 DependencyProperty *
1331 dependency_property_get_dependency_property_full (int type, const char *name, bool inherits)
1333 return DependencyProperty::GetDependencyPropertyFull ((Type::Kind) type, name, inherits);
1337 const char *
1338 dependency_property_get_name (DependencyProperty *instance)
1340 if (instance == NULL)
1341 return NULL;
1343 return instance->GetName ();
1348 dependency_property_get_property_type (DependencyProperty *instance)
1350 if (instance == NULL)
1351 return Type::INVALID;
1353 return instance->GetPropertyType ();
1357 bool
1358 dependency_property_is_attached (DependencyProperty *instance)
1360 if (instance == NULL)
1361 return false;
1363 return instance->IsAttached ();
1367 bool
1368 dependency_property_is_nullable (DependencyProperty *instance)
1370 if (instance == NULL)
1371 return false;
1373 return instance->IsNullable ();
1377 bool
1378 dependency_property_is_read_only (DependencyProperty *instance)
1380 if (instance == NULL)
1381 return false;
1383 return instance->IsReadOnly ();
1387 DependencyProperty *
1388 dependency_property_register_core_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1390 return DependencyProperty::RegisterCoreProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1394 DependencyProperty *
1395 dependency_property_register_custom_property (const char *name, int property_type, int owner_type, Value *defaultValue, bool attached, bool read_only, PropertyChangeHandler callback)
1397 return DependencyProperty::RegisterCustomProperty (name, (Type::Kind) property_type, (Type::Kind) owner_type, defaultValue, attached, read_only, callback);
1401 void
1402 dependency_property_set_is_nullable (DependencyProperty *instance, bool value)
1404 if (instance == NULL)
1405 return;
1407 instance->SetIsNullable (value);
1411 void
1412 dependency_property_set_property_changed_callback (DependencyProperty *instance, PropertyChangeHandler changed_callback)
1414 if (instance == NULL)
1415 return;
1417 instance->SetPropertyChangedCallback (changed_callback);
1422 * Deployment
1424 Deployment *
1425 deployment_new (void)
1427 return new Deployment ();
1431 Deployment *
1432 deployment_get_current (void)
1434 return Deployment::GetCurrent ();
1438 Types *
1439 deployment_get_types (Deployment *instance)
1441 if (instance == NULL)
1442 return NULL;
1444 return instance->GetTypes ();
1448 void
1449 deployment_set_current (Deployment *value)
1451 Deployment::SetCurrent (value);
1455 void
1456 deployment_set_current_application (Deployment *instance, Application *value)
1458 if (instance == NULL)
1459 return;
1461 instance->SetCurrentApplication (value);
1465 void
1466 deployment_set_is_loaded_from_xap (Deployment *instance, bool flag)
1468 if (instance == NULL)
1469 return;
1471 instance->SetIsLoadedFromXap (flag);
1476 * DiscreteColorKeyFrame
1478 DiscreteColorKeyFrame *
1479 discrete_color_key_frame_new (void)
1481 return new DiscreteColorKeyFrame ();
1486 * DiscreteDoubleKeyFrame
1488 DiscreteDoubleKeyFrame *
1489 discrete_double_key_frame_new (void)
1491 return new DiscreteDoubleKeyFrame ();
1496 * DiscreteObjectKeyFrame
1498 DiscreteObjectKeyFrame *
1499 discrete_object_key_frame_new (void)
1501 return new DiscreteObjectKeyFrame ();
1506 * DiscretePointKeyFrame
1508 DiscretePointKeyFrame *
1509 discrete_point_key_frame_new (void)
1511 return new DiscretePointKeyFrame ();
1516 * DispatcherTimer
1518 DispatcherTimer *
1519 dispatcher_timer_new (void)
1521 return new DispatcherTimer ();
1525 void
1526 dispatcher_timer_start (DispatcherTimer *instance)
1528 if (instance == NULL)
1529 return;
1531 instance->Start ();
1535 void
1536 dispatcher_timer_stop (DispatcherTimer *instance)
1538 if (instance == NULL)
1539 return;
1541 instance->Stop ();
1546 * DoubleAnimation
1548 DoubleAnimation *
1549 double_animation_new (void)
1551 return new DoubleAnimation ();
1556 * DoubleAnimationUsingKeyFrames
1558 DoubleAnimationUsingKeyFrames *
1559 double_animation_using_key_frames_new (void)
1561 return new DoubleAnimationUsingKeyFrames ();
1566 * DoubleCollection
1568 DoubleCollection *
1569 double_collection_new (void)
1571 return new DoubleCollection ();
1576 * DoubleKeyFrame
1578 DoubleKeyFrame *
1579 double_key_frame_new (void)
1581 return new DoubleKeyFrame ();
1586 * DoubleKeyFrameCollection
1588 DoubleKeyFrameCollection *
1589 double_key_frame_collection_new (void)
1591 return new DoubleKeyFrameCollection ();
1596 * Downloader
1598 void *
1599 downloader_create_web_request (Downloader *instance, const char *method, const char *uri)
1601 if (instance == NULL)
1602 return NULL;
1604 return instance->CreateWebRequest (method, uri);
1608 Downloader *
1609 downloader_new (void)
1611 return new Downloader ();
1615 void
1616 downloader_notify_failed (Downloader *instance, const char *msg)
1618 if (instance == NULL)
1619 return;
1621 instance->NotifyFailed (msg);
1625 void
1626 downloader_notify_finished (Downloader *instance, const char *final_uri)
1628 if (instance == NULL)
1629 return;
1631 instance->NotifyFinished (final_uri);
1635 void
1636 downloader_notify_size (Downloader *instance, gint64 size)
1638 if (instance == NULL)
1639 return;
1641 instance->NotifySize (size);
1645 void
1646 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)
1648 Downloader::SetFunctions (create_state, destroy_state, open, send, abort, header, body, request, response_header_callback, get_response);
1652 void
1653 downloader_write (Downloader *instance, void *buf, gint32 offset, gint32 n)
1655 if (instance == NULL)
1656 return;
1658 instance->Write (buf, offset, n);
1663 * DownloaderRequest
1665 void
1666 downloader_request_free (DownloaderRequest *instance)
1668 delete instance;
1672 void
1673 downloader_request_abort (DownloaderRequest *instance)
1675 if (instance == NULL)
1676 return;
1678 instance->Abort ();
1682 DownloaderResponse *
1683 downloader_request_get_downloader_response (DownloaderRequest *instance)
1685 if (instance == NULL)
1686 return NULL;
1688 return instance->GetDownloaderResponse ();
1692 bool
1693 downloader_request_get_response (DownloaderRequest *instance, DownloaderResponseStartedHandler started, DownloaderResponseDataAvailableHandler available, DownloaderResponseFinishedHandler finished, gpointer context)
1695 if (instance == NULL)
1696 return false;
1698 return instance->GetResponse (started, available, finished, context);
1702 const bool
1703 downloader_request_is_aborted (DownloaderRequest *instance)
1705 if (instance == NULL)
1706 return false;
1708 return instance->IsAborted ();
1712 void
1713 downloader_request_set_body (DownloaderRequest *instance, void *body, int size)
1715 if (instance == NULL)
1716 return;
1718 instance->SetBody (body, size);
1722 void
1723 downloader_request_set_http_header (DownloaderRequest *instance, const char *name, const char *value)
1725 if (instance == NULL)
1726 return;
1728 instance->SetHttpHeader (name, value);
1733 * DownloaderResponse
1735 void
1736 downloader_response_free (DownloaderResponse *instance)
1738 delete instance;
1742 void
1743 downloader_response_abort (DownloaderResponse *instance)
1745 if (instance == NULL)
1746 return;
1748 instance->Abort ();
1753 downloader_response_get_response_status (DownloaderResponse *instance)
1755 if (instance == NULL)
1756 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1757 return (int) 0;
1759 return instance->GetResponseStatus ();
1763 const char *
1764 downloader_response_get_response_status_text (DownloaderResponse *instance)
1766 if (instance == NULL)
1767 return NULL;
1769 return instance->GetResponseStatusText ();
1773 void
1774 downloader_response_set_header_visitor (DownloaderResponse *instance, DownloaderResponseHeaderCallback visitor, gpointer context)
1776 if (instance == NULL)
1777 return;
1779 instance->SetHeaderVisitor (visitor, context);
1784 * DownloadProgressEventArgs
1786 double
1787 download_progress_event_args_get_progress (DownloadProgressEventArgs *instance)
1789 if (instance == NULL)
1790 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1791 return (double) 0;
1793 return instance->GetProgress ();
1798 * DrawingAttributes
1800 DrawingAttributes *
1801 drawing_attributes_new (void)
1803 return new DrawingAttributes ();
1808 * DropShadowEffect
1810 DropShadowEffect *
1811 drop_shadow_effect_new (void)
1813 return new DropShadowEffect ();
1818 * EasingColorKeyFrame
1820 EasingColorKeyFrame *
1821 easing_color_key_frame_new (void)
1823 return new EasingColorKeyFrame ();
1828 * EasingDoubleKeyFrame
1830 EasingDoubleKeyFrame *
1831 easing_double_key_frame_new (void)
1833 return new EasingDoubleKeyFrame ();
1838 * EasingFunctionBase
1840 EasingFunctionBase *
1841 easing_function_base_new (void)
1843 return new EasingFunctionBase ();
1847 void
1848 easing_function_base_set_easing_function (EasingFunctionBase *instance, EasingFunction value)
1850 if (instance == NULL)
1851 return;
1853 instance->SetEasingFunction (value);
1858 * EasingPointKeyFrame
1860 EasingPointKeyFrame *
1861 easing_point_key_frame_new (void)
1863 return new EasingPointKeyFrame ();
1868 * Effect
1870 Effect *
1871 effect_new (void)
1873 return new Effect ();
1878 * ElasticEase
1880 double
1881 elastic_ease_ease_in_core (ElasticEase *instance, double normalizedTime)
1883 if (instance == NULL)
1884 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1885 return (double) 0;
1887 return instance->EaseInCore (normalizedTime);
1891 ElasticEase *
1892 elastic_ease_new (void)
1894 return new ElasticEase ();
1899 * Ellipse
1901 Ellipse *
1902 ellipse_new (void)
1904 return new Ellipse ();
1909 * EllipseGeometry
1911 EllipseGeometry *
1912 ellipse_geometry_new (void)
1914 return new EllipseGeometry ();
1919 * ErrorEventArgs
1922 error_event_args_get_error_code (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 (int) 0;
1928 return instance->GetErrorCode ();
1932 const char *
1933 error_event_args_get_error_message (ErrorEventArgs *instance)
1935 if (instance == NULL)
1936 return NULL;
1938 return instance->GetErrorMessage ();
1943 error_event_args_get_error_type (ErrorEventArgs *instance)
1945 if (instance == NULL)
1946 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1947 return (int) 0;
1949 return instance->GetErrorType ();
1953 gpointer
1954 error_event_args_get_moon_error (ErrorEventArgs *instance)
1956 if (instance == NULL)
1957 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1958 return (gpointer) 0;
1960 return instance->GetMoonError ();
1965 * EventObject
1968 event_object_add_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1970 if (instance == NULL)
1971 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
1972 return (int) 0;
1974 return instance->AddHandler (event_id, handler, data, data_dtor);
1978 void
1979 event_object_add_on_event_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
1981 if (instance == NULL)
1982 return;
1984 instance->AddOnEventHandler (event_id, handler, data, data_dtor);
1988 void
1989 event_object_add_toggle_ref_notifier (EventObject *instance, ToggleNotifyHandler tr)
1991 if (instance == NULL)
1992 return;
1994 instance->AddToggleRefNotifier (tr);
1999 event_object_add_xaml_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data, GDestroyNotify data_dtor)
2001 if (instance == NULL)
2002 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2003 return (int) 0;
2005 return instance->AddXamlHandler (event_id, handler, data, data_dtor);
2009 void
2010 event_object_do_emit_current_context (EventObject *instance, int event_id, EventArgs *calldata)
2012 if (instance == NULL)
2013 return;
2015 instance->DoEmitCurrentContext (event_id, calldata);
2020 event_object_get_object_type (EventObject *instance)
2022 if (instance == NULL)
2023 return Type::INVALID;
2025 return instance->GetObjectType ();
2029 Surface *
2030 event_object_get_surface (EventObject *instance)
2032 if (instance == NULL)
2033 return NULL;
2035 return instance->GetSurface ();
2039 const char *
2040 event_object_get_type_name (EventObject *instance)
2042 if (instance == NULL)
2043 return NULL;
2045 return instance->GetTypeName ();
2049 void
2050 event_object_ref (EventObject *instance)
2052 if (instance == NULL)
2053 return;
2055 instance->ref ();
2060 event_object_remove_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data)
2062 if (instance == NULL)
2063 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2064 return (int) 0;
2066 return instance->RemoveHandler (event_id, handler, data);
2070 void
2071 event_object_remove_on_event_handler (EventObject *instance, int event_id, EventHandler handler, gpointer data)
2073 if (instance == NULL)
2074 return;
2076 instance->RemoveOnEventHandler (event_id, handler, data);
2080 void
2081 event_object_remove_toggle_ref_notifier (EventObject *instance)
2083 if (instance == NULL)
2084 return;
2086 instance->RemoveToggleRefNotifier ();
2090 void
2091 event_object_set_object_type (EventObject *instance, int value)
2093 if (instance == NULL)
2094 return;
2096 instance->SetObjectType ((Type::Kind) value);
2100 void
2101 event_object_unref (EventObject *instance)
2103 if (instance == NULL)
2104 return;
2106 instance->unref ();
2111 * EventTrigger
2113 EventTrigger *
2114 event_trigger_new (void)
2116 return new EventTrigger ();
2121 * ExponentialEase
2123 double
2124 exponential_ease_ease_in_core (ExponentialEase *instance, double normalizedTime)
2126 if (instance == NULL)
2127 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2128 return (double) 0;
2130 return instance->EaseInCore (normalizedTime);
2134 ExponentialEase *
2135 exponential_ease_new (void)
2137 return new ExponentialEase ();
2142 * ExtensionPart
2144 ExtensionPart *
2145 extension_part_new (void)
2147 return new ExtensionPart ();
2152 * ExternalDecoder
2154 ExternalDecoder *
2155 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)
2157 return new ExternalDecoder (media, stream, instance, name, decode_frame_async, open_decoder_async, cleanup, clean_state, has_delayed_frame, dispose, dtor);
2162 * ExternalDecoderInfo
2164 ExternalDecoderInfo *
2165 external_decoder_info_new (void *instance, const char *name, ExternalDecoderInfo_SupportsCallback supports, ExternalDecoderInfo_Create create, ExternalDecoderInfo_dtor dtor)
2167 return new ExternalDecoderInfo (instance, name, supports, create, dtor);
2172 * ExternalDemuxer
2174 gint32
2175 external_demuxer_add_stream (ExternalDemuxer *instance, IMediaStream *stream)
2177 if (instance == NULL)
2178 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2179 return (gint32) 0;
2181 return instance->AddStream (stream);
2185 void
2186 external_demuxer_clear_callbacks (ExternalDemuxer *instance)
2188 if (instance == NULL)
2189 return;
2191 instance->ClearCallbacks ();
2195 void
2196 external_demuxer_set_can_seek (ExternalDemuxer *instance, bool value)
2198 if (instance == NULL)
2199 return;
2201 instance->SetCanSeek (value);
2206 * ExternalPart
2208 ExternalPart *
2209 external_part_new (void)
2211 return new ExternalPart ();
2216 * ExternalPartCollection
2218 ExternalPartCollection *
2219 external_part_collection_new (void)
2221 return new ExternalPartCollection ();
2226 * FrameworkElement
2228 bool
2229 framework_element_apply_template (FrameworkElement *instance)
2231 if (instance == NULL)
2232 return false;
2234 return instance->ApplyTemplate ();
2238 Size
2239 framework_element_arrange_override (FrameworkElement *instance, Size finalSize)
2241 if (instance == NULL)
2242 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2243 return (Size) 0;
2245 return instance->ArrangeOverride (finalSize);
2249 FrameworkElement *
2250 framework_element_new (void)
2252 return new FrameworkElement ();
2256 DependencyObject *
2257 framework_element_get_logical_parent (FrameworkElement *instance)
2259 if (instance == NULL)
2260 return NULL;
2262 return instance->GetLogicalParent ();
2266 Size
2267 framework_element_measure_override (FrameworkElement *instance, Size availableSize)
2269 if (instance == NULL)
2270 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2271 return (Size) 0;
2273 return instance->MeasureOverride (availableSize);
2277 void
2278 framework_element_register_managed_overrides (FrameworkElement *instance, MeasureOverrideCallback measure_cb, ArrangeOverrideCallback arrange_cb, GetDefaultTemplateCallback get_default_template_cb, LoadedCallback loaded_cb)
2280 if (instance == NULL)
2281 return;
2283 instance->RegisterManagedOverrides (measure_cb, arrange_cb, get_default_template_cb, loaded_cb);
2287 void
2288 framework_element_set_default_style (FrameworkElement *instance, Style *value)
2290 if (instance == NULL)
2291 return;
2293 instance->SetDefaultStyle (value);
2297 void
2298 framework_element_set_logical_parent (FrameworkElement *instance, DependencyObject *logical_parent, MoonError *error)
2300 if (instance == NULL)
2301 return;
2303 if (error == NULL)
2304 g_warning ("Moonlight: Called framework_element_set_logical_parent () with error == NULL.");
2305 instance->SetLogicalParent (logical_parent, error);
2310 * FrameworkTemplate
2312 FrameworkTemplate *
2313 framework_template_new (void)
2315 return new FrameworkTemplate ();
2319 DependencyObject *
2320 framework_template_get_visual_tree (FrameworkTemplate *instance, FrameworkElement *templateBindingSource)
2322 if (instance == NULL)
2323 return NULL;
2325 return instance->GetVisualTree (templateBindingSource);
2330 * GeneralTransform
2332 GeneralTransform *
2333 general_transform_new (void)
2335 return new GeneralTransform ();
2339 Matrix *
2340 general_transform_get_matrix (GeneralTransform *instance)
2342 if (instance == NULL)
2343 return NULL;
2345 return instance->GetMatrix ();
2350 * Geometry
2352 Geometry *
2353 geometry_new (void)
2355 return new Geometry ();
2359 Rect
2360 geometry_get_bounds (Geometry *instance)
2362 if (instance == NULL)
2363 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2364 return (Rect) 0;
2366 return instance->GetBounds ();
2371 * GeometryCollection
2373 GeometryCollection *
2374 geometry_collection_new (void)
2376 return new GeometryCollection ();
2381 * GeometryGroup
2383 GeometryGroup *
2384 geometry_group_new (void)
2386 return new GeometryGroup ();
2391 * Glyphs
2393 Glyphs *
2394 glyphs_new (void)
2396 return new Glyphs ();
2401 * GradientBrush
2403 GradientBrush *
2404 gradient_brush_new (void)
2406 return new GradientBrush ();
2411 * GradientStop
2413 GradientStop *
2414 gradient_stop_new (void)
2416 return new GradientStop ();
2421 * GradientStopCollection
2423 GradientStopCollection *
2424 gradient_stop_collection_new (void)
2426 return new GradientStopCollection ();
2431 * Grid
2433 Grid *
2434 grid_new (void)
2436 return new Grid ();
2441 * HitTestCollection
2443 HitTestCollection *
2444 hit_test_collection_new (void)
2446 return new HitTestCollection ();
2451 * Icon
2453 Icon *
2454 icon_new (void)
2456 return new Icon ();
2461 * IconCollection
2463 IconCollection *
2464 icon_collection_new (void)
2466 return new IconCollection ();
2471 * Image
2473 Image *
2474 image_new (void)
2476 return new Image ();
2480 void
2481 image_set_source (Image *instance, ImageSource *source)
2483 if (instance == NULL)
2484 return;
2486 instance->SetSource (source);
2491 * ImageBrush
2493 ImageBrush *
2494 image_brush_new (void)
2496 return new ImageBrush ();
2501 * ImageSource
2503 ImageSource *
2504 image_source_new (void)
2506 return new ImageSource ();
2511 * IMediaDecoder
2513 void
2514 imedia_decoder_report_decode_frame_completed (IMediaDecoder *instance, MediaFrame *frame)
2516 if (instance == NULL)
2517 return;
2519 instance->ReportDecodeFrameCompleted (frame);
2523 void
2524 imedia_decoder_report_open_decoder_completed (IMediaDecoder *instance)
2526 if (instance == NULL)
2527 return;
2529 instance->ReportOpenDecoderCompleted ();
2533 void
2534 imedia_decoder_set_pixel_format (IMediaDecoder *instance, int value)
2536 if (instance == NULL)
2537 return;
2539 instance->SetPixelFormat ((MoonPixelFormat) value);
2544 * IMediaDemuxer
2546 void
2547 imedia_demuxer_report_get_diagnostic_completed (IMediaDemuxer *instance, int diagnosticKind, gint64 diagnosticValue)
2549 if (instance == NULL)
2550 return;
2552 instance->ReportGetDiagnosticCompleted ((MediaStreamSourceDiagnosticKind) diagnosticKind, diagnosticValue);
2556 void
2557 imedia_demuxer_report_get_frame_completed (IMediaDemuxer *instance, MediaFrame *frame)
2559 if (instance == NULL)
2560 return;
2562 instance->ReportGetFrameCompleted (frame);
2566 void
2567 imedia_demuxer_report_get_frame_progress (IMediaDemuxer *instance, double bufferingProgress)
2569 if (instance == NULL)
2570 return;
2572 instance->ReportGetFrameProgress (bufferingProgress);
2576 void
2577 imedia_demuxer_report_open_demuxer_completed (IMediaDemuxer *instance)
2579 if (instance == NULL)
2580 return;
2582 instance->ReportOpenDemuxerCompleted ();
2586 void
2587 imedia_demuxer_report_seek_completed (IMediaDemuxer *instance, guint64 pts)
2589 if (instance == NULL)
2590 return;
2592 instance->ReportSeekCompleted (pts);
2596 void
2597 imedia_demuxer_report_switch_media_stream_completed (IMediaDemuxer *instance, IMediaStream *stream)
2599 if (instance == NULL)
2600 return;
2602 instance->ReportSwitchMediaStreamCompleted (stream);
2607 * IMediaObject
2609 Media *
2610 imedia_object_get_media_reffed (IMediaObject *instance)
2612 if (instance == NULL)
2613 return NULL;
2615 return instance->GetMediaReffed ();
2619 void
2620 imedia_object_report_error_occurred (IMediaObject *instance, const char *message)
2622 if (instance == NULL)
2623 return;
2625 instance->ReportErrorOccurred (message);
2630 * IMediaStream
2632 const char *
2633 imedia_stream_get_codec (IMediaStream *instance)
2635 if (instance == NULL)
2636 return NULL;
2638 return instance->GetCodec ();
2643 imedia_stream_get_codec_id (IMediaStream *instance)
2645 if (instance == NULL)
2646 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2647 return (int) 0;
2649 return instance->GetCodecId ();
2653 guint64
2654 imedia_stream_get_duration (IMediaStream *instance)
2656 if (instance == NULL)
2657 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2658 return (guint64) 0;
2660 return instance->GetDuration ();
2664 void *
2665 imedia_stream_get_extra_data (IMediaStream *instance)
2667 if (instance == NULL)
2668 return NULL;
2670 return instance->GetExtraData ();
2675 imedia_stream_get_extra_data_size (IMediaStream *instance)
2677 if (instance == NULL)
2678 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2679 return (int) 0;
2681 return instance->GetExtraDataSize ();
2686 imedia_stream_get_stream_type (IMediaStream *instance)
2688 if (instance == NULL)
2689 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2690 return (MediaStreamType) 0;
2692 return instance->GetStreamType ();
2696 void
2697 imedia_stream_set_codec_id (IMediaStream *instance, int value)
2699 if (instance == NULL)
2700 return;
2702 instance->SetCodecId (value);
2706 void
2707 imedia_stream_set_duration (IMediaStream *instance, guint64 value)
2709 if (instance == NULL)
2710 return;
2712 instance->SetDuration (value);
2716 void
2717 imedia_stream_set_extra_data (IMediaStream *instance, void *value)
2719 if (instance == NULL)
2720 return;
2722 instance->SetExtraData (value);
2726 void
2727 imedia_stream_set_extra_data_size (IMediaStream *instance, int value)
2729 if (instance == NULL)
2730 return;
2732 instance->SetExtraDataSize (value);
2737 * InkPresenter
2739 InkPresenter *
2740 ink_presenter_new (void)
2742 return new InkPresenter ();
2747 * Inline
2749 Inline *
2750 inline_new (void)
2752 return new Inline ();
2757 * InlineCollection
2759 InlineCollection *
2760 inline_collection_new (void)
2762 return new InlineCollection ();
2767 * InputMethod
2769 InputMethod *
2770 input_method_new (void)
2772 return new InputMethod ();
2777 * ItemCollection
2779 ItemCollection *
2780 item_collection_new (void)
2782 return new ItemCollection ();
2787 * Keyboard
2790 keyboard_get_modifiers (void)
2792 return Keyboard::GetModifiers ();
2797 * KeyEventArgs
2800 key_event_args_get_key (KeyEventArgs *instance)
2802 if (instance == NULL)
2803 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2804 return (int) 0;
2806 return instance->GetKey ();
2811 key_event_args_get_platform_key_code (KeyEventArgs *instance)
2813 if (instance == NULL)
2814 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
2815 return (int) 0;
2817 return instance->GetPlatformKeyCode ();
2821 KeyEventArgs *
2822 key_event_args_new (void)
2824 return new KeyEventArgs ();
2829 * KeyFrameCollection
2831 KeyFrameCollection *
2832 key_frame_collection_new (void)
2834 return new KeyFrameCollection ();
2839 * KeySpline
2841 KeySpline *
2842 key_spline_new (void)
2844 return new KeySpline ();
2849 * Line
2851 Line *
2852 line_new (void)
2854 return new Line ();
2859 * LinearColorKeyFrame
2861 LinearColorKeyFrame *
2862 linear_color_key_frame_new (void)
2864 return new LinearColorKeyFrame ();
2869 * LinearDoubleKeyFrame
2871 LinearDoubleKeyFrame *
2872 linear_double_key_frame_new (void)
2874 return new LinearDoubleKeyFrame ();
2879 * LinearGradientBrush
2881 LinearGradientBrush *
2882 linear_gradient_brush_new (void)
2884 return new LinearGradientBrush ();
2889 * LinearPointKeyFrame
2891 LinearPointKeyFrame *
2892 linear_point_key_frame_new (void)
2894 return new LinearPointKeyFrame ();
2899 * LineBreak
2901 LineBreak *
2902 line_break_new (void)
2904 return new LineBreak ();
2909 * LineGeometry
2911 LineGeometry *
2912 line_geometry_new (void)
2914 return new LineGeometry ();
2919 * LineSegment
2921 LineSegment *
2922 line_segment_new (void)
2924 return new LineSegment ();
2929 * MarkerReachedEventArgs
2931 TimelineMarker *
2932 marker_reached_event_args_get_marker (MarkerReachedEventArgs *instance)
2934 if (instance == NULL)
2935 return NULL;
2937 return instance->GetMarker ();
2942 * Matrix
2944 cairo_matrix_t *
2945 matrix_get_matrix_values (Matrix *instance)
2947 if (instance == NULL)
2948 return NULL;
2950 return instance->GetMatrixValues ();
2954 Matrix *
2955 matrix_new (void)
2957 return new Matrix ();
2962 * MatrixTransform
2964 MatrixTransform *
2965 matrix_transform_new (void)
2967 return new MatrixTransform ();
2972 * Media
2974 void
2975 media_register_decoder (DecoderInfo *info)
2977 Media::RegisterDecoder (info);
2982 * MediaAttribute
2984 MediaAttribute *
2985 media_attribute_new (void)
2987 return new MediaAttribute ();
2992 * MediaAttributeCollection
2994 MediaAttribute *
2995 media_attribute_collection_get_item_by_name (MediaAttributeCollection *instance, const char *name)
2997 if (instance == NULL)
2998 return NULL;
3000 return instance->GetItemByName (name);
3004 MediaAttributeCollection *
3005 media_attribute_collection_new (void)
3007 return new MediaAttributeCollection ();
3012 * MediaBase
3014 MediaBase *
3015 media_base_new (void)
3017 return new MediaBase ();
3021 void
3022 media_base_set_source (MediaBase *instance, const char *uri)
3024 if (instance == NULL)
3025 return;
3027 instance->SetSource (uri);
3032 * MediaElement
3034 MediaElement *
3035 media_element_new (void)
3037 return new MediaElement ();
3041 void
3042 media_element_pause (MediaElement *instance)
3044 if (instance == NULL)
3045 return;
3047 instance->Pause ();
3051 void
3052 media_element_play (MediaElement *instance)
3054 if (instance == NULL)
3055 return;
3057 instance->Play ();
3061 void
3062 media_element_report_error_occurred (MediaElement *instance, const char *args)
3064 if (instance == NULL)
3065 return;
3067 instance->ReportErrorOccurred (args);
3071 IMediaDemuxer *
3072 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)
3074 if (instance == NULL)
3075 return NULL;
3077 return instance->SetDemuxerSource (context, close_demuxer, get_diagnostic, get_sample, open_demuxer, seek, switch_media_stream);
3081 void
3082 media_element_set_stream_source (MediaElement *instance, ManagedStreamCallbacks *stream)
3084 if (instance == NULL)
3085 return;
3087 instance->SetStreamSource (stream);
3091 void
3092 media_element_stop (MediaElement *instance)
3094 if (instance == NULL)
3095 return;
3097 instance->Stop ();
3102 * MediaFrame
3104 void
3105 media_frame_add_state (MediaFrame *instance, int state)
3107 if (instance == NULL)
3108 return;
3110 instance->AddState ((MediaFrameState) state);
3114 guint8 *
3115 media_frame_get_buffer (MediaFrame *instance)
3117 if (instance == NULL)
3118 return NULL;
3120 return instance->GetBuffer ();
3124 guint32
3125 media_frame_get_buf_len (MediaFrame *instance)
3127 if (instance == NULL)
3128 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3129 return (guint32) 0;
3131 return instance->GetBufLen ();
3135 gint32
3136 media_frame_get_height (MediaFrame *instance)
3138 if (instance == NULL)
3139 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3140 return (gint32) 0;
3142 return instance->GetHeight ();
3146 guint64
3147 media_frame_get_pts (MediaFrame *instance)
3149 if (instance == NULL)
3150 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3151 return (guint64) 0;
3153 return instance->GetPts ();
3157 gint32
3158 media_frame_get_width (MediaFrame *instance)
3160 if (instance == NULL)
3161 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3162 return (gint32) 0;
3164 return instance->GetWidth ();
3168 bool
3169 media_frame_is_key_frame (MediaFrame *instance)
3171 if (instance == NULL)
3172 return false;
3174 return instance->IsKeyFrame ();
3178 MediaFrame *
3179 media_frame_new (IMediaStream *stream, guint8 *buffer, guint32 buflen, guint64 pts, bool keyframe)
3181 return new MediaFrame (stream, buffer, buflen, pts, keyframe);
3185 void
3186 media_frame_set_buffer (MediaFrame *instance, guint8 *value)
3188 if (instance == NULL)
3189 return;
3191 instance->SetBuffer (value);
3195 void
3196 media_frame_set_buf_len (MediaFrame *instance, guint32 value)
3198 if (instance == NULL)
3199 return;
3201 instance->SetBufLen (value);
3205 void
3206 media_frame_set_data_stride (MediaFrame *instance, guint8 *a, guint8 *b, guint8 *c, guint8 *d)
3208 if (instance == NULL)
3209 return;
3211 instance->SetDataStride (a, b, c, d);
3215 void
3216 media_frame_set_decoder_specific_data (MediaFrame *instance, void *value)
3218 if (instance == NULL)
3219 return;
3221 instance->SetDecoderSpecificData (value);
3225 void
3226 media_frame_set_height (MediaFrame *instance, gint32 value)
3228 if (instance == NULL)
3229 return;
3231 instance->SetHeight (value);
3235 void
3236 media_frame_set_pts (MediaFrame *instance, guint64 value)
3238 if (instance == NULL)
3239 return;
3241 instance->SetPts (value);
3245 void
3246 media_frame_set_src_slide_h (MediaFrame *instance, int value)
3248 if (instance == NULL)
3249 return;
3251 instance->SetSrcSlideH (value);
3255 void
3256 media_frame_set_src_slide_y (MediaFrame *instance, int value)
3258 if (instance == NULL)
3259 return;
3261 instance->SetSrcSlideY (value);
3265 void
3266 media_frame_set_src_stride (MediaFrame *instance, int a, int b, int c, int d)
3268 if (instance == NULL)
3269 return;
3271 instance->SetSrcStride (a, b, c, d);
3275 void
3276 media_frame_set_width (MediaFrame *instance, gint32 value)
3278 if (instance == NULL)
3279 return;
3281 instance->SetWidth (value);
3286 * MoonWindow
3288 bool
3289 moon_window_get_transparent (MoonWindow *instance)
3291 if (instance == NULL)
3292 return false;
3294 return instance->GetTransparent ();
3298 void
3299 moon_window_set_transparent (MoonWindow *instance, bool flag)
3301 if (instance == NULL)
3302 return;
3304 instance->SetTransparent (flag);
3309 * MoonWindowGtk
3311 void *
3312 moon_window_gtk_get_native_widget (MoonWindowGtk *instance)
3314 if (instance == NULL)
3315 return NULL;
3317 return instance->GetNativeWidget ();
3321 MoonWindowGtk *
3322 moon_window_gtk_new (bool fullscreen, int w, int h, MoonWindow *parent, Surface *surface)
3324 return new MoonWindowGtk (fullscreen, w, h, parent, surface);
3329 * MouseButtonEventArgs
3331 MouseButtonEventArgs *
3332 mouse_button_event_args_new (void)
3334 return new MouseButtonEventArgs ();
3339 * MouseEventArgs
3341 void
3342 mouse_event_args_get_position (MouseEventArgs *instance, UIElement *relative_to, double *x, double *y)
3344 if (instance == NULL)
3345 return;
3347 instance->GetPosition (relative_to, x, y);
3351 StylusInfo *
3352 mouse_event_args_get_stylus_info (MouseEventArgs *instance)
3354 if (instance == NULL)
3355 return NULL;
3357 return instance->GetStylusInfo ();
3361 StylusPointCollection *
3362 mouse_event_args_get_stylus_points (MouseEventArgs *instance, UIElement *ink_presenter)
3364 if (instance == NULL)
3365 return NULL;
3367 return instance->GetStylusPoints (ink_presenter);
3371 MouseEventArgs *
3372 mouse_event_args_new (void)
3374 return new MouseEventArgs ();
3379 * MouseWheelEventArgs
3382 mouse_wheel_event_args_get_wheel_delta (MouseWheelEventArgs *instance)
3384 if (instance == NULL)
3385 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3386 return (int) 0;
3388 return instance->GetWheelDelta ();
3392 MouseWheelEventArgs *
3393 mouse_wheel_event_args_new (void)
3395 return new MouseWheelEventArgs ();
3400 * MultiScaleImage
3402 Point
3403 multi_scale_image_element_to_logical_point (MultiScaleImage *instance, Point elementPoint)
3405 if (instance == NULL)
3406 return Point (0, 0);
3408 return instance->ElementToLogicalPoint (elementPoint);
3412 void
3413 multi_scale_image_emit_image_failed (MultiScaleImage *instance)
3415 if (instance == NULL)
3416 return;
3418 instance->EmitImageFailed ();
3422 void
3423 multi_scale_image_emit_image_open_failed (MultiScaleImage *instance)
3425 if (instance == NULL)
3426 return;
3428 instance->EmitImageOpenFailed ();
3432 void
3433 multi_scale_image_emit_motion_finished (MultiScaleImage *instance)
3435 if (instance == NULL)
3436 return;
3438 instance->EmitMotionFinished ();
3442 void
3443 multi_scale_image_handle_dz_parsed (MultiScaleImage *instance)
3445 if (instance == NULL)
3446 return;
3448 instance->HandleDzParsed ();
3452 void
3453 multi_scale_image_invalidate_tile_layer (MultiScaleImage *instance, int level, int tilePositionX, int tilePositionY, int tileLayer)
3455 if (instance == NULL)
3456 return;
3458 instance->InvalidateTileLayer (level, tilePositionX, tilePositionY, tileLayer);
3462 Point
3463 multi_scale_image_logical_to_element_point (MultiScaleImage *instance, Point logicalPoint)
3465 if (instance == NULL)
3466 return Point (0, 0);
3468 return instance->LogicalToElementPoint (logicalPoint);
3472 MultiScaleImage *
3473 multi_scale_image_new (void)
3475 return new MultiScaleImage ();
3479 void
3480 multi_scale_image_on_source_property_changed (MultiScaleImage *instance)
3482 if (instance == NULL)
3483 return;
3485 instance->OnSourcePropertyChanged ();
3489 void
3490 multi_scale_image_zoom_about_logical_point (MultiScaleImage *instance, double zoomIncrementFactor, double zoomCenterLogicalX, double zoomCenterLogicalY)
3492 if (instance == NULL)
3493 return;
3495 instance->ZoomAboutLogicalPoint (zoomIncrementFactor, zoomCenterLogicalX, zoomCenterLogicalY);
3500 * MultiScaleSubImage
3502 gint32
3503 multi_scale_sub_image_get_zindex (MultiScaleSubImage *instance)
3505 if (instance == NULL)
3506 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3507 return (gint32) 0;
3509 return instance->GetZIndex ();
3513 MultiScaleSubImage *
3514 multi_scale_sub_image_new (void)
3516 return new MultiScaleSubImage ();
3521 * MultiScaleSubImageCollection
3523 MultiScaleSubImageCollection *
3524 multi_scale_sub_image_collection_new (void)
3526 return new MultiScaleSubImageCollection ();
3531 * MultiScaleTileSource
3533 void
3534 multi_scale_tile_source_invalidate_tile_layer (MultiScaleTileSource *instance, int level, int tilePositionX, int tilePositionY, int tileLayer)
3536 if (instance == NULL)
3537 return;
3539 instance->InvalidateTileLayer (level, tilePositionX, tilePositionY, tileLayer);
3543 MultiScaleTileSource *
3544 multi_scale_tile_source_new (void)
3546 return new MultiScaleTileSource ();
3550 void
3551 multi_scale_tile_source_set_image_uri_func (MultiScaleTileSource *instance, get_image_uri_func func)
3553 if (instance == NULL)
3554 return;
3556 instance->set_image_uri_func (func);
3561 * NameScope
3563 NameScope *
3564 name_scope_new (void)
3566 return new NameScope ();
3571 * ObjectAnimationUsingKeyFrames
3573 ObjectAnimationUsingKeyFrames *
3574 object_animation_using_key_frames_new (void)
3576 return new ObjectAnimationUsingKeyFrames ();
3581 * ObjectKeyFrame
3583 ObjectKeyFrame *
3584 object_key_frame_new (void)
3586 return new ObjectKeyFrame ();
3591 * ObjectKeyFrameCollection
3593 ObjectKeyFrameCollection *
3594 object_key_frame_collection_new (void)
3596 return new ObjectKeyFrameCollection ();
3601 * OutOfBrowserSettings
3603 OutOfBrowserSettings *
3604 out_of_browser_settings_new (void)
3606 return new OutOfBrowserSettings ();
3611 * Panel
3613 Panel *
3614 panel_new (void)
3616 return new Panel ();
3621 * ParallelTimeline
3623 ParallelTimeline *
3624 parallel_timeline_new (void)
3626 return new ParallelTimeline ();
3631 * PasswordBox
3633 PasswordBox *
3634 password_box_new (void)
3636 return new PasswordBox ();
3641 * Path
3643 Path *
3644 path_new (void)
3646 return new Path ();
3651 * PathFigure
3653 PathFigure *
3654 path_figure_new (void)
3656 return new PathFigure ();
3661 * PathFigureCollection
3663 PathFigureCollection *
3664 path_figure_collection_new (void)
3666 return new PathFigureCollection ();
3671 * PathGeometry
3673 PathGeometry *
3674 path_geometry_new (void)
3676 return new PathGeometry ();
3681 * PathSegment
3683 PathSegment *
3684 path_segment_new (void)
3686 return new PathSegment ();
3691 * PathSegmentCollection
3693 PathSegmentCollection *
3694 path_segment_collection_new (void)
3696 return new PathSegmentCollection ();
3701 * PointAnimation
3703 PointAnimation *
3704 point_animation_new (void)
3706 return new PointAnimation ();
3711 * PointAnimationUsingKeyFrames
3713 PointAnimationUsingKeyFrames *
3714 point_animation_using_key_frames_new (void)
3716 return new PointAnimationUsingKeyFrames ();
3721 * PointCollection
3723 PointCollection *
3724 point_collection_new (void)
3726 return new PointCollection ();
3731 * PointKeyFrame
3733 PointKeyFrame *
3734 point_key_frame_new (void)
3736 return new PointKeyFrame ();
3741 * PointKeyFrameCollection
3743 PointKeyFrameCollection *
3744 point_key_frame_collection_new (void)
3746 return new PointKeyFrameCollection ();
3751 * PolyBezierSegment
3753 PolyBezierSegment *
3754 poly_bezier_segment_new (void)
3756 return new PolyBezierSegment ();
3760 void
3761 poly_bezier_segment_set_points (PolyBezierSegment *instance, PointCollection *points)
3763 if (instance == NULL)
3764 return;
3766 instance->SetPoints (points);
3771 * Polygon
3773 Polygon *
3774 polygon_new (void)
3776 return new Polygon ();
3781 * Polyline
3783 Polyline *
3784 polyline_new (void)
3786 return new Polyline ();
3791 * PolyLineSegment
3793 PolyLineSegment *
3794 poly_line_segment_new (void)
3796 return new PolyLineSegment ();
3801 * PolyQuadraticBezierSegment
3803 PolyQuadraticBezierSegment *
3804 poly_quadratic_bezier_segment_new (void)
3806 return new PolyQuadraticBezierSegment ();
3811 * Popup
3813 Popup *
3814 popup_new (void)
3816 return new Popup ();
3821 * PowerEase
3823 double
3824 power_ease_ease_in_core (PowerEase *instance, double normalizedTime)
3826 if (instance == NULL)
3827 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3828 return (double) 0;
3830 return instance->EaseInCore (normalizedTime);
3834 PowerEase *
3835 power_ease_new (void)
3837 return new PowerEase ();
3842 * PropertyChangedEventArgs
3845 property_changed_event_args_get_id (PropertyChangedEventArgs *instance)
3847 if (instance == NULL)
3848 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3849 return (int) 0;
3851 return instance->GetId ();
3855 Value *
3856 property_changed_event_args_get_new_value (PropertyChangedEventArgs *instance)
3858 if (instance == NULL)
3859 return NULL;
3861 return instance->GetNewValue ();
3865 Value *
3866 property_changed_event_args_get_old_value (PropertyChangedEventArgs *instance)
3868 if (instance == NULL)
3869 return NULL;
3871 return instance->GetOldValue ();
3875 DependencyProperty *
3876 property_changed_event_args_get_property (PropertyChangedEventArgs *instance)
3878 if (instance == NULL)
3879 return NULL;
3881 return instance->GetProperty ();
3886 * QuadraticBezierSegment
3888 QuadraticBezierSegment *
3889 quadratic_bezier_segment_new (void)
3891 return new QuadraticBezierSegment ();
3896 * QuadraticEase
3898 double
3899 quadratic_ease_ease_in_core (QuadraticEase *instance, double normalizedTime)
3901 if (instance == NULL)
3902 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3903 return (double) 0;
3905 return instance->EaseInCore (normalizedTime);
3909 QuadraticEase *
3910 quadratic_ease_new (void)
3912 return new QuadraticEase ();
3917 * QuarticEase
3919 double
3920 quartic_ease_ease_in_core (QuarticEase *instance, double normalizedTime)
3922 if (instance == NULL)
3923 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3924 return (double) 0;
3926 return instance->EaseInCore (normalizedTime);
3930 QuarticEase *
3931 quartic_ease_new (void)
3933 return new QuarticEase ();
3938 * QuinticEase
3940 double
3941 quintic_ease_ease_in_core (QuinticEase *instance, double normalizedTime)
3943 if (instance == NULL)
3944 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3945 return (double) 0;
3947 return instance->EaseInCore (normalizedTime);
3951 QuinticEase *
3952 quintic_ease_new (void)
3954 return new QuinticEase ();
3959 * RadialGradientBrush
3961 RadialGradientBrush *
3962 radial_gradient_brush_new (void)
3964 return new RadialGradientBrush ();
3969 * Rectangle
3971 Rectangle *
3972 rectangle_new (void)
3974 return new Rectangle ();
3979 * RectangleGeometry
3981 RectangleGeometry *
3982 rectangle_geometry_new (void)
3984 return new RectangleGeometry ();
3989 * RenderingEventArgs
3991 TimeSpan
3992 rendering_event_args_get_rendering_time (RenderingEventArgs *instance)
3994 if (instance == NULL)
3995 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
3996 return (TimeSpan) 0;
3998 return instance->GetRenderingTime ();
4003 * ResourceDictionary
4005 bool
4006 resource_dictionary_add_with_error (ResourceDictionary *instance, const char *key, Value *value, MoonError *error)
4008 if (instance == NULL)
4009 return false;
4011 if (error == NULL)
4012 g_warning ("Moonlight: Called resource_dictionary_add_with_error () with error == NULL.");
4013 return instance->AddWithError (key, value, error);
4017 bool
4018 resource_dictionary_clear (ResourceDictionary *instance)
4020 if (instance == NULL)
4021 return false;
4023 return instance->Clear ();
4027 bool
4028 resource_dictionary_contains_key (ResourceDictionary *instance, const char *key)
4030 if (instance == NULL)
4031 return false;
4033 return instance->ContainsKey (key);
4037 Value *
4038 resource_dictionary_get (ResourceDictionary *instance, const char *key, bool *exists)
4040 if (instance == NULL)
4041 return NULL;
4043 return instance->Get (key, exists);
4047 bool
4048 resource_dictionary_remove (ResourceDictionary *instance, const char *key)
4050 if (instance == NULL)
4051 return false;
4053 return instance->Remove (key);
4057 ResourceDictionary *
4058 resource_dictionary_new (void)
4060 return new ResourceDictionary ();
4064 bool
4065 resource_dictionary_set (ResourceDictionary *instance, const char *key, Value *value)
4067 if (instance == NULL)
4068 return false;
4070 return instance->Set (key, value);
4075 * ResourceDictionaryCollection
4077 ResourceDictionaryCollection *
4078 resource_dictionary_collection_new (void)
4080 return new ResourceDictionaryCollection ();
4085 * RotateTransform
4087 RotateTransform *
4088 rotate_transform_new (void)
4090 return new RotateTransform ();
4095 * RoutedEventArgs
4097 bool
4098 routed_event_args_get_handled (RoutedEventArgs *instance)
4100 if (instance == NULL)
4101 return false;
4103 return instance->GetHandled ();
4107 DependencyObject *
4108 routed_event_args_get_source (RoutedEventArgs *instance)
4110 if (instance == NULL)
4111 return NULL;
4113 return instance->GetSource ();
4117 RoutedEventArgs *
4118 routed_event_args_new (void)
4120 return new RoutedEventArgs ();
4124 void
4125 routed_event_args_set_handled (RoutedEventArgs *instance, bool handled)
4127 if (instance == NULL)
4128 return;
4130 instance->SetHandled (handled);
4134 void
4135 routed_event_args_set_source (RoutedEventArgs *instance, DependencyObject *el)
4137 if (instance == NULL)
4138 return;
4140 instance->SetSource (el);
4145 * RowDefinition
4147 RowDefinition *
4148 row_definition_new (void)
4150 return new RowDefinition ();
4155 * RowDefinitionCollection
4157 RowDefinitionCollection *
4158 row_definition_collection_new (void)
4160 return new RowDefinitionCollection ();
4165 * Run
4167 Run *
4168 run_new (void)
4170 return new Run ();
4175 * ScaleTransform
4177 ScaleTransform *
4178 scale_transform_new (void)
4180 return new ScaleTransform ();
4185 * Setter
4187 Setter *
4188 setter_new (void)
4190 return new Setter ();
4195 * SetterBase
4197 SetterBase *
4198 setter_base_new (void)
4200 return new SetterBase ();
4205 * SetterBaseCollection
4207 SetterBaseCollection *
4208 setter_base_collection_new (void)
4210 return new SetterBaseCollection ();
4215 * Shape
4217 Transform *
4218 shape_get_geometry_transform (Shape *instance)
4220 if (instance == NULL)
4221 return NULL;
4223 return instance->GetGeometryTransform ();
4227 Shape *
4228 shape_new (void)
4230 return new Shape ();
4235 * SineEase
4237 double
4238 sine_ease_ease_in_core (SineEase *instance, double normalizedTime)
4240 if (instance == NULL)
4241 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4242 return (double) 0;
4244 return instance->EaseInCore (normalizedTime);
4248 SineEase *
4249 sine_ease_new (void)
4251 return new SineEase ();
4256 * SizeChangedEventArgs
4258 SizeChangedEventArgs *
4259 size_changed_event_args_new (void)
4261 return new SizeChangedEventArgs ();
4266 * SkewTransform
4268 SkewTransform *
4269 skew_transform_new (void)
4271 return new SkewTransform ();
4276 * SolidColorBrush
4278 SolidColorBrush *
4279 solid_color_brush_new (void)
4281 return new SolidColorBrush ();
4286 * SplineColorKeyFrame
4288 SplineColorKeyFrame *
4289 spline_color_key_frame_new (void)
4291 return new SplineColorKeyFrame ();
4296 * SplineDoubleKeyFrame
4298 SplineDoubleKeyFrame *
4299 spline_double_key_frame_new (void)
4301 return new SplineDoubleKeyFrame ();
4306 * SplinePointKeyFrame
4308 SplinePointKeyFrame *
4309 spline_point_key_frame_new (void)
4311 return new SplinePointKeyFrame ();
4316 * Storyboard
4318 bool
4319 storyboard_begin_with_error (Storyboard *instance, MoonError *error)
4321 if (instance == NULL)
4322 return false;
4324 if (error == NULL)
4325 g_warning ("Moonlight: Called storyboard_begin_with_error () with error == NULL.");
4326 return instance->BeginWithError (error);
4331 storyboard_get_current_state (Storyboard *instance)
4333 if (instance == NULL)
4334 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4335 return (int) 0;
4337 return instance->GetCurrentState ();
4341 TimeSpan
4342 storyboard_get_current_time (Storyboard *instance)
4344 if (instance == NULL)
4345 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4346 return (TimeSpan) 0;
4348 return instance->GetCurrentTime ();
4352 DependencyProperty *
4353 storyboard_get_target_dependency_property (Storyboard *instance)
4355 if (instance == NULL)
4356 return NULL;
4358 return instance->GetTargetDependencyProperty ();
4362 void
4363 storyboard_pause_with_error (Storyboard *instance, MoonError *error)
4365 if (instance == NULL)
4366 return;
4368 if (error == NULL)
4369 g_warning ("Moonlight: Called storyboard_pause_with_error () with error == NULL.");
4370 instance->PauseWithError (error);
4374 void
4375 storyboard_resume_with_error (Storyboard *instance, MoonError *error)
4377 if (instance == NULL)
4378 return;
4380 if (error == NULL)
4381 g_warning ("Moonlight: Called storyboard_resume_with_error () with error == NULL.");
4382 instance->ResumeWithError (error);
4386 void
4387 storyboard_seek_aligned_to_last_tick_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4389 if (instance == NULL)
4390 return;
4392 if (error == NULL)
4393 g_warning ("Moonlight: Called storyboard_seek_aligned_to_last_tick_with_error () with error == NULL.");
4394 instance->SeekAlignedToLastTickWithError (timespan, error);
4398 void
4399 storyboard_seek_with_error (Storyboard *instance, TimeSpan timespan, MoonError *error)
4401 if (instance == NULL)
4402 return;
4404 if (error == NULL)
4405 g_warning ("Moonlight: Called storyboard_seek_with_error () with error == NULL.");
4406 instance->SeekWithError (timespan, error);
4410 void
4411 storyboard_skip_to_fill_with_error (Storyboard *instance, MoonError *error)
4413 if (instance == NULL)
4414 return;
4416 if (error == NULL)
4417 g_warning ("Moonlight: Called storyboard_skip_to_fill_with_error () with error == NULL.");
4418 instance->SkipToFillWithError (error);
4422 void
4423 storyboard_stop_with_error (Storyboard *instance, MoonError *error)
4425 if (instance == NULL)
4426 return;
4428 if (error == NULL)
4429 g_warning ("Moonlight: Called storyboard_stop_with_error () with error == NULL.");
4430 instance->StopWithError (error);
4434 Storyboard *
4435 storyboard_new (void)
4437 return new Storyboard ();
4442 * Stroke
4444 bool
4445 stroke_hit_test (Stroke *instance, StylusPointCollection *stylusPoints)
4447 if (instance == NULL)
4448 return false;
4450 return instance->HitTest (stylusPoints);
4454 Stroke *
4455 stroke_new (void)
4457 return new Stroke ();
4462 * StrokeCollection
4464 StrokeCollection *
4465 stroke_collection_hit_test (StrokeCollection *instance, StylusPointCollection *stylusPoints)
4467 if (instance == NULL)
4468 return NULL;
4470 return instance->HitTest (stylusPoints);
4474 StrokeCollection *
4475 stroke_collection_new (void)
4477 return new StrokeCollection ();
4482 * Style
4484 void
4485 style_seal (Style *instance)
4487 if (instance == NULL)
4488 return;
4490 instance->Seal ();
4494 Style *
4495 style_new (void)
4497 return new Style ();
4502 * StylusInfo
4504 StylusInfo *
4505 stylus_info_new (void)
4507 return new StylusInfo ();
4512 * StylusPoint
4514 double
4515 stylus_point_get_pressure_factor (StylusPoint *instance)
4517 if (instance == NULL)
4518 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4519 return (double) 0;
4521 return instance->GetPressureFactor ();
4525 double
4526 stylus_point_get_x (StylusPoint *instance)
4528 if (instance == NULL)
4529 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4530 return (double) 0;
4532 return instance->GetX ();
4536 double
4537 stylus_point_get_y (StylusPoint *instance)
4539 if (instance == NULL)
4540 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4541 return (double) 0;
4543 return instance->GetY ();
4547 void
4548 stylus_point_set_pressure_factor (StylusPoint *instance, double factor)
4550 if (instance == NULL)
4551 return;
4553 instance->SetPressureFactor (factor);
4557 void
4558 stylus_point_set_x (StylusPoint *instance, double x)
4560 if (instance == NULL)
4561 return;
4563 instance->SetX (x);
4567 void
4568 stylus_point_set_y (StylusPoint *instance, double y)
4570 if (instance == NULL)
4571 return;
4573 instance->SetY (y);
4577 StylusPoint *
4578 stylus_point_new (void)
4580 return new StylusPoint ();
4585 * StylusPointCollection
4587 double
4588 stylus_point_collection_add_stylus_points (StylusPointCollection *instance, StylusPointCollection *stylusPointCollection)
4590 if (instance == NULL)
4591 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
4592 return (double) 0;
4594 return instance->AddStylusPoints (stylusPointCollection);
4598 StylusPointCollection *
4599 stylus_point_collection_new (void)
4601 return new StylusPointCollection ();
4606 * Surface
4608 void
4609 surface_attach (Surface *instance, UIElement *toplevel)
4611 if (instance == NULL)
4612 return;
4614 instance->Attach (toplevel);
4618 Downloader *
4619 surface_create_downloader (Surface *instance)
4621 if (instance == NULL)
4622 return NULL;
4624 return instance->CreateDownloader ();
4628 void
4629 surface_emit_error (Surface *instance, int number, int code, const char *message)
4631 if (instance == NULL)
4632 return;
4634 instance->EmitError (number, code, message);
4638 Color *
4639 surface_get_background_color (Surface *instance)
4641 if (instance == NULL)
4642 return NULL;
4644 return instance->GetBackgroundColor ();
4648 UIElement *
4649 surface_get_focused_element (Surface *instance)
4651 if (instance == NULL)
4652 return NULL;
4654 return instance->GetFocusedElement ();
4658 bool
4659 surface_get_full_screen (Surface *instance)
4661 if (instance == NULL)
4662 return false;
4664 return instance->GetFullScreen ();
4668 TimeManager *
4669 surface_get_time_manager (Surface *instance)
4671 if (instance == NULL)
4672 return NULL;
4674 return instance->GetTimeManager ();
4678 UIElement *
4679 surface_get_toplevel (Surface *instance)
4681 if (instance == NULL)
4682 return NULL;
4684 return instance->GetToplevel ();
4688 MoonWindow *
4689 surface_get_window (Surface *instance)
4691 if (instance == NULL)
4692 return NULL;
4694 return instance->GetWindow ();
4698 bool
4699 surface_in_main_thread (void)
4701 return Surface::InMainThread ();
4705 bool
4706 surface_is_loaded (Surface *instance)
4708 if (instance == NULL)
4709 return false;
4711 return instance->IsLoaded ();
4715 bool
4716 surface_is_user_initiated_event (Surface *instance)
4718 if (instance == NULL)
4719 return false;
4721 return instance->IsUserInitiatedEvent ();
4725 bool
4726 surface_is_version_supported (const char *version)
4728 return Surface::IsVersionSupported (version);
4732 void
4733 surface_paint (Surface *instance, cairo_t *ctx, int x, int y, int width, int height)
4735 if (instance == NULL)
4736 return;
4738 instance->Paint (ctx, x, y, width, height);
4742 void
4743 surface_resize (Surface *instance, int width, int height)
4745 if (instance == NULL)
4746 return;
4748 instance->Resize (width, height);
4752 void
4753 surface_set_full_screen (Surface *instance, bool value)
4755 if (instance == NULL)
4756 return;
4758 instance->SetFullScreen (value);
4762 Surface *
4763 surface_new (MoonWindow *window)
4765 return new Surface (window);
4770 * TabNavigationWalker
4772 bool
4773 tab_navigation_walker_focus (UIElement *element, bool forwards)
4775 return TabNavigationWalker::Focus (element, forwards);
4780 * TextBlock
4782 TextBlock *
4783 text_block_new (void)
4785 return new TextBlock ();
4790 * TextBox
4792 TextBox *
4793 text_box_new (void)
4795 return new TextBox ();
4800 * TextBoxBase
4802 void
4803 text_box_base_on_got_focus (TextBoxBase *instance, RoutedEventArgs *args)
4805 if (instance == NULL)
4806 return;
4808 instance->OnGotFocus (args);
4812 void
4813 text_box_base_on_key_down (TextBoxBase *instance, KeyEventArgs *args)
4815 if (instance == NULL)
4816 return;
4818 instance->OnKeyDown (args);
4822 void
4823 text_box_base_on_key_up (TextBoxBase *instance, KeyEventArgs *args)
4825 if (instance == NULL)
4826 return;
4828 instance->OnKeyUp (args);
4832 void
4833 text_box_base_on_lost_focus (TextBoxBase *instance, RoutedEventArgs *args)
4835 if (instance == NULL)
4836 return;
4838 instance->OnLostFocus (args);
4842 void
4843 text_box_base_on_mouse_left_button_down (TextBoxBase *instance, MouseButtonEventArgs *args)
4845 if (instance == NULL)
4846 return;
4848 instance->OnMouseLeftButtonDown (args);
4852 void
4853 text_box_base_on_mouse_left_button_up (TextBoxBase *instance, MouseButtonEventArgs *args)
4855 if (instance == NULL)
4856 return;
4858 instance->OnMouseLeftButtonUp (args);
4862 void
4863 text_box_base_on_mouse_move (TextBoxBase *instance, MouseEventArgs *args)
4865 if (instance == NULL)
4866 return;
4868 instance->OnMouseMove (args);
4872 void
4873 text_box_base_post_on_key_down (TextBoxBase *instance, KeyEventArgs *args)
4875 if (instance == NULL)
4876 return;
4878 instance->PostOnKeyDown (args);
4882 void
4883 text_box_base_select_all (TextBoxBase *instance)
4885 if (instance == NULL)
4886 return;
4888 instance->SelectAll ();
4892 bool
4893 text_box_base_select_with_error (TextBoxBase *instance, int start, int length, MoonError *error)
4895 if (instance == NULL)
4896 return false;
4898 if (error == NULL)
4899 g_warning ("Moonlight: Called text_box_base_select_with_error () with error == NULL.");
4900 return instance->SelectWithError (start, length, error);
4905 * TextBoxView
4907 TextBoxView *
4908 text_box_view_new (void)
4910 return new TextBoxView ();
4915 * TextChangedEventArgs
4917 TextChangedEventArgs *
4918 text_changed_event_args_new (void)
4920 return new TextChangedEventArgs ();
4925 * TileBrush
4927 TileBrush *
4928 tile_brush_new (void)
4930 return new TileBrush ();
4935 * Timeline
4937 DependencyObject *
4938 timeline_get_manual_target (Timeline *instance)
4940 if (instance == NULL)
4941 return NULL;
4943 return instance->GetManualTarget ();
4947 void
4948 timeline_set_manual_target (Timeline *instance, DependencyObject *o)
4950 if (instance == NULL)
4951 return;
4953 instance->SetManualTarget (o);
4957 Timeline *
4958 timeline_new (void)
4960 return new Timeline ();
4965 * TimelineCollection
4967 TimelineCollection *
4968 timeline_collection_new (void)
4970 return new TimelineCollection ();
4975 * TimelineGroup
4977 TimelineGroup *
4978 timeline_group_new (void)
4980 return new TimelineGroup ();
4985 * TimelineMarker
4987 TimelineMarker *
4988 timeline_marker_new (void)
4990 return new TimelineMarker ();
4995 * TimelineMarkerCollection
4997 TimelineMarkerCollection *
4998 timeline_marker_collection_new (void)
5000 return new TimelineMarkerCollection ();
5005 * TimeManager
5007 void
5008 time_manager_add_dispatcher_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
5010 if (instance == NULL)
5011 return;
5013 instance->AddDispatcherCall (handler, tick_data);
5017 void
5018 time_manager_add_tick_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
5020 if (instance == NULL)
5021 return;
5023 instance->AddTickCall (handler, tick_data);
5027 guint
5028 time_manager_add_timeout (TimeManager *instance, gint priority, guint ms_interval, GSourceFunc func, gpointer timeout_data)
5030 if (instance == NULL)
5031 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5032 return (guint) 0;
5034 return instance->AddTimeout (priority, ms_interval, func, timeout_data);
5039 time_manager_get_maximum_refresh_rate (TimeManager *instance)
5041 if (instance == NULL)
5042 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5043 return (int) 0;
5045 return instance->GetMaximumRefreshRate ();
5049 void
5050 time_manager_remove_tick_call (TimeManager *instance, TickCallHandler handler, EventObject *tick_data)
5052 if (instance == NULL)
5053 return;
5055 instance->RemoveTickCall (handler, tick_data);
5059 void
5060 time_manager_remove_timeout (TimeManager *instance, guint timeout_id)
5062 if (instance == NULL)
5063 return;
5065 instance->RemoveTimeout (timeout_id);
5069 void
5070 time_manager_set_maximum_refresh_rate (TimeManager *instance, int hz)
5072 if (instance == NULL)
5073 return;
5075 instance->SetMaximumRefreshRate (hz);
5080 * Transform
5082 Transform *
5083 transform_new (void)
5085 return new Transform ();
5090 * TransformCollection
5092 TransformCollection *
5093 transform_collection_new (void)
5095 return new TransformCollection ();
5100 * TransformGroup
5102 TransformGroup *
5103 transform_group_new (void)
5105 return new TransformGroup ();
5110 * TranslateTransform
5112 TranslateTransform *
5113 translate_transform_new (void)
5115 return new TranslateTransform ();
5120 * TriggerAction
5122 void
5123 trigger_action_fire (TriggerAction *instance)
5125 if (instance == NULL)
5126 return;
5128 instance->Fire ();
5132 TriggerAction *
5133 trigger_action_new (void)
5135 return new TriggerAction ();
5140 * TriggerActionCollection
5142 TriggerActionCollection *
5143 trigger_action_collection_new (void)
5145 return new TriggerActionCollection ();
5150 * TriggerBase
5152 TriggerBase *
5153 trigger_base_new (void)
5155 return new TriggerBase ();
5160 * TriggerCollection
5162 TriggerCollection *
5163 trigger_collection_new (void)
5165 return new TriggerCollection ();
5170 * Types
5172 void
5173 types_free (Types *instance)
5175 delete instance;
5179 Type *
5180 types_find (Types *instance, int type)
5182 if (instance == NULL)
5183 return NULL;
5185 return instance->Find ((Type::Kind) type);
5190 types_register_type (Types *instance, const char *name, void *gc_handle, int parent, bool is_interface, bool ctor_visible, int *interfaces, int interface_count)
5192 if (instance == NULL)
5193 return Type::INVALID;
5195 return instance->RegisterType (name, gc_handle, (Type::Kind) parent, is_interface, ctor_visible, (Type::Kind*) interfaces, interface_count);
5199 Types *
5200 types_new (void)
5202 return new Types ();
5207 * UIElement
5209 void
5210 uielement_arrange (UIElement *instance, Rect finalRect)
5212 if (instance == NULL)
5213 return;
5215 instance->Arrange (finalRect);
5219 bool
5220 uielement_capture_mouse (UIElement *instance)
5222 if (instance == NULL)
5223 return false;
5225 return instance->CaptureMouse ();
5229 void
5230 uielement_element_added (UIElement *instance, UIElement *obj)
5232 if (instance == NULL)
5233 return;
5235 instance->ElementAdded (obj);
5239 void
5240 uielement_element_removed (UIElement *instance, UIElement *obj)
5242 if (instance == NULL)
5243 return;
5245 instance->ElementRemoved (obj);
5249 void
5250 uielement_find_elements_in_host_coordinates_p (UIElement *instance, Point p, HitTestCollection *uielement_list)
5252 if (instance == NULL)
5253 return;
5255 instance->FindElementsInHostCoordinates_p (p, uielement_list);
5259 void
5260 uielement_find_elements_in_host_coordinates_r (UIElement *instance, Rect p, HitTestCollection *uielement_list)
5262 if (instance == NULL)
5263 return;
5265 instance->FindElementsInHostCoordinates_r (p, uielement_list);
5269 bool
5270 uielement_focus (UIElement *instance, bool recurse)
5272 if (instance == NULL)
5273 return false;
5275 return instance->Focus (recurse);
5279 Size
5280 uielement_get_desired_size (UIElement *instance)
5282 if (instance == NULL)
5283 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5284 return (Size) 0;
5286 return instance->GetDesiredSize ();
5290 Size
5291 uielement_get_render_size (UIElement *instance)
5293 if (instance == NULL)
5294 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5295 return (Size) 0;
5297 return instance->GetRenderSize ();
5301 DependencyObject *
5302 uielement_get_subtree_object (UIElement *instance)
5304 if (instance == NULL)
5305 return NULL;
5307 return instance->GetSubtreeObject ();
5311 GeneralTransform *
5312 uielement_get_transform_to_uielement_with_error (UIElement *instance, UIElement *to_element, MoonError *error)
5314 if (instance == NULL)
5315 return NULL;
5317 if (error == NULL)
5318 g_warning ("Moonlight: Called uielement_get_transform_to_uielement_with_error () with error == NULL.");
5319 return instance->GetTransformToUIElementWithError (to_element, error);
5323 UIElement *
5324 uielement_get_visual_parent (UIElement *instance)
5326 if (instance == NULL)
5327 return NULL;
5329 return instance->GetVisualParent ();
5333 void
5334 uielement_invalidate (UIElement *instance)
5336 if (instance == NULL)
5337 return;
5339 instance->Invalidate ();
5343 void
5344 uielement_invalidate_arrange (UIElement *instance)
5346 if (instance == NULL)
5347 return;
5349 instance->InvalidateArrange ();
5353 void
5354 uielement_invalidate_measure (UIElement *instance)
5356 if (instance == NULL)
5357 return;
5359 instance->InvalidateMeasure ();
5363 void
5364 uielement_measure (UIElement *instance, Size availableSize)
5366 if (instance == NULL)
5367 return;
5369 instance->Measure (availableSize);
5373 void
5374 uielement_release_mouse_capture (UIElement *instance)
5376 if (instance == NULL)
5377 return;
5379 instance->ReleaseMouseCapture ();
5383 void
5384 uielement_set_subtree_object (UIElement *instance, DependencyObject *value)
5386 if (instance == NULL)
5387 return;
5389 instance->SetSubtreeObject (value);
5393 void
5394 uielement_update_layout (UIElement *instance)
5396 if (instance == NULL)
5397 return;
5399 instance->UpdateLayout ();
5404 * UIElementCollection
5406 UIElementCollection *
5407 uielement_collection_new (void)
5409 return new UIElementCollection ();
5414 * UnmanagedMatrix
5416 UnmanagedMatrix *
5417 unmanaged_matrix_new (void)
5419 return new UnmanagedMatrix ();
5424 * Uri
5426 bool
5427 uri_equals (const Uri *left, const Uri *right)
5429 return Uri::Equals (left, right);
5433 void
5434 uri_free (Uri *instance)
5436 if (instance == NULL)
5437 return;
5439 instance->Free ();
5443 guint
5444 uri_get_hash_code (Uri *instance)
5446 if (instance == NULL)
5447 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5448 return (guint) 0;
5450 return instance->GetHashCode ();
5454 bool
5455 uri_parse (Uri *instance, const char *uri, bool allow_trailing_sep)
5457 if (instance == NULL)
5458 return false;
5460 return instance->Parse (uri, allow_trailing_sep);
5465 * UserControl
5467 UserControl *
5468 user_control_new (void)
5470 return new UserControl ();
5475 * VideoBrush
5477 void
5478 video_brush_set_source (VideoBrush *instance, MediaElement *source)
5480 if (instance == NULL)
5481 return;
5483 instance->SetSource (source);
5487 VideoBrush *
5488 video_brush_new (void)
5490 return new VideoBrush ();
5495 * VideoStream
5497 guint32
5498 video_stream_get_height (VideoStream *instance)
5500 if (instance == NULL)
5501 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5502 return (guint32) 0;
5504 return instance->GetHeight ();
5508 guint32
5509 video_stream_get_width (VideoStream *instance)
5511 if (instance == NULL)
5512 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5513 return (guint32) 0;
5515 return instance->GetWidth ();
5519 VideoStream *
5520 video_stream_new (Media *media, int codec_id, guint32 width, guint32 height, guint64 duration, gpointer extra_data, guint32 extra_data_size)
5522 return new VideoStream (media, codec_id, width, height, duration, extra_data, extra_data_size);
5527 * VisualBrush
5529 VisualBrush *
5530 visual_brush_new (void)
5532 return new VisualBrush ();
5537 * WindowSettings
5539 WindowSettings *
5540 window_settings_new (void)
5542 return new WindowSettings ();
5547 * WriteableBitmap
5549 gpointer
5550 writeable_bitmap_initialize_from_bitmap_source (WriteableBitmap *instance, BitmapSource *source)
5552 if (instance == NULL)
5553 // Need to find a proper way to get the default value for the specified type and return that if instance is NULL.
5554 return (gpointer) 0;
5556 return instance->InitializeFromBitmapSource (source);
5560 void
5561 writeable_bitmap_lock (WriteableBitmap *instance)
5563 if (instance == NULL)
5564 return;
5566 instance->Lock ();
5570 void
5571 writeable_bitmap_render (WriteableBitmap *instance, UIElement *element, Transform *transform)
5573 if (instance == NULL)
5574 return;
5576 instance->Render (element, transform);
5580 void
5581 writeable_bitmap_unlock (WriteableBitmap *instance)
5583 if (instance == NULL)
5584 return;
5586 instance->Unlock ();
5590 WriteableBitmap *
5591 writeable_bitmap_new (void)
5593 return new WriteableBitmap ();
5598 * XamlContext
5600 DependencyObject *
5601 xaml_context_get_template_binding_source (XamlContext *instance)
5603 if (instance == NULL)
5604 return NULL;
5606 return instance->GetTemplateBindingSource ();
5611 * XamlLoader
5613 Value *
5614 xaml_loader_create_from_file_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, int *element_type, MoonError *error)
5616 if (instance == NULL)
5617 return NULL;
5619 if (error == NULL)
5620 g_warning ("Moonlight: Called xaml_loader_create_from_file_with_error () with error == NULL.");
5621 return instance->CreateFromFileWithError (xaml, create_namescope, (Type::Kind*) element_type, error);
5625 Value *
5626 xaml_loader_create_from_string_with_error (XamlLoader *instance, const char *xaml, bool create_namescope, int *element_type, int flags, MoonError *error)
5628 if (instance == NULL)
5629 return NULL;
5631 if (error == NULL)
5632 g_warning ("Moonlight: Called xaml_loader_create_from_string_with_error () with error == NULL.");
5633 return instance->CreateFromStringWithError (xaml, create_namescope, (Type::Kind*) element_type, flags, error);
5637 XamlContext *
5638 xaml_loader_get_context (XamlLoader *instance)
5640 if (instance == NULL)
5641 return NULL;
5643 return instance->GetContext ();
5647 Value *
5648 xaml_loader_hydrate_from_string_with_error (XamlLoader *instance, const char *xaml, Value *obj, bool create_namescope, int *element_type, int flags, MoonError *error)
5650 if (instance == NULL)
5651 return NULL;
5653 if (error == NULL)
5654 g_warning ("Moonlight: Called xaml_loader_hydrate_from_string_with_error () with error == NULL.");
5655 return instance->HydrateFromStringWithError (xaml, obj, create_namescope, (Type::Kind*) element_type, flags, error);
5660 * Xap
5662 char *
5663 xap_unpack (const char *fname)
5665 return Xap::Unpack (fname);