This file is indexed.

/usr/include/mirclient/mir/events/event_builders.h is in libmirclient-dev 0.26.3+16.04.20170605-0ubuntu1.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
/*
 * Copyright © 2015 Canonical Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version 3,
 * as published by the Free Software Foundation.
 *
 * 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 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/>.
 *
 * Author: Robert Carr <robert.carr@canonical.com>
 */

#ifndef MIR_EVENT_BUILDERS_H_
#define MIR_EVENT_BUILDERS_H_

#include "mir_toolkit/event.h"

#include "mir/geometry/size.h"
#include "mir/geometry/point.h"
#include "mir/geometry/rectangle.h"
#include "mir/geometry/displacement.h"
#include "mir/frontend/surface_id.h"
#include "mir/events/input_device_state.h"
#include "mir/events/contact_state.h"

#include <memory>
#include <functional>
#include <chrono>
#include <vector>

namespace mir
{
    typedef std::unique_ptr<MirEvent, void(*)(MirEvent*)> EventUPtr;
    
namespace events
{
// Surface orientation change event
EventUPtr make_event(frontend::SurfaceId const& surface_id, MirOrientation orientation);
// Prompt session state change event
EventUPtr make_event(MirPromptSessionState state);
// Surface resize event
EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Size const& size);
// Surface configure event
EventUPtr make_event(frontend::SurfaceId const& surface_id, MirSurfaceAttrib attribute, int value)
MIR_FOR_REMOVAL_IN_VERSION_1("use make_event with MirWindowAttribute instead");
// Window configure event
EventUPtr make_event(frontend::SurfaceId const& surface_id, MirWindowAttrib attribute, int value);
// Close surface event
EventUPtr make_event(frontend::SurfaceId const& surface_id);
// Keymap event
EventUPtr make_event(frontend::SurfaceId const& surface_id, MirInputDeviceId id, std::string const& model,
                     std::string const& layout, std::string const& variant, std::string const& options);
// Surface output event
EventUPtr make_event(
    frontend::SurfaceId const& surface_id,
    int dpi,
    float scale,
    double refresh_rate,
    MirFormFactor form_factor,
    uint32_t id);

/// Surface placement event
EventUPtr make_event(frontend::SurfaceId const& surface_id, geometry::Rectangle placement);

// Key event
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    std::vector<uint8_t> const& cookie, MirKeyboardAction action, xkb_keysym_t key_code,
    int scan_code, MirInputEventModifiers modifiers);

void set_modifier(MirEvent& event, MirInputEventModifiers modifiers);
void set_cursor_position(MirEvent& event, mir::geometry::Point const& pos);
void set_cursor_position(MirEvent& event, float x, float y);
void set_button_state(MirEvent& event, MirPointerButtons button_state);

// Deprecated version with uint64_t mac
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code,
    int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

// Deprecated version without mac
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    MirKeyboardAction action, xkb_keysym_t key_code,
    int scan_code, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

// Touch event
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers);

// Deprecated version with uint64_t mac
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    uint64_t mac, MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

// Deprecated version without mac
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    MirInputEventModifiers modifiers) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action,
    MirTouchTooltype tooltype, float x_axis_value, float y_axis_value,
    float pressure_value, float touch_major_value, float touch_minor_value, float size_value);

// Pointer event
// Deprecated version without relative axis
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action,
    MirPointerButtons buttons_pressed,
    float x_axis_value, float y_axis_value,
    float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

// Deprecated version without relative axis and mac
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    MirInputEventModifiers modifiers, MirPointerAction action,
    MirPointerButtons buttons_pressed,
    float x_axis_value, float y_axis_value,
    float hscroll_value, float vscroll_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers, MirPointerAction action,
    MirPointerButtons buttons_pressed,
    float x_axis_value, float y_axis_value,
    float hscroll_value, float vscroll_value,
    float relative_x_value, float relative_y_value);

// Deprecated version with uint64_t mac
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action,
    MirPointerButtons buttons_pressed,
    float x_axis_value, float y_axis_value,
    float hscroll_value, float vscroll_value,
    float relative_x_value, float relative_y_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

// Deprecated version without mac
EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    MirInputEventModifiers modifiers, MirPointerAction action,
    MirPointerButtons buttons_pressed,
    float x_axis_value, float y_axis_value,
    float hscroll_value, float vscroll_value,
    float relative_x_value, float relative_y_value) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

// Input configuration event
EventUPtr make_event(MirInputConfigurationAction action,
    MirInputDeviceId id, std::chrono::nanoseconds time) MIR_FOR_REMOVAL_IN_VERSION_1("unused");

EventUPtr make_event(std::chrono::nanoseconds timestamp,
                     MirPointerButtons pointer_buttons,
                     MirInputEventModifiers modifiers,
                     float x_axis_value,
                     float y_axis_value,
                     std::vector<InputDeviceState>&& device_states);

EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp,
    std::vector<uint8_t> const& mac, MirInputEventModifiers modifiers,
    std::vector<ContactState> const& contacts);

EventUPtr clone_event(MirEvent const& event);
void transform_positions(MirEvent& event, mir::geometry::Displacement const& movement);

}
}

#endif // MIR_EVENT_BUILDERS_H_