This file is indexed.

/usr/include/gnucash/table-model.h is in gnucash-common 1:2.6.15-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/********************************************************************\
 * table-model.h -- 2D grid table object model                      *
 * Copyright (c) 2001 Free Software Foundation                      *
 * Author: Dave Peticolas <dave@krondo.com>                         *
 *                                                                  *
 * This program is free software; you can redistribute it and/or    *
 * modify it under the terms of the GNU General Public License as   *
 * published by the Free Software Foundation; either version 2 of   *
 * the License, or (at your option) any later version.              *
 *                                                                  *
 * This program 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 General Public License for more details.                     *
 *                                                                  *
 * You should have received a copy of the GNU General Public License*
 * along with this program; if not, contact:                        *
 *                                                                  *
 * Free Software Foundation           Voice:  +1-617-542-5942       *
 * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
 * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
 *                                                                  *
\********************************************************************/

#ifndef TABLE_MODEL_H
#define TABLE_MODEL_H

#include <glib.h>

#include "basiccell.h"
#include "register-common.h"

/** @addtogroup Table Table
 * @{
 * @file table-model.h
 */
typedef enum
{
    XACC_CELL_ALLOW_NONE       = 0,
    XACC_CELL_ALLOW_INPUT      = 1 << 0,
    XACC_CELL_ALLOW_SHADOW     = 1 << 1,
    XACC_CELL_ALLOW_ALL        = XACC_CELL_ALLOW_INPUT | XACC_CELL_ALLOW_SHADOW,
    XACC_CELL_ALLOW_EXACT_ONLY = 1 << 2,
    XACC_CELL_ALLOW_ENTER	     = 1 << 3,
    XACC_CELL_ALLOW_READ_ONLY  = XACC_CELL_ALLOW_SHADOW | XACC_CELL_ALLOW_ENTER
} CellIOFlags;

typedef enum
{
    CELL_BORDER_LINE_NONE,
    CELL_BORDER_LINE_LIGHT,
    CELL_BORDER_LINE_NORMAL,
    CELL_BORDER_LINE_HEAVY,
    CELL_BORDER_LINE_HIGHLIGHT
} PhysicalCellBorderLineStyle;

typedef struct
{
    PhysicalCellBorderLineStyle top;
    PhysicalCellBorderLineStyle bottom;
    PhysicalCellBorderLineStyle left;
    PhysicalCellBorderLineStyle right;
} PhysicalCellBorders;

typedef const char * (*TableGetEntryHandler) (VirtualLocation virt_loc,
        gboolean translate,
        gboolean *conditionally_changed,
        gpointer user_data);

typedef const char * (*TableGetLabelHandler) (VirtualLocation virt_loc,
        gpointer user_data);

typedef char * (*TableGetHelpHandler) (VirtualLocation virt_loc,
                                       gpointer user_data);

typedef CellIOFlags (*TableGetCellIOFlagsHandler) (VirtualLocation virt_loc,
        gpointer user_data);

typedef guint32 (*TableGetFGColorHandler) (VirtualLocation virt_loc,
        gpointer user_data);

typedef guint32 (*TableGetBGColorHandler) (VirtualLocation virt_loc,
        gboolean *hatching,
        gpointer user_data);

typedef void (*TableGetCellBorderHandler) (VirtualLocation virt_loc,
        PhysicalCellBorders *borders,
        gpointer user_data);

typedef gboolean (*TableConfirmHandler) (VirtualLocation virt_loc,
        gpointer user_data);

typedef void (*TableSaveCellHandler) (BasicCell * cell,
                                      gpointer save_data,
                                      gpointer user_data);

typedef void (*TableSaveHandler) (gpointer save_data,
                                  gpointer user_data);

typedef gpointer (*VirtCellDataAllocator)   (void);
typedef void     (*VirtCellDataDeallocator) (gpointer cell_data);
typedef void     (*VirtCellDataCopy)        (gpointer to, gconstpointer from);

typedef struct
{
    GHashTable *entry_handlers;
    GHashTable *label_handlers;
    GHashTable *help_handlers;
    GHashTable *io_flags_handlers;
    GHashTable *fg_color_handlers;
    GHashTable *bg_color_handlers;
    GHashTable *cell_border_handlers;
    GHashTable *confirm_handlers;

    GHashTable *save_handlers;
    TableSaveHandler pre_save_handler;
    TableSaveHandler post_save_handler;

    gpointer handler_user_data;

    /* If true, denotes that this table is read-only
     * and edits should not be allowed. */
    gboolean read_only;

    /* If positive, denotes a row that marks a boundary that should
     * be visually distinguished. */
    int dividing_row;
    /* If positive, denotes a row that marks a boundary that should
     * be visually distinguished, but different from the other. */
    int dividing_row_upper;

    VirtCellDataAllocator cell_data_allocator;
    VirtCellDataDeallocator cell_data_deallocator;
    VirtCellDataCopy cell_data_copy;
} TableModel;


TableModel * gnc_table_model_new (void);
void         gnc_table_model_destroy (TableModel *model);

void         gnc_table_model_set_read_only (TableModel *model,
        gboolean read_only);
gboolean     gnc_table_model_read_only (TableModel *model);

void gnc_table_model_set_entry_handler
(TableModel *model,
 TableGetEntryHandler entry_handler,
 const char * cell_name);
void gnc_table_model_set_default_entry_handler
(TableModel *model,
 TableGetEntryHandler entry_handler);
TableGetEntryHandler gnc_table_model_get_entry_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_label_handler
(TableModel *model,
 TableGetLabelHandler label_handler,
 const char * cell_name);
void gnc_table_model_set_default_label_handler
(TableModel *model,
 TableGetLabelHandler label_handler);
TableGetLabelHandler gnc_table_model_get_label_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_help_handler
(TableModel *model,
 TableGetHelpHandler help_handler,
 const char * cell_name);
void gnc_table_model_set_default_help_handler
(TableModel *model,
 TableGetHelpHandler help_handler);
TableGetHelpHandler gnc_table_model_get_help_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_io_flags_handler
(TableModel *model,
 TableGetCellIOFlagsHandler io_flags_handler,
 const char * cell_name);
void gnc_table_model_set_default_io_flags_handler
(TableModel *model,
 TableGetCellIOFlagsHandler io_flags_handler);
TableGetCellIOFlagsHandler gnc_table_model_get_io_flags_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_fg_color_handler
(TableModel *model,
 TableGetFGColorHandler io_flags_handler,
 const char * cell_name);
void gnc_table_model_set_default_fg_color_handler
(TableModel *model,
 TableGetFGColorHandler io_flags_handler);
TableGetFGColorHandler gnc_table_model_get_fg_color_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_bg_color_handler
(TableModel *model,
 TableGetBGColorHandler io_flags_handler,
 const char * cell_name);
void gnc_table_model_set_default_bg_color_handler
(TableModel *model,
 TableGetBGColorHandler io_flags_handler);
TableGetBGColorHandler gnc_table_model_get_bg_color_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_cell_border_handler
(TableModel *model,
 TableGetCellBorderHandler io_flags_handler,
 const char * cell_name);
void gnc_table_model_set_default_cell_border_handler
(TableModel *model,
 TableGetCellBorderHandler io_flags_handler);
TableGetCellBorderHandler gnc_table_model_get_cell_border_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_confirm_handler
(TableModel *model,
 TableConfirmHandler io_flags_handler,
 const char * cell_name);
void gnc_table_model_set_default_confirm_handler
(TableModel *model,
 TableConfirmHandler io_flags_handler);
TableConfirmHandler gnc_table_model_get_confirm_handler
(TableModel *model,
 const char * cell_name);

void gnc_table_model_set_save_handler
(TableModel *model,
 TableSaveCellHandler save_handler,
 const char * cell_name);
void gnc_table_model_set_pre_save_handler
(TableModel *model,
 TableSaveHandler save_handler);
void gnc_table_model_set_post_save_handler
(TableModel *model,
 TableSaveHandler save_handler);
TableSaveCellHandler gnc_table_model_get_save_handler
(TableModel *model,
 const char * cell_name);
TableSaveHandler gnc_table_model_get_pre_save_handler
(TableModel *model);
TableSaveHandler gnc_table_model_get_post_save_handler
(TableModel *model);
/** @} */
#endif