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>
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>
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.
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.