2 * Automatically generated, do not edit this file directly
5 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
7 * type.h: Generated code for the type system.
10 * Moonlight List (moonlight-list@lists.ximian.com)
12 * Copyright 2007 Novell, Inc. (http://www.novell.com)
14 * See the LICENSE file included with the distribution for details.
24 class DependencyObject
;
25 class DependencyProperty
;
29 /* @CBindingRequisite */
30 typedef gint64 TimeSpan
;
31 typedef DependencyObject
*create_inst_func (void);
36 // START_MANAGED_MAPPING
49 ASSEMBLYPART_COLLECTION
,
69 COLLECTIONCHANGEDEVENTARGS
,
70 COLLECTIONITEMCHANGEDEVENTARGS
,
73 COLORANIMATIONUSINGKEYFRAMES
,
75 COLORKEYFRAME_COLLECTION
,
77 COLUMNDEFINITION_COLLECTION
,
78 CONTENTCHANGEDEVENTARGS
,
85 CURSORPOSITIONCHANGEDEVENTARGS
,
87 DEEPZOOMIMAGETILESOURCE
,
89 DEPENDENCY_OBJECT_COLLECTION
,
92 DISCRETECOLORKEYFRAME
,
93 DISCRETEDOUBLEKEYFRAME
,
94 DISCRETEOBJECTKEYFRAME
,
95 DISCRETEPOINTKEYFRAME
,
100 DOUBLEANIMATIONUSINGKEYFRAMES
,
102 DOUBLEKEYFRAME_COLLECTION
,
104 DOWNLOADPROGRESSEVENTARGS
,
108 EASINGDOUBLEKEYFRAME
,
124 EXTERNALPART_COLLECTION
,
144 GRADIENTSTOP_COLLECTION
,
156 ICOMPARABLE_TIMESPAN
,
197 LINEARDOUBLEKEYFRAME
,
203 MANAGED
,// Silverlight 2.0 only
207 MARKERREACHEDEVENTARGS
,
213 MEDIAATTRIBUTE_COLLECTION
,
216 MEDIADISPOSEOBJECTCLOSURE
,
219 MEDIAGETFRAMECLOSURE
,
221 MEDIAMARKERFOUNDCLOSURE
,
223 MEDIAREPORTSEEKCOMPLETEDCLOSURE
,
231 MOUSEBUTTONEVENTARGS
,
237 MULTISCALESUBIMAGE_COLLECTION
,
238 MULTISCALETILESOURCE
,
243 OBJECTANIMATIONUSINGKEYFRAMES
,
245 OBJECTKEYFRAME_COLLECTION
,
246 OUTOFBROWSERSETTINGS
,
249 PARSERERROREVENTARGS
,
254 PATHFIGURE_COLLECTION
,
257 PATHSEGMENT_COLLECTION
,
264 POINTANIMATIONUSINGKEYFRAMES
,
266 POINTKEYFRAME_COLLECTION
,
271 POLYQUADRATICBEZIERSEGMENT
,
276 PROPERTYCHANGEDEVENTARGS
,
279 QUADRATICBEZIERSEGMENT
,
290 RESOURCE_DICTIONARY_COLLECTION
,
294 ROWDEFINITION_COLLECTION
,
299 SETTERBASE_COLLECTION
,
303 SIZECHANGEDEVENTARGS
,
307 SPLINEDOUBLEKEYFRAME
,
316 STYLUSPOINT_COLLECTION
,
322 TEXTBOXMODELCHANGEDEVENTARGS
,
324 TEXTCHANGEDEVENTARGS
,
331 TIMELINEMARKER_COLLECTION
,
336 TRANSFORM_COLLECTION
,
341 TRIGGERACTION_COLLECTION
,
344 UIELEMENT_COLLECTION
,
358 // END_MANAGED_MAPPING
361 static Type
*Find (Deployment
*deployment
, const char *name
);
362 static Type
*Find (const char *name
);
363 static Type
*Find (Deployment
*deployment
, Type::Kind type
);
364 static Type
*Find (Type::Kind type
);
365 static Type
*Find (Deployment
*deployment
, const char *name
, bool ignore_case
);
366 static Type
*Find (const char *name
, bool ignore_case
);
368 bool IsSubclassOf (Type::Kind super
);
369 bool IsSubclassOf (Deployment
*deployment
, Type::Kind super
);
370 static bool IsSubclassOf (Deployment
*deployment
, Type::Kind type
, Type::Kind super
);
371 static bool IsSubclassOf (Type::Kind type
, Type::Kind super
);
373 bool IsAssignableFrom (Type::Kind type
);
374 bool IsAssignableFrom (Deployment
*deployment
, Type::Kind type
);
375 static bool IsAssignableFrom (Deployment
*deployment
, Type::Kind assignable
, Type::Kind type
);
376 static bool IsAssignableFrom (Type::Kind assignable
, Type::Kind type
);
378 int LookupEvent (const char *event_name
);
379 const char *LookupEventName (int id
);
380 DependencyObject
*CreateInstance ();
381 const char *GetContentPropertyName ();
383 DependencyProperty
*LookupProperty (const char *name
);
384 void AddProperty (DependencyProperty
*property
);
386 GHashTable
*CopyProperties (bool inherited
);
388 Type::Kind
GetKind () { return type
; }
389 void SetKind (Type::Kind value
) { type
= value
; }
390 Type::Kind
GetParent () { return parent
; }
391 bool IsValueType () { return is_value_type
; }
392 bool IsInterface () { return is_interface
; }
393 bool IsCustomType () { return type
> LASTTYPE
; }
394 const char *GetName () { return name
; }
395 int GetEventCount () { return total_event_count
; }
396 int GetInterfaceCount () { return interface_count
; }
397 Type::Kind
GetInterface (int i
) { return i
>= 0 && i
< interface_count
? interfaces
[i
] : Type::INVALID
; }
399 bool IsCtorVisible () { return ctor_visible
; }
402 Type (Type::Kind type
, Type::Kind parent
, bool is_value_type
, bool is_interface
,
404 int event_count
, int total_event_count
, const char **events
,
405 int interface_count
, const Type::Kind
*interfaces
, bool ctor_visible
,
406 create_inst_func
*create_inst
, const char *content_property
);
411 Type::Kind type
; // this type
412 Type::Kind parent
; // parent type, INVALID if no parent
413 bool is_value_type
; // if this type is a value type
414 bool is_interface
; // if this type is a value type
416 const char *name
; // The name as it appears in code.
419 Type::Kind
*interfaces
;
421 int event_count
; // number of events in this class
422 int total_event_count
; // number of events in this class and all base classes
423 const char **events
; // the events this class has
425 bool ctor_visible
; // if the type is instantiable in xaml, basically if the managed type has a public default ctor.
426 create_inst_func
*create_inst
; // a function pointer to create an instance of this type
428 const char *content_property
;
430 // The catch here is that SL allows us to register several DPs with the same name,
431 // and when looking up DP on name they seem to return the latest DP registered
433 GHashTable
*properties
; // Registered DependencyProperties for this type
441 ArrayList properties
;
443 void RegisterNativeTypes ();
444 void RegisterNativeProperties ();
447 /* @GenerateCBinding,GeneratePInvoke,Version=2.0 */
449 /* @GenerateCBinding,GeneratePInvoke,Version=2.0 */
452 /* @GenerateCBinding,Version=2.0 */
453 Type::Kind
RegisterType (const char *name
, void *gc_handle
, Type::Kind parent
, bool is_interface
, bool ctor_visible
, Type::Kind
*interfaces
, int interface_count
);
455 void AddProperty (DependencyProperty
*property
);
456 DependencyProperty
*GetProperty (int id
);
458 /* @GenerateCBinding,GeneratePInvoke,Version=2.0 */
459 Type
*Find (Type::Kind type
);
460 Type
*Find (const char *name
);
461 Type
*Find (const char *name
, bool ignore_case
);
463 bool IsSubclassOf (Type::Kind type
, Type::Kind super
);
464 bool IsSubclassOrSuperclassOf (Type::Kind unknown
, Type::Kind known
);
465 static bool IsSubclassOrSuperclassOf (Types
*types
, Type::Kind unknown
, Type::Kind known
);
467 bool IsAssignableFrom (Type::Kind destination
, Type::Kind type
);
471 void DeleteProperties ();
476 /* @GeneratePInvoke */
477 bool type_get_value_type (Type::Kind type
);
478 DependencyObject
*type_create_instance (Type
*type
);
479 DependencyObject
*type_create_instance_from_kind (Type::Kind kind
);
481 void types_init (void);
482 const char *type_get_name (Type::Kind type
);
483 /* @GeneratePInvoke */
484 bool type_is_dependency_object (Type::Kind type
);
486 /* @IncludeInKinds */
487 struct ManagedTypeInfo
{
491 ManagedTypeInfo (const char *assembly_name
, const char *full_name
)
493 this->assembly_name
= g_strdup (assembly_name
);
494 this->full_name
= g_strdup (full_name
);