From: Bill Spitzak <[email protected]> I think this makes it less confusing. "factory" was already used for internal functions.
Signed-off-by: Bill Spitzak <[email protected]> --- src/wayland-client-core.h | 10 +++++----- src/wayland-client.c | 48 +++++++++++++++++++++++------------------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/wayland-client-core.h b/src/wayland-client-core.h index b1d6515..52bb553 100644 --- a/src/wayland-client-core.h +++ b/src/wayland-client-core.h @@ -133,29 +133,29 @@ wl_proxy_create(struct wl_proxy *factory, const struct wl_interface *interface); void * -wl_proxy_create_wrapper(void *proxy); +wl_proxy_create_wrapper(void *factory); void wl_proxy_wrapper_destroy(void *proxy_wrapper); struct wl_proxy * -wl_proxy_marshal_constructor(struct wl_proxy *proxy, +wl_proxy_marshal_constructor(struct wl_proxy *factory, uint32_t opcode, const struct wl_interface *interface, ...); struct wl_proxy * -wl_proxy_marshal_constructor_versioned(struct wl_proxy *proxy, +wl_proxy_marshal_constructor_versioned(struct wl_proxy *factory, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...); struct wl_proxy * -wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, +wl_proxy_marshal_array_constructor(struct wl_proxy *factory, uint32_t opcode, union wl_argument *args, const struct wl_interface *interface); struct wl_proxy * -wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, +wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *factory, uint32_t opcode, union wl_argument *args, const struct wl_interface *interface, diff --git a/src/wayland-client.c b/src/wayland-client.c index 9934cd2..f67678b 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -532,11 +532,11 @@ wl_proxy_add_dispatcher(struct wl_proxy *proxy, /* Return index of the new_id argument */ static int -new_id_index(struct wl_proxy *proxy, uint32_t opcode) +new_id_index(struct wl_proxy *factory, uint32_t opcode) { int i; const struct wl_message *message = - &proxy->object.interface->methods[opcode]; + &factory->object.interface->methods[opcode]; const char *signature = message->signature; int count = arg_count_for_signature(signature); for (i = 0; ; i++) { @@ -591,7 +591,7 @@ proxy_marshal_array(struct wl_proxy *proxy, /** Prepare a request to be sent to the compositor * - * \param proxy The proxy object + * \param factory The proxy object * \param opcode Opcode of the request to be sent * \param args Extra arguments for the given request * \param interface The interface to use for the new proxy @@ -613,19 +613,19 @@ proxy_marshal_array(struct wl_proxy *proxy, * \memberof wl_proxy */ WL_EXPORT struct wl_proxy * -wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, +wl_proxy_marshal_array_constructor(struct wl_proxy *factory, uint32_t opcode, union wl_argument *args, const struct wl_interface *interface) { - return wl_proxy_marshal_array_constructor_versioned(proxy, opcode, + return wl_proxy_marshal_array_constructor_versioned(factory, opcode, args, interface, - proxy->version); + factory->version); } /** Prepare a request to be sent to the compositor * - * \param proxy The proxy object + * \param factory The proxy object * \param opcode Opcode of the request to be sent * \param args Extra arguments for the given request * \param interface The interface to use for the new proxy @@ -648,7 +648,7 @@ wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, * \memberof wl_proxy */ WL_EXPORT struct wl_proxy * -wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, +wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *factory, uint32_t opcode, union wl_argument *args, const struct wl_interface *interface, @@ -660,13 +660,13 @@ wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, new_proxy = proxy_new(interface); if (new_proxy == NULL) return NULL; - new_proxy->display = proxy->display; - new_proxy->queue = proxy->queue; + new_proxy->display = factory->display; + new_proxy->queue = factory->queue; new_proxy->version = version; - args[new_id_index(proxy, opcode)].o = &new_proxy->object; + args[new_id_index(factory, opcode)].o = &new_proxy->object; } - proxy_marshal_array(proxy, opcode, args, new_proxy); + proxy_marshal_array(factory, opcode, args, new_proxy); return new_proxy; } @@ -703,7 +703,7 @@ wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...) /** Prepare a request to be sent to the compositor * - * \param proxy The proxy object + * \param factory The proxy object * \param opcode Opcode of the request to be sent * \param interface The interface to use for the new proxy * \param ... Extra arguments for the given request @@ -717,32 +717,32 @@ wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...) * For new-id arguments, this function will allocate a new wl_proxy * and send the ID to the server. The new wl_proxy will be returned * on success or NULL on error with errno set accordingly. The newly - * created proxy will inherit their version from their parent. + * created proxy will inherit their version from the factory. * * \note This should not normally be used by non-generated code. * * \memberof wl_proxy */ WL_EXPORT struct wl_proxy * -wl_proxy_marshal_constructor(struct wl_proxy *proxy, uint32_t opcode, +wl_proxy_marshal_constructor(struct wl_proxy *factory, uint32_t opcode, const struct wl_interface *interface, ...) { union wl_argument args[WL_CLOSURE_MAX_ARGS]; va_list ap; va_start(ap, interface); - wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, + wl_argument_from_va_list(factory->object.interface->methods[opcode].signature, args, WL_CLOSURE_MAX_ARGS, ap); va_end(ap); - return wl_proxy_marshal_array_constructor(proxy, opcode, + return wl_proxy_marshal_array_constructor(factory, opcode, args, interface); } /** Prepare a request to be sent to the compositor * - * \param proxy The proxy object + * \param factory The proxy object * \param opcode Opcode of the request to be sent * \param interface The interface to use for the new proxy * \param version The protocol object version of the new proxy @@ -762,7 +762,7 @@ wl_proxy_marshal_constructor(struct wl_proxy *proxy, uint32_t opcode, * \memberof wl_proxy */ WL_EXPORT struct wl_proxy * -wl_proxy_marshal_constructor_versioned(struct wl_proxy *proxy, uint32_t opcode, +wl_proxy_marshal_constructor_versioned(struct wl_proxy *factory, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...) { @@ -770,11 +770,11 @@ wl_proxy_marshal_constructor_versioned(struct wl_proxy *proxy, uint32_t opcode, va_list ap; va_start(ap, version); - wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, + wl_argument_from_va_list(factory->object.interface->methods[opcode].signature, args, WL_CLOSURE_MAX_ARGS, ap); va_end(ap); - return wl_proxy_marshal_array_constructor_versioned(proxy, opcode, + return wl_proxy_marshal_array_constructor_versioned(factory, opcode, args, interface, version); } @@ -1984,7 +1984,7 @@ wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue) /** Create a proxy wrapper for making queue assignments thread-safe * - * \param proxy The proxy object to be wrapped + * \param factory The proxy object to be wrapped * \return A proxy wrapper for the given proxy or NULL on failure * * A proxy wrapper is type of 'struct wl_proxy' instance that can be used when @@ -2031,9 +2031,9 @@ wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue) * \memberof wl_proxy */ WL_EXPORT void * -wl_proxy_create_wrapper(void *proxy) +wl_proxy_create_wrapper(void *factory) { - struct wl_proxy *wrapped_proxy = proxy; + struct wl_proxy *wrapped_proxy = factory; struct wl_proxy *wrapper = proxy_new(wrapped_proxy->object.interface); if (!wrapper) return NULL; -- 1.9.1 _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
