gtkselection.inc 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // included by gtk2.pas
  2. {$IFDEF read_forward_definitions}
  3. PGtkSelectionData = ^TGtkSelectionData;
  4. {$ENDIF read_forward_definitions}
  5. //------------------------------------------------------------------------------
  6. {$IFDEF read_interface_types}
  7. { The contents of a selection are returned in a GtkSelectionData
  8. structure. selection/target identify the request. type specifies
  9. the type of the return; if length < 0, and the data should be
  10. ignored. This structure has anObject semantics - no fields should be
  11. modified directly, they should not be created directly, and
  12. pointers to them should not be stored beyond the duration of a
  13. callback. (If the last is changed, we'll need to add reference
  14. counting.) The time field gives the timestamp at which the data was
  15. sent.
  16. }
  17. TGtkSelectionData = record
  18. selection : TGdkAtom;
  19. target : TGdkAtom;
  20. _type : TGdkAtom;
  21. format : gint;
  22. data : Pguchar;
  23. length : gint;
  24. display : PGdkDisplay;
  25. end;
  26. PGtkTargetEntry = ^TGtkTargetEntry;
  27. TGtkTargetEntry = record
  28. target : Pgchar;
  29. flags : guint;
  30. info : guint;
  31. end;
  32. { These structures not public, and are here only for the convenience of
  33. gtkdnd.c
  34. }
  35. { This structure is a list of destinations, and associated guint id's }
  36. PGtkTargetList = ^TGtkTargetList;
  37. TGtkTargetList = record
  38. list : PGList;
  39. ref_count : guint;
  40. end;
  41. PGtkTargetPair = ^TGtkTargetPair;
  42. TGtkTargetPair = record
  43. target : TGdkAtom;
  44. flags : guint;
  45. info : guint;
  46. end;
  47. {$ENDIF read_interface_types}
  48. //------------------------------------------------------------------------------
  49. {$IFDEF read_interface_rest}
  50. function GTK_TYPE_SELECTION_DATA : GType;
  51. function gtk_target_list_new(targets:PGtkTargetEntry; ntargets:guint):PGtkTargetList; cdecl; external gtklib;
  52. procedure gtk_target_list_ref(list:PGtkTargetList); cdecl; external gtklib;
  53. procedure gtk_target_list_unref(list:PGtkTargetList); cdecl; external gtklib;
  54. procedure gtk_target_list_add(list:PGtkTargetList; target:TGdkAtom; flags:guint; info:guint); cdecl; external gtklib;
  55. procedure gtk_target_list_add_table(list:PGtkTargetList; targets:PGtkTargetEntry; ntargets:guint); cdecl; external gtklib;
  56. procedure gtk_target_list_remove(list:PGtkTargetList; target:TGdkAtom); cdecl; external gtklib;
  57. function gtk_target_list_find(list:PGtkTargetList; target:TGdkAtom; info:Pguint):gboolean; cdecl; external gtklib;
  58. { Public interface }
  59. function gtk_selection_owner_set(widget:PGtkWidget; selection:TGdkAtom; time:guint32):gboolean; cdecl; external gtklib;
  60. function gtk_selection_owner_set_for_display(display:PGdkDisplay; widget:PGtkWidget; selection:TGdkAtom; time:guint32):gboolean; cdecl; external gtklib;
  61. procedure gtk_selection_add_target(widget:PGtkWidget; selection:TGdkAtom; target:TGdkAtom; info:guint); cdecl; external gtklib;
  62. procedure gtk_selection_add_targets(widget:PGtkWidget; selection:TGdkAtom; targets:PGtkTargetEntry; ntargets:guint); cdecl; external gtklib;
  63. procedure gtk_selection_clear_targets(widget:PGtkWidget; selection:TGdkAtom); cdecl; external gtklib;
  64. function gtk_selection_convert(widget:PGtkWidget; selection:TGdkAtom; target:TGdkAtom; time:guint32):gboolean; cdecl; external gtklib;
  65. procedure gtk_selection_data_set(selection_data:PGtkSelectionData; _type:TGdkAtom; format:gint; data:Pguchar; length:gint); cdecl; external gtklib;
  66. function gtk_selection_data_set_text(selection_data:PGtkSelectionData; str:Pgchar; len:gint):gboolean; cdecl; external gtklib;
  67. function gtk_selection_data_get_text(selection_data:PGtkSelectionData):Pguchar; cdecl; external gtklib;
  68. function gtk_selection_data_get_targets(selection_data:PGtkSelectionData; var targets:PGdkAtom; var n_atoms:gint):gboolean; cdecl; external gtklib;
  69. function gtk_selection_data_targets_include_text(selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
  70. { Called when a widget is destroyed }
  71. procedure gtk_selection_remove_all(widget:PGtkWidget); cdecl; external gtklib;
  72. { Event handlers }
  73. function gtk_selection_clear(widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl; external gtklib;
  74. function gtk_selection_request(widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl; external gtklib;
  75. function gtk_selection_incr_event(window:PGdkWindow; event:PGdkEventProperty):gboolean; cdecl; external gtklib;
  76. function gtk_selection_notify(widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl; external gtklib;
  77. function gtk_selection_property_notify(widget:PGtkWidget; event:PGdkEventProperty):gboolean; cdecl; external gtklib;
  78. function gtk_selection_data_get_type:GType; cdecl; external gtklib;
  79. function gtk_selection_data_copy(data:PGtkSelectionData):PGtkSelectionData; cdecl; external gtklib;
  80. procedure gtk_selection_data_free(data:PGtkSelectionData); cdecl; external gtklib;
  81. {$ENDIF read_interface_rest}
  82. //------------------------------------------------------------------------------
  83. {$IFDEF read_implementation}
  84. function GTK_TYPE_SELECTION_DATA : GType;
  85. begin
  86. GTK_TYPE_SELECTION_DATA:=gtk_selection_data_get_type;
  87. end;
  88. {$ENDIF read_implementation}
  89. // included by gtk2.pas