Skip to content
  • Auke Booij's avatar
    protocol: add support for cross-interface enum attributes · 7ccf35d4
    Auke Booij authored and Pekka Paalanen's avatar Pekka Paalanen committed
    The enum attribute, for which scanner support was introduced in
    1771299a
    
    , can be used to link message arguments to <enum>s. However,
    some arguments refer to <enum>s in a different <interface>.
    
    This adds scanner support for referring to an <enum> in a different
    <interface> using dot notation. It also sets the attributes in this
    style in the wayland XML protocol (wl_shm_pool::create_buffer::format
    to wl_shm::format, and wl_surface::set_buffer_transform::transform to
    wl_output::transform), and updates the documentation XSL so that this
    new style is supported.
    
    Changes since v2:
     - add object:: prefix for all enumerations in the documentation
     - fix whitespace in scanner.c
     - minor code fixup to return early and avoid casts in scanner.c
    
    Changes since v1:
     - several implementation bugs fixed
    
    Signed-off-by: default avatarAuke Booij <auke@tulcod.com>
    Reviewed-by: default avatarNils Christopher Brause <nilschrbrause@googlemail.com>
    Reviewed-by: default avatarBill Spitzak <spitzak@gmail.com>
    [Pekka: rebased across cde251a1
    
    ]
    [Pekka: wrap lines and space fixes in scanner.c]
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    7ccf35d4