~ci-train-bot/miral/miral-ubuntu-zesty-2299

« back to all changes in this revision

Viewing changes to include/miral/toolkit/surface_spec.h

  • Committer: Bileto Bot
  • Date: 2016-11-30 08:40:00 UTC
  • mfrom: (340.1.2 miral-release)
  • Revision ID: ci-train-bot@canonical.com-20161130084000-q9mfvwqsbdr078ec
* New upstream release 0.5.0 (https://launchpad.net/miral/+milestone/0.5)
  - ABI summary:
    . miral ABI unchanged at 1
  - Enhancements:
    . Add miral::DebugExtension allowing shells to enable & disable support
      for debug extension API(s) dynamically
    . Improve handling of fullscreen surfaces when switching outputs, or
      specified output doesn't exist (any more)
    . Initial tests and some fixes for tracking of active window.
    . Document the order of windows passed to
      WindowManagementPolicy::advise_raise() so clients can rely on it.
    . [examples] Add miral-desktop script for launching a pseudo-desktop
    . [examples] Add miral-screencast - a utility script to assist with
      creating a screencast
    . [examples: miral-shell --window-manager tiling] implement the layout
      suggested in "Tasks for the interested reader"
    . [examples: miral-shell --window-manager tiling] Don't place a tile
      until the first window is ready
    . [examples: miral-kiosk] Provide configuration options for kiosk:
      --keymap --kiosk-maximize-root-windows & --kiosk-startup-apps-only
  - Bugs fixed:
    . Display configuration changes may cause "fatal errors" when there are
      fullscreen windows (LP: #1640557)

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        return SurfaceSpec{mir_connection_create_spec_for_menu(connection, width, height, format, parent, rect, edge)};
54
54
    }
55
55
 
 
56
#if MIR_CLIENT_VERSION >= MIR_VERSION_NUMBER(3, 4, 0)
 
57
    static auto for_tip(MirConnection* connection,
 
58
                        int width,
 
59
                        int height,
 
60
                        MirPixelFormat format,
 
61
                        MirSurface* parent,
 
62
                        MirRectangle* rect,
 
63
                        MirEdgeAttachment edge) -> SurfaceSpec
 
64
    {
 
65
        return SurfaceSpec{mir_connection_create_spec_for_tip(connection, width, height, format, parent, rect, edge)};
 
66
    }
 
67
#endif
 
68
 
 
69
    static auto for_dialog(MirConnection* connection,
 
70
                           int width,
 
71
                           int height,
 
72
                           MirPixelFormat format)-> SurfaceSpec
 
73
    {
 
74
        return SurfaceSpec{mir_connection_create_spec_for_dialog(connection, width, height, format)};
 
75
    }
 
76
 
 
77
    static auto for_dialog(MirConnection* connection,
 
78
                           int width,
 
79
                           int height,
 
80
                           MirPixelFormat format,
 
81
                           MirSurface* parent) -> SurfaceSpec
 
82
    {
 
83
        return for_dialog(connection, width, height, format).set_parent(parent);
 
84
    }
 
85
 
56
86
    static auto for_changes(MirConnection* connection) -> SurfaceSpec
57
87
    {
58
88
        return SurfaceSpec{mir_connection_create_spec_for_changes(connection)};
123
153
    }
124
154
#endif
125
155
 
 
156
    auto set_parent(MirSurface* parent) -> SurfaceSpec&
 
157
    {
 
158
        mir_surface_spec_set_parent(*this, parent);
 
159
        return *this;
 
160
    }
 
161
 
126
162
    template<typename Context>
127
163
    void create_surface(void (*callback)(MirSurface*, Context*), Context* context) const
128
164
    {