
org.freedesktop.wayland.client.WlKeyboardEventsV4 Maven / Gradle / Ivy
package org.freedesktop.wayland.client;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
//
//
// Copyright © 2008-2011 Kristian Høgsberg
// Copyright © 2010-2011 Intel Corporation
// Copyright © 2012-2013 Collabora, Ltd.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation files
// (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice (including the
// next paragraph) shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
/**
* keyboard input device
*
*
* The wl_keyboard interface represents one or more keyboards
* associated with a seat.
*
*/
public interface WlKeyboardEventsV4 extends WlKeyboardEventsV3 {
int VERSION = 4;
/**
* keyboard mapping
*
*
* This event provides a file descriptor to the client which can be
* memory-mapped to provide a keyboard mapping description.
*
* @param emitter The protocol object that emitted the event.
* @param format
* @param fd
* @param size
*/
public void keymap(WlKeyboardProxy emitter, int format, int fd, int size);
/**
* enter event
*
*
* Notification that this seat's keyboard focus is on a certain
* surface.
*
* @param emitter The protocol object that emitted the event.
* @param serial
* @param surface
* @param keys the currently pressed keys
*/
public void enter(WlKeyboardProxy emitter, int serial, @Nonnull WlSurfaceProxy surface, @Nonnull java.nio.ByteBuffer keys);
/**
* leave event
*
*
* Notification that this seat's keyboard focus is no longer on
* a certain surface.
*
* The leave notification is sent before the enter notification
* for the new focus.
*
* @param emitter The protocol object that emitted the event.
* @param serial
* @param surface
*/
public void leave(WlKeyboardProxy emitter, int serial, @Nonnull WlSurfaceProxy surface);
/**
* key event
*
*
* A key was pressed or released.
* The time argument is a timestamp with millisecond
* granularity, with an undefined base.
*
* @param emitter The protocol object that emitted the event.
* @param serial
* @param time timestamp with millisecond granularity
* @param key
* @param state
*/
public void key(WlKeyboardProxy emitter, int serial, int time, int key, int state);
/**
* modifier and group state
*
*
* Notifies clients that the modifier and/or group state has
* changed, and it should update its local state.
*
* @param emitter The protocol object that emitted the event.
* @param serial
* @param modsDepressed
* @param modsLatched
* @param modsLocked
* @param group
*/
public void modifiers(WlKeyboardProxy emitter, int serial, int modsDepressed, int modsLatched, int modsLocked, int group);
/**
* repeat rate and delay
*
*
* Informs the client about the keyboard's repeat rate and delay.
*
* This event is sent as soon as the wl_keyboard object has been created,
* and is guaranteed to be received by the client before any key press
* event.
*
* Negative values for either rate or delay are illegal. A rate of zero
* will disable any repeating (regardless of the value of delay).
*
* This event can be sent later on as well with a new value if necessary,
* so clients should continue listening for the event past the creation
* of wl_keyboard.
*
* @param emitter The protocol object that emitted the event.
* @param rate the rate of repeating keys in characters per second
* @param delay delay in milliseconds since key down until repeating starts
*/
public void repeatInfo(WlKeyboardProxy emitter, int rate, int delay);
}