2 * Copyright (C) 2002, 2004 Anders Carlsson <andersca@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 #include "gtk/gtkiconview.h"
20 #ifndef __GTK_ICON_VIEW_PRIVATE_H__
21 #define __GTK_ICON_VIEW_PRIVATE_H__
23 typedef struct _GtkIconViewItem GtkIconViewItem;
24 struct _GtkIconViewItem
26 GdkRectangle cell_area;
34 guint selected_before_rubberbanding : 1;
38 struct _GtkIconViewPrivate
40 GtkCellArea *cell_area;
41 GtkCellAreaContext *cell_area_context;
43 gulong add_editable_id;
44 gulong remove_editable_id;
45 gulong context_changed_id;
47 GPtrArray *row_contexts;
51 GtkSelectionMode selection_mode;
55 GdkWindow *bin_window;
63 GtkAdjustment *hadjustment;
64 GtkAdjustment *vadjustment;
66 gint rubberband_x1, rubberband_y1;
67 gint rubberband_x2, rubberband_y2;
68 GdkDevice *rubberband_device;
70 guint scroll_timeout_id;
71 gint scroll_value_diff;
72 gint event_last_x, event_last_y;
74 GtkIconViewItem *anchor_item;
75 GtkIconViewItem *cursor_item;
77 GtkIconViewItem *last_single_clicked;
78 GtkIconViewItem *last_prelight;
80 GtkOrientation item_orientation;
95 GtkCellRenderer *pixbuf_cell;
96 GtkCellRenderer *text_cell;
99 GdkModifierType start_button_mask;
104 GdkDragAction source_actions;
105 GdkDragAction dest_actions;
107 GtkTreeRowReference *dest_item;
108 GtkIconViewDropPosition dest_pos;
111 GtkTreeRowReference *scroll_to_path;
112 gfloat scroll_to_row_align;
113 gfloat scroll_to_col_align;
114 guint scroll_to_use_align : 1;
116 guint source_set : 1;
118 guint reorderable : 1;
119 guint empty_view_drop :1;
121 guint modify_selection_pressed : 1;
122 guint extend_selection_pressed : 1;
124 guint draw_focus : 1;
126 /* GtkScrollablePolicy needs to be checked when
127 * driving the scrollable adjustment values */
128 guint hscroll_policy : 1;
129 guint vscroll_policy : 1;
131 guint doing_rubberband : 1;
135 void _gtk_icon_view_set_cell_data (GtkIconView *icon_view,
136 GtkIconViewItem *item);
137 void _gtk_icon_view_set_cursor_item (GtkIconView *icon_view,
138 GtkIconViewItem *item,
139 GtkCellRenderer *cursor_cell);
140 GtkIconViewItem * _gtk_icon_view_get_item_at_coords (GtkIconView *icon_view,
143 gboolean only_in_cell,
144 GtkCellRenderer **cell_at_pos);
145 void _gtk_icon_view_select_item (GtkIconView *icon_view,
146 GtkIconViewItem *item);
147 void _gtk_icon_view_unselect_item (GtkIconView *icon_view,
148 GtkIconViewItem *item);
152 #endif /* __GTK_ICON_VIEW_PRIVATE_H__ */