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>
Showing
- compositor/weston-screenshooter.c 1 addition, 1 deletioncompositor/weston-screenshooter.c
- desktop-shell/input-panel.c 1 addition, 1 deletiondesktop-shell/input-panel.c
- desktop-shell/shell.c 2 additions, 2 deletionsdesktop-shell/shell.c
- fullscreen-shell/fullscreen-shell.c 2 additions, 2 deletionsfullscreen-shell/fullscreen-shell.c
- ivi-shell/input-panel-ivi.c 1 addition, 1 deletionivi-shell/input-panel-ivi.c
- libweston-desktop/wl-shell.c 1 addition, 1 deletionlibweston-desktop/wl-shell.c
- libweston-desktop/xdg-shell-v5.c 1 addition, 1 deletionlibweston-desktop/xdg-shell-v5.c
- libweston-desktop/xdg-shell-v6.c 1 addition, 1 deletionlibweston-desktop/xdg-shell-v6.c
- libweston/compositor.c 16 additions, 0 deletionslibweston/compositor.c
- libweston/compositor.h 3 additions, 0 deletionslibweston/compositor.h
- tests/weston-test.c 1 addition, 1 deletiontests/weston-test.c
Loading
Please register or sign in to comment