gtktreednd.inc 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // included by gtk2.pas
  2. {$IFDEF read_forward_definitions}
  3. {$ENDIF read_forward_definitions}
  4. //------------------------------------------------------------------------------
  5. {$IFDEF read_interface_types}
  6. // internal type
  7. PGtkTreeDragSource = pointer;
  8. // internal type
  9. PGtkTreeDragDest = pointer;
  10. { VTable - not signals }
  11. PGtkTreeDragSourceIface = ^TGtkTreeDragSourceIface;
  12. TGtkTreeDragSourceIface = record
  13. g_iface : TGTypeInterface;
  14. row_draggable : function (drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl;
  15. drag_data_get : function (drag_source:PGtkTreeDragSource; path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl;
  16. drag_data_delete : function (drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl;
  17. end;
  18. { VTable - not signals }
  19. PGtkTreeDragDestIface = ^TGtkTreeDragDestIface;
  20. TGtkTreeDragDestIface = record
  21. g_iface : TGTypeInterface;
  22. drag_data_received : function (drag_dest:PGtkTreeDragDest; dest:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl;
  23. row_drop_possible : function (drag_dest:PGtkTreeDragDest; dest_path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl;
  24. end;
  25. {$ENDIF read_interface_types}
  26. //------------------------------------------------------------------------------
  27. {$IFDEF read_interface_rest}
  28. function GTK_TYPE_TREE_DRAG_SOURCE : GType;
  29. function GTK_TREE_DRAG_SOURCE(obj: pointer) : PGtkTreeDragSource;
  30. function GTK_IS_TREE_DRAG_SOURCE(obj: pointer) : boolean;
  31. function GTK_TREE_DRAG_SOURCE_GET_IFACE(obj: pointer) : PGtkTreeDragSourceIface;
  32. function gtk_tree_drag_source_get_type:GType; cdecl; external gtklib;
  33. { Returns whether the given row can be dragged }
  34. function gtk_tree_drag_source_row_draggable(drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl; external gtklib;
  35. { Deletes the given row, or returns FALSE if it can't }
  36. function gtk_tree_drag_source_drag_data_delete(drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl; external gtklib;
  37. { Fills in selection_data with type selection_data->target based on
  38. the row denoted by path, returns TRUE if it does anything
  39. }
  40. function gtk_tree_drag_source_drag_data_get(drag_source:PGtkTreeDragSource; path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
  41. function GTK_TYPE_TREE_DRAG_DEST : GType;
  42. function GTK_TREE_DRAG_DEST(obj: pointer) : PGtkTreeDragDest;
  43. function GTK_IS_TREE_DRAG_DEST(obj: pointer) : boolean;
  44. function GTK_TREE_DRAG_DEST_GET_IFACE(obj: pointer) : PGtkTreeDragDestIface;
  45. function gtk_tree_drag_dest_get_type:GType; cdecl; external gtklib;
  46. { Inserts a row before dest which contains data in selection_data,
  47. or returns FALSE if it can't
  48. }
  49. function gtk_tree_drag_dest_drag_data_received(drag_dest:PGtkTreeDragDest; dest:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
  50. { Returns TRUE if we can drop before path; path may not exist. }
  51. function gtk_tree_drag_dest_row_drop_possible(drag_dest:PGtkTreeDragDest; dest_path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
  52. { The selection data would normally have target type GTK_TREE_MODEL_ROW in this
  53. case. If the target is wrong these functions return FALSE.
  54. }
  55. function gtk_tree_set_row_drag_data(selection_data:PGtkSelectionData; tree_model:PGtkTreeModel; path:PGtkTreePath):gboolean; cdecl; external gtklib;
  56. function gtk_tree_get_row_drag_data(selection_data:PGtkSelectionData; var tree_model:PGtkTreeModel; var path:PGtkTreePath):gboolean; cdecl; external gtklib;
  57. {$ENDIF read_interface_rest}
  58. //------------------------------------------------------------------------------
  59. {$IFDEF read_implementation}
  60. function GTK_TYPE_TREE_DRAG_SOURCE : GType;
  61. begin
  62. GTK_TYPE_TREE_DRAG_SOURCE:=gtk_tree_drag_source_get_type;
  63. end;
  64. function GTK_TREE_DRAG_SOURCE(obj: pointer) : PGtkTreeDragSource;
  65. begin
  66. GTK_TREE_DRAG_SOURCE:=PGtkTreeDragSource(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TREE_DRAG_SOURCE));
  67. end;
  68. function GTK_IS_TREE_DRAG_SOURCE(obj: pointer) : boolean;
  69. begin
  70. GTK_IS_TREE_DRAG_SOURCE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TREE_DRAG_SOURCE);
  71. end;
  72. function GTK_TREE_DRAG_SOURCE_GET_IFACE(obj: pointer) : PGtkTreeDragSourceIface;
  73. begin
  74. GTK_TREE_DRAG_SOURCE_GET_IFACE:=PGtkTreeDragSourceIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_TREE_DRAG_SOURCE));
  75. end;
  76. function GTK_TYPE_TREE_DRAG_DEST : GType;
  77. begin
  78. GTK_TYPE_TREE_DRAG_DEST:=gtk_tree_drag_dest_get_type;
  79. end;
  80. function GTK_TREE_DRAG_DEST(obj: pointer) : PGtkTreeDragDest;
  81. begin
  82. GTK_TREE_DRAG_DEST:=PGtkTreeDragDest(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TREE_DRAG_DEST));
  83. end;
  84. function GTK_IS_TREE_DRAG_DEST(obj: pointer) : boolean;
  85. begin
  86. GTK_IS_TREE_DRAG_DEST:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TREE_DRAG_DEST);
  87. end;
  88. function GTK_TREE_DRAG_DEST_GET_IFACE(obj: pointer) : PGtkTreeDragDestIface;
  89. begin
  90. GTK_TREE_DRAG_DEST_GET_IFACE:=PGtkTreeDragDestIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_TREE_DRAG_DEST));
  91. end;
  92. {$ENDIF read_implementation}
  93. // included by gtk2.pas