Logo Search packages:      
Sourcecode: wayland-demos version File versions  Download package

static int motion_handler ( struct window window,
struct input input,
uint32_t  time,
int32_t  x,
int32_t  y,
int32_t  sx,
int32_t  sy,
void *  data 
) [static]

CALLBACK function, Waylands informs about pointer motion.

inputinput device that caused the motion event
timetime the event happend
xabsolute x position
yabsolute y position
sxx position relative to the window
syy position relative to the window
datauser data associated to the window

Demonstrates the use of different cursors

Definition at line 252 of file eventdemo.c.

References log_motion.

Referenced by eventdemo_create().

      struct eventdemo *e = data;

      if (log_motion) {
            printf("motion time: %d, x: %d, y: %d, sx: %d, sy: %d\n",
                   time, x, y, sx, sy);

      if(sx > e->x && sx < e->x + e->w)
            if(sy > e->y && sy < e->y + e->h)
                  return POINTER_HAND1;

      return POINTER_LEFT_PTR;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index