217
217
auto parent = mtf::make_any_surface(connection);
218
218
MirRectangle attachment_rect{100, 200, 100, 100};
220
auto spec = mir_connection_create_spec_for_menu_surface(connection, 640, 480,
220
auto spec = mir_connection_create_spec_for_menu(connection, 640, 480,
221
221
mir_pixel_format_abgr_8888, parent, &attachment_rect, mir_edge_attachment_vertical);
222
222
ASSERT_THAT(spec, NotNull());
231
231
mir_surface_release_sync(menu);
234
TEST_F(ClientSurfaces, can_be_tooltips)
236
auto parent = mtf::make_any_surface(connection);
237
MirRectangle zone_rect{100, 200, 100, 100};
239
auto spec = mir_connection_create_spec_for_tooltip(connection, 640, 480,
240
mir_pixel_format_abgr_8888, parent, &zone_rect);
241
ASSERT_THAT(spec, NotNull());
243
auto tooltip = mir_surface_create_sync(spec);
244
mir_surface_spec_release(spec);
246
ASSERT_THAT(tooltip, IsValid());
247
EXPECT_EQ(mir_surface_get_type(tooltip), mir_surface_type_tip);
249
mir_surface_release_sync(parent);
250
mir_surface_release_sync(tooltip);
253
TEST_F(ClientSurfaces, can_be_dialogs)
255
auto spec = mir_connection_create_spec_for_dialog(connection, 640, 480,
256
mir_pixel_format_abgr_8888);
257
ASSERT_THAT(spec, NotNull());
259
auto dialog = mir_surface_create_sync(spec);
260
mir_surface_spec_release(spec);
262
ASSERT_THAT(dialog, IsValid());
263
EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);
265
mir_surface_release_sync(dialog);
268
TEST_F(ClientSurfaces, can_be_modal_dialogs)
270
auto parent = mtf::make_any_surface(connection);
271
auto spec = mir_connection_create_spec_for_modal_dialog(connection, 640, 480,
272
mir_pixel_format_abgr_8888, parent);
273
ASSERT_THAT(spec, NotNull());
275
auto dialog = mir_surface_create_sync(spec);
276
mir_surface_spec_release(spec);
278
ASSERT_THAT(dialog, IsValid());
279
EXPECT_EQ(mir_surface_get_type(dialog), mir_surface_type_dialog);
281
mir_surface_release_sync(parent);
282
mir_surface_release_sync(dialog);