Program Listing for File input_event.h

↰ Return to documentation for file (/home/docs/checkouts/readthedocs.org/user_builds/canonical-mir-documentation/checkouts/2.26/include/common/mir_toolkit/events/input/input_event.h)

/*
 * Copyright © Canonical Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version 2 or 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MIR_TOOLKIT_INPUT_EVENT_H_
#define MIR_TOOLKIT_INPUT_EVENT_H_

#include <mir_toolkit/events/event.h>
#include <mir_toolkit/mir_input_device_types.h>

#include <stdint.h>
#include <stdbool.h>

#include <mir_toolkit/events/input/touch_event.h>
#include <mir_toolkit/events/input/keyboard_event.h>
#include <mir_toolkit/events/input/pointer_event.h>

#ifdef __cplusplus
extern "C" {
#endif

MirInputDeviceId mir_input_event_get_device_id(MirInputEvent const* event);

int64_t mir_input_event_get_event_time(MirInputEvent const* event);

uint32_t mir_input_event_get_wayland_timestamp(MirInputEvent const* event);

MirInputEventType mir_input_event_get_type(MirInputEvent const* event);

MirKeyboardEvent const* mir_input_event_get_keyboard_event(MirInputEvent const* event);

MirTouchEvent const* mir_input_event_get_touch_event(MirInputEvent const* event);

MirPointerEvent const* mir_input_event_get_pointer_event(MirInputEvent const* event);

MirEvent const* mir_input_event_get_event(MirInputEvent const* event);

#ifdef __cplusplus
}
#endif

#endif // MIR_TOOLKIT_INPUT_EVENT_H_