This file is indexed.

/usr/include/gpointing-device-settings/gpds-xinput-ui.h is in libgpds-dev 1.5.1-6.

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
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 *  Copyright (C) 2009 Hiroyuki Ikezoe  <poincare@ikezoe.net>
 *
 *  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 __GPDS_XINPUT_UI_H__
#define __GPDS_XINPUT_UI_H__

#include <gpds-ui.h>
#include <gpds-xinput.h>

G_BEGIN_DECLS

#define GPDS_XINPUT_UI_ERROR           (gpds_xinput_ui_error_quark())

#define GPDS_TYPE_XINPUT_UI            (gpds_xinput_ui_get_type ())
#define GPDS_XINPUT_UI(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GPDS_TYPE_XINPUT_UI, GpdsXInputUI))
#define GPDS_XINPUT_UI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GPDS_TYPE_XINPUT_UI, GpdsXInputUIClass))
#define GPDS_IS_XINPUT_UI(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GPDS_TYPE_XINPUT_UI))
#define GPDS_IS_XINPUT_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GPDS_TYPE_XINPUT_UI))
#define GPDS_XINPUT_UI_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), GPDS_TYPE_XINPUT_UI, GpdsXInputUIClass))

typedef struct _GpdsXInputUI GpdsXInputUI;
typedef struct _GpdsXInputUIClass GpdsXInputUIClass;

struct _GpdsXInputUI
{
    GpdsUI parent;
};

struct _GpdsXInputUIClass
{
    GpdsUIClass parent_class;
};

GType       gpds_xinput_ui_get_type         (void) G_GNUC_CONST;
void        gpds_xinput_ui_set_xinput       (GpdsXInputUI *ui,
                                             GpdsXInput *xinput);
GpdsXInput *gpds_xinput_ui_get_xinput       (GpdsXInputUI *ui);
gboolean    gpds_xinput_ui_get_xinput_int_property
                                            (GpdsXInputUI *ui,
                                             gint property,
                                             gint **values,
                                             gulong *n_values);
gboolean    gpds_xinput_ui_get_xinput_float_property
                                            (GpdsXInputUI *ui,
                                             gint property,
                                             gdouble **values,
                                             gulong *n_values);
void        gpds_xinput_ui_set_xinput_property_from_toggle_button_state
                                            (GpdsXInputUI *ui,
                                             gint property,
                                             GtkToggleButton *button);
void        gpds_xinput_ui_set_toggle_button_state_from_preference
                                            (GpdsXInputUI *ui,
                                             gint property,
                                             const gchar *gconf_key_name,
                                             const gchar *button_name);
void        gpds_xinput_ui_set_widget_value_from_preference
                                            (GpdsXInputUI *ui,
                                             gint property,
                                             const gchar *gconf_key_name,
                                             const gchar *widget_name);

#define GPDS_XINPUT_UI_DEFINE_TOGGLE_BUTTON_CALLBACK(function_name, PROPERTY_NAME, depend_widget_name)  \
static void                                                                                             \
cb_ ## function_name ## _toggled (GtkToggleButton *button,                                              \
                                  gpointer user_data)                                                   \
{                                                                                                       \
    GtkBuilder *builder;                                                                                \
    GObject *depend_widget = NULL;                                                                      \
    gboolean enable;                                                                                    \
    gpds_xinput_ui_set_xinput_property_from_toggle_button_state(GPDS_XINPUT_UI(user_data),              \
                                                                PROPERTY_NAME,                          \
                                                                button);                                \
    enable = gtk_toggle_button_get_active(button);                                                      \
    gpds_ui_set_gconf_bool(GPDS_UI(user_data), PROPERTY_NAME ## _KEY, enable);                          \
    builder = gpds_ui_get_builder(GPDS_UI(user_data));                                                  \
    if (!depend_widget_name)                                                                            \
        return;                                                                                         \
    depend_widget = gtk_builder_get_object(builder, depend_widget_name);                                \
    if (!depend_widget)                                                                                 \
        return;                                                                                         \
    gtk_widget_set_sensitive(GTK_WIDGET(depend_widget), enable);                                        \
}

#define GPDS_XINPUT_UI_DEFINE_SCALE_VALUE_CHANGED_CALLBACK(function_name, PROPERTY_NAME)    \
static void                                                                                 \
cb_ ## function_name ## _value_changed (GtkRange *range, gpointer user_data)                \
{                                                                                           \
    gdouble value;                                                                          \
    GpdsXInput *xinput;                                                                     \
    GError *error = NULL;                                                                   \
    gint properties[1];                                                                     \
    xinput = gpds_xinput_ui_get_xinput(GPDS_XINPUT_UI(user_data));                          \
    if (!xinput)                                                                            \
        return;                                                                             \
    value = gtk_range_get_value(range);                                                     \
    properties[0] = (gint)value;                                                            \
    if (!gpds_xinput_set_int_properties(xinput,                                             \
                                        PROPERTY_NAME,                                      \
                                        &error,                                             \
                                        properties,                                         \
                                        1)) {                                               \
        if (error) {                                                                        \
            show_error(error);                                                              \
            g_error_free(error);                                                            \
        }                                                                                   \
    }                                                                                       \
    gpds_ui_set_gconf_int(GPDS_UI(user_data), PROPERTY_NAME ## _KEY, (gint)value);          \
}

G_END_DECLS

#endif /* __GPDS_XINPUT_UI_H__ */
/*
vi:ts=4:nowrap:ai:expandtab:sw=4
*/