diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-12-08 12:57:31 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-12-11 08:06:39 +0100 |
commit | b0c693faa9afab66e6fcbec95437f870aba99a00 (patch) | |
tree | 1a3116752e4ee1710b240e4d2f3fb8a274956d2b /ui/vnc.h | |
parent | 5c4b107f88ad2679817b73445fa706c62db4d8e0 (diff) |
vnc: use enum for features
Use an enum for the vnc feature bits. That way they are enumerated
automatically and we don't have to do that manually when adding or
removing features.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20201208115737.18581-4-kraxel@redhat.com
Diffstat (limited to 'ui/vnc.h')
-rw-r--r-- | ui/vnc.h | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -438,18 +438,20 @@ enum { * *****************************************************************************/ -#define VNC_FEATURE_RESIZE 0 -#define VNC_FEATURE_HEXTILE 1 -#define VNC_FEATURE_POINTER_TYPE_CHANGE 2 -#define VNC_FEATURE_WMVI 3 -#define VNC_FEATURE_TIGHT 4 -#define VNC_FEATURE_ZLIB 5 -#define VNC_FEATURE_COPYRECT 6 -#define VNC_FEATURE_RICH_CURSOR 7 -#define VNC_FEATURE_TIGHT_PNG 8 -#define VNC_FEATURE_ZRLE 9 -#define VNC_FEATURE_ZYWRLE 10 -#define VNC_FEATURE_LED_STATE 11 +enum VncFeatures { + VNC_FEATURE_RESIZE, + VNC_FEATURE_HEXTILE, + VNC_FEATURE_POINTER_TYPE_CHANGE, + VNC_FEATURE_WMVI, + VNC_FEATURE_TIGHT, + VNC_FEATURE_ZLIB, + VNC_FEATURE_COPYRECT, + VNC_FEATURE_RICH_CURSOR, + VNC_FEATURE_TIGHT_PNG, + VNC_FEATURE_ZRLE, + VNC_FEATURE_ZYWRLE, + VNC_FEATURE_LED_STATE, +}; #define VNC_FEATURE_RESIZE_MASK (1 << VNC_FEATURE_RESIZE) #define VNC_FEATURE_HEXTILE_MASK (1 << VNC_FEATURE_HEXTILE) |