diff --git a/tests/data/small-client-core.h b/tests/data/small-client-core.h index e5e21931..0e722441 100644 --- a/tests/data/small-client-core.h +++ b/tests/data/small-client-core.h @@ -85,6 +85,12 @@ enum intf_A_foo { * @since 2 */ INTF_A_FOO_NEGATIVE = -1, + /** + * this is a deprecated value + * @since 2 + * @deprecated Deprecated since version 3 + */ + INTF_A_FOO_DEPRECATED = 3, }; /** * @ingroup iface_intf_A @@ -94,6 +100,10 @@ enum intf_A_foo { * @ingroup iface_intf_A */ #define INTF_A_FOO_NEGATIVE_SINCE_VERSION 2 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_FOO_DEPRECATED_SINCE_VERSION 2 #endif /* INTF_A_FOO_ENUM */ /** @@ -105,6 +115,12 @@ struct intf_A_listener { */ void (*hey)(void *data, struct intf_A *intf_A); + /** + * @since 2 + * @deprecated Deprecated since version 3 + */ + void (*yo)(void *data, + struct intf_A *intf_A); }; /** @@ -126,6 +142,10 @@ intf_A_add_listener(struct intf_A *intf_A, * @ingroup iface_intf_A */ #define INTF_A_HEY_SINCE_VERSION 1 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_YO_SINCE_VERSION 2 /** * @ingroup iface_intf_A diff --git a/tests/data/small-client.h b/tests/data/small-client.h index c81b70f5..ad435923 100644 --- a/tests/data/small-client.h +++ b/tests/data/small-client.h @@ -85,6 +85,12 @@ enum intf_A_foo { * @since 2 */ INTF_A_FOO_NEGATIVE = -1, + /** + * this is a deprecated value + * @since 2 + * @deprecated Deprecated since version 3 + */ + INTF_A_FOO_DEPRECATED = 3, }; /** * @ingroup iface_intf_A @@ -94,6 +100,10 @@ enum intf_A_foo { * @ingroup iface_intf_A */ #define INTF_A_FOO_NEGATIVE_SINCE_VERSION 2 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_FOO_DEPRECATED_SINCE_VERSION 2 #endif /* INTF_A_FOO_ENUM */ /** @@ -105,6 +115,12 @@ struct intf_A_listener { */ void (*hey)(void *data, struct intf_A *intf_A); + /** + * @since 2 + * @deprecated Deprecated since version 3 + */ + void (*yo)(void *data, + struct intf_A *intf_A); }; /** @@ -126,6 +142,10 @@ intf_A_add_listener(struct intf_A *intf_A, * @ingroup iface_intf_A */ #define INTF_A_HEY_SINCE_VERSION 1 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_YO_SINCE_VERSION 2 /** * @ingroup iface_intf_A diff --git a/tests/data/small-code-core.c b/tests/data/small-code-core.c index 88e82579..b6545493 100644 --- a/tests/data/small-code-core.c +++ b/tests/data/small-code-core.c @@ -52,11 +52,12 @@ static const struct wl_message intf_A_requests[] = { static const struct wl_message intf_A_events[] = { { "hey", "", small_test_types + 0 }, + { "yo", "2", small_test_types + 0 }, }; WL_EXPORT const struct wl_interface intf_A_interface = { "intf_A", 3, 3, intf_A_requests, - 1, intf_A_events, + 2, intf_A_events, }; diff --git a/tests/data/small-code.c b/tests/data/small-code.c index 88e82579..b6545493 100644 --- a/tests/data/small-code.c +++ b/tests/data/small-code.c @@ -52,11 +52,12 @@ static const struct wl_message intf_A_requests[] = { static const struct wl_message intf_A_events[] = { { "hey", "", small_test_types + 0 }, + { "yo", "2", small_test_types + 0 }, }; WL_EXPORT const struct wl_interface intf_A_interface = { "intf_A", 3, 3, intf_A_requests, - 1, intf_A_events, + 2, intf_A_events, }; diff --git a/tests/data/small-private-code.c b/tests/data/small-private-code.c index 16794319..b2bbf0a3 100644 --- a/tests/data/small-private-code.c +++ b/tests/data/small-private-code.c @@ -62,11 +62,12 @@ static const struct wl_message intf_A_requests[] = { static const struct wl_message intf_A_events[] = { { "hey", "", small_test_types + 0 }, + { "yo", "2", small_test_types + 0 }, }; WL_PRIVATE const struct wl_interface intf_A_interface = { "intf_A", 3, 3, intf_A_requests, - 1, intf_A_events, + 2, intf_A_events, }; diff --git a/tests/data/small-server-core.h b/tests/data/small-server-core.h index ff19d670..e696cde7 100644 --- a/tests/data/small-server-core.h +++ b/tests/data/small-server-core.h @@ -88,6 +88,12 @@ enum intf_A_foo { * @since 2 */ INTF_A_FOO_NEGATIVE = -1, + /** + * this is a deprecated value + * @since 2 + * @deprecated Deprecated since version 3 + */ + INTF_A_FOO_DEPRECATED = 3, }; /** * @ingroup iface_intf_A @@ -97,6 +103,10 @@ enum intf_A_foo { * @ingroup iface_intf_A */ #define INTF_A_FOO_NEGATIVE_SINCE_VERSION 2 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_FOO_DEPRECATED_SINCE_VERSION 2 /** * @ingroup iface_intf_A * Validate a intf_A foo value. @@ -115,6 +125,8 @@ intf_A_foo_is_valid(uint32_t value, uint32_t version) { return version >= 2; case (uint32_t)INTF_A_FOO_NEGATIVE: return version >= 2; + case INTF_A_FOO_DEPRECATED: + return version >= 2; default: return false; } @@ -151,11 +163,16 @@ struct intf_A_interface { }; #define INTF_A_HEY 0 +#define INTF_A_YO 1 /** * @ingroup iface_intf_A */ #define INTF_A_HEY_SINCE_VERSION 1 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_YO_SINCE_VERSION 2 /** * @ingroup iface_intf_A @@ -181,6 +198,17 @@ intf_A_send_hey(struct wl_resource *resource_) wl_resource_post_event(resource_, INTF_A_HEY); } +/** + * @ingroup iface_intf_A + * Sends an yo event to the client owning the resource. + * @param resource_ The client's resource + */ +static inline void +intf_A_send_yo(struct wl_resource *resource_) +{ + wl_resource_post_event(resource_, INTF_A_YO); +} + #ifdef __cplusplus } #endif diff --git a/tests/data/small-server.h b/tests/data/small-server.h index 13fd1edc..009d9cdd 100644 --- a/tests/data/small-server.h +++ b/tests/data/small-server.h @@ -88,6 +88,12 @@ enum intf_A_foo { * @since 2 */ INTF_A_FOO_NEGATIVE = -1, + /** + * this is a deprecated value + * @since 2 + * @deprecated Deprecated since version 3 + */ + INTF_A_FOO_DEPRECATED = 3, }; /** * @ingroup iface_intf_A @@ -97,6 +103,10 @@ enum intf_A_foo { * @ingroup iface_intf_A */ #define INTF_A_FOO_NEGATIVE_SINCE_VERSION 2 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_FOO_DEPRECATED_SINCE_VERSION 2 /** * @ingroup iface_intf_A * Validate a intf_A foo value. @@ -115,6 +125,8 @@ intf_A_foo_is_valid(uint32_t value, uint32_t version) { return version >= 2; case (uint32_t)INTF_A_FOO_NEGATIVE: return version >= 2; + case INTF_A_FOO_DEPRECATED: + return version >= 2; default: return false; } @@ -151,11 +163,16 @@ struct intf_A_interface { }; #define INTF_A_HEY 0 +#define INTF_A_YO 1 /** * @ingroup iface_intf_A */ #define INTF_A_HEY_SINCE_VERSION 1 +/** + * @ingroup iface_intf_A + */ +#define INTF_A_YO_SINCE_VERSION 2 /** * @ingroup iface_intf_A @@ -181,6 +198,17 @@ intf_A_send_hey(struct wl_resource *resource_) wl_resource_post_event(resource_, INTF_A_HEY); } +/** + * @ingroup iface_intf_A + * Sends an yo event to the client owning the resource. + * @param resource_ The client's resource + */ +static inline void +intf_A_send_yo(struct wl_resource *resource_) +{ + wl_resource_post_event(resource_, INTF_A_YO); +} + #ifdef __cplusplus } #endif diff --git a/tests/data/small.xml b/tests/data/small.xml index 685c8915..ac527795 100644 --- a/tests/data/small.xml +++ b/tests/data/small.xml @@ -49,11 +49,14 @@ + + +