2
0

gtkclist.pp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. {
  2. }
  3. {****************************************************************************
  4. Interface
  5. ****************************************************************************}
  6. {$ifdef read_interface}
  7. type
  8. TGtkCellType = (GTK_CELL_EMPTY,GTK_CELL_TEXT,GTK_CELL_PIXMAP,
  9. GTK_CELL_PIXTEXT,GTK_CELL_WIDGET);
  10. TGtkCListDragPos = (GTK_CLIST_DRAG_NONE,GTK_CLIST_DRAG_BEFORE,
  11. GTK_CLIST_DRAG_INTO,GTK_CLIST_DRAG_AFTER
  12. );
  13. TGtkButtonAction = (GTK_BUTTON_IGNORED := 0,GTK_BUTTON_SELECTS := 1 shl 0,
  14. GTK_BUTTON_DRAGS := 1 shl 1,GTK_BUTTON_EXPANDS := 1 shl 2
  15. );
  16. PGtkCList = ^TGtkCList;
  17. PGtkCListClass = ^TGtkCListClass;
  18. PGtkCListColumn = ^TGtkCListColumn;
  19. PGtkCListRow = ^TGtkCListRow;
  20. PGtkCellText = ^TGtkCellText;
  21. PGtkCellPixmap = ^TGtkCellPixmap;
  22. PGtkCellPixText = ^TGtkCellPixText;
  23. PGtkCellWidget = ^TGtkCellWidget;
  24. PGtkCell = ^TGtkCell;
  25. TGtkCListCompareFunc = function (clist:PGtkCList; ptr1:gconstpointer; ptr2:gconstpointer):gint;cdecl;
  26. PGtkCListCellInfo = ^TGtkCListCellInfo;
  27. TGtkCListCellInfo = record
  28. row : gint;
  29. column : gint;
  30. end;
  31. PGtkCListDestInfo = ^TGtkCListDestInfo;
  32. TGtkCListDestInfo = record
  33. cell : TGtkCListCellInfo;
  34. insert_pos : TGtkCListDragPos;
  35. end;
  36. TGtkCList = record
  37. container : TGtkContainer;
  38. flags : guint16;
  39. row_mem_chunk : PGMemChunk;
  40. cell_mem_chunk : PGMemChunk;
  41. freeze_count : guint;
  42. internal_allocation : TGdkRectangle;
  43. rows : gint;
  44. row_center_offset : gint;
  45. row_height : gint;
  46. row_list : PGList;
  47. row_list_end : PGList;
  48. columns : gint;
  49. column_title_area : TGdkRectangle;
  50. title_window : PGdkWindow;
  51. column : PGtkCListColumn;
  52. clist_window : PGdkWindow;
  53. clist_window_width : gint;
  54. clist_window_height : gint;
  55. hoffset : gint;
  56. voffset : gint;
  57. shadow_type : TGtkShadowType;
  58. selection_mode : TGtkSelectionMode;
  59. selection : PGList;
  60. selection_end : PGList;
  61. undo_selection : PGList;
  62. undo_unselection : PGList;
  63. undo_anchor : gint;
  64. button_actions : array[0..4] of guint8;
  65. drag_button : guint8;
  66. click_cell : TGtkCListCellInfo;
  67. hadjustment : PGtkAdjustment;
  68. vadjustment : PGtkAdjustment;
  69. xor_gc : PGdkGC;
  70. fg_gc : PGdkGC;
  71. bg_gc : PGdkGC;
  72. cursor_drag : PGdkCursor;
  73. x_drag : gint;
  74. focus_row : gint;
  75. anchor : gint;
  76. anchor_state : TGtkStateType;
  77. drag_pos : gint;
  78. htimer : gint;
  79. vtimer : gint;
  80. sort_type : TGtkSortType;
  81. compare : TGtkCListCompareFunc;
  82. sort_column : gint;
  83. end;
  84. TGtkCListClass = record
  85. parent_class : TGtkContainerClass;
  86. set_scroll_adjustments : procedure (clist:PGtkCList; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment);cdecl;
  87. refresh : procedure (clist:PGtkCList);cdecl;
  88. select_row : procedure (clist:PGtkCList; row:gint; column:gint; event:PGdkEvent);cdecl;
  89. unselect_row : procedure (clist:PGtkCList; row:gint; column:gint; event:PGdkEvent);cdecl;
  90. row_move : procedure (clist:PGtkCList; source_row:gint; dest_row:gint);cdecl;
  91. click_column : procedure (clist:PGtkCList; column:gint);cdecl;
  92. resize_column : procedure (clist:PGtkCList; column:gint; width:gint);cdecl;
  93. toggle_focus_row : procedure (clist:PGtkCList);cdecl;
  94. select_all : procedure (clist:PGtkCList);cdecl;
  95. unselect_all : procedure (clist:PGtkCList);cdecl;
  96. undo_selection : procedure (clist:PGtkCList);cdecl;
  97. start_selection : procedure (clist:PGtkCList);cdecl;
  98. end_selection : procedure (clist:PGtkCList);cdecl;
  99. extend_selection : procedure (clist:PGtkCList; scroll_type:TGtkScrollType; position:gfloat; auto_start_selection:gboolean);cdecl;
  100. scroll_horizontal : procedure (clist:PGtkCList; scroll_type:TGtkScrollType; position:gfloat);cdecl;
  101. scroll_vertical : procedure (clist:PGtkCList; scroll_type:TGtkScrollType; position:gfloat);cdecl;
  102. toggle_add_mode : procedure (clist:PGtkCList);cdecl;
  103. abort_column_resize : procedure (clist:PGtkCList);cdecl;
  104. resync_selection : procedure (clist:PGtkCList; event:PGdkEvent);cdecl;
  105. selection_find : function (clist:PGtkCList; row_number:gint; row_list_element:PGList):PGList;cdecl;
  106. draw_row : procedure (clist:PGtkCList; area:PGdkRectangle; row:gint; clist_row:PGtkCListRow);cdecl;
  107. draw_drag_highlight : procedure (clist:PGtkCList; target_row:PGtkCListRow; target_row_number:gint; drag_pos:TGtkCListDragPos);cdecl;
  108. clear : procedure (clist:PGtkCList);cdecl;
  109. fake_unselect_all : procedure (clist:PGtkCList; row:gint);cdecl;
  110. sort_list : procedure (clist:PGtkCList);cdecl;
  111. insert_row : procedure (clist:PGtkCList; row:gint; text:PPgchar);cdecl;
  112. remove_row : procedure (clist:PGtkCList; row:gint);cdecl;
  113. set_cell_contents : procedure (clist:PGtkCList; clist_row:PGtkCListRow; column:gint; thetype:TGtkCellType; text:Pgchar; spacing:guint8; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;
  114. cell_size_request : procedure (clist:PGtkCList; clist_row:PGtkCListRow; column:gint; requisition:PGtkRequisition);cdecl;
  115. end;
  116. TGtkCListColumn = record
  117. title : Pgchar;
  118. area : TGdkRectangle;
  119. button : PGtkWidget;
  120. window : PGdkWindow;
  121. width : gint;
  122. min_width : gint;
  123. max_width : gint;
  124. justification : TGtkJustification;
  125. flag0 : {$ifdef win32}longint{$else}word{$endif};
  126. end;
  127. TGtkCListRow = record
  128. cell : PGtkCell;
  129. state : TGtkStateType;
  130. foreground : TGdkColor;
  131. background : TGdkColor;
  132. style : PGtkStyle;
  133. data : gpointer;
  134. destroy : TGtkDestroyNotify;
  135. flag0 : {$ifdef win32}longint{$else}word{$endif};
  136. end;
  137. TGtkCellText = record
  138. thetype : TGtkCellType;
  139. vertical : gint16;
  140. horizontal : gint16;
  141. style : PGtkStyle;
  142. thetext : Pgchar;
  143. end;
  144. TGtkCellPixmap = record
  145. thetype : TGtkCellType;
  146. vertical : gint16;
  147. horizontal : gint16;
  148. style : PGtkStyle;
  149. pixmap : PGdkPixmap;
  150. mask : PGdkBitmap;
  151. end;
  152. TGtkCellPixText = record
  153. thetype : TGtkCellType;
  154. vertical : gint16;
  155. horizontal : gint16;
  156. style : PGtkStyle;
  157. thetext : Pgchar;
  158. spacing : guint8;
  159. pixmap : PGdkPixmap;
  160. mask : PGdkBitmap;
  161. end;
  162. TGtkCellWidget = record
  163. thetype : TGtkCellType;
  164. vertical : gint16;
  165. horizontal : gint16;
  166. style : PGtkStyle;
  167. widget : PGtkWidget;
  168. end;
  169. TGtkCell = record
  170. thetype : TGtkCellType;
  171. vertical : gint16;
  172. horizontal : gint16;
  173. style : PGtkStyle;
  174. u : record
  175. case longint of
  176. 0 : ( text : Pgchar );
  177. 1 : ( pm : record
  178. pixmap : PGdkPixmap;
  179. mask : PGdkBitmap;
  180. end );
  181. 2 : ( pt : record
  182. text : Pgchar;
  183. spacing : guint8;
  184. pixmap : PGdkPixmap;
  185. mask : PGdkBitmap;
  186. end );
  187. 3 : ( widget : PGtkWidget );
  188. end;
  189. end;
  190. const
  191. bm_TGtkCListColumn_visible = $1;
  192. bp_TGtkCListColumn_visible = 0;
  193. bm_TGtkCListColumn_width_set = $2;
  194. bp_TGtkCListColumn_width_set = 1;
  195. bm_TGtkCListColumn_resizeable = $4;
  196. bp_TGtkCListColumn_resizeable = 2;
  197. bm_TGtkCListColumn_auto_resize = $8;
  198. bp_TGtkCListColumn_auto_resize = 3;
  199. bm_TGtkCListColumn_button_passive = $10;
  200. bp_TGtkCListColumn_button_passive = 4;
  201. function visible(var a : TGtkCListColumn) : guint;
  202. procedure set_visible(var a : TGtkCListColumn; __visible : guint);
  203. function width_set(var a : TGtkCListColumn) : guint;
  204. procedure set_width_set(var a : TGtkCListColumn; __width_set : guint);
  205. function resizeable(var a : TGtkCListColumn) : guint;
  206. procedure set_resizeable(var a : TGtkCListColumn; __resizeable : guint);
  207. function auto_resize(var a : TGtkCListColumn) : guint;
  208. procedure set_auto_resize(var a : TGtkCListColumn; __auto_resize : guint);
  209. function button_passive(var a : TGtkCListColumn) : guint;
  210. procedure set_button_passive(var a : TGtkCListColumn; __button_passive : guint);
  211. const
  212. bm_TGtkCListRow_fg_set = $1;
  213. bp_TGtkCListRow_fg_set = 0;
  214. bm_TGtkCListRow_bg_set = $2;
  215. bp_TGtkCListRow_bg_set = 1;
  216. bm_TGtkCListRow_selectable = $4;
  217. bp_TGtkCListRow_selectable = 2;
  218. function fg_set(var a : TGtkCListRow) : guint;cdecl;
  219. procedure set_fg_set(var a : TGtkCListRow; __fg_set : guint);cdecl;
  220. function bg_set(var a : TGtkCListRow) : guint;cdecl;
  221. procedure set_bg_set(var a : TGtkCListRow; __bg_set : guint);cdecl;
  222. function selectable(var a : TGtkCListRow) : guint;
  223. procedure set_selectable(var a : TGtkCListRow; __selectable : guint);
  224. Type
  225. GTK_CLIST=PGtkCList;
  226. GTK_CLIST_CLASS=PGtkCListClass;
  227. function GTK_CLIST_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_clist_get_type';
  228. function GTK_IS_CLIST(obj:pointer):boolean;
  229. function GTK_IS_CLIST_CLASS(klass:pointer):boolean;
  230. function gtk_clist_get_type:TGtkType;cdecl;external gtkdll name 'gtk_clist_get_type';
  231. procedure gtk_clist_construct(clist:PGtkCList; columns:gint; titles:PPgchar);cdecl;external gtkdll name 'gtk_clist_construct';
  232. function gtk_clist_new (columns:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_clist_new';
  233. function gtk_clist_new_with_titles (columns:gint; titles:PPgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_clist_new_with_titles';
  234. procedure gtk_clist_set_hadjustment(clist:PGtkCList; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_clist_set_hadjustment';
  235. procedure gtk_clist_set_vadjustment(clist:PGtkCList; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_clist_set_vadjustment';
  236. function gtk_clist_get_hadjustment(clist:PGtkCList):PGtkAdjustment;cdecl;external gtkdll name 'gtk_clist_get_hadjustment';
  237. function gtk_clist_get_vadjustment(clist:PGtkCList):PGtkAdjustment;cdecl;external gtkdll name 'gtk_clist_get_vadjustment';
  238. procedure gtk_clist_set_shadow_type(clist:PGtkCList; thetype:TGtkShadowType);cdecl;external gtkdll name 'gtk_clist_set_shadow_type';
  239. procedure gtk_clist_set_selection_mode(clist:PGtkCList; mode:TGtkSelectionMode);cdecl;external gtkdll name 'gtk_clist_set_selection_mode';
  240. procedure gtk_clist_set_reorderable(clist:PGtkCList; reorderable:gboolean);cdecl;external gtkdll name 'gtk_clist_set_reorderable';
  241. procedure gtk_clist_set_use_drag_icons(clist:PGtkCList; use_icons:gboolean);cdecl;external gtkdll name 'gtk_clist_set_use_drag_icons';
  242. procedure gtk_clist_set_button_actions(clist:PGtkCList; button:guint; button_actions:guint8);cdecl;external gtkdll name 'gtk_clist_set_button_actions';
  243. procedure gtk_clist_freeze(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_freeze';
  244. procedure gtk_clist_thaw(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_thaw';
  245. procedure gtk_clist_column_titles_show(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_show';
  246. procedure gtk_clist_column_titles_hide(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_hide';
  247. procedure gtk_clist_column_title_active(clist:PGtkCList; column:gint);cdecl;external gtkdll name 'gtk_clist_column_title_active';
  248. procedure gtk_clist_column_title_passive(clist:PGtkCList; column:gint);cdecl;external gtkdll name 'gtk_clist_column_title_passive';
  249. procedure gtk_clist_column_titles_active(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_active';
  250. procedure gtk_clist_column_titles_passive(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_passive';
  251. procedure gtk_clist_set_column_title(clist:PGtkCList; column:gint; title:Pgchar);cdecl;external gtkdll name 'gtk_clist_set_column_title';
  252. function gtk_clist_get_column_title(clist:PGtkCList; column:gint):Pgchar;cdecl;external gtkdll name 'gtk_clist_get_column_title';
  253. procedure gtk_clist_set_column_widget(clist:PGtkCList; column:gint; widget:PGtkWidget);cdecl;external gtkdll name 'gtk_clist_set_column_widget';
  254. function gtk_clist_get_column_widget(clist:PGtkCList; column:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_clist_get_column_widget';
  255. procedure gtk_clist_set_column_justification(clist:PGtkCList; column:gint; justification:TGtkJustification);cdecl;external gtkdll name 'gtk_clist_set_column_justification';
  256. procedure gtk_clist_set_column_visibility(clist:PGtkCList; column:gint; visible:gboolean);cdecl;external gtkdll name 'gtk_clist_set_column_visibility';
  257. procedure gtk_clist_set_column_resizeable(clist:PGtkCList; column:gint; resizeable:gboolean);cdecl;external gtkdll name 'gtk_clist_set_column_resizeable';
  258. procedure gtk_clist_set_column_auto_resize(clist:PGtkCList; column:gint; auto_resize:gboolean);cdecl;external gtkdll name 'gtk_clist_set_column_auto_resize';
  259. function gtk_clist_columns_autosize(clist:PGtkCList):gint;cdecl;external gtkdll name 'gtk_clist_columns_autosize';
  260. function gtk_clist_optimal_column_width(clist:PGtkCList; column:gint):gint;cdecl;external gtkdll name 'gtk_clist_optimal_column_width';
  261. procedure gtk_clist_set_column_width(clist:PGtkCList; column:gint; width:gint);cdecl;external gtkdll name 'gtk_clist_set_column_width';
  262. procedure gtk_clist_set_column_min_width(clist:PGtkCList; column:gint; min_width:gint);cdecl;external gtkdll name 'gtk_clist_set_column_min_width';
  263. procedure gtk_clist_set_column_max_width(clist:PGtkCList; column:gint; max_width:gint);cdecl;external gtkdll name 'gtk_clist_set_column_max_width';
  264. procedure gtk_clist_set_row_height(clist:PGtkCList; height:guint);cdecl;external gtkdll name 'gtk_clist_set_row_height';
  265. procedure gtk_clist_moveto(clist:PGtkCList; row:gint; column:gint; row_align:gfloat; col_align:gfloat);cdecl;external gtkdll name 'gtk_clist_moveto';
  266. function gtk_clist_row_is_visible(clist:PGtkCList; row:gint):TGtkVisibility;cdecl;external gtkdll name 'gtk_clist_row_is_visible';
  267. function gtk_clist_get_cell_type(clist:PGtkCList; row:gint; column:gint):TGtkCellType;cdecl;external gtkdll name 'gtk_clist_get_cell_type';
  268. procedure gtk_clist_set_text(clist:PGtkCList; row:gint; column:gint; thetext:Pgchar);cdecl;external gtkdll name 'gtk_clist_set_text';
  269. function gtk_clist_get_text(clist:PGtkCList; row:gint; column:gint; thetext:PPgchar):gint;cdecl;external gtkdll name 'gtk_clist_get_text';
  270. procedure gtk_clist_set_pixmap(clist:PGtkCList; row:gint; column:gint; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_clist_set_pixmap';
  271. function gtk_clist_get_pixmap(clist:PGtkCList; row:gint; column:gint; pixmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gtkdll name 'gtk_clist_get_pixmap';
  272. procedure gtk_clist_set_pixtext(clist:PGtkCList; row:gint; column:gint; thetext:Pgchar; spacing:guint8;pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_clist_set_pixtext';
  273. function gtk_clist_get_pixtext(clist:PGtkCList; row:gint; column:gint; thetext:PPgchar; spacing:Pguint8;pixmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gtkdll name 'gtk_clist_get_pixtext';
  274. procedure gtk_clist_set_foreground(clist:PGtkCList; row:gint; color:PGdkColor);cdecl;external gtkdll name 'gtk_clist_set_foreground';
  275. procedure gtk_clist_set_background(clist:PGtkCList; row:gint; color:PGdkColor);cdecl;external gtkdll name 'gtk_clist_set_background';
  276. procedure gtk_clist_set_cell_style(clist:PGtkCList; row:gint; column:gint; style:PGtkStyle);cdecl;external gtkdll name 'gtk_clist_set_cell_style';
  277. function gtk_clist_get_cell_style(clist:PGtkCList; row:gint; column:gint):PGtkStyle;cdecl;external gtkdll name 'gtk_clist_get_cell_style';
  278. procedure gtk_clist_set_row_style(clist:PGtkCList; row:gint; style:PGtkStyle);cdecl;external gtkdll name 'gtk_clist_set_row_style';
  279. function gtk_clist_get_row_style(clist:PGtkCList; row:gint):PGtkStyle;cdecl;external gtkdll name 'gtk_clist_get_row_style';
  280. procedure gtk_clist_set_shift(clist:PGtkCList; row:gint; column:gint; vertical:gint; horizontal:gint);cdecl;external gtkdll name 'gtk_clist_set_shift';
  281. function gtk_clist_prepend(clist:PGtkCList; thetext:PPgchar):gint;cdecl;external gtkdll name 'gtk_clist_prepend';
  282. function gtk_clist_append(clist:PGtkCList; thetext:PPgchar):gint;cdecl;external gtkdll name 'gtk_clist_append';
  283. procedure gtk_clist_insert(clist:PGtkCList; row:gint; thetext:PPgchar);cdecl;external gtkdll name 'gtk_clist_insert';
  284. procedure gtk_clist_remove(clist:PGtkCList; row:gint);cdecl;external gtkdll name 'gtk_clist_remove';
  285. procedure gtk_clist_set_row_data(clist:PGtkCList; row:gint; data:gpointer);cdecl;external gtkdll name 'gtk_clist_set_row_data';
  286. procedure gtk_clist_set_row_data_full(clist:PGtkCList; row:gint; data:gpointer; destroy:TGtkDestroyNotify);cdecl;external gtkdll name 'gtk_clist_set_row_data_full';
  287. function gtk_clist_get_row_data(clist:PGtkCList; row:gint):gpointer;cdecl;external gtkdll name 'gtk_clist_get_row_data';
  288. function gtk_clist_find_row_from_data(clist:PGtkCList; data:gpointer):gint;cdecl;external gtkdll name 'gtk_clist_find_row_from_data';
  289. procedure gtk_clist_select_row(clist:PGtkCList; row:gint; column:gint);cdecl;external gtkdll name 'gtk_clist_select_row';
  290. procedure gtk_clist_unselect_row(clist:PGtkCList; row:gint; column:gint);cdecl;external gtkdll name 'gtk_clist_unselect_row';
  291. procedure gtk_clist_clear(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_clear';
  292. function gtk_clist_get_selection_info(clist:PGtkCList; x:gint; y:gint; row:Pgint; column:Pgint):gint;cdecl;external gtkdll name 'gtk_clist_get_selection_info';
  293. procedure gtk_clist_select_all(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_select_all';
  294. procedure gtk_clist_unselect_all(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_unselect_all';
  295. procedure gtk_clist_swap_rows(clist:PGtkCList; row1:gint; row2:gint);cdecl;external gtkdll name 'gtk_clist_swap_rows';
  296. procedure gtk_clist_row_move(clist:PGtkCList; source_row:gint; dest_row:gint);cdecl;external gtkdll name 'gtk_clist_row_move';
  297. procedure gtk_clist_set_compare_func(clist:PGtkCList; cmp_func:TGtkCListCompareFunc);cdecl;external gtkdll name 'gtk_clist_set_compare_func';
  298. procedure gtk_clist_set_sort_column(clist:PGtkCList; column:gint);cdecl;external gtkdll name 'gtk_clist_set_sort_column';
  299. procedure gtk_clist_set_sort_type(clist:PGtkCList; sort_type:TGtkSortType);cdecl;external gtkdll name 'gtk_clist_set_sort_type';
  300. procedure gtk_clist_sort(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_sort';
  301. procedure gtk_clist_set_auto_sort(clist:PGtkCList; auto_sort:gboolean);cdecl;external gtkdll name 'gtk_clist_set_auto_sort';
  302. {$endif read_interface}
  303. {****************************************************************************
  304. Implementation
  305. ****************************************************************************}
  306. {$ifdef read_implementation}
  307. function visible(var a : TGtkCListColumn) : guint;
  308. begin
  309. visible:=(a.flag0 and bm_TGtkCListColumn_visible) shr bp_TGtkCListColumn_visible;
  310. end;
  311. procedure set_visible(var a : TGtkCListColumn; __visible : guint);
  312. begin
  313. a.flag0:=a.flag0 or ((__visible shl bp_TGtkCListColumn_visible) and bm_TGtkCListColumn_visible);
  314. end;
  315. function width_set(var a : TGtkCListColumn) : guint;
  316. begin
  317. width_set:=(a.flag0 and bm_TGtkCListColumn_width_set) shr bp_TGtkCListColumn_width_set;
  318. end;
  319. procedure set_width_set(var a : TGtkCListColumn; __width_set : guint);
  320. begin
  321. a.flag0:=a.flag0 or ((__width_set shl bp_TGtkCListColumn_width_set) and bm_TGtkCListColumn_width_set);
  322. end;
  323. function resizeable(var a : TGtkCListColumn) : guint;
  324. begin
  325. resizeable:=(a.flag0 and bm_TGtkCListColumn_resizeable) shr bp_TGtkCListColumn_resizeable;
  326. end;
  327. procedure set_resizeable(var a : TGtkCListColumn; __resizeable : guint);
  328. begin
  329. a.flag0:=a.flag0 or ((__resizeable shl bp_TGtkCListColumn_resizeable) and bm_TGtkCListColumn_resizeable);
  330. end;
  331. function auto_resize(var a : TGtkCListColumn) : guint;
  332. begin
  333. auto_resize:=(a.flag0 and bm_TGtkCListColumn_auto_resize) shr bp_TGtkCListColumn_auto_resize;
  334. end;
  335. procedure set_auto_resize(var a : TGtkCListColumn; __auto_resize : guint);
  336. begin
  337. a.flag0:=a.flag0 or ((__auto_resize shl bp_TGtkCListColumn_auto_resize) and bm_TGtkCListColumn_auto_resize);
  338. end;
  339. function button_passive(var a : TGtkCListColumn) : guint;
  340. begin
  341. button_passive:=(a.flag0 and bm_TGtkCListColumn_button_passive) shr bp_TGtkCListColumn_button_passive;
  342. end;
  343. procedure set_button_passive(var a : TGtkCListColumn; __button_passive : guint);
  344. begin
  345. a.flag0:=a.flag0 or ((__button_passive shl bp_TGtkCListColumn_button_passive) and bm_TGtkCListColumn_button_passive);
  346. end;
  347. function fg_set(var a : TGtkCListRow) : guint;cdecl;
  348. begin
  349. fg_set:=(a.flag0 and bm_TGtkCListRow_fg_set) shr bp_TGtkCListRow_fg_set;
  350. end;
  351. procedure set_fg_set(var a : TGtkCListRow; __fg_set : guint);cdecl;
  352. begin
  353. a.flag0:=a.flag0 or ((__fg_set shl bp_TGtkCListRow_fg_set) and bm_TGtkCListRow_fg_set);
  354. end;
  355. function bg_set(var a : TGtkCListRow) : guint;cdecl;
  356. begin
  357. bg_set:=(a.flag0 and bm_TGtkCListRow_bg_set) shr bp_TGtkCListRow_bg_set;
  358. end;
  359. procedure set_bg_set(var a : TGtkCListRow; __bg_set : guint);cdecl;
  360. begin
  361. a.flag0:=a.flag0 or ((__bg_set shl bp_TGtkCListRow_bg_set) and bm_TGtkCListRow_bg_set);
  362. end;
  363. function selectable(var a : TGtkCListRow) : guint;
  364. begin
  365. selectable:=(a.flag0 and bm_TGtkCListRow_selectable) shr bp_TGtkCListRow_selectable;
  366. end;
  367. procedure set_selectable(var a : TGtkCListRow; __selectable : guint);
  368. begin
  369. a.flag0:=a.flag0 or ((__selectable shl bp_TGtkCListRow_selectable) and bm_TGtkCListRow_selectable);
  370. end;
  371. function GTK_IS_CLIST(obj:pointer):boolean;
  372. begin
  373. GTK_IS_CLIST:=(obj<>nil) and GTK_IS_CLIST_CLASS(PGtkTypeObject(obj)^.klass);
  374. end;
  375. function GTK_IS_CLIST_CLASS(klass:pointer):boolean;
  376. begin
  377. GTK_IS_CLIST_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CLIST_TYPE);
  378. end;
  379. {$endif read_implementation}