• Home
  • Raw
  • Download

Lines Matching refs:app

79 stream_alloc(struct debug_app *app, const char *name, const char *desc)  in stream_alloc()  argument
102 stream->should_bind = app->opt.bind_all; in stream_alloc()
103 wl_list_insert(app->stream_list.prev, &stream->link); in stream_alloc()
115 stream_find(struct debug_app *app, const char *name, const char *desc) in stream_find() argument
119 wl_list_for_each(stream, &app->stream_list, link) { in stream_find()
128 return stream_alloc(app, name, desc); in stream_find()
143 destroy_streams(struct debug_app *app) in destroy_streams() argument
148 wl_list_for_each_safe(stream, tmp, &app->stream_list, link) in destroy_streams()
156 struct debug_app *app = data; in debug_advertise() local
157 (void) stream_find(app, name, desc); in debug_advertise()
168 struct debug_app *app = data; in global_handler() local
171 assert(app->registry == registry); in global_handler()
174 if (app->debug_iface) in global_handler()
178 app->debug_iface = in global_handler()
181 weston_debug_v1_add_listener(app->debug_iface, &debug_listener, in global_handler()
182 app); in global_handler()
225 start_streams(struct debug_app *app) in start_streams() argument
229 wl_list_for_each(stream, &app->stream_list, link) { in start_streams()
233 stream->obj = weston_debug_v1_subscribe(app->debug_iface, in start_streams()
235 app->out_fd); in start_streams()
242 list_streams(struct debug_app *app) in list_streams() argument
248 wl_list_for_each(stream, &app->stream_list, link) { in list_streams()
331 parse_cmdline(struct debug_app *app, int argc, char **argv) in parse_cmdline() argument
352 app->opt.help = true; in parse_cmdline()
355 app->opt.list = true; in parse_cmdline()
358 app->opt.bind_all = true; in parse_cmdline()
361 free(app->opt.output); in parse_cmdline()
362 app->opt.output = strdup(optarg); in parse_cmdline()
365 free(app->opt.outfd); in parse_cmdline()
366 app->opt.outfd = strdup(optarg); in parse_cmdline()
382 stream_alloc(app, argv[optind++], NULL); in parse_cmdline()
392 struct debug_app app = {}; in main() local
395 wl_list_init(&app.stream_list); in main()
396 app.out_fd = -1; in main()
398 if (parse_cmdline(&app, argc, argv) < 0) { in main()
403 if (app.opt.help) { in main()
408 if (!app.opt.list && !app.opt.bind_all && in main()
409 wl_list_empty(&app.stream_list)) { in main()
416 if (app.opt.bind_all && !wl_list_empty(&app.stream_list)) { in main()
422 if (app.opt.output && app.opt.outfd) { in main()
428 app.out_fd = setup_out_fd(app.opt.output, app.opt.outfd); in main()
429 if (app.out_fd < 0) { in main()
434 app.dpy = wl_display_connect(NULL); in main()
435 if (!app.dpy) { in main()
442 app.registry = wl_display_get_registry(app.dpy); in main()
443 wl_registry_add_listener(app.registry, &registry_listener, &app); in main()
444 wl_display_roundtrip(app.dpy); in main()
446 if (!app.debug_iface) { in main()
454 wl_display_roundtrip(app.dpy); /* for weston_debug_v1::advertise */ in main()
456 if (app.opt.list) in main()
457 list_streams(&app); in main()
459 start_streams(&app); in main()
461 weston_debug_v1_destroy(app.debug_iface); in main()
467 wl_list_for_each(stream, &app.stream_list, link) { in main()
477 if (wl_display_dispatch(app.dpy) < 0) { in main()
484 destroy_streams(&app); in main()
487 wl_display_roundtrip(app.dpy); in main()
489 wl_registry_destroy(app.registry); in main()
490 wl_display_disconnect(app.dpy); in main()
493 if (app.out_fd != -1) in main()
494 close(app.out_fd); in main()
496 destroy_streams(&app); in main()
497 free(app.opt.output); in main()
498 free(app.opt.outfd); in main()