{
return proxy->object.id;
}
+
+WL_EXPORT void
+wl_log_set_handler_client(wl_log_func_t handler)
+{
+ wl_log_handler = handler;
+}
wl_display_get_global(struct wl_display *display,
const char *interface, uint32_t version);
+void wl_log_set_handler_client(wl_log_func_t handler);
+
#ifdef __cplusplus
}
#endif
void
wl_closure_destroy(struct wl_closure *closure);
+extern wl_log_func_t wl_log_handler;
+
+void wl_log(const char *fmt, ...);
+
#endif
interface, implementation, id, data);
}
+
+WL_EXPORT void
+wl_log_set_handler_server(wl_log_func_t handler)
+{
+ wl_log_handler = handler;
+}
int
wl_display_init_shm(struct wl_display *display);
+void wl_log_set_handler_server(wl_log_func_t handler);
+
#ifdef __cplusplus
}
#endif
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
+#include <stdarg.h>
#include "wayland-util.h"
#include "wayland-private.h"
for_each_helper(&map->client_entries, func, data);
for_each_helper(&map->server_entries, func, data);
}
+
+static void
+wl_log_noop_handler(const char *fmt, va_list arg)
+{
+}
+
+wl_log_func_t wl_log_handler = wl_log_noop_handler;
+
+void
+wl_log(const char *fmt, ...)
+{
+ va_list argp;
+
+ va_start(argp, fmt);
+ wl_log_handler(fmt, argp);
+ va_end(argp);
+}
#include <math.h>
#include <stddef.h>
#include <inttypes.h>
+#include <stdarg.h>
/* GCC visibility */
#if defined(__GNUC__) && __GNUC__ >= 4
return i * 256;
}
+typedef void (*wl_log_func_t)(const char *, va_list);
+
#ifdef __cplusplus
}
#endif