MCPcopy
hub / github.com/mmulet/term.everything / WlCompositor_create_surface

Method WlCompositor_create_surface

wayland/wl_compositor.go:9–45  ·  view source on GitHub ↗
(
	s protocols.ClientState,
	_ protocols.ObjectID[protocols.WlCompositor],
	id protocols.ObjectID[protocols.WlSurface],
)

Source from the content-addressed store, hash-verified

7type WlCompositor struct{}
8
9func (c *WlCompositor) WlCompositor_create_surface(
10 s protocols.ClientState,
11 _ protocols.ObjectID[protocols.WlCompositor],
12 id protocols.ObjectID[protocols.WlSurface],
13) {
14 surface := MakeWlSurface()
15
16 AddObject(s, id, surface)
17
18 // // s.bound_compositor_info?.surfaces.set(id, new Surface_Info(surface, 1));
19 // // console.log("create surface", id);
20 // /**
21 // * @TODO check this code to see if it is needed
22 // */
23 // // s.get_global_binds(Global_Ids.wl_output)?.forEach((output_id) => {
24 // // console.log("Output enter", output_id, id);
25 // // wl_surface.enter(s, id, output_id);
26 // // });
27 //
28 // // s.get_global_binds(Global_Ids.wl_keyboard)?.forEach((keyboard_id) => {
29 // // console.log("Keyboard enter", keyboard_id, id);
30 // // wl_keyboard.enter(s, keyboard_id, 0, id, []);
31 // // });
32 //
33 // // s.get_global_binds(Global_Ids.wl_pointer)?.forEach((pointer_id) => {
34 // // console.log("Pointer enter", pointer_id, id);
35 // // wl_pointer.enter(
36 // // s,
37 // // pointer_id,
38 // // Math.round(Math.random() * 10_000),
39 // // id,
40 // // 0,
41 // // 0
42 // // );
43 // // wl_pointer.frame(s, pointer_id);
44 // // });
45}
46
47func (c *WlCompositor) WlCompositor_create_region(
48 s protocols.ClientState,

Callers

nothing calls this directly

Calls 2

MakeWlSurfaceFunction · 0.85
AddObjectFunction · 0.85

Tested by

no test coverage detected