This file is indexed.

/usr/include/cutter/gcutter/gcut-event-loop.h is in cutter-glib-support 1.1.7-1.2ubuntu3.

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
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 *  Copyright (C) 2011  Kouhei Sutou <kou@clear-code.com>
 *
 *  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 3 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 program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef __GCUT_EVENT_LOOP_H__
#define __GCUT_EVENT_LOOP_H__

#include <glib-object.h>

G_BEGIN_DECLS

/**
 * SECTION: gcut-event-loop
 * @title: Abstracted event loop
 * @short_description: Abstracted event loop API for
 * customizing event loop in GCutter.
 *
 * #GCutEventLoop encapsulates event loop. For example,
 * event loop is used in #GCutProcess. It uses the GLib's
 * default main context for it.
 *
 * Normally, a custom #GCutEventLoop isn't required. It is
 * needed some special case. For example, using libev as
 * event loop backend instead of GLib's main loop.
 *
 * GCutter provides #GCutEventLoop for GLib's main context
 * and main loop, #GCutGLibEventLoop.
 *
 * Since: 1.1.6
 */

#define GCUT_TYPE_EVENT_LOOP            (gcut_event_loop_get_type ())
#define GCUT_EVENT_LOOP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCUT_TYPE_EVENT_LOOP, GCutEventLoop))
#define GCUT_EVENT_LOOP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GCUT_TYPE_EVENT_LOOP, GCutEventLoopClass))
#define GCUT_IS_EVENT_LOOP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCUT_TYPE_EVENT_LOOP))
#define GCUT_IS_EVENT_LOOP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCUT_TYPE_EVENT_LOOP))
#define GCUT_EVENT_LOOP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GCUT_TYPE_EVENT_LOOP, GCutEventLoopClass))

#define GCUT_EVENT_LOOP_ERROR           (gcut_event_loop_error_quark())

typedef struct _GCutEventLoop      GCutEventLoop;
typedef struct _GCutEventLoopClass GCutEventLoopClass;

struct _GCutEventLoop
{
    GObject object;
};

struct _GCutEventLoopClass
{
    GObjectClass parent_class;

    void     (*run)              (GCutEventLoop   *loop);
    gboolean (*iterate)          (GCutEventLoop   *loop,
                                  gboolean         may_block);
    void     (*quit)             (GCutEventLoop   *loop);

    guint    (*watch_io)         (GCutEventLoop   *loop,
                                  GIOChannel      *channel,
                                  GIOCondition     condition,
                                  GIOFunc          function,
                                  gpointer         data);
    guint    (*watch_child_full) (GCutEventLoop   *loop,
                                  gint             priority,
                                  GPid             pid,
                                  GChildWatchFunc  function,
                                  gpointer         data,
                                  GDestroyNotify   notify);
    guint    (*add_timeout_full) (GCutEventLoop   *loop,
                                  gint             priority,
                                  gdouble          interval_in_seconds,
                                  GSourceFunc      function,
                                  gpointer         data,
                                  GDestroyNotify   notify);
    guint    (*add_idle_full)    (GCutEventLoop   *loop,
                                  gint             priority,
                                  GSourceFunc      function,
                                  gpointer         data,
                                  GDestroyNotify   notify);
    gboolean (*remove)           (GCutEventLoop   *loop,
                                  guint            tag);
};

GQuark               gcut_event_loop_error_quark       (void);
GType                gcut_event_loop_get_type          (void) G_GNUC_CONST;

/**
 * gcut_event_loop_run:
 * @loop: a #GCutEventLoop.
 *
 * Runs the given event loop until gcut_event_loop_quit() is
 * called on the loop.
 *
 * Since: 1.1.6
 */
void                 gcut_event_loop_run               (GCutEventLoop   *loop);

/**
 * gcut_event_loop_iterate:
 * @loop: a #GCutEventLoop.
 * @may_block: whether the call may block.
 *
 * Runs a single iteration for the given event loop. If no
 * events are ready and @may_block is %TRUE, waiting
 * for a event become ready. Otherwise, if @may_block is
 * %FALSE, events are not waited to become ready.
 *
 * Returns: %TRUE if a event was dispatched.
 *
 * Since: 1.1.6
 */
gboolean             gcut_event_loop_iterate           (GCutEventLoop   *loop,
                                                        gboolean         may_block);

/**
 * gcut_event_loop_quit:
 * @loop: a #GCutEventLoop.
 *
 * Stops the @loop from running.
 *
 * Since: 1.1.6
 */
void                 gcut_event_loop_quit              (GCutEventLoop   *loop);

/**
 * gcut_event_loop_watch_io:
 * @loop: a #GCutEventLoop.
 * @channel: a #GIOChannel
 * @condition: conditions to watch for
 * @function: function to call
 * @data: data to pass to @function
 *
 * Adds the @channel into @loop with the default
 * priority. @function is called when @condition is met for
 * the given @channel.
 *
 * Returns: the event ID.
 *
 * Since: 1.1.6
 */
guint                gcut_event_loop_watch_io          (GCutEventLoop   *loop,
                                                        GIOChannel      *channel,
                                                        GIOCondition     condition,
                                                        GIOFunc          function,
                                                        gpointer         data);

/**
 * gcut_event_loop_watch_child:
 * @loop: a #GCutEventLoop.
 * @pid: process ID to watch
 * @function: function to call
 * @data: data to pass to @function
 *
 * Adds the @function to be called when the child indicated
 * by @pid exits into @loop with the default priority.
 *
 * Returns: the event ID.
 *
 * Since: 1.1.6
 */
guint                gcut_event_loop_watch_child       (GCutEventLoop   *loop,
                                                        GPid             pid,
                                                        GChildWatchFunc  function,
                                                        gpointer         data);

/**
 * gcut_event_loop_watch_child_full:
 * @loop: a #GCutEventLoop.
 * @priority: the priority of the event.
 * @pid: process ID to watch
 * @function: function to call
 * @data: data to pass to @function
 * @notify: function to call when the event is removed, or %NULL
 *
 * Adds the @function to be called when the child indicated
 * by @pid exits into @loop with the @priority.
 *
 * Returns: the event ID.
 *
 * Since: 1.1.6
 */
guint                gcut_event_loop_watch_child_full  (GCutEventLoop   *loop,
                                                        gint             priority,
                                                        GPid             pid,
                                                        GChildWatchFunc  function,
                                                        gpointer         data,
                                                        GDestroyNotify   notify);

/**
 * gcut_event_loop_add_timeout:
 * @loop: a #GCutEventLoop.
 * @interval_in_seconds: the time between calls to the @function, in seconds.
 * @function: function to call
 * @data: data to pass to @function
 *
 * Adds the @function to be called at regular intervals,
 * with the default priority.
 *
 * Returns: the event ID.
 *
 * Since: 1.1.6
 */
guint                gcut_event_loop_add_timeout       (GCutEventLoop   *loop,
                                                        gdouble          interval_in_seconds,
                                                        GSourceFunc      function,
                                                        gpointer         data);

/**
 * gcut_event_loop_add_timeout_full:
 * @loop: a #GCutEventLoop.
 * @priority: the priority of the event.
 * @interval_in_seconds: the time between calls to the @function, in seconds.
 * @function: function to call
 * @data: data to pass to @function
 * @notify: function to call when the event is removed, or %NULL
 *
 * Adds the @function to be called at regular intervals,
 * with the @priority.
 *
 * Returns: the event ID.
 *
 * Since: 1.1.6
 */
guint                gcut_event_loop_add_timeout_full  (GCutEventLoop   *loop,
                                                        gint             priority,
                                                        gdouble          interval_in_seconds,
                                                        GSourceFunc      function,
                                                        gpointer         data,
                                                        GDestroyNotify   notify);

/**
 * gcut_event_loop_add_idle:
 * @loop: a #GCutEventLoop.
 * @function: function to call
 * @data: data to pass to @function
 *
 * Adds the @function to be called whenever there are no
 * higher priority events pending with the default priority.
 *
 * Returns: the event ID.
 *
 * Since: 1.1.6
 */
guint                gcut_event_loop_add_idle          (GCutEventLoop   *loop,
                                                        GSourceFunc      function,
                                                        gpointer         data);

/**
 * gcut_event_loop_add_idle_full:
 * @loop: a #GCutEventLoop.
 * @priority: the priority of the event.
 * @function: function to call
 * @data: data to pass to @function
 * @notify: function to call when the event is removed, or %NULL
 *
 * Adds the @function to be called whenever there are no
 * higher priority events pending with the @priority.
 *
 * Returns: the event ID.
 *
 * Since: 1.1.6
 */
guint                gcut_event_loop_add_idle_full     (GCutEventLoop   *loop,
                                                        gint             priority,
                                                        GSourceFunc      function,
                                                        gpointer         data,
                                                        GDestroyNotify   notify);

/**
 * gcut_event_loop_remove:
 * @loop: a #GCutEventLoop.
 * @tag: the ID of the source to remove
 *
 * Removes the event with the given ID, @tag.
 *
 * Returns: %TRUE if the source was found and removed.
 *
 * Since: 1.1.6
 */
gboolean             gcut_event_loop_remove            (GCutEventLoop   *loop,
                                                        guint            tag);

G_END_DECLS

#endif /* __GCUT_EVENT_LOOP_H__ */

/*
vi:ts=4:nowrap:ai:expandtab:sw=4
*/