Go to index / Go to protocols

jay_wl_surface_factory_v1 ↗

protocol for compositor-created wl_surface objects

This protocol allows the compositor to create wl_surface objects and send them to the client.

This protocol is frozen, meaning that its API and semantics will never change.

jay_wl_surface_factory_v1
jay_wl_surface_factory_manager_v1

Version 65535

manager singleton

This interface is a singleton global.

Since the wl_surface objects created by jay_wl_surface_factory_v1.surface have the same version as this object, the compositor should expose this singleton with the same version it uses for the wl_compositor singleton.

jay_wl_surface_factory_manager_v1
request destroy()
Destructor

    destroy this manager

    This request destroys the manager. This has no effect on any of the created factories.

    jay_wl_surface_factory_manager_v1
    request create_factory(
        id: new_id<jay_wl_surface_factory_v1>,
    )
    • id — the new factory

    create a new factory

    See the description of jay_wl_surface_factory_v1 for more details.

    jay_wl_surface_factory_v1
    jay_wl_surface_factory_v1

    Version 65535

    wl_surface factory

    This interface can be used by the compositor to create wl_surface objects and send them to the client.

    The created wl_surface objects will have the same version as this object, which in turn has the same version as the jay_wl_surface_factory_manager_v1 object. The client should bind jay_wl_surface_factory_manager_v1 with the version it wants for the wl_surface objects.

    Each jay_wl_surface_factory_v1 is in one of three states:

    The object can only transition from the initial to the assigned state and from the assigned to the abandoned state. How and when these transitions happen is defined by higher-level protocols building on top of this protocol.

    For example, a higher-level protocol might have a constructor request that accepts a jay_wl_surface_factory_v1 object as an argument and transitions it from the initial to the assigned state. The created higher-level object might have a stop request that transitions the jay_wl_surface_factory_v1 object from the assigned to the abandoned state.

    The jay_wl_surface_factory_v1.surface event is only sent while the object is in the assigned state.

    Trying to transition the jay_wl_surface_factory_v1 to the assigned state while it is not in the initial state raises the already_assigned error.

    jay_wl_surface_factory_v1
    enum error {
        already_assigned = 0,
        still_assigned = 1,
    }
    • already_assigned — the factory was already assigned to a producer
    • still_assigned — the factory is still assigned to a producer

    fatal error

    These fatal protocol errors may be emitted in response to invalid requests.

    jay_wl_surface_factory_v1
    request destroy()
    Destructor

      destroy this factory

      This request must only be sent while the jay_wl_surface_factory_v1 is in the initial or abandoned state. Trying to send it in the assigned state raises the still_assigned error.

      jay_wl_surface_factory_v1
      event surface(
          id: new_id<wl_surface>,
      )
      • id — the new surface

      a new wl_surface has been created

      This event is sent when the compositor creates a new wl_surface object. The meaning and use of the surface are defined by the higher-level protocol that this jay_wl_surface_factory_v1 is assigned to.

      The version of the wl_surface is the version of this jay_wl_surface_factory_v1 object, which is in turn the version that the client bound the jay_wl_surface_factory_manager_v1 with.