libweston: introduce weston_output_from_resource()
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 27 Mar 2017 12:14:32 +0000 (15:14 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 25 Jul 2017 13:08:48 +0000 (16:08 +0300)
commit9ffb25009cbf2996f53b4ceb39cb9a7af1508ebf
treeee1e06386af507ad0008ed91524639a0059e6da7
parent0079a949e09816a7ae1ea0de69196c2a0e0875e7
libweston: introduce weston_output_from_resource()

This is a simple wrapper for casting the user data of a wl_resource into
a struct weston_output pointer. Using the wrapper clearly marks all the
places where a wl_output protocol object is used.

Replace ALL wl_output related calls to wl_resource_get_user_data() with
a call to weston_output_from_resource().

v2: add type assert in weston_output_from_resource().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
compositor/weston-screenshooter.c
desktop-shell/input-panel.c
desktop-shell/shell.c
fullscreen-shell/fullscreen-shell.c
ivi-shell/input-panel-ivi.c
libweston-desktop/wl-shell.c
libweston-desktop/xdg-shell-v5.c
libweston-desktop/xdg-shell-v6.c
libweston/compositor.c
libweston/compositor.h
tests/weston-test.c