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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #include "gtk/gtkiconview.h"
22 #ifndef __GTK_ICON_VIEW_PRIVATE_H__
23 #define __GTK_ICON_VIEW_PRIVATE_H__
25 typedef struct _GtkIconViewItem GtkIconViewItem;
26 struct _GtkIconViewItem
28 /* First member is always the rectangle so it
29 * can be cast to a rectangle. */
30 GdkRectangle cell_area;
39 guint selected_before_rubberbanding : 1;
43 struct _GtkIconViewPrivate
45 GtkCellArea *cell_area;
46 GtkCellAreaContext *cell_area_context;
48 gulong add_editable_id;
49 gulong remove_editable_id;
50 gulong context_changed_id;
52 GPtrArray *row_contexts;
56 GtkSelectionMode selection_mode;
60 GdkWindow *bin_window;
68 GtkAdjustment *hadjustment;
69 GtkAdjustment *vadjustment;
71 gint rubberband_x1, rubberband_y1;
72 gint rubberband_x2, rubberband_y2;
73 GdkDevice *rubberband_device;
75 guint scroll_timeout_id;
76 gint scroll_value_diff;
77 gint event_last_x, event_last_y;
79 GtkIconViewItem *anchor_item;
80 GtkIconViewItem *cursor_item;
82 GtkIconViewItem *last_single_clicked;
83 GtkIconViewItem *last_prelight;
85 GtkOrientation item_orientation;
100 GtkCellRenderer *pixbuf_cell;
101 GtkCellRenderer *text_cell;
104 GdkModifierType start_button_mask;
109 GdkDragAction source_actions;
110 GdkDragAction dest_actions;
112 GtkTreeRowReference *dest_item;
113 GtkIconViewDropPosition dest_pos;
116 GtkTreeRowReference *scroll_to_path;
117 gfloat scroll_to_row_align;
118 gfloat scroll_to_col_align;
119 guint scroll_to_use_align : 1;
121 guint source_set : 1;
123 guint reorderable : 1;
124 guint empty_view_drop :1;
126 guint modify_selection_pressed : 1;
127 guint extend_selection_pressed : 1;
129 guint draw_focus : 1;
131 /* GtkScrollablePolicy needs to be checked when
132 * driving the scrollable adjustment values */
133 guint hscroll_policy : 1;
134 guint vscroll_policy : 1;
136 guint doing_rubberband : 1;
140 void _gtk_icon_view_set_cell_data (GtkIconView *icon_view,
141 GtkIconViewItem *item);
142 void _gtk_icon_view_set_cursor_item (GtkIconView *icon_view,
143 GtkIconViewItem *item,
144 GtkCellRenderer *cursor_cell);
145 GtkIconViewItem * _gtk_icon_view_get_item_at_coords (GtkIconView *icon_view,
148 gboolean only_in_cell,
149 GtkCellRenderer **cell_at_pos);
150 void _gtk_icon_view_select_item (GtkIconView *icon_view,
151 GtkIconViewItem *item);
152 void _gtk_icon_view_unselect_item (GtkIconView *icon_view,
153 GtkIconViewItem *item);
157 #endif /* __GTK_ICON_VIEW_PRIVATE_H__ */