mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-02-20 01:40:52 -05:00
scanner: add defines for wayland interface versions
Currently, it is cumbersome for clients that want to know what version of an interface is supported at compile time. This can especially matter in cases where the compositor and client aren't neccesarily compiled against the same wayland and wayland protocol versions. Provide more information by adding a simple int define for all interfaces that give the version that is already defined in the source xml file. Signed-off-by: Dudemanguy <random342@airmail.cc>
This commit is contained in:
parent
6137c8c213
commit
ab4c580480
9 changed files with 262 additions and 0 deletions
|
|
@ -950,6 +950,11 @@ wl_display_add_listener(struct wl_display *wl_display,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_display
|
||||
*/
|
||||
#define WL_DISPLAY_MAX_VERSION 1
|
||||
|
||||
#define WL_DISPLAY_SYNC 0
|
||||
#define WL_DISPLAY_GET_REGISTRY 1
|
||||
|
||||
|
|
@ -1088,6 +1093,11 @@ wl_registry_add_listener(struct wl_registry *wl_registry,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_registry
|
||||
*/
|
||||
#define WL_REGISTRY_MAX_VERSION 1
|
||||
|
||||
#define WL_REGISTRY_BIND 0
|
||||
|
||||
/**
|
||||
|
|
@ -1175,6 +1185,11 @@ wl_callback_add_listener(struct wl_callback *wl_callback,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_callback
|
||||
*/
|
||||
#define WL_CALLBACK_MAX_VERSION 1
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_callback
|
||||
*/
|
||||
|
|
@ -1208,6 +1223,11 @@ wl_callback_destroy(struct wl_callback *wl_callback)
|
|||
wl_proxy_destroy((struct wl_proxy *) wl_callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_compositor
|
||||
*/
|
||||
#define WL_COMPOSITOR_MAX_VERSION 4
|
||||
|
||||
#define WL_COMPOSITOR_CREATE_SURFACE 0
|
||||
#define WL_COMPOSITOR_CREATE_REGION 1
|
||||
|
||||
|
|
@ -1280,6 +1300,11 @@ wl_compositor_create_region(struct wl_compositor *wl_compositor)
|
|||
return (struct wl_region *) id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_shm_pool
|
||||
*/
|
||||
#define WL_SHM_POOL_MAX_VERSION 1
|
||||
|
||||
#define WL_SHM_POOL_CREATE_BUFFER 0
|
||||
#define WL_SHM_POOL_DESTROY 1
|
||||
#define WL_SHM_POOL_RESIZE 2
|
||||
|
|
@ -1679,6 +1704,11 @@ wl_shm_add_listener(struct wl_shm *wl_shm,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_shm
|
||||
*/
|
||||
#define WL_SHM_MAX_VERSION 1
|
||||
|
||||
#define WL_SHM_CREATE_POOL 0
|
||||
|
||||
/**
|
||||
|
|
@ -1774,6 +1804,11 @@ wl_buffer_add_listener(struct wl_buffer *wl_buffer,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_buffer
|
||||
*/
|
||||
#define WL_BUFFER_MAX_VERSION 1
|
||||
|
||||
#define WL_BUFFER_DESTROY 0
|
||||
|
||||
/**
|
||||
|
|
@ -1930,6 +1965,11 @@ wl_data_offer_add_listener(struct wl_data_offer *wl_data_offer,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_data_offer
|
||||
*/
|
||||
#define WL_DATA_OFFER_MAX_VERSION 3
|
||||
|
||||
#define WL_DATA_OFFER_ACCEPT 0
|
||||
#define WL_DATA_OFFER_RECEIVE 1
|
||||
#define WL_DATA_OFFER_DESTROY 2
|
||||
|
|
@ -2266,6 +2306,11 @@ wl_data_source_add_listener(struct wl_data_source *wl_data_source,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_data_source
|
||||
*/
|
||||
#define WL_DATA_SOURCE_MAX_VERSION 3
|
||||
|
||||
#define WL_DATA_SOURCE_OFFER 0
|
||||
#define WL_DATA_SOURCE_DESTROY 1
|
||||
#define WL_DATA_SOURCE_SET_ACTIONS 2
|
||||
|
|
@ -2503,6 +2548,11 @@ wl_data_device_add_listener(struct wl_data_device *wl_data_device,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_data_device
|
||||
*/
|
||||
#define WL_DATA_DEVICE_MAX_VERSION 3
|
||||
|
||||
#define WL_DATA_DEVICE_START_DRAG 0
|
||||
#define WL_DATA_DEVICE_SET_SELECTION 1
|
||||
#define WL_DATA_DEVICE_RELEASE 2
|
||||
|
|
@ -2687,6 +2737,11 @@ enum wl_data_device_manager_dnd_action {
|
|||
};
|
||||
#endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_data_device_manager
|
||||
*/
|
||||
#define WL_DATA_DEVICE_MANAGER_MAX_VERSION 3
|
||||
|
||||
#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE 0
|
||||
#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE 1
|
||||
|
||||
|
|
@ -2769,6 +2824,11 @@ enum wl_shell_error {
|
|||
};
|
||||
#endif /* WL_SHELL_ERROR_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_shell
|
||||
*/
|
||||
#define WL_SHELL_MAX_VERSION 1
|
||||
|
||||
#define WL_SHELL_GET_SHELL_SURFACE 0
|
||||
|
||||
|
||||
|
|
@ -2988,6 +3048,11 @@ wl_shell_surface_add_listener(struct wl_shell_surface *wl_shell_surface,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_shell_surface
|
||||
*/
|
||||
#define WL_SHELL_SURFACE_MAX_VERSION 1
|
||||
|
||||
#define WL_SHELL_SURFACE_PONG 0
|
||||
#define WL_SHELL_SURFACE_MOVE 1
|
||||
#define WL_SHELL_SURFACE_RESIZE 2
|
||||
|
|
@ -3358,6 +3423,11 @@ wl_surface_add_listener(struct wl_surface *wl_surface,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_surface
|
||||
*/
|
||||
#define WL_SURFACE_MAX_VERSION 4
|
||||
|
||||
#define WL_SURFACE_DESTROY 0
|
||||
#define WL_SURFACE_ATTACH 1
|
||||
#define WL_SURFACE_DAMAGE 2
|
||||
|
|
@ -3881,6 +3951,11 @@ wl_seat_add_listener(struct wl_seat *wl_seat,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_seat
|
||||
*/
|
||||
#define WL_SEAT_MAX_VERSION 6
|
||||
|
||||
#define WL_SEAT_GET_POINTER 0
|
||||
#define WL_SEAT_GET_KEYBOARD 1
|
||||
#define WL_SEAT_GET_TOUCH 2
|
||||
|
|
@ -4378,6 +4453,11 @@ wl_pointer_add_listener(struct wl_pointer *wl_pointer,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_pointer
|
||||
*/
|
||||
#define WL_POINTER_MAX_VERSION 6
|
||||
|
||||
#define WL_POINTER_SET_CURSOR 0
|
||||
#define WL_POINTER_RELEASE 1
|
||||
|
||||
|
|
@ -4672,6 +4752,11 @@ wl_keyboard_add_listener(struct wl_keyboard *wl_keyboard,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_keyboard
|
||||
*/
|
||||
#define WL_KEYBOARD_MAX_VERSION 6
|
||||
|
||||
#define WL_KEYBOARD_RELEASE 0
|
||||
|
||||
/**
|
||||
|
|
@ -4910,6 +4995,11 @@ wl_touch_add_listener(struct wl_touch *wl_touch,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_touch
|
||||
*/
|
||||
#define WL_TOUCH_MAX_VERSION 6
|
||||
|
||||
#define WL_TOUCH_RELEASE 0
|
||||
|
||||
/**
|
||||
|
|
@ -5202,6 +5292,11 @@ wl_output_add_listener(struct wl_output *wl_output,
|
|||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_output
|
||||
*/
|
||||
#define WL_OUTPUT_MAX_VERSION 3
|
||||
|
||||
#define WL_OUTPUT_RELEASE 0
|
||||
|
||||
/**
|
||||
|
|
@ -5266,6 +5361,11 @@ wl_output_release(struct wl_output *wl_output)
|
|||
WL_OUTPUT_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_output), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_region
|
||||
*/
|
||||
#define WL_REGION_MAX_VERSION 1
|
||||
|
||||
#define WL_REGION_DESTROY 0
|
||||
#define WL_REGION_ADD 1
|
||||
#define WL_REGION_SUBTRACT 2
|
||||
|
|
@ -5350,6 +5450,11 @@ enum wl_subcompositor_error {
|
|||
};
|
||||
#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_subcompositor
|
||||
*/
|
||||
#define WL_SUBCOMPOSITOR_MAX_VERSION 1
|
||||
|
||||
#define WL_SUBCOMPOSITOR_DESTROY 0
|
||||
#define WL_SUBCOMPOSITOR_GET_SUBSURFACE 1
|
||||
|
||||
|
|
@ -5429,6 +5534,11 @@ enum wl_subsurface_error {
|
|||
};
|
||||
#endif /* WL_SUBSURFACE_ERROR_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_wl_subsurface
|
||||
*/
|
||||
#define WL_SUBSURFACE_MAX_VERSION 1
|
||||
|
||||
#define WL_SUBSURFACE_DESTROY 0
|
||||
#define WL_SUBSURFACE_SET_POSITION 1
|
||||
#define WL_SUBSURFACE_PLACE_ABOVE 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue