Commit Graph

9 Commits

Author SHA1 Message Date
Emmanuel Gil Peyrot
c81cbae3f2 cursor: Properly document wl_cursor_image and wl_cursor
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2020-06-05 11:05:20 +00:00
Emmanuel Gil Peyrot
95a3272625 cursor: Use spaces for alignment in the header
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2020-06-05 11:05:20 +00:00
Emil Velikov
2f392daadb cursor: add forward declaration for struct wl_buffer
This makes the header self-contained, since the struct is considered
opaque from waylad-cursor POV.

As we're here move the wl_shm fwd. declaration alongside the others.
Making it easier to read and track.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2017-12-04 19:45:38 +00:00
Bryce Harrington
3540ea2b9f cursor: Update boilerplate from MIT X11 license to MIT Expat license
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-12 15:51:38 -07:00
Derek Foreman
4908bf0d0f cursor: add wl_cursor_frame_and_duration
It's useful to know how long the current cursor frame should be displayed
so we can wait that long to change it.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-03-05 09:39:44 +02:00
Ander Conselvan de Oliveira
6b861f7b4d cursor: Add function for calculating current frame in cursor animation
Given a pointer to struct wl_cursor and an elapsed time in ms.,
wl_cursor_frame() will return the index of the cursor image the should
be displayed.
2012-06-15 10:53:58 -04:00
Ander Conselvan de Oliveira
f779c57be2 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.
2012-05-25 23:06:15 -04:00
Yan Wang
d860f0cbec Wayland: Add missing extern "C"
Add extern "C" macro definition for C++.
2012-05-23 09:32:03 -04:00
Ander Conselvan de Oliveira
775002c6c0 Introduce libwayland-cursor, a cursor helper library
The purpose of this library is to be the equivalent of libXcursor in
the X world. This library is compatible with X cursor themes and loads
them directly into an shm pool making it easy for the clients to get
buffer for each cursor image.

The code for handling the X cursor theme was taken from libXcursor. The
files cursor/xcursor.[ch] are a stripped down version of that library
containing only the interfaces necessary for implementing the wayland
counterpart.
2012-05-22 15:20:13 -04:00