atkimage.inc 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // included by atk.pp
  2. {
  3. The AtkImage interface should be supported by any anObject that has an
  4. associated image. This interface provides the standard mechanism for
  5. an assistive technology to get descriptive information about images.
  6. }
  7. {$IFDEF read_forward_definitions}
  8. {$ENDIF read_forward_definitions}
  9. //------------------------------------------------------------------------------
  10. {$IFDEF read_interface_types}
  11. PAtkImageIface = ^TAtkImageIface;
  12. TAtkImageIface = record
  13. parent : TGTypeInterface;
  14. get_image_position : procedure (image:PAtkImage; x:Pgint; y:Pgint; coord_type:TAtkCoordType); cdecl;
  15. get_image_description : function (image:PAtkImage):Pgchar; cdecl;
  16. get_image_size : procedure (image:PAtkImage; width:Pgint; height:Pgint); cdecl;
  17. set_image_description : function (image:PAtkImage; description:Pgchar):gboolean; cdecl;
  18. pad1 : TAtkFunction;
  19. pad2 : TAtkFunction;
  20. end;
  21. {$ENDIF read_interface_types}
  22. //------------------------------------------------------------------------------
  23. {$IFDEF read_interface_rest}
  24. function ATK_TYPE_IMAGE : GType;
  25. function ATK_IS_IMAGE(obj: pointer) : boolean;
  26. function ATK_IMAGE(obj: pointer) : PAtkImage;
  27. function ATK_IMAGE_GET_IFACE(obj: pointer) : PAtkImageIface;
  28. function atk_image_get_type:GType; cdecl; external atklib;
  29. function atk_image_get_image_description(image:PAtkImage):Pgchar; cdecl; external atklib;
  30. procedure atk_image_get_image_size(image:PAtkImage; width:Pgint; height:Pgint); cdecl; external atklib;
  31. function atk_image_set_image_description(image:PAtkImage; description:Pgchar):gboolean; cdecl; external atklib;
  32. procedure atk_image_get_image_position(image:PAtkImage; x:Pgint; y:Pgint; coord_type:TAtkCoordType); cdecl; external atklib;
  33. {$ENDIF read_interface_rest}
  34. //------------------------------------------------------------------------------
  35. {$IFDEF read_implementation}
  36. function ATK_TYPE_IMAGE : GType;
  37. begin
  38. ATK_TYPE_IMAGE:=atk_image_get_type;
  39. end;
  40. function ATK_IS_IMAGE(obj: pointer) : boolean;
  41. begin
  42. ATK_IS_IMAGE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_IMAGE);
  43. end;
  44. function ATK_IMAGE(obj: pointer) : PAtkImage;
  45. begin
  46. ATK_IMAGE:=PAtkImage(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_IMAGE));
  47. end;
  48. function ATK_IMAGE_GET_IFACE(obj: pointer) : PAtkImageIface;
  49. begin
  50. ATK_IMAGE_GET_IFACE:=PAtkImageIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_IMAGE));
  51. end;
  52. {$ENDIF read_implementation}