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
* 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;
extern "C" {
#endif
-enum wl_cursor_type {
- WL_CURSOR_BOTTOM_LEFT,
- WL_CURSOR_BOTTOM_RIGHT,
- WL_CURSOR_BOTTOM,
- WL_CURSOR_DRAGGING,
- WL_CURSOR_LEFT_PTR,
- WL_CURSOR_LEFT,
- WL_CURSOR_RIGHT,
- WL_CURSOR_TOP_LEFT,
- WL_CURSOR_TOP_RIGHT,
- WL_CURSOR_TOP,
- WL_CURSOR_IBEAM,
- WL_CURSOR_HAND1,
-};
-
struct wl_cursor_theme;
struct wl_cursor_image {
struct wl_cursor *
wl_cursor_theme_get_cursor(struct wl_cursor_theme *theme,
- enum wl_cursor_type type);
-
-struct wl_cursor *
-wl_cursor_theme_get_cursor_by_name(struct wl_cursor_theme *theme,
- const char *name);
+ const char *name);
struct wl_buffer *
wl_cursor_image_get_buffer(struct wl_cursor_image *image);