atkhyperlink.inc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. // included by atk.pp
  2. {
  3. AtkHyperlink encapsulates a link or set of links in a hypertext document.
  4. It implements the AtkAction interface.
  5. }
  6. {$IFDEF read_forward_definitions}
  7. {$ENDIF read_forward_definitions}
  8. //------------------------------------------------------------------------------
  9. {$IFDEF read_interface_types}
  10. PAtkHyperlink = ^TAtkHyperlink;
  11. TAtkHyperlink = record
  12. parent : TGObject;
  13. end;
  14. { Returns a string specifying the URI associated with the nth anchor
  15. of this link. }
  16. { Returns an anObject which represents the link action, as appropriate for
  17. that link. }
  18. { Gets the index with the hypertext document at which this link ends }
  19. { Gets the index with the hypertext document at which this link begins }
  20. { Since the document a link is associated with may have changed, this
  21. method returns whether or not this link is still valid (with respect
  22. to the document is references) }
  23. { Returns the number of anchors associated with this link }
  24. PAtkHyperlinkClass = ^TAtkHyperlinkClass;
  25. TAtkHyperlinkClass = record
  26. parent : TGObjectClass;
  27. get_uri : function (link:PAtkHyperlink; i:gint):Pgchar; cdecl;
  28. get_object : function (link:PAtkHyperlink; i:gint):PAtkObject; cdecl;
  29. get_end_index : function (link:PAtkHyperlink):gint; cdecl;
  30. get_start_index : function (link:PAtkHyperlink):gint; cdecl;
  31. is_valid : function (link:PAtkHyperlink):gboolean; cdecl;
  32. get_n_anchors : function (link:PAtkHyperlink):gint; cdecl;
  33. pad1 : TAtkFunction;
  34. pad2 : TAtkFunction;
  35. pad3 : TAtkFunction;
  36. pad4 : TAtkFunction;
  37. end;
  38. {$ENDIF read_interface_types}
  39. //------------------------------------------------------------------------------
  40. {$IFDEF read_interface_rest}
  41. function ATK_TYPE_HYPERLINK : GType;
  42. function ATK_HYPERLINK(obj: pointer) : PAtkHyperlink;
  43. function ATK_HYPERLINK_CLASS(klass: pointer) : PAtkHyperlinkClass;
  44. function ATK_IS_HYPERLINK(obj: pointer) : boolean;
  45. function ATK_IS_HYPERLINK_CLASS(klass: pointer) : boolean;
  46. function ATK_HYPERLINK_GET_CLASS(obj: pointer) : PAtkHyperlinkClass;
  47. function atk_hyperlink_get_type:GType; cdecl; external atklib;
  48. function atk_hyperlink_get_uri(link:PAtkHyperlink; i:gint):Pgchar; cdecl; external atklib;
  49. function atk_hyperlink_get_object(link:PAtkHyperlink; i:gint):PAtkObject; cdecl; external atklib;
  50. function atk_hyperlink_get_end_index(link:PAtkHyperlink):gint; cdecl; external atklib;
  51. function atk_hyperlink_get_start_index(link:PAtkHyperlink):gint; cdecl; external atklib;
  52. function atk_hyperlink_is_valid(link:PAtkHyperlink):gboolean; cdecl; external atklib;
  53. function atk_hyperlink_get_n_anchors(link:PAtkHyperlink):gint; cdecl; external atklib;
  54. {$ENDIF read_interface_rest}
  55. //------------------------------------------------------------------------------
  56. {$IFDEF read_implementation}
  57. function ATK_TYPE_HYPERLINK : GType;
  58. begin
  59. ATK_TYPE_HYPERLINK:=atk_hyperlink_get_type;
  60. end;
  61. function ATK_HYPERLINK(obj: pointer) : PAtkHyperlink;
  62. begin
  63. ATK_HYPERLINK:=PAtkHyperlink(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_HYPERLINK));
  64. end;
  65. function ATK_HYPERLINK_CLASS(klass: pointer) : PAtkHyperlinkClass;
  66. begin
  67. ATK_HYPERLINK_CLASS:=PAtkHyperlinkClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_HYPERLINK));
  68. end;
  69. function ATK_IS_HYPERLINK(obj: pointer) : boolean;
  70. begin
  71. ATK_IS_HYPERLINK:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_HYPERLINK);
  72. end;
  73. function ATK_IS_HYPERLINK_CLASS(klass: pointer) : boolean;
  74. begin
  75. ATK_IS_HYPERLINK_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_HYPERLINK);
  76. end;
  77. function ATK_HYPERLINK_GET_CLASS(obj: pointer) : PAtkHyperlinkClass;
  78. begin
  79. ATK_HYPERLINK_GET_CLASS:=PAtkHyperlinkClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_HYPERLINK));
  80. end;
  81. {$ENDIF read_implementation}