This file is indexed.

/usr/include/mirserver/mir/scene/surface.h is in libmirserver-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
/*
 * Copyright © 2014 Canonical Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by: Alan Griffiths <alan@octopull.co.uk>
 */

#ifndef MIR_SCENE_SURFACE_H_
#define MIR_SCENE_SURFACE_H_

#include "mir/graphics/renderable.h"
#include "mir/input/surface.h"
#include "mir/frontend/surface.h"
#include "mir/compositor/compositor_id.h"
#include "mir/optional_value.h"

#include <vector>
#include <list>

namespace mir
{
namespace input { class InputChannel; }
namespace shell { class InputTargeter; }
namespace geometry { struct Rectangle; }
namespace graphics { class CursorImage; }
namespace compositor { class BufferStream; }
namespace scene
{
struct StreamInfo
{
    std::shared_ptr<compositor::BufferStream> stream;
    geometry::Displacement displacement;
    optional_value<geometry::Size> size;
};

class SurfaceObserver;

class Surface :
    public input::Surface,
    public frontend::Surface
{
public:
    // resolve ambiguous member function names

    std::string name() const override = 0;
    geometry::Size client_size() const override = 0;
    geometry::Rectangle input_bounds() const override = 0;

    // member functions that don't exist in base classes

    /// Top-left corner (of the window frame if present)
    virtual geometry::Point top_left() const = 0;
    /// Size of the surface including window frame (if any)
    virtual geometry::Size size() const = 0;

    virtual graphics::RenderableList generate_renderables(compositor::CompositorID id) const = 0; 
    virtual int buffers_ready_for_compositor(void const* compositor_id) const = 0;

    virtual float alpha() const = 0; //only used in examples/
    virtual MirWindowType type() const = 0;
    virtual MirWindowState state() const = 0;
    virtual void hide() = 0;
    virtual void show() = 0;
    virtual bool visible() const = 0;
    virtual void move_to(geometry::Point const& top_left) = 0;

    /**
     * Sets the input region for this surface.
     *
     * The input region is expressed in coordinates relative to the surface (i.e.,
     * use (0,0) for the top left point of the surface).
     *
     * By default the input region is the whole surface. To unset a custom input region
     * and revert to the default set an empty input region, i.e., set_input_region({}).
     * To disable input set a non-empty region containing an empty rectangle, i.e.,
     * set_input_region({Rectangle{}}).
     */
    virtual void set_input_region(std::vector<geometry::Rectangle> const& region) = 0;
    virtual void resize(geometry::Size const& size) = 0;
    virtual void set_transformation(glm::mat4 const& t) = 0;
    virtual void set_alpha(float alpha) = 0;
    virtual void set_orientation(MirOrientation orientation) = 0;
    
    virtual void set_cursor_image(std::shared_ptr<graphics::CursorImage> const& image) override = 0;
    virtual std::shared_ptr<graphics::CursorImage> cursor_image() const override = 0;

    virtual void add_observer(std::shared_ptr<SurfaceObserver> const& observer) = 0;
    virtual void remove_observer(std::weak_ptr<SurfaceObserver> const& observer) = 0;

    // TODO input_channel() relates to adding and removing the surface
    // TODO from the scene and is probably not cleanest interface for this.
    virtual std::shared_ptr<input::InputChannel> input_channel() const override = 0;
    virtual void set_reception_mode(input::InputReceptionMode mode) = 0;

    virtual void request_client_surface_close() = 0;
    virtual std::shared_ptr<Surface> parent() const = 0;

    // TODO a legacy of old interactions and needs removing
    virtual int configure(MirWindowAttrib attrib, int value) = 0;
    // TODO a legacy of old interactions and needs removing
    virtual int query(MirWindowAttrib attrib) const = 0;

    virtual void set_keymap(MirInputDeviceId id, std::string const& model, std::string const& layout,
                            std::string const& variant, std::string const& options) = 0;
    virtual void rename(std::string const& title) = 0;
    virtual void set_streams(std::list<StreamInfo> const& streams) = 0;

    virtual void set_confine_pointer_state(MirPointerConfinementState state) = 0;
    virtual MirPointerConfinementState confine_pointer_state() const = 0;

    virtual void placed_relative(geometry::Rectangle const& placement) = 0;
};
}
}

#endif // MIR_SCENE_SURFACE_H_