atkregistry.inc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // included by atk.pp
  2. {$IFDEF read_forward_definitions}
  3. {$ENDIF read_forward_definitions}
  4. //------------------------------------------------------------------------------
  5. {$IFDEF read_interface_types}
  6. PAtkRegistry = ^TAtkRegistry;
  7. TAtkRegistry = record
  8. parent : TGObject;
  9. factory_type_registry : PGHashTable;
  10. factory_singleton_cache : PGHashTable;
  11. end;
  12. PAtkRegistryClass = ^TAtkRegistryClass;
  13. TAtkRegistryClass = record
  14. parent_class : TGObjectClass;
  15. end;
  16. {$ENDIF read_interface_types}
  17. //------------------------------------------------------------------------------
  18. {$IFDEF read_interface_rest}
  19. function ATK_TYPE_REGISTRY : GType;
  20. function ATK_REGISTRY(obj: pointer) : PAtkRegistry;
  21. function ATK_REGISTRY_CLASS(klass: pointer) : PAtkRegistryClass;
  22. function ATK_IS_REGISTRY(obj: pointer) : boolean;
  23. function ATK_IS_REGISTRY_CLASS(klass: pointer) : boolean;
  24. function ATK_REGISTRY_GET_CLASS(obj: pointer) : PAtkRegistryClass;
  25. function atk_registry_get_type:GType; cdecl; external atklib;
  26. procedure atk_registry_set_factory_type(registry:PAtkRegistry; _type:GType; factory_type:GType); cdecl; external atklib;
  27. function atk_registry_get_factory_type(registry:PAtkRegistry; _type:GType):GType; cdecl; external atklib;
  28. function atk_registry_get_factory(registry:PAtkRegistry; _type:GType):PAtkObjectFactory; cdecl; external atklib;
  29. function atk_get_default_registry:PAtkRegistry; cdecl; external atklib;
  30. {$ENDIF read_interface_rest}
  31. //------------------------------------------------------------------------------
  32. {$IFDEF read_implementation}
  33. function ATK_TYPE_REGISTRY : GType;
  34. begin
  35. ATK_TYPE_REGISTRY:=atk_registry_get_type;
  36. end;
  37. function ATK_REGISTRY(obj: pointer) : PAtkRegistry;
  38. begin
  39. ATK_REGISTRY:=PAtkRegistry(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_REGISTRY));
  40. end;
  41. function ATK_REGISTRY_CLASS(klass: pointer) : PAtkRegistryClass;
  42. begin
  43. ATK_REGISTRY_CLASS:=PAtkRegistryClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_REGISTRY));
  44. end;
  45. function ATK_IS_REGISTRY(obj: pointer) : boolean;
  46. begin
  47. ATK_IS_REGISTRY:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_REGISTRY);
  48. end;
  49. function ATK_IS_REGISTRY_CLASS(klass: pointer) : boolean;
  50. begin
  51. ATK_IS_REGISTRY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_REGISTRY);
  52. end;
  53. function ATK_REGISTRY_GET_CLASS(obj: pointer) : PAtkRegistryClass;
  54. begin
  55. ATK_REGISTRY_GET_CLASS:=PAtkRegistryClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_REGISTRY));
  56. end;
  57. {$ENDIF read_implementation}