libweston: Add weston-debug header to libweston
authorMarius Vlad <marius.vlad@collabora.com>
Mon, 29 Apr 2019 10:27:47 +0000 (13:27 +0300)
committerDaniel Stone <daniel@fooishbar.org>
Fri, 10 May 2019 12:02:00 +0000 (12:02 +0000)
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
compositor/main.c
compositor/weston-screenshooter.c
include/libweston/weston-debug.h [new file with mode: 0644]
libweston/compositor-drm.c
libweston/compositor.c
libweston/weston-debug.c
libweston/weston-debug.h [deleted file]
xwayland/xwayland.h

index 576809eed78cdb360a4d533935e2ee45731f744b..df90b3c9a48081704483c7f4ed67620fd490c211 100644 (file)
@@ -62,7 +62,7 @@
 #include <libweston/backend-x11.h>
 #include <libweston/backend-wayland.h>
 #include <libweston/windowed-output-api.h>
-#include "weston-debug.h"
+#include <libweston/weston-debug.h>
 #include "../remoting/remoting-plugin.h"
 
 #define WINDOW_TITLE "Weston Compositor"
index 55fbf8dfc9b1695ac02fc621bef33c9d20c9169d..b2aaf22fcdd389db31849a51e5f4674e97cdcacf 100644 (file)
@@ -32,7 +32,7 @@
 #include "weston.h"
 #include "weston-screenshooter-server-protocol.h"
 #include "shared/helpers.h"
-#include "weston-debug.h"
+#include <libweston/weston-debug.h>
 
 struct screenshooter {
        struct weston_compositor *ec;
diff --git a/include/libweston/weston-debug.h b/include/libweston/weston-debug.h
new file mode 100644 (file)
index 0000000..2dbaa53
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright © 2017 Pekka Paalanen <pq@iki.fi>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef WESTON_DEBUG_H
+#define WESTON_DEBUG_H
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+struct weston_compositor;
+struct weston_log_context;
+struct wl_display;
+
+void
+weston_compositor_enable_debug_protocol(struct weston_compositor *);
+
+bool
+weston_compositor_is_debug_protocol_enabled(struct weston_compositor *);
+
+struct weston_log_scope;
+struct weston_debug_stream;
+
+/** weston_log_scope callback
+ *
+ * \param stream The debug stream.
+ * \param user_data The \c user_data argument given to
+ * weston_compositor_add_log_scope()
+ *
+ * \memberof weston_log_scope
+ * \sa weston_debug_stream
+ */
+typedef void (*weston_log_scope_cb)(struct weston_debug_stream *stream,
+                                     void *user_data);
+
+struct weston_log_scope *
+weston_compositor_add_log_scope(struct weston_log_context *compositor,
+                                 const char *name,
+                                 const char *description,
+                                 weston_log_scope_cb begin_cb,
+                                 void *user_data);
+
+void
+weston_compositor_log_scope_destroy(struct weston_log_scope *scope);
+
+bool
+weston_log_scope_is_enabled(struct weston_log_scope *scope);
+
+void
+weston_log_scope_write(struct weston_log_scope *scope,
+                        const char *data, size_t len);
+
+void
+weston_log_scope_vprintf(struct weston_log_scope *scope,
+                          const char *fmt, va_list ap);
+
+void
+weston_log_scope_printf(struct weston_log_scope *scope,
+                         const char *fmt, ...)
+                         __attribute__ ((format (printf, 2, 3)));
+
+void
+weston_debug_stream_write(struct weston_debug_stream *stream,
+                         const char *data, size_t len);
+
+void
+weston_debug_stream_vprintf(struct weston_debug_stream *stream,
+                           const char *fmt, va_list ap);
+
+void
+weston_debug_stream_printf(struct weston_debug_stream *stream,
+                          const char *fmt, ...)
+                          __attribute__ ((format (printf, 2, 3)));
+
+void
+weston_debug_stream_complete(struct weston_debug_stream *stream);
+
+char *
+weston_log_scope_timestamp(struct weston_log_scope *scope,
+                            char *buf, size_t len);
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif /* WESTON_DEBUG_H */
index 6d40e72b8d192a9bb51d51e1f9ac083db404d2d3..627f58e547c53a6e7d8a969efb4dbd0e1cc26622 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <libweston/libweston.h>
 #include <libweston/backend-drm.h>
-#include "weston-debug.h"
+#include <libweston/weston-debug.h>
 #include "shared/helpers.h"
 #include "shared/timespec-util.h"
 #include "renderer-gl/gl-renderer.h"
index da34ee75ab7cf4f3dd06c603379cb6ff496e0ca1..fa2645fea7317ce927d1a60e99505c9ffcd1f7ee 100644 (file)
@@ -56,7 +56,7 @@
 #include "timeline.h"
 
 #include <libweston/libweston.h>
-#include "weston-debug.h"
+#include <libweston/weston-debug.h>
 #include "linux-dmabuf.h"
 #include "viewporter-server-protocol.h"
 #include "presentation-time-server-protocol.h"
index 79b35a45ad70931cec8c4baa16cfeec465060599..5f5053460347c9edea8cb33fbef43df1c843940b 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "config.h"
 
-#include "weston-debug.h"
+#include <libweston/weston-debug.h>
 #include "helpers.h"
 #include <libweston/libweston.h>
 
diff --git a/libweston/weston-debug.h b/libweston/weston-debug.h
deleted file mode 100644 (file)
index 2dbaa53..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright © 2017 Pekka Paalanen <pq@iki.fi>
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef WESTON_DEBUG_H
-#define WESTON_DEBUG_H
-
-#include <stdbool.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-struct weston_compositor;
-struct weston_log_context;
-struct wl_display;
-
-void
-weston_compositor_enable_debug_protocol(struct weston_compositor *);
-
-bool
-weston_compositor_is_debug_protocol_enabled(struct weston_compositor *);
-
-struct weston_log_scope;
-struct weston_debug_stream;
-
-/** weston_log_scope callback
- *
- * \param stream The debug stream.
- * \param user_data The \c user_data argument given to
- * weston_compositor_add_log_scope()
- *
- * \memberof weston_log_scope
- * \sa weston_debug_stream
- */
-typedef void (*weston_log_scope_cb)(struct weston_debug_stream *stream,
-                                     void *user_data);
-
-struct weston_log_scope *
-weston_compositor_add_log_scope(struct weston_log_context *compositor,
-                                 const char *name,
-                                 const char *description,
-                                 weston_log_scope_cb begin_cb,
-                                 void *user_data);
-
-void
-weston_compositor_log_scope_destroy(struct weston_log_scope *scope);
-
-bool
-weston_log_scope_is_enabled(struct weston_log_scope *scope);
-
-void
-weston_log_scope_write(struct weston_log_scope *scope,
-                        const char *data, size_t len);
-
-void
-weston_log_scope_vprintf(struct weston_log_scope *scope,
-                          const char *fmt, va_list ap);
-
-void
-weston_log_scope_printf(struct weston_log_scope *scope,
-                         const char *fmt, ...)
-                         __attribute__ ((format (printf, 2, 3)));
-
-void
-weston_debug_stream_write(struct weston_debug_stream *stream,
-                         const char *data, size_t len);
-
-void
-weston_debug_stream_vprintf(struct weston_debug_stream *stream,
-                           const char *fmt, va_list ap);
-
-void
-weston_debug_stream_printf(struct weston_debug_stream *stream,
-                          const char *fmt, ...)
-                          __attribute__ ((format (printf, 2, 3)));
-
-void
-weston_debug_stream_complete(struct weston_debug_stream *stream);
-
-char *
-weston_log_scope_timestamp(struct weston_log_scope *scope,
-                            char *buf, size_t len);
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /* WESTON_DEBUG_H */
index 1c32350286c1475f1293c9963fa9d5ff8f5f8a9d..d42d33c4bc4607c8ccaa4ae2a6fb308b279515df 100644 (file)
@@ -33,7 +33,7 @@
 #include <libweston/libweston.h>
 #include "compositor/weston.h"
 #include <libweston/xwayland-api.h>
-#include "weston-debug.h"
+#include <libweston/weston-debug.h>
 
 #define SEND_EVENT_MASK (0x80)
 #define EVENT_TYPE(event) ((event)->response_type & ~SEND_EVENT_MASK)