gtktreeview.h 27.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/* gtktreeview.h
 * Copyright (C) 2000  Red Hat, Inc.,  Jonathan Blandford <jrb@redhat.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
Javier Jardón's avatar
Javier Jardón committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16
 */
17

18 19 20
#ifndef __GTK_TREE_VIEW_H__
#define __GTK_TREE_VIEW_H__

21
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22 23 24
#error "Only <gtk/gtk.h> can be included directly."
#endif

25 26 27
#include <gtk/gtkcontainer.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtktreeviewcolumn.h>
Havoc Pennington's avatar
Havoc Pennington committed
28
#include <gtk/gtkdnd.h>
29
#include <gtk/gtkentry.h>
30

31 32
G_BEGIN_DECLS

33 34 35 36 37 38 39 40 41
/**
 * GtkTreeViewDropPosition:
 * @GTK_TREE_VIEW_DROP_BEFORE: dropped row is inserted before
 * @GTK_TREE_VIEW_DROP_AFTER: dropped row is inserted after
 * @GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: dropped row becomes a child or is inserted before
 * @GTK_TREE_VIEW_DROP_INTO_OR_AFTER: dropped row becomes a child or is inserted after
 *
 * An enum for determining where a dropped row goes.
 */
Havoc Pennington's avatar
Havoc Pennington committed
42 43 44 45 46 47 48 49 50 51 52 53
typedef enum
{
  /* drop before/after this row */
  GTK_TREE_VIEW_DROP_BEFORE,
  GTK_TREE_VIEW_DROP_AFTER,
  /* drop as a child of this row (with fallback to before or after
   * if into is not possible)
   */
  GTK_TREE_VIEW_DROP_INTO_OR_BEFORE,
  GTK_TREE_VIEW_DROP_INTO_OR_AFTER
} GtkTreeViewDropPosition;

54
#define GTK_TYPE_TREE_VIEW		(gtk_tree_view_get_type ())
Manish Singh's avatar
Manish Singh committed
55 56 57 58 59
#define GTK_TREE_VIEW(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_VIEW, GtkTreeView))
#define GTK_TREE_VIEW_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW, GtkTreeViewClass))
#define GTK_IS_TREE_VIEW(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_VIEW))
#define GTK_IS_TREE_VIEW_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW))
#define GTK_TREE_VIEW_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW, GtkTreeViewClass))
60

61 62 63
typedef struct _GtkTreeView           GtkTreeView;
typedef struct _GtkTreeViewClass      GtkTreeViewClass;
typedef struct _GtkTreeViewPrivate    GtkTreeViewPrivate;
64 65 66 67 68 69 70
typedef struct _GtkTreeSelection      GtkTreeSelection;
typedef struct _GtkTreeSelectionClass GtkTreeSelectionClass;

struct _GtkTreeView
{
  GtkContainer parent;

71
  /*< private >*/
72
  GtkTreeViewPrivate *priv;
73 74 75 76 77 78
};

struct _GtkTreeViewClass
{
  GtkContainerClass parent_class;

79 80 81
  void     (* row_activated)              (GtkTreeView       *tree_view,
				           GtkTreePath       *path,
					   GtkTreeViewColumn *column);
82
  gboolean (* test_expand_row)            (GtkTreeView       *tree_view,
83 84
				           GtkTreeIter       *iter,
				           GtkTreePath       *path);
85 86 87 88 89 90 91
  gboolean (* test_collapse_row)          (GtkTreeView       *tree_view,
				           GtkTreeIter       *iter,
				           GtkTreePath       *path);
  void     (* row_expanded)               (GtkTreeView       *tree_view,
				           GtkTreeIter       *iter,
				           GtkTreePath       *path);
  void     (* row_collapsed)              (GtkTreeView       *tree_view,
92 93 94
				           GtkTreeIter       *iter,
				           GtkTreePath       *path);
  void     (* columns_changed)            (GtkTreeView       *tree_view);
95
  void     (* cursor_changed)             (GtkTreeView       *tree_view);
96 97

  /* Key Binding signals */
98
  gboolean (* move_cursor)                (GtkTreeView       *tree_view,
99
				           GtkMovementStep    step,
100
				           gint               count);
101 102 103
  gboolean (* select_all)                 (GtkTreeView       *tree_view);
  gboolean (* unselect_all)               (GtkTreeView       *tree_view);
  gboolean (* select_cursor_row)          (GtkTreeView       *tree_view,
104
					   gboolean           start_editing);
105 106
  gboolean (* toggle_cursor_row)          (GtkTreeView       *tree_view);
  gboolean (* expand_collapse_cursor_row) (GtkTreeView       *tree_view,
107 108 109
					   gboolean           logical,
					   gboolean           expand,
					   gboolean           open_all);
110 111
  gboolean (* select_cursor_parent)       (GtkTreeView       *tree_view);
  gboolean (* start_interactive_search)   (GtkTreeView       *tree_view);
112 113 114 115 116 117

  /* Padding for future expansion */
  void (*_gtk_reserved1) (void);
  void (*_gtk_reserved2) (void);
  void (*_gtk_reserved3) (void);
  void (*_gtk_reserved4) (void);
118 119 120 121
  void (*_gtk_reserved5) (void);
  void (*_gtk_reserved6) (void);
  void (*_gtk_reserved7) (void);
  void (*_gtk_reserved8) (void);
122 123
};

124 125 126 127 128 129
/**
 * GtkTreeViewColumnDropFunc:
 * @tree_view: A #GtkTreeView
 * @column: The #GtkTreeViewColumn being dragged
 * @prev_column: A #GtkTreeViewColumn on one side of @column
 * @next_column: A #GtkTreeViewColumn on the other side of @column
130
 * @data: (closure): user data
131 132 133 134 135 136 137 138 139 140 141 142
 *
 * Function type for determining whether @column can be dropped in a
 * particular spot (as determined by @prev_column and @next_column).  In
 * left to right locales, @prev_column is on the left of the potential drop
 * spot, and @next_column is on the right.  In right to left mode, this is
 * reversed.  This function should return %TRUE if the spot is a valid drop
 * spot.  Please note that returning %TRUE does not actually indicate that
 * the column drop was made, but is meant only to indicate a possible drop
 * spot to the user.
 *
 * Returns: %TRUE, if @column can be dropped in this spot
 */
143 144 145 146 147
typedef gboolean (* GtkTreeViewColumnDropFunc) (GtkTreeView             *tree_view,
						GtkTreeViewColumn       *column,
						GtkTreeViewColumn       *prev_column,
						GtkTreeViewColumn       *next_column,
						gpointer                 data);
148 149 150 151

/**
 * GtkTreeViewMappingFunc:
 * @tree_view: A #GtkTreeView
152
 * @path: The path that’s expanded
153 154 155 156
 * @user_data: user data
 *
 * Function used for gtk_tree_view_map_expanded_rows().
 */
157 158 159
typedef void     (* GtkTreeViewMappingFunc)    (GtkTreeView             *tree_view,
						GtkTreePath             *path,
						gpointer                 user_data);
160 161 162 163 164 165 166 167

/**
 * GtkTreeViewSearchEqualFunc:
 * @model: the #GtkTreeModel being searched
 * @column: the search column set by gtk_tree_view_set_search_column()
 * @key: the key string to compare with
 * @iter: a #GtkTreeIter pointing the row of @model that should be compared
 *  with @key.
168
 * @search_data: (closure): user data from gtk_tree_view_set_search_equal_func()
169 170 171 172 173 174 175 176
 *
 * A function used for checking whether a row in @model matches
 * a search key string entered by the user. Note the return value
 * is reversed from what you would normally expect, though it
 * has some similarity to strcmp() returning 0 for equal strings.
 *
 * Returns: %FALSE if the row matches, %TRUE otherwise.
 */
177 178
typedef gboolean (*GtkTreeViewSearchEqualFunc) (GtkTreeModel            *model,
						gint                     column,
179
						const gchar             *key,
Jonathan Blandford's avatar
Jonathan Blandford committed
180 181
						GtkTreeIter             *iter,
						gpointer                 search_data);
182 183 184 185 186

/**
 * GtkTreeViewRowSeparatorFunc:
 * @model: the #GtkTreeModel
 * @iter: a #GtkTreeIter pointing at a row in @model
187
 * @data: (closure): user data
188 189 190 191 192 193 194 195
 *
 * Function type for determining whether the row pointed to by @iter should
 * be rendered as a separator. A common way to implement this is to have a
 * boolean column in the model, whose values the #GtkTreeViewRowSeparatorFunc
 * returns.
 *
 * Returns: %TRUE if the row is a separator
 */
196 197 198
typedef gboolean (*GtkTreeViewRowSeparatorFunc) (GtkTreeModel      *model,
						 GtkTreeIter       *iter,
						 gpointer           data);
199 200 201
typedef void     (*GtkTreeViewSearchPositionFunc) (GtkTreeView  *tree_view,
						   GtkWidget    *search_dialog,
						   gpointer      user_data);
202 203 204


/* Creators */
205
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
206
GType                  gtk_tree_view_get_type                      (void) G_GNUC_CONST;
207
GDK_AVAILABLE_IN_ALL
208
GtkWidget             *gtk_tree_view_new                           (void);
209
GDK_AVAILABLE_IN_ALL
210 211 212
GtkWidget             *gtk_tree_view_new_with_model                (GtkTreeModel              *model);

/* Accessors */
213
GDK_AVAILABLE_IN_ALL
214
GtkTreeModel          *gtk_tree_view_get_model                     (GtkTreeView               *tree_view);
215
GDK_AVAILABLE_IN_ALL
216 217
void                   gtk_tree_view_set_model                     (GtkTreeView               *tree_view,
								    GtkTreeModel              *model);
218
GDK_AVAILABLE_IN_ALL
219
GtkTreeSelection      *gtk_tree_view_get_selection                 (GtkTreeView               *tree_view);
220

221
GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_get_hadjustment)
222
GtkAdjustment         *gtk_tree_view_get_hadjustment               (GtkTreeView               *tree_view);
223
GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_set_hadjustment)
224 225
void                   gtk_tree_view_set_hadjustment               (GtkTreeView               *tree_view,
								    GtkAdjustment             *adjustment);
226
GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_get_vadjustment)
227
GtkAdjustment         *gtk_tree_view_get_vadjustment               (GtkTreeView               *tree_view);
228
GDK_DEPRECATED_IN_3_0_FOR(gtk_scrollable_set_vadjustment)
229 230
void                   gtk_tree_view_set_vadjustment               (GtkTreeView               *tree_view,
								    GtkAdjustment             *adjustment);
231 232


233
GDK_AVAILABLE_IN_ALL
234
gboolean               gtk_tree_view_get_headers_visible           (GtkTreeView               *tree_view);
235
GDK_AVAILABLE_IN_ALL
236 237
void                   gtk_tree_view_set_headers_visible           (GtkTreeView               *tree_view,
								    gboolean                   headers_visible);
238
GDK_AVAILABLE_IN_ALL
239
void                   gtk_tree_view_columns_autosize              (GtkTreeView               *tree_view);
240
GDK_AVAILABLE_IN_ALL
241
gboolean               gtk_tree_view_get_headers_clickable         (GtkTreeView *tree_view);
242
GDK_AVAILABLE_IN_ALL
243 244
void                   gtk_tree_view_set_headers_clickable         (GtkTreeView               *tree_view,
								    gboolean                   setting);
245
GDK_DEPRECATED_IN_3_14
246 247
void                   gtk_tree_view_set_rules_hint                (GtkTreeView               *tree_view,
								    gboolean                   setting);
248
GDK_DEPRECATED_IN_3_14
249
gboolean               gtk_tree_view_get_rules_hint                (GtkTreeView               *tree_view);
250 251 252 253 254
GDK_AVAILABLE_IN_3_8
gboolean               gtk_tree_view_get_activate_on_single_click  (GtkTreeView               *tree_view);
GDK_AVAILABLE_IN_3_8
void                   gtk_tree_view_set_activate_on_single_click  (GtkTreeView               *tree_view,
								    gboolean                   single);
255 256

/* Column funtions */
257
GDK_AVAILABLE_IN_ALL
258 259
gint                   gtk_tree_view_append_column                 (GtkTreeView               *tree_view,
								    GtkTreeViewColumn         *column);
260
GDK_AVAILABLE_IN_ALL
261 262
gint                   gtk_tree_view_remove_column                 (GtkTreeView               *tree_view,
								    GtkTreeViewColumn         *column);
263
GDK_AVAILABLE_IN_ALL
264 265 266
gint                   gtk_tree_view_insert_column                 (GtkTreeView               *tree_view,
								    GtkTreeViewColumn         *column,
								    gint                       position);
267
GDK_AVAILABLE_IN_ALL
268 269
gint                   gtk_tree_view_insert_column_with_attributes (GtkTreeView               *tree_view,
								    gint                       position,
270
								    const gchar               *title,
271
								    GtkCellRenderer           *cell,
272
								    ...) G_GNUC_NULL_TERMINATED;
273
GDK_AVAILABLE_IN_ALL
274 275
gint                   gtk_tree_view_insert_column_with_data_func  (GtkTreeView               *tree_view,
								    gint                       position,
276
								    const gchar               *title,
277
								    GtkCellRenderer           *cell,
278
                                                                    GtkTreeCellDataFunc        func,
279 280
                                                                    gpointer                   data,
                                                                    GDestroyNotify             dnotify);
281 282

GDK_AVAILABLE_IN_3_4
283
guint                  gtk_tree_view_get_n_columns                 (GtkTreeView               *tree_view);
284
GDK_AVAILABLE_IN_ALL
285 286
GtkTreeViewColumn     *gtk_tree_view_get_column                    (GtkTreeView               *tree_view,
								    gint                       n);
287
GDK_AVAILABLE_IN_ALL
288
GList                 *gtk_tree_view_get_columns                   (GtkTreeView               *tree_view);
289
GDK_AVAILABLE_IN_ALL
290
void                   gtk_tree_view_move_column_after             (GtkTreeView               *tree_view,
291
								    GtkTreeViewColumn         *column,
292
								    GtkTreeViewColumn         *base_column);
293
GDK_AVAILABLE_IN_ALL
294
void                   gtk_tree_view_set_expander_column           (GtkTreeView               *tree_view,
295
								    GtkTreeViewColumn         *column);
296
GDK_AVAILABLE_IN_ALL
297
GtkTreeViewColumn     *gtk_tree_view_get_expander_column           (GtkTreeView               *tree_view);
298
GDK_AVAILABLE_IN_ALL
299 300 301
void                   gtk_tree_view_set_column_drag_function      (GtkTreeView               *tree_view,
								    GtkTreeViewColumnDropFunc  func,
								    gpointer                   user_data,
302
								    GDestroyNotify             destroy);
Havoc Pennington's avatar
Havoc Pennington committed
303

304
/* Actions */
305
GDK_AVAILABLE_IN_ALL
306 307 308
void                   gtk_tree_view_scroll_to_point               (GtkTreeView               *tree_view,
								    gint                       tree_x,
								    gint                       tree_y);
309
GDK_AVAILABLE_IN_ALL
310 311 312
void                   gtk_tree_view_scroll_to_cell                (GtkTreeView               *tree_view,
								    GtkTreePath               *path,
								    GtkTreeViewColumn         *column,
313
								    gboolean                   use_align,
314 315
								    gfloat                     row_align,
								    gfloat                     col_align);
316
GDK_AVAILABLE_IN_ALL
317 318 319
void                   gtk_tree_view_row_activated                 (GtkTreeView               *tree_view,
								    GtkTreePath               *path,
								    GtkTreeViewColumn         *column);
320
GDK_AVAILABLE_IN_ALL
321
void                   gtk_tree_view_expand_all                    (GtkTreeView               *tree_view);
322
GDK_AVAILABLE_IN_ALL
323
void                   gtk_tree_view_collapse_all                  (GtkTreeView               *tree_view);
324
GDK_AVAILABLE_IN_ALL
325 326
void                   gtk_tree_view_expand_to_path                (GtkTreeView               *tree_view,
								    GtkTreePath               *path);
327
GDK_AVAILABLE_IN_ALL
328 329 330
gboolean               gtk_tree_view_expand_row                    (GtkTreeView               *tree_view,
								    GtkTreePath               *path,
								    gboolean                   open_all);
331
GDK_AVAILABLE_IN_ALL
332 333
gboolean               gtk_tree_view_collapse_row                  (GtkTreeView               *tree_view,
								    GtkTreePath               *path);
334
GDK_AVAILABLE_IN_ALL
335 336 337
void                   gtk_tree_view_map_expanded_rows             (GtkTreeView               *tree_view,
								    GtkTreeViewMappingFunc     func,
								    gpointer                   data);
338
GDK_AVAILABLE_IN_ALL
339 340
gboolean               gtk_tree_view_row_expanded                  (GtkTreeView               *tree_view,
								    GtkTreePath               *path);
341
GDK_AVAILABLE_IN_ALL
342 343
void                   gtk_tree_view_set_reorderable               (GtkTreeView               *tree_view,
								    gboolean                   reorderable);
344
GDK_AVAILABLE_IN_ALL
345
gboolean               gtk_tree_view_get_reorderable               (GtkTreeView               *tree_view);
346
GDK_AVAILABLE_IN_ALL
347
void                   gtk_tree_view_set_cursor                    (GtkTreeView               *tree_view,
348 349 350
								    GtkTreePath               *path,
								    GtkTreeViewColumn         *focus_column,
								    gboolean                   start_editing);
351
GDK_AVAILABLE_IN_ALL
352 353 354 355 356
void                   gtk_tree_view_set_cursor_on_cell            (GtkTreeView               *tree_view,
								    GtkTreePath               *path,
								    GtkTreeViewColumn         *focus_column,
								    GtkCellRenderer           *focus_cell,
								    gboolean                   start_editing);
357
GDK_AVAILABLE_IN_ALL
358 359 360
void                   gtk_tree_view_get_cursor                    (GtkTreeView               *tree_view,
								    GtkTreePath              **path,
								    GtkTreeViewColumn        **focus_column);
361

362 363

/* Layout information */
364
GDK_AVAILABLE_IN_ALL
365
GdkWindow             *gtk_tree_view_get_bin_window                (GtkTreeView               *tree_view);
366
GDK_AVAILABLE_IN_ALL
367 368 369 370 371 372 373
gboolean               gtk_tree_view_get_path_at_pos               (GtkTreeView               *tree_view,
								    gint                       x,
								    gint                       y,
								    GtkTreePath              **path,
								    GtkTreeViewColumn        **column,
								    gint                      *cell_x,
								    gint                      *cell_y);
374
GDK_AVAILABLE_IN_ALL
375 376 377 378
void                   gtk_tree_view_get_cell_area                 (GtkTreeView               *tree_view,
								    GtkTreePath               *path,
								    GtkTreeViewColumn         *column,
								    GdkRectangle              *rect);
379
GDK_AVAILABLE_IN_ALL
380 381 382 383
void                   gtk_tree_view_get_background_area           (GtkTreeView               *tree_view,
								    GtkTreePath               *path,
								    GtkTreeViewColumn         *column,
								    GdkRectangle              *rect);
384
GDK_AVAILABLE_IN_ALL
385 386
void                   gtk_tree_view_get_visible_rect              (GtkTreeView               *tree_view,
								    GdkRectangle              *visible_rect);
387
GDK_AVAILABLE_IN_ALL
388 389 390
gboolean               gtk_tree_view_get_visible_range             (GtkTreeView               *tree_view,
								    GtkTreePath              **start_path,
								    GtkTreePath              **end_path);
391
GDK_AVAILABLE_IN_ALL
392 393 394 395 396 397 398
gboolean               gtk_tree_view_is_blank_at_pos               (GtkTreeView               *tree_view,
                                                                    gint                       x,
                                                                    gint                       y,
                                                                    GtkTreePath              **path,
                                                                    GtkTreeViewColumn        **column,
                                                                    gint                      *cell_x,
                                                                    gint                      *cell_y);
Havoc Pennington's avatar
Havoc Pennington committed
399 400

/* Drag-and-Drop support */
401
GDK_AVAILABLE_IN_ALL
402
void                   gtk_tree_view_enable_model_drag_source      (GtkTreeView               *tree_view,
403 404 405
								    GdkModifierType            start_button_mask,
								    const GtkTargetEntry      *targets,
								    gint                       n_targets,
406
								    GdkDragAction              actions);
407
GDK_AVAILABLE_IN_ALL
408
void                   gtk_tree_view_enable_model_drag_dest        (GtkTreeView               *tree_view,
409 410
								    const GtkTargetEntry      *targets,
								    gint                       n_targets,
411
								    GdkDragAction              actions);
412
GDK_AVAILABLE_IN_ALL
413
void                   gtk_tree_view_unset_rows_drag_source        (GtkTreeView               *tree_view);
414
GDK_AVAILABLE_IN_ALL
415
void                   gtk_tree_view_unset_rows_drag_dest          (GtkTreeView               *tree_view);
Havoc Pennington's avatar
Havoc Pennington committed
416

417

Havoc Pennington's avatar
Havoc Pennington committed
418
/* These are useful to implement your own custom stuff. */
419
GDK_AVAILABLE_IN_ALL
420 421 422
void                   gtk_tree_view_set_drag_dest_row             (GtkTreeView               *tree_view,
								    GtkTreePath               *path,
								    GtkTreeViewDropPosition    pos);
423
GDK_AVAILABLE_IN_ALL
424 425 426
void                   gtk_tree_view_get_drag_dest_row             (GtkTreeView               *tree_view,
								    GtkTreePath              **path,
								    GtkTreeViewDropPosition   *pos);
427
GDK_AVAILABLE_IN_ALL
428 429 430 431 432
gboolean               gtk_tree_view_get_dest_row_at_pos           (GtkTreeView               *tree_view,
								    gint                       drag_x,
								    gint                       drag_y,
								    GtkTreePath              **path,
								    GtkTreeViewDropPosition   *pos);
433
GDK_AVAILABLE_IN_ALL
434
cairo_surface_t       *gtk_tree_view_create_row_drag_icon          (GtkTreeView               *tree_view,
435
								    GtkTreePath               *path);
436

437
/* Interactive search */
438
GDK_AVAILABLE_IN_ALL
439
void                       gtk_tree_view_set_enable_search     (GtkTreeView                *tree_view,
440
								gboolean                    enable_search);
441
GDK_AVAILABLE_IN_ALL
442
gboolean                   gtk_tree_view_get_enable_search     (GtkTreeView                *tree_view);
443
GDK_AVAILABLE_IN_ALL
444
gint                       gtk_tree_view_get_search_column     (GtkTreeView                *tree_view);
445
GDK_AVAILABLE_IN_ALL
446 447
void                       gtk_tree_view_set_search_column     (GtkTreeView                *tree_view,
								gint                        column);
448
GDK_AVAILABLE_IN_ALL
449
GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView                *tree_view);
450
GDK_AVAILABLE_IN_ALL
451
void                       gtk_tree_view_set_search_equal_func (GtkTreeView                *tree_view,
452 453
								GtkTreeViewSearchEqualFunc  search_equal_func,
								gpointer                    search_user_data,
454
								GDestroyNotify              search_destroy);
455

456
GDK_AVAILABLE_IN_ALL
457
GtkEntry                     *gtk_tree_view_get_search_entry         (GtkTreeView                   *tree_view);
458
GDK_AVAILABLE_IN_ALL
459 460
void                          gtk_tree_view_set_search_entry         (GtkTreeView                   *tree_view,
								      GtkEntry                      *entry);
461
GDK_AVAILABLE_IN_ALL
462
GtkTreeViewSearchPositionFunc gtk_tree_view_get_search_position_func (GtkTreeView                   *tree_view);
463
GDK_AVAILABLE_IN_ALL
464 465 466 467 468
void                          gtk_tree_view_set_search_position_func (GtkTreeView                   *tree_view,
								      GtkTreeViewSearchPositionFunc  func,
								      gpointer                       data,
								      GDestroyNotify                 destroy);

469
/* Convert between the different coordinate systems */
470
GDK_AVAILABLE_IN_ALL
471 472 473 474 475
void gtk_tree_view_convert_widget_to_tree_coords       (GtkTreeView *tree_view,
							gint         wx,
							gint         wy,
							gint        *tx,
							gint        *ty);
476
GDK_AVAILABLE_IN_ALL
477 478 479 480 481
void gtk_tree_view_convert_tree_to_widget_coords       (GtkTreeView *tree_view,
							gint         tx,
							gint         ty,
							gint        *wx,
							gint        *wy);
482
GDK_AVAILABLE_IN_ALL
483 484 485 486 487
void gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
							gint         wx,
							gint         wy,
							gint        *bx,
							gint        *by);
488
GDK_AVAILABLE_IN_ALL
489 490 491 492 493
void gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
							gint         bx,
							gint         by,
							gint        *wx,
							gint        *wy);
494
GDK_AVAILABLE_IN_ALL
495 496 497 498 499
void gtk_tree_view_convert_tree_to_bin_window_coords   (GtkTreeView *tree_view,
							gint         tx,
							gint         ty,
							gint        *bx,
							gint        *by);
500
GDK_AVAILABLE_IN_ALL
501 502 503 504 505 506
void gtk_tree_view_convert_bin_window_to_tree_coords   (GtkTreeView *tree_view,
							gint         bx,
							gint         by,
							gint        *tx,
							gint        *ty);

507 508
/* This function should really never be used.  It is just for use by ATK.
 */
509 510 511 512
typedef void (* GtkTreeDestroyCountFunc)  (GtkTreeView             *tree_view,
					   GtkTreePath             *path,
					   gint                     children,
					   gpointer                 user_data);
513
GDK_DEPRECATED_IN_3_4
514 515 516
void gtk_tree_view_set_destroy_count_func (GtkTreeView             *tree_view,
					   GtkTreeDestroyCountFunc  func,
					   gpointer                 data,
517
					   GDestroyNotify           destroy);
518

519
GDK_AVAILABLE_IN_ALL
520
void     gtk_tree_view_set_fixed_height_mode (GtkTreeView          *tree_view,
521
					      gboolean              enable);
522
GDK_AVAILABLE_IN_ALL
523
gboolean gtk_tree_view_get_fixed_height_mode (GtkTreeView          *tree_view);
524
GDK_AVAILABLE_IN_ALL
525 526
void     gtk_tree_view_set_hover_selection   (GtkTreeView          *tree_view,
					      gboolean              hover);
527
GDK_AVAILABLE_IN_ALL
528
gboolean gtk_tree_view_get_hover_selection   (GtkTreeView          *tree_view);
529
GDK_AVAILABLE_IN_ALL
530 531
void     gtk_tree_view_set_hover_expand      (GtkTreeView          *tree_view,
					      gboolean              expand);
532
GDK_AVAILABLE_IN_ALL
533
gboolean gtk_tree_view_get_hover_expand      (GtkTreeView          *tree_view);
534
GDK_AVAILABLE_IN_ALL
535 536
void     gtk_tree_view_set_rubber_banding    (GtkTreeView          *tree_view,
					      gboolean              enable);
537
GDK_AVAILABLE_IN_ALL
538
gboolean gtk_tree_view_get_rubber_banding    (GtkTreeView          *tree_view);
539

540
GDK_AVAILABLE_IN_ALL
541 542
gboolean gtk_tree_view_is_rubber_banding_active (GtkTreeView       *tree_view);

543
GDK_AVAILABLE_IN_ALL
544
GtkTreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func (GtkTreeView               *tree_view);
545
GDK_AVAILABLE_IN_ALL
546 547 548
void                        gtk_tree_view_set_row_separator_func (GtkTreeView                *tree_view,
								  GtkTreeViewRowSeparatorFunc func,
								  gpointer                    data,
549
								  GDestroyNotify              destroy);
550

551
GDK_AVAILABLE_IN_ALL
552
GtkTreeViewGridLines        gtk_tree_view_get_grid_lines         (GtkTreeView                *tree_view);
553
GDK_AVAILABLE_IN_ALL
554 555
void                        gtk_tree_view_set_grid_lines         (GtkTreeView                *tree_view,
								  GtkTreeViewGridLines        grid_lines);
556
GDK_AVAILABLE_IN_ALL
557
gboolean                    gtk_tree_view_get_enable_tree_lines  (GtkTreeView                *tree_view);
558
GDK_AVAILABLE_IN_ALL
559 560
void                        gtk_tree_view_set_enable_tree_lines  (GtkTreeView                *tree_view,
								  gboolean                    enabled);
561
GDK_AVAILABLE_IN_ALL
562 563
void                        gtk_tree_view_set_show_expanders     (GtkTreeView                *tree_view,
								  gboolean                    enabled);
564
GDK_AVAILABLE_IN_ALL
565
gboolean                    gtk_tree_view_get_show_expanders     (GtkTreeView                *tree_view);
566
GDK_AVAILABLE_IN_ALL
567 568
void                        gtk_tree_view_set_level_indentation  (GtkTreeView                *tree_view,
								  gint                        indentation);
569
GDK_AVAILABLE_IN_ALL
570
gint                        gtk_tree_view_get_level_indentation  (GtkTreeView                *tree_view);
571

572
/* Convenience functions for setting tooltips */
573
GDK_AVAILABLE_IN_ALL
574 575 576
void          gtk_tree_view_set_tooltip_row    (GtkTreeView       *tree_view,
						GtkTooltip        *tooltip,
						GtkTreePath       *path);
577
GDK_AVAILABLE_IN_ALL
578 579 580 581 582
void          gtk_tree_view_set_tooltip_cell   (GtkTreeView       *tree_view,
						GtkTooltip        *tooltip,
						GtkTreePath       *path,
						GtkTreeViewColumn *column,
						GtkCellRenderer   *cell);
583
GDK_AVAILABLE_IN_ALL
584 585 586 587 588 589 590
gboolean      gtk_tree_view_get_tooltip_context(GtkTreeView       *tree_view,
						gint              *x,
						gint              *y,
						gboolean           keyboard_tip,
						GtkTreeModel     **model,
						GtkTreePath      **path,
						GtkTreeIter       *iter);
591
GDK_AVAILABLE_IN_ALL
592 593
void          gtk_tree_view_set_tooltip_column (GtkTreeView       *tree_view,
					        gint               column);
594
GDK_AVAILABLE_IN_ALL
595
gint          gtk_tree_view_get_tooltip_column (GtkTreeView       *tree_view);
596

597
G_END_DECLS
598 599 600


#endif /* __GTK_TREE_VIEW_H__ */