This file is indexed.

/usr/include/gnucash/gnc-period-select.h is in gnucash-common 1:2.6.12-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
/*
 * gnc-period-select.h -- Accounting period selection widget
 *
 * Copyright (c) 2005 David Hampton <hampton@employees.org>
 * All rights reserved.
 *
 * GnuCash 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.
 *
 * Gnucash 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 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
 */

/** @addtogroup GUI
    @{ */
/** @file gnc-period-select.h
    @brief A custom widget for selecting accounting periods.
    @author David Hampton <hampton@employees.org>
*/

#ifndef GNC_PERIOD_SELECT_H
#define GNC_PERIOD_SELECT_H

#include "gnc-accounting-period.h"

G_BEGIN_DECLS

#define GNC_TYPE_PERIOD_SELECT      (gnc_period_select_get_type())
#define GNC_PERIOD_SELECT(o)        (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_PERIOD_SELECT, GncPeriodSelect))
#define GNC_PERIOD_SELECT_CLASS(k)  (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_PERIOD_SELECT, GncPeriodSelectClass))
#define GNC_IS_PERIOD_SELECT(o)     (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_PERIOD_SELECT))

/* typedefs & structures */
typedef struct
{
    GtkHBox hbox;
} GncPeriodSelect;

typedef struct
{
    GtkHBoxClass hbox;

    /* Signals */
    void (*changed) (GncPeriodSelect *period);

} GncPeriodSelectClass;


/** @name GncPeriodSelect Widget Implementation
 @{ */

/** Returns the GType of a GncPeriodSelect widget.
 */
GType gnc_period_select_get_type (void);


/** Create a new GncPeriodSelect widget which is used to select a
 *  accounting period like "previous month" or "this year".
 *
 *  @param starting_labels If set to TRUE then all the labels will
 *  refer to the "Start of...".  If FALSE, labels will refer to "End
 *  of...".
 *
 *  @return A newly created GncPeriodSelect widget.
 */
GtkWidget *gnc_period_select_new (gboolean starting_labels);


/** Create a new GncPeriodSelect widget from a glade file.  The int1
 *  argument passed from glade is used to determine whether the widget
 *  uses labels for start times or end times.  A non-zero int2
 *  argument indicates that an example date should be shown.
 *
 *  @return A newly created GncPeriodSelect widget.
 */
GtkWidget * gnc_period_select_new_glade (gchar *widget_name,
        gchar *string1, gchar *string2,
        gint int1, gint int2);
/** @} */


/** @name GncPeriodSelect Properties
 @{ */

/** Set the fiscal year end on a GncPeriodSelect widget.  If set to a
 *  value other than NULL then widget will include fiscal accounting
 *  period like "this fiscal year".
 *
 *  @param period The GncPeriodSelect widget to update.
 *
 *  @param fy_end The new fiscal year end value, or NULL if no fiscal
 *  year is set.  Note that only the month and day fields need be
 *  valid in the provided GDate.
 */
void gnc_period_select_set_fy_end (GncPeriodSelect *period, const GDate *fy_end);


/** Get the current value of the fiscal year end setting from a
 *  GncPeriodSelect widget.  If the result is NULL then fiscal years
 *  are not currently supported.
 *
 *  @param period The GncPeriodSelect widget to query.
 *
 *  @return A pointer to a GDate containing the fiscal year end value,
 *  or NULL if no fiscal year end is set.  Note that only the month
 *  and day fields are valid in the returned GDate.
 */
GDate *gnc_period_select_get_fy_end (GncPeriodSelect *period);


/** Get the current value of the "show sample" setting from a
 *  GncPeriodSelect widget.
 */
gboolean
gnc_period_select_get_show_date (GncPeriodSelect *period);


/** Set the "show sample" setting on a GncPeriodSelect widget.  If set
 *  to TRUE then a GtkLabel will be used to show the date
 *  corresponding to the selected time period.
 */
void gnc_period_select_set_show_date (GncPeriodSelect *period, const gboolean show_date);


GDate *gnc_period_select_get_date_base (GncPeriodSelect *period);

/*  Set the base date used by a GncPeriodSelect widget.  All example
 *  dates presented by the widget will be computed from this date.
 */
void gnc_period_select_set_date_base (GncPeriodSelect *period, const GDate *sample_base);

/** @} */


/** Set which item in the GncPeriodSelect is initially selected.  This
 *  is used to set the initial selection before the widget is shown to
 *  the user.
 *
 *  @param period The selection widget to update.
 *
 *  @param which The accounting period that should be selected.
 */
void gnc_period_select_set_active (GncPeriodSelect *period, GncAccountingPeriod which);


/** Get the currently selected accounting period from a
 *  GncPeriodSelect widget.  This is used to retrieve the user's
 *  selection in the form of an enum.
 *
 *  @param period The selection widget to query.
 *
 *  @return An enum indicating the user's choice of accounting period.
 */
GncAccountingPeriod gnc_period_select_get_active (GncPeriodSelect *period);


/** Get the currently selected accounting period choice from a
 *  GncPeriodSelect widget.  This is used to retrieve the user's
 *  selection in the form of a GDate.
 *
 *  @param period The selection widget to query.
 *
 *  @return The starting/ending time. */
GDate *gnc_period_select_get_date (GncPeriodSelect *period);

G_END_DECLS

#endif /* GNC_PERIOD_SELECT_H */

/** @} */