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

static void button_handler ( struct window window,
struct input input,
uint32_t  time,
int  button,
int  state,
void *  data 
) [static]

CALLBACK function, Wayland informs about button event.

Parameters:
windowwindow
inputinput device that caused the button event
timetime the event happend
buttonbutton
statepressed or released
datauser data associated to the window

Definition at line 225 of file eventdemo.c.

References log_button.

Referenced by eventdemo_create().

{
      int32_t x, y;

      if (!log_button)
            return;

      input_get_position(input, &x, &y);
      printf("button time: %d, button: %d, state: %d, x: %d, y: %d\n",
             time, button, state, x, y);
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index