mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-18 05:34:45 -04:00
wayland-cursor: remove enum wl_cursor_type
Defining a list of all cursors a theme, client or toolkit should have is not the purpose of libwayland-cursor. The cursor type enum existed for making lookups faster, but this kind of optmization belongs in the toolkits.
This commit is contained in:
parent
086b4e2c1a
commit
f779c57be2
2 changed files with 3 additions and 39 deletions
|
|
@ -305,23 +305,6 @@ wl_cursor_theme_destroy(struct wl_cursor_theme *theme)
|
|||
free(theme);
|
||||
}
|
||||
|
||||
/** Get the cursor for a given type from a cursor theme
|
||||
*
|
||||
* \param theme The cursor theme
|
||||
* \patam type The desired cursor type
|
||||
* \return The theme's cursor of the given type or %NULL if there is no
|
||||
* such cursor
|
||||
*/
|
||||
WL_EXPORT struct wl_cursor *
|
||||
wl_cursor_theme_get_cursor(struct wl_cursor_theme *theme,
|
||||
enum wl_cursor_type type)
|
||||
{
|
||||
if (type < theme->cursor_count)
|
||||
return theme->cursors[type];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** Get the cursor for a given name from a cursor theme
|
||||
*
|
||||
* \param theme The cursor theme
|
||||
|
|
@ -330,8 +313,8 @@ wl_cursor_theme_get_cursor(struct wl_cursor_theme *theme,
|
|||
* such cursor
|
||||
*/
|
||||
WL_EXPORT struct wl_cursor *
|
||||
wl_cursor_theme_get_cursor_by_name(struct wl_cursor_theme *theme,
|
||||
const char *name)
|
||||
wl_cursor_theme_get_cursor(struct wl_cursor_theme *theme,
|
||||
const char *name)
|
||||
{
|
||||
unsigned int i;
|
||||
struct wl_cursor *cursor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue