gtkiconview_private.h

Go to the documentation of this file.
00001 #ifndef __GTK_ICON_VIEW_PRIVATE_H__
00002 #define __GTK_ICON_VIEW_PRIVATE_H__
00003 
00004 /**
00005  * \file gtkiconview_private.h
00006  * \brief ereader gtk library - private definitions from gtkiconview.c
00007  * \brief                       must keep synchronised with GTK source code
00008  */
00009 
00010 /*
00011  * This file is part of libergtk.
00012  *
00013  * libergtk is free software: you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation, either version 2 of the License, or
00016  * (at your option) any later version.
00017  *
00018  * libergtk is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00025  */
00026  
00027 /**
00028  * Copyright (C) 2008 iRex Technologies B.V.
00029  * All rights reserved.
00030  */
00031 
00032 G_BEGIN_DECLS
00033 
00034 
00035 typedef struct _GtkIconViewItem GtkIconViewItem;
00036 struct _GtkIconViewItem
00037 {
00038     GtkTreeIter iter;
00039     gint index;
00040 
00041     gint row, col;
00042 
00043     /* Bounding box */
00044     gint x, y, width, height;
00045 
00046     /* Individual cells.
00047     * box[i] is the actual area occupied by cell i,
00048     * before, after are used to calculate the cell 
00049     * area relative to the box. 
00050     * See gtk_icon_view_get_cell_area().
00051     */
00052     gint n_cells;
00053     GdkRectangle *box;
00054     gint *before;
00055     gint *after;
00056 
00057     guint selected : 1;
00058     guint selected_before_rubberbanding : 1;
00059 };
00060 
00061 typedef struct _GtkIconViewCellInfo GtkIconViewCellInfo;
00062 struct _GtkIconViewCellInfo
00063 {
00064     GtkCellRenderer *cell;
00065 
00066     guint expand : 1;
00067     guint pack : 1;
00068     guint editing : 1;
00069 
00070     gint position;
00071 
00072     GSList *attributes;
00073 
00074     GtkCellLayoutDataFunc func;
00075     gpointer func_data;
00076     GDestroyNotify destroy;
00077 };
00078 
00079 struct _GtkIconViewPrivate
00080 {
00081     gint width, height;
00082 
00083     GtkSelectionMode selection_mode;
00084 
00085     GdkWindow *bin_window;
00086 
00087     GList *children;
00088 
00089     GtkTreeModel *model;
00090 
00091     GList *items;
00092 
00093     GtkAdjustment *hadjustment;
00094     GtkAdjustment *vadjustment;
00095 
00096     guint layout_idle_id;
00097 
00098     gboolean doing_rubberband;
00099     gint rubberband_x1, rubberband_y1;
00100     gint rubberband_x2, rubberband_y2;
00101 
00102     guint scroll_timeout_id;
00103     gint scroll_value_diff;
00104     gint event_last_x, event_last_y;
00105 
00106     GtkIconViewItem *anchor_item;
00107     GtkIconViewItem *cursor_item;
00108     GtkIconViewItem *edited_item;
00109     GtkCellEditable *editable;
00110 
00111     GtkIconViewItem *last_single_clicked;
00112 
00113     GList *cell_list;
00114     guint n_cells;
00115 
00116     gint cursor_cell;
00117 
00118     GtkOrientation orientation;
00119 
00120     gint columns;
00121     gint item_width;
00122     gint spacing;
00123     gint row_spacing;
00124     gint column_spacing;
00125     gint margin;
00126 
00127     gint text_column;
00128     gint markup_column;
00129     gint pixbuf_column;
00130 
00131     gint pixbuf_cell;
00132     gint text_cell;
00133 
00134     gint tooltip_column;
00135 
00136     /* Drag-and-drop. */
00137     GdkModifierType start_button_mask;
00138     guint pressed_button;
00139     gint press_start_x;
00140     gint press_start_y;
00141 
00142     GtkTargetList *source_targets;
00143     GdkDragAction source_actions;
00144 
00145     GtkTargetList *dest_targets;
00146     GdkDragAction dest_actions;
00147 
00148     GtkTreeRowReference *dest_item;
00149     GtkIconViewDropPosition dest_pos;
00150 
00151     /* scroll to */
00152     GtkTreeRowReference *scroll_to_path;
00153     gfloat scroll_to_row_align;
00154     gfloat scroll_to_col_align;
00155     guint scroll_to_use_align : 1;
00156 
00157     guint source_set : 1;
00158     guint dest_set : 1;
00159     guint reorderable : 1;
00160     guint empty_view_drop :1;
00161 
00162     guint ctrl_pressed : 1;
00163     guint shift_pressed : 1;  
00164 };
00165 
00166 
00167 G_END_DECLS
00168 
00169 #endif  // __GTK_ICON_VIEW_PRIVATE_H__
Generated by  doxygen 1.6.2-20100208