protocol: migrate to stable presentation-time.xml
Remove the unstable presentation_timing.xml file, and use
presentation-time.xml from wayland-protocols instead to generate all the
Presentation extension bindings.
The following renames are done according to the XML changes:
- generated header includes
- enum constants and macros prefixed with WP_
- interface symbol names prefixed with wp_
- protocol API calls prefixed with wp_
Clients use wp_presentation_interface.name rather than hardcoding the
global interface name: presentation-shm, weston-info, presentation-test.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
[Pekka: updated wayland-protocols dependency to 1.2]
diff --git a/clients/weston-info.c b/clients/weston-info.c
index 49d64fe..9d42599 100644
--- a/clients/weston-info.c
+++ b/clients/weston-info.c
@@ -34,7 +34,7 @@
#include "shared/helpers.h"
#include "shared/os-compatibility.h"
-#include "presentation_timing-client-protocol.h"
+#include "presentation-time-client-protocol.h"
typedef void (*print_info_t)(void *info);
typedef void (*destroy_info_t)(void *info);
@@ -105,7 +105,7 @@
struct presentation_info {
struct global_info global;
- struct presentation *presentation;
+ struct wp_presentation *presentation;
clockid_t clk_id;
};
@@ -595,7 +595,7 @@
{
struct presentation_info *prinfo = info;
- presentation_destroy(prinfo->presentation);
+ wp_presentation_destroy(prinfo->presentation);
}
static const char *
@@ -630,7 +630,7 @@
}
static void
-presentation_handle_clock_id(void *data, struct presentation *presentation,
+presentation_handle_clock_id(void *data, struct wp_presentation *presentation,
uint32_t clk_id)
{
struct presentation_info *prinfo = data;
@@ -638,7 +638,7 @@
prinfo->clk_id = clk_id;
}
-static const struct presentation_listener presentation_listener = {
+static const struct wp_presentation_listener presentation_listener = {
presentation_handle_clock_id
};
@@ -647,15 +647,16 @@
{
struct presentation_info *prinfo = xzalloc(sizeof *prinfo);
- init_global_info(info, &prinfo->global, id, "presentation", version);
+ init_global_info(info, &prinfo->global, id,
+ wp_presentation_interface.name, version);
prinfo->global.print = print_presentation_info;
prinfo->global.destroy = destroy_presentation_info;
prinfo->clk_id = -1;
prinfo->presentation = wl_registry_bind(info->registry, id,
- &presentation_interface, 1);
- presentation_add_listener(prinfo->presentation, &presentation_listener,
- prinfo);
+ &wp_presentation_interface, 1);
+ wp_presentation_add_listener(prinfo->presentation,
+ &presentation_listener, prinfo);
info->roundtrip_needed = true;
}