This file is indexed.

/usr/include/gtkmm-3.0/gtkmm/widgetpath.h is in libgtkmm-3.0-dev 3.10.1-0ubuntu2.

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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// -*- c++ -*-
// Generated by gmmproc 2.38.0 -- DO NOT MODIFY!
#ifndef _GTKMM_WIDGETPATH_H
#define _GTKMM_WIDGETPATH_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

/* Copyright 2010 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <gtkmm/enums.h>
#include <vector>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _GtkWidgetPath GtkWidgetPath; }
#endif

namespace Gtk
{

//TODO: Add all of the C documentation, including translating the code examples to C++.
/** This represents a widget hierarchy from the topmost widget, typically a toplevel, to any child.
 * This widget path abstraction is used in StyleContext on behalf of the real
 * widget in order to query style information.
 *
 * If you are using gtkmm widgets, you probably will not need to use
 * this API directly, as there is Widget::get_path(), and the style
 * context returned by Widget::get_style_context() will be automatically
 * updated on widget hierarchy changes.
 *
 * @newin{3,0}
 */
class WidgetPath
{
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  typedef WidgetPath CppObjectType;
  typedef GtkWidgetPath BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  /** Get the GType for this class, for use with the underlying GObject type system.
   */
  static GType get_type() G_GNUC_CONST;

  WidgetPath();

  explicit WidgetPath(GtkWidgetPath* gobject, bool make_a_copy = true);

  WidgetPath(const WidgetPath& other);
  WidgetPath& operator=(const WidgetPath& other);

  ~WidgetPath();

  void swap(WidgetPath& other);

  ///Provides access to the underlying C instance.
  GtkWidgetPath*       gobj()       { return gobject_; }

  ///Provides access to the underlying C instance.
  const GtkWidgetPath* gobj() const { return gobject_; }

  ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
  GtkWidgetPath* gobj_copy() const;

protected:
  GtkWidgetPath* gobject_;

private:

  
public:

  
  /** Dumps the widget path into a string representation. It tries to match
   * the CSS style as closely as possible (Note that there might be paths
   * that cannot be represented in CSS).
   * 
   * The main use of this code is for debugging purposes, so that you can
   * Glib::print() the path or dump it in a gdb session.
   * 
   * @newin{3,2}
   * @return A new string describing @a path.
   */
  Glib::ustring to_string() const;
  
  /** Returns the number of Gtk::Widget Types between the represented
   * widget and its topmost container.
   * 
   * @newin{3,0}
   * @return The number of elements in the path.
   */
  int path_length() const;

  
  /** Appends a widget type to the widget hierarchy represented by @a path.
   * 
   * @newin{3,0}
   * @param type Widget type to append.
   * @return The position where the element was inserted.
   */
  int path_append_type(GType type);
  
  /** Prepends a widget type to the widget hierachy represented by @a path.
   * 
   * @newin{3,0}
   * @param type Widget type to prepend.
   */
  void prepend_type(GType type);

  
  /** Returns the object Type that is at position @a pos in the widget
   * hierarchy defined in @a path.
   * 
   * @newin{3,0}
   * @param pos Position to get the object type for, -1 for the path head.
   * @return A widget type.
   */
  GType iter_get_object_type(int pos) const;
  
  /** Sets the object type for a given position in the widget hierarchy
   * defined by @a path.
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   * @param type Object type to set.
   */
  void iter_set_object_type(int pos, GType type);

  
  /** Returns the name corresponding to the widget found at
   * the position @a pos in the widget hierarchy defined by
   *  @a path
   * @param pos Position to get the widget name for, -1 for the path head.
   * @return The widget name, or <tt>0</tt> if none was set.
   */
  Glib::ustring iter_get_name(int pos) const;
  
  /** Sets the widget name for the widget found at position @a pos
   * in the widget hierarchy defined by @a path.
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   * @param name Widget name.
   */
  void iter_set_name(int pos, const Glib::ustring& name);
  
  /** Returns <tt>true</tt> if the widget at position @a pos has the name @a name,
   * <tt>false</tt> otherwise.
   * 
   * @newin{3,0}
   * @param pos Position to query, -1 for the path head.
   * @param name A widget name.
   * @return <tt>true</tt> if the widget at @a pos has this name.
   */
  bool iter_has_name(int pos, const Glib::ustring& name) const;
  //TODO: _WRAP_METHOD(bool iter_has_qname(int pos, GQuark qname) const, gtk_widget_path_iter_has_qname)


  /** Returns the list of siblings for the element at @a pos. If the element
   * was not added with siblings, <tt>0</tt> is returned.
   * @param pos Position to get the siblings for, -1 for the path head.
   * @return <tt>0</tt> or the list of siblings for the element at @a pos.
   */
  WidgetPath iter_get_siblings(int pos =  -1) const;
  
  /** Returns the index into the list of siblings for the element at @a pos as
   * returned by path_iter_get_siblings(). If that function would
   * return <tt>0</tt> because the element at @a pos has no siblings, this function
   * will return 0.
   * @param pos Position to get the sibling index for, -1 for the path head.
   * @return 0 or the index into the list of siblings for the element at @a pos.
   */
  guint get_sibling_index(int pos =  -1);

  
  /** Adds the class @a name to the widget at position @a pos in
   * the hierarchy defined in @a path. See
   * Gtk::StyleContext::add_class().
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   * @param name A class name.
   */
  void iter_add_class(int pos, const Glib::ustring& name);
  
  /** Removes the class @a name from the widget at position @a pos in
   * the hierarchy defined in @a path.
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   * @param name Class name.
   */
  void iter_remove_class(int pos, const Glib::ustring& name);
  
  /** Removes all classes from the widget at position @a pos in the
   * hierarchy defined in @a path.
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   */
  void iter_clear_classes(int pos =  -1);

 
  /** Returns a list with all the class names defined for the widget
   * at position @a pos in the hierarchy defined in @a path.
   * 
   * @newin{3,0}
   * @param pos Position to query, -1 for the path head.
   * @return The list of
   * classes, This is a list of strings, the SList contents
   * are owned by GTK+, but you should use Glib::slist_free() to
   * free the list itself.
   */
  std::vector<Glib::ustring> iter_list_classes(int pos =  -1) const;

  
  /** Returns <tt>true</tt> if the widget at position @a pos has the class @a name
   * defined, <tt>false</tt> otherwise.
   * 
   * @newin{3,0}
   * @param pos Position to query, -1 for the path head.
   * @param name Class name.
   * @return <tt>true</tt> if the class @a name is defined for the widget at @a pos.
   */
  bool iter_has_class(int pos, const Glib::ustring& name) const;
  //TODOL_WRAP_METHOD(bool iter_has_qclass(int pos, GQuark qname) const, gtk_widget_path_iter_has_qclass)

  
  /** Adds the region @a name to the widget at position @a pos in
   * the hierarchy defined in @a path. See
   * Gtk::StyleContext::add_region().
   * 
   * <note>Region names must only contain lowercase letters
   * and '-', starting always with a lowercase letter.</note>
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   * @param name Region name.
   * @param flags Flags affecting the region.
   */
  void iter_add_region(int pos, const Glib::ustring& name, RegionFlags flags);
  
  /** Removes the region @a name from the widget at position @a pos in
   * the hierarchy defined in @a path.
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   * @param name Region name.
   */
  void iter_remove_region(int pos, const Glib::ustring& name);
  
  /** Removes all regions from the widget at position @a pos in the
   * hierarchy defined in @a path.
   * 
   * @newin{3,0}
   * @param pos Position to modify, -1 for the path head.
   */
  void iter_clear_regions(int pos =  -1);

  
  /** Returns a list with all the region names defined for the widget
   * at position @a pos in the hierarchy defined in @a path.
   * 
   * @newin{3,0}
   * @param pos Position to query, -1 for the path head.
   * @return The list of
   * regions, This is a list of strings, the SList contents
   * are owned by GTK+, but you should use Glib::slist_free() to
   * free the list itself.
   */
  std::vector<Glib::ustring> iter_list_regions(int pos =  -1) const;

  
  /** Returns <tt>true</tt> if the widget at position @a pos has the class @a name
   * defined, <tt>false</tt> otherwise.
   * 
   * @newin{3,0}
   * @param pos Position to query, -1 for the path head.
   * @param name Region name.
   * @param flags Return location for the region flags.
   * @return <tt>true</tt> if the class @a name is defined for the widget at @a pos.
   */
  bool iter_has_region(int pos, const Glib::ustring& name, RegionFlags& flags) const;
  //TODO: _WRAP_METHOD(bool iter_has_qregion(int pos, GQuark qname,  RegionFlags& flags), gtk_widget_path_iter_has_qregion)

  
  /** Returns the topmost object type, that is, the object type this path
   * is representing.
   * 
   * @newin{3,0}
   * @return The object type.
   */
  GType get_object_type() const;

  
  /** Returns <tt>true</tt> if the widget type represented by this path
   * is @a type, or a subtype of it.
   * 
   * @newin{3,0}
   * @param type Widget type to match.
   * @return <tt>true</tt> if the widget represented by @a path is of type @a type.
   */
  bool is_type(GType type) const;
  
  /** Returns <tt>true</tt> if any of the parents of the widget represented
   * in @a path is of type @a type, or any subtype of it.
   * 
   * @newin{3,0}
   * @param type Widget type to check in parents.
   * @return <tt>true</tt> if any parent is of type @a type.
   */
  bool has_parent(GType type) const;


};

} //namespace Gtk


namespace Gtk
{

/** @relates Gtk::WidgetPath
 * @param lhs The left-hand side
 * @param rhs The right-hand side
 */
inline void swap(WidgetPath& lhs, WidgetPath& rhs)
  { lhs.swap(rhs); }

} // namespace Gtk

namespace Glib
{

/** A Glib::wrap() method for this object.
 * 
 * @param object The C instance.
 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 * @result A C++ instance that wraps this C instance.
 *
 * @relates Gtk::WidgetPath
 */
Gtk::WidgetPath wrap(GtkWidgetPath* object, bool take_copy = false);

#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <>
class Value<Gtk::WidgetPath> : public Glib::Value_Boxed<Gtk::WidgetPath>
{};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

} // namespace Glib


#endif /* _GTKMM_WIDGETPATH_H */