~ci-train-bot/mir/mir-ubuntu-yakkety-2783

« back to all changes in this revision

Viewing changes to src/client/mir_connection.cpp

Publish new apis

- Renamed mir_surface_spec_add_render_surface() to mir_window_spec_add_render_surface()
- Deleted forgotten mir_surface_spec_set_cursor_name from symbols.map
- Renamed mir_surface_spec_set_cursor_render_surface() to mir_window_spec_set_cursor_render_surface()
- Fixed build failure I noticed in gbm_buffer.h (and included extension headers in c99 test)
- Fixed licensing on headers (GPL->LGPL)
- Included new APIs in mir_client_library.h
- Deprecated the RS API/types
- Left RS API in the original symbols.map stanza.
- Created a new stanza for the rest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
897
897
    }
898
898
}
899
899
 
 
900
#pragma GCC diagnostic push
 
901
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
900
902
MirWaitHandle* MirConnection::create_client_buffer_stream(
901
903
    int width, int height,
902
904
    MirPixelFormat format,
947
949
    surface_map->insert(render_surface->stream_id(), stream);
948
950
    return stream;
949
951
}
 
952
#pragma GCC diagnostic pop
950
953
 
951
954
void MirConnection::render_surface_error(std::string const& error_msg, std::shared_ptr<RenderSurfaceCreationRequest> const& request)
952
955
{
956
959
    auto rs = std::make_shared<mcl::ErrorRenderSurface>(error_msg, this);
957
960
    surface_map->insert(request->native_window.get(), rs);
958
961
 
 
962
#pragma GCC diagnostic push
 
963
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
959
964
    if (request->callback)
960
965
        request->callback(
961
966
            static_cast<MirRenderSurface*>(request->native_window.get()),
962
967
            request->context);
 
968
#pragma GCC diagnostic pop
963
969
 
964
970
    request->wh->result_received();
965
971
}
1242
1248
    return display_configuration->take_snapshot();
1243
1249
}
1244
1250
 
 
1251
#pragma GCC diagnostic push
 
1252
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1245
1253
std::shared_ptr<mcl::PresentationChain> MirConnection::create_presentation_chain_with_id(
1246
1254
    MirRenderSurface* render_surface,
1247
1255
    mir::protobuf::BufferStream const& a_protobuf_bs)
1254
1262
    surface_map->insert(render_surface->stream_id(), chain);
1255
1263
    return chain;
1256
1264
}
 
1265
#pragma GCC diagnostic pop
1257
1266
 
1258
1267
void MirConnection::allocate_buffer(
1259
1268
    geom::Size size, MirPixelFormat format,
1337
1346
        google::protobuf::NewCallback(this, &MirConnection::released, stream_release));
1338
1347
}
1339
1348
 
 
1349
#pragma GCC diagnostic push
 
1350
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1340
1351
void MirConnection::render_surface_created(RenderSurfaceCreationRequest* request_raw)
1341
1352
{
1342
1353
    std::string static const error_msg = "Error creating MirRenderSurface: ";
1426
1437
 
1427
1438
    return static_cast<MirRenderSurface*>(nw.get());
1428
1439
}
 
1440
#pragma GCC diagnostic pop
1429
1441
 
1430
1442
void* MirConnection::request_interface(char const* name, int version)
1431
1443
{