gobject.inc 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. // included by glib2.pas
  2. { --- typedefs & structures --- }
  3. type
  4. {< private > }
  5. PGObject = ^TGObject;
  6. TGObject = record
  7. g_type_instance : TGTypeInstance;
  8. ref_count : guint;
  9. qdata : PGData;
  10. end;
  11. TGObjectGetPropertyFunc = procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
  12. TGObjectSetPropertyFunc = procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
  13. TGObjectFinalizeFunc = procedure (anObject:PGObject); cdecl;
  14. TGWeakNotify = procedure (data:gpointer; where_the_object_was:PGObject); cdecl;
  15. {< private > }
  16. PGObjectConstructParam = ^TGObjectConstructParam;
  17. { public overridable methods }
  18. { seldomly overidden }
  19. { signals }
  20. { padding }
  21. PGObjectClass = ^TGObjectClass;
  22. TGObjectClass = record
  23. g_type_class : TGTypeClass;
  24. construct_properties : PGSList;
  25. _constructor : function (_type:GType; n_construct_properties:guint; construct_properties:PGObjectConstructParam):PGObject; cdecl;
  26. set_property : procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
  27. get_property : procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
  28. _dispose : procedure (anObject:PGObject); cdecl;
  29. finalize : procedure (anObject:PGObject); cdecl;
  30. dispatch_properties_changed : procedure (anObject:PGObject; n_pspecs:guint; pspecs:PPGParamSpec); cdecl;
  31. notify : procedure (anObject:PGObject; pspec:PGParamSpec); cdecl;
  32. pdummy : array[0..7] of gpointer;
  33. end;
  34. TGObjectConstructParam = record
  35. pspec : PGParamSpec;
  36. value : PGValue;
  37. end;
  38. { --- type macros --- }
  39. function G_TYPE_IS_OBJECT(_type : GType) : boolean;
  40. function G_OBJECT(anObject: pointer) : PGObject;
  41. function G_OBJECT_CLASS(_class : Pointer) : PGObjectClass;
  42. function G_IS_OBJECT(anObject: pointer) : boolean;
  43. function G_IS_OBJECT_CLASS(_class : Pointer) : boolean;
  44. function G_OBJECT_GET_CLASS(anObject: pointer) : PGObjectClass;
  45. function G_OBJECT_TYPE(anObject: pointer) : GType;
  46. function G_OBJECT_TYPE_NAME(anObject: pointer) : Pgchar;
  47. function G_OBJECT_CLASS_TYPE(_class : Pointer) : GType;
  48. function G_OBJECT_CLASS_NAME(_class : Pointer) : Pgchar;
  49. function G_VALUE_HOLDS_OBJECT(value : Pointer) : boolean;
  50. { --- prototypes --- }
  51. procedure g_object_class_install_property(oclass:PGObjectClass; property_id:guint; pspec:PGParamSpec); cdecl; external gobjectlib;
  52. function g_object_class_find_property(oclass:PGObjectClass; property_name:Pgchar):PGParamSpec; cdecl; external gobjectlib;
  53. function g_object_class_list_properties(oclass:PGObjectClass; n_properties:Pguint):PPGParamSpec; cdecl; external gobjectlib;
  54. function g_object_new(object_type:GType; first_property_name:Pgchar):gpointer; varargs; cdecl; external gobjectlib;
  55. function g_object_newv(object_type:GType; n_parameters:guint; parameters:PGParameter):gpointer; varargs; cdecl; external gobjectlib;
  56. function g_object_new_valist(object_type:GType; first_property_name:Pgchar):PGObject; varargs; cdecl; external gobjectlib;
  57. procedure g_object_set(anObject:gpointer; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
  58. procedure g_object_get(anObject:gpointer; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
  59. function g_object_connect(anObject:gpointer; signal_spec:Pgchar):gpointer; varargs; cdecl; external gobjectlib;
  60. procedure g_object_disconnect(anObject:gpointer; signal_spec:Pgchar); varargs; cdecl; external gobjectlib;
  61. procedure g_object_set_valist(anObject:PGObject; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
  62. procedure g_object_get_valist(anObject:PGObject; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
  63. procedure g_object_set_property(anObject:PGObject; property_name:Pgchar; value:PGValue); cdecl; external gobjectlib;
  64. procedure g_object_get_property(anObject:PGObject; property_name:Pgchar; value:PGValue); cdecl; external gobjectlib;
  65. procedure g_object_freeze_notify(anObject:PGObject); cdecl; external gobjectlib;
  66. procedure g_object_notify(anObject:PGObject; property_name:Pgchar); cdecl; external gobjectlib;
  67. procedure g_object_thaw_notify(anObject:PGObject); cdecl; external gobjectlib;
  68. function g_object_ref(anObject:gpointer):gpointer; cdecl; external gobjectlib;
  69. procedure g_object_unref(anObject:gpointer); cdecl; external gobjectlib;
  70. procedure g_object_weak_ref(anObject:PGObject; notify:TGWeakNotify; data:gpointer); cdecl; external gobjectlib;
  71. procedure g_object_weak_unref(anObject:PGObject; notify:TGWeakNotify; data:gpointer); cdecl; external gobjectlib;
  72. procedure g_object_add_weak_pointer(anObject:PGObject; weak_pointer_location:Pgpointer); cdecl; external gobjectlib;
  73. procedure g_object_remove_weak_pointer(anObject:PGObject; weak_pointer_location:Pgpointer); cdecl; external gobjectlib;
  74. function g_object_get_qdata(anObject:PGObject; quark:TGQuark):gpointer; cdecl; external gobjectlib;
  75. procedure g_object_set_qdata(anObject:PGObject; quark:TGQuark; data:gpointer); cdecl; external gobjectlib;
  76. procedure g_object_set_qdata_full(anObject:PGObject; quark:TGQuark; data:gpointer; destroy:TGDestroyNotify); cdecl; external gobjectlib;
  77. function g_object_steal_qdata(anObject:PGObject; quark:TGQuark):gpointer; cdecl; external gobjectlib;
  78. function g_object_get_data(anObject:PGObject; key:Pgchar):gpointer; cdecl; external gobjectlib;
  79. procedure g_object_set_data(anObject:PGObject; key:Pgchar; data:gpointer); cdecl; external gobjectlib;
  80. procedure g_object_set_data_full(anObject:PGObject; key:Pgchar; data:gpointer; destroy:TGDestroyNotify); cdecl; external gobjectlib;
  81. function g_object_steal_data(anObject:PGObject; key:Pgchar):gpointer; cdecl; external gobjectlib;
  82. procedure g_object_watch_closure(anObject:PGObject; closure:PGClosure); cdecl; external gobjectlib;
  83. function g_cclosure_new_object(callback_func:TGCallback; anObject:PGObject):PGClosure; cdecl; external gobjectlib;
  84. function g_cclosure_new_object_swap(callback_func:TGCallback; anObject:PGObject):PGClosure; cdecl; external gobjectlib;
  85. function g_closure_new_object(sizeof_closure:guint; anObject:PGObject):PGClosure; cdecl; external gobjectlib;
  86. procedure g_value_set_object(value:PGValue; v_object:gpointer); cdecl; external gobjectlib;
  87. function g_value_get_object(value:PGValue):gpointer; cdecl; external gobjectlib;
  88. function g_value_dup_object(value:PGValue):PGObject; cdecl; external gobjectlib;
  89. function g_signal_connect_object(instance:gpointer; detailed_signal:Pgchar; c_handler:TGCallback; gobject:gpointer; connect_flags:TGConnectFlags):gulong; cdecl; external gobjectlib;
  90. {< protected > }
  91. procedure g_object_run_dispose(anObject:PGObject); cdecl; external gobjectlib;
  92. { --- marshaller specific --- }
  93. procedure g_value_set_object_take_ownership(value:PGValue; v_object:gpointer); cdecl; external gobjectlib;
  94. { --- implementation macros --- }
  95. procedure G_OBJECT_WARN_INVALID_PSPEC(anObject: gpointer; pname: PGChar;
  96. property_id: gint; pspec: gpointer);
  97. procedure G_OBJECT_WARN_INVALID_PROPERTY_ID(anObject: gpointer;
  98. property_id: gint; pspec : gpointer);
  99. type
  100. G_FLAGS_TYPE = GType;
  101. // included by glib2.pas