package wayland
Module Proxy.Service_handlerSource
An ('a, 'v) t handles incoming messages for a service object of type 'a. This type is used when binding a service, to choose the version. All other handlers get the version from elsewhere (inherited from their parent object).
If the version rules turn out to be too restrictive, this can be used to disable them. Using this incorrectly may lead to a protocol error (such as receiving an event for which no handler was registered).
val accept_new :
(_, 'v, [< `Client | `Server ] as 'role) proxy ->
int32 ->
(module Metadata.S with type t = 'a) ->
version:int32 ->
('a, [ `Unknown ], 'role) proxyaccept_new parent id metadata ~version registers a new object, with an ID allocated by the peer. The returned proxy must have its handlers attached before switching threads, since otherwise processing a message addressed to the new object will fail. This is called from the generated code; the user code then calls the result.