}
log_scope = weston_compositor_add_log_scope(log_ctx, "log",
- "Weston and Wayland log\n", NULL, NULL);
+ "Weston and Wayland log\n", NULL, NULL, NULL);
weston_log_file_open(log);
weston_log_set_handler(vlog, vlog_continue);
weston_compositor_add_log_scope(log_ctx,
"proto",
"Wayland protocol dump for all clients.\n",
- NULL, NULL);
+ NULL, NULL, NULL);
if (debug_protocol) {
protologger = wl_display_add_protocol_logger(display,
const char *name,
const char *description,
weston_log_scope_cb new_subscription,
+ weston_log_scope_cb destroy_subscription,
void *user_data);
void
b->debug = weston_compositor_add_log_scope(compositor->weston_log_ctx,
"drm-backend",
"Debug messages from DRM/KMS backend\n",
- NULL, NULL);
+ NULL, NULL, NULL);
compositor->backend = &b->base;
ec->debug_scene =
weston_compositor_add_log_scope(ec->weston_log_ctx, "scene-graph",
"Scene graph details\n",
- debug_scene_graph_cb,
+ debug_scene_graph_cb, NULL,
ec);
return ec;
cp->debug = weston_compositor_add_log_scope(compositor->weston_log_ctx,
"content-protection-debug",
"debug-logs for content-protection",
- NULL, NULL);
+ NULL, NULL, NULL);
return 0;
}
char *name;
char *desc;
weston_log_scope_cb new_subscription;
+ weston_log_scope_cb destroy_subscription;
void *user_data;
struct wl_list compositor_link;
struct wl_list subscription_list; /**< weston_log_subscription::source_link */
weston_log_subscription_destroy(struct weston_log_subscription *sub)
{
assert(sub);
+
+ if (sub->source->destroy_subscription)
+ sub->source->destroy_subscription(sub, sub->source->user_data);
+
if (sub->owner)
wl_list_remove(&sub->owner_link);
* @param description The log scope description for humans; must not be NULL.
* @param new_subscription Optional callback when a client subscribes to this
* scope.
+ * @param destroy_subscription Optional callback when a client destroys the
+ * subscription.
* @param user_data Optional user data pointer for the callback.
* @returns A valid pointer on success, NULL on failure.
*
const char *name,
const char *description,
weston_log_scope_cb new_subscription,
+ weston_log_scope_cb destroy_subscription,
void *user_data)
{
struct weston_log_scope *scope;
scope->name = strdup(name);
scope->desc = strdup(description);
scope->new_subscription = new_subscription;
+ scope->destroy_subscription = destroy_subscription;
scope->user_data = user_data;
wl_list_init(&scope->subscription_list);
license: 'MIT/Expat',
)
-libweston_major = 7
+libweston_major = 8
# libweston_revision is manufactured to follow the autotools build's
# library file naming, thanks to libtool
compositor->weston_log_ctx,
"pipewire",
"Debug messages from pipewire plugin\n",
- NULL, NULL);
+ NULL, NULL, NULL);
pipewire->destroy_listener.notify = weston_pipewire_destroy;
wl_signal_add(&compositor->destroy_signal, &pipewire->destroy_listener);
weston_compositor_add_log_scope(wxs->compositor->weston_log_ctx,
"xwm-wm-x11",
"XWM's window management X11 events\n",
- NULL, NULL);
+ NULL, NULL, NULL);
return 0;
}