vkf_viewer_events Interface

interface


Called by

interface~~vkf_viewer_events~~CalledByGraph interface~vkf_viewer_events vkf_viewer_events proc~dispatch_events dispatch_events proc~dispatch_events->interface~vkf_viewer_events proc~frame WindowProxy%frame proc~frame->proc~dispatch_events proc~resize WindowProxy%resize proc~resize->proc~frame proc~run WindowProxy%run proc~run->proc~frame

public function vkf_viewer_events(viewer, events, capacity) bind(C, name="vkf_viewer_events")

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: viewer

viewer handle (vkf_viewer_create)

integer(kind=c_int), intent(out) :: events(12,*)

the events, 12 integers each

integer(kind=c_int), value :: capacity

the most events events holds

Return Value integer(kind=c_int)

Description

The keyboard and mouse events since the last call, oldest first, up to capacity of them. Returns how many were copied (the rest are kept for the next call), or -1 on failure. Each event (a column of events): kind (1 key press, 2 key release, 3 pointer move, 4 button press, 5 button release), key (modified: 'V' with shift), key base, modifiers, button, buttons held (mask), x, y (framebuffer pixels from the top left), and the render area (offset x, y, width, height). Pointer events have key 1 while the mouse is grabbed (vkf_viewer_set_grab). Events taken by a GUI panel are not included.