~ubuntu-branches/ubuntu/wily/mir/wily-proposed

« back to all changes in this revision

Viewing changes to src/server/scene/basic_surface.h

  • Committer: Package Import Robot
  • Author(s): CI Train Bot
  • Date: 2015-05-12 13:12:55 UTC
  • mto: This revision was merged to the branch mainline in revision 96.
  • Revision ID: package-import@ubuntu.com-20150512131255-y7z12i8n4pbvo70x
Tags: upstream-0.13.0+15.10.20150512
ImportĀ upstreamĀ versionĀ 0.13.0+15.10.20150512

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
namespace scene
55
55
{
56
56
class SceneReport;
 
57
class CursorStreamImageAdapter;
57
58
 
58
59
class SurfaceObservers : public SurfaceObserver, BasicObservers<SurfaceObserver>
59
60
{
72
73
    void reception_mode_set_to(input::InputReceptionMode mode) override;
73
74
    void cursor_image_set_to(graphics::CursorImage const& image) override;
74
75
    void client_surface_close_requested() override;
 
76
    void keymap_changed(xkb_rule_names const& names) override;
 
77
    void renamed(char const*) override;
75
78
};
76
79
 
77
80
class BasicSurface : public Surface
144
147
 
145
148
    MirSurfaceType type() const override;
146
149
    MirSurfaceState state() const override;
147
 
    void take_input_focus(std::shared_ptr<shell::InputTargeter> const& targeter) override;
148
150
    int configure(MirSurfaceAttrib attrib, int value) override;
149
 
    int query(MirSurfaceAttrib attrib) override;
 
151
    int query(MirSurfaceAttrib attrib) const override;
150
152
    void hide() override;
151
153
    void show() override;
152
154
    
153
155
    void set_cursor_image(std::shared_ptr<graphics::CursorImage> const& image) override;
154
156
    std::shared_ptr<graphics::CursorImage> cursor_image() const override;
155
157
 
 
158
    void set_cursor_stream(std::shared_ptr<frontend::BufferStream> const& stream,
 
159
                           geometry::Displacement const& hotspot) override;
 
160
    void set_cursor_from_buffer(graphics::Buffer& buffer,
 
161
                                geometry::Displacement const& hotspot);
 
162
 
156
163
    void request_client_surface_close() override;
157
164
 
158
165
    std::shared_ptr<Surface> parent() const override;
162
169
 
163
170
    int dpi() const;
164
171
 
 
172
    void set_keymap(xkb_rule_names const& rules) override;
 
173
 
 
174
    void rename(std::string const& title) override;
 
175
 
165
176
private:
166
177
    bool visible(std::unique_lock<std::mutex>&) const;
167
178
    MirSurfaceType set_type(MirSurfaceType t);  // Use configure() to make public changes
174
185
 
175
186
    SurfaceObservers observers;
176
187
    std::mutex mutable guard;
177
 
    std::string const surface_name;
 
188
    std::string surface_name;
178
189
    geometry::Rectangle surface_rect;
179
190
    glm::mat4 transformation_matrix;
180
191
    float surface_alpha;
198
209
    int dpi_ = 0;
199
210
    MirSurfaceVisibility visibility_ = mir_surface_visibility_exposed;
200
211
    MirOrientationMode pref_orientation_mode = mir_orientation_mode_any;
 
212
 
 
213
    std::unique_ptr<CursorStreamImageAdapter> cursor_stream_adapter;
201
214
};
202
215
 
203
216
}