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);
37 // START_MANAGED_MAPPING
50 ASSEMBLYPART_COLLECTION
,
73 COLLECTIONCHANGEDEVENTARGS
,
74 COLLECTIONITEMCHANGEDEVENTARGS
,
77 COLORANIMATIONUSINGKEYFRAMES
,
79 COLORKEYFRAME_COLLECTION
,
81 COLUMNDEFINITION_COLLECTION
,
82 CONTENTCHANGEDEVENTARGS
,
89 CURSORPOSITIONCHANGEDEVENTARGS
,
91 DEEPZOOMIMAGETILESOURCE
,
93 DEPENDENCY_OBJECT_COLLECTION
,
96 DISCRETECOLORKEYFRAME
,
97 DISCRETEDOUBLEKEYFRAME
,
98 DISCRETEOBJECTKEYFRAME
,
99 DISCRETEPOINTKEYFRAME
,
104 DOUBLEANIMATIONUSINGKEYFRAMES
,
106 DOUBLEKEYFRAME_COLLECTION
,
108 DOWNLOADPROGRESSEVENTARGS
,
113 EASINGDOUBLEKEYFRAME
,
130 EXTERNALPART_COLLECTION
,
150 GRADIENTSTOP_COLLECTION
,
162 ICOMPARABLE_TIMESPAN
,
205 LINEARDOUBLEKEYFRAME
,
211 LOGREADYROUTEDEVENTARGS
,
212 MANAGED
,// Silverlight 2.0 only
223 MEDIAATTRIBUTE_COLLECTION
,
226 MEDIADISPOSEOBJECTCLOSURE
,
229 MEDIAGETFRAMECLOSURE
,
231 MEDIAMARKERFOUNDCLOSURE
,
233 MEDIAREPORTFRAMECOMPLETEDCLOSURE
,
234 MEDIAREPORTSEEKCOMPLETEDCLOSURE
,
242 MOUSEBUTTONEVENTARGS
,
248 MULTISCALESUBIMAGE_COLLECTION
,
249 MULTISCALETILESOURCE
,
254 OBJECTANIMATIONUSINGKEYFRAMES
,
256 OBJECTKEYFRAME_COLLECTION
,
257 OUTOFBROWSERSETTINGS
,
260 PARSERERROREVENTARGS
,
265 PATHFIGURE_COLLECTION
,
268 PATHSEGMENT_COLLECTION
,
277 POINTANIMATIONUSINGKEYFRAMES
,
279 POINTKEYFRAME_COLLECTION
,
284 POLYQUADRATICBEZIERSEGMENT
,
290 PROPERTYCHANGEDEVENTARGS
,
293 QUADRATICBEZIERSEGMENT
,
304 RESOURCE_DICTIONARY_COLLECTION
,
308 ROWDEFINITION_COLLECTION
,
313 SETTERBASE_COLLECTION
,
318 SIZECHANGEDEVENTARGS
,
322 SPLINEDOUBLEKEYFRAME
,
331 STYLUSPOINT_COLLECTION
,
337 TEXTBOXMODELCHANGEDEVENTARGS
,
339 TEXTCHANGEDEVENTARGS
,
347 TIMELINEMARKER_COLLECTION
,
348 TIMELINEMARKERROUTEDEVENTARGS
,
353 TRANSFORM_COLLECTION
,
358 TRIGGERACTION_COLLECTION
,
361 UIELEMENT_COLLECTION
,
377 // END_MANAGED_MAPPING
380 static Type
*Find (Deployment
*deployment
, const char *name
);
381 static Type
*Find (Deployment
*deployment
, Type::Kind type
);
382 static Type
*Find (Deployment
*deployment
, const char *name
, bool ignore_case
);
384 bool IsSubclassOf (Type::Kind super
);
385 static bool IsSubclassOf (Deployment
*deployment
, Type::Kind type
, Type::Kind super
);
387 bool IsAssignableFrom (Type::Kind type
);
388 static bool IsAssignableFrom (Deployment
*deployment
, Type::Kind assignable
, Type::Kind type
);
390 int LookupEvent (const char *event_name
);
391 DependencyObject
*CreateInstance ();
392 const char *GetContentPropertyName ();
394 DependencyProperty
*LookupProperty (const char *name
);
395 void AddProperty (DependencyProperty
*property
);
397 GHashTable
*CopyProperties (bool inherited
);
399 Type::Kind
GetKind () { return type
; }
400 void SetKind (Type::Kind value
) { type
= value
; }
401 bool HasParent () { return parent
!= Type::INVALID
; }
402 Type
*GetParentType ();
403 bool IsValueType () { return is_value_type
; }
404 bool IsInterface () { return is_interface
; }
405 bool IsCustomType () { return type
> LASTTYPE
; }
406 const char *GetName () { return name
; }
407 int GetEventCount () { return total_event_count
; }
408 int GetInterfaceCount () { return interface_count
; }
409 Type::Kind
GetInterface (int i
) { return i
>= 0 && i
< interface_count
? interfaces
[i
] : Type::INVALID
; }
411 bool IsCtorVisible () { return ctor_visible
; }
414 Type (Deployment
*deployment
, Type::Kind type
, Type::Kind parent
, bool is_value_type
, bool is_interface
,
416 int event_count
, int total_event_count
, const char **events
,
417 int interface_count
, const Type::Kind
*interfaces
, bool ctor_visible
,
418 create_inst_func
*create_inst
, const char *content_property
);
423 Type::Kind type
; // this type
424 Type::Kind parent
; // parent type, INVALID if no parent
425 bool is_value_type
; // if this type is a value type
426 bool is_interface
; // if this type is a value type
428 const char *name
; // The name as it appears in code.
431 Type::Kind
*interfaces
;
433 int event_count
; // number of events in this class
434 int total_event_count
; // number of events in this class and all base classes
435 const char **events
; // the events this class has
437 bool ctor_visible
; // if the type is instantiable in xaml, basically if the managed type has a public default ctor.
438 create_inst_func
*create_inst
; // a function pointer to create an instance of this type
440 const char *content_property
;
442 // The catch here is that SL allows us to register several DPs with the same name,
443 // and when looking up DP on name they seem to return the latest DP registered
445 GHashTable
*properties
; // Registered DependencyProperties for this type
446 Deployment
*deployment
;
454 ArrayList properties
;
456 void RegisterNativeTypes ();
457 void RegisterNativeProperties ();
460 /* @GenerateCBinding,GeneratePInvoke,Version=2.0 */
464 /* @GenerateCBinding,GeneratePInvoke,Version=2.0 */
465 Type::Kind
RegisterType (const char *name
, void *gc_handle
, Type::Kind parent
, bool is_interface
, bool ctor_visible
, /* @MarshalAs=Kind[] */Type::Kind
*interfaces
, int interface_count
);
467 void AddProperty (DependencyProperty
*property
);
468 DependencyProperty
*GetProperty (int id
);
470 /* @GenerateCBinding,GeneratePInvoke,Version=2.0 */
471 Type
*Find (Type::Kind type
)
473 if ((int) type
>= types
.GetCount ())
476 return (Type
*) types
[(int) type
];
479 Type
*Find (const char *name
);
480 Type
*Find (const char *name
, bool ignore_case
);
482 bool IsSubclassOf (Type::Kind type
, Type::Kind super
);
484 bool IsSubclassOrSuperclassOf (Type::Kind unknown
, Type::Kind known
);
485 static bool IsSubclassOrSuperclassOf (Types
*types
, Type::Kind unknown
, Type::Kind known
);
488 bool IsAssignableFrom (Type::Kind destination
, Type::Kind type
);
492 void DeleteProperties ();
497 /* @GeneratePInvoke */
498 bool type_get_value_type (Type::Kind type
);
499 DependencyObject
*type_create_instance (Type
*type
);
500 DependencyObject
*type_create_instance_from_kind (Type::Kind kind
);
502 void types_init (void);
504 /* @GeneratePInvoke */
505 bool type_is_dependency_object (Type::Kind type
);