Program Listing for File pointer_event.h

↰ Return to documentation for file (/home/docs/checkouts/readthedocs.org/user_builds/canonical-mir-documentation/checkouts/2.30/include/common/mir_toolkit/events/input/pointer_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_POINTER_EVENT_H_
#define MIR_TOOLKIT_POINTER_EVENT_H_

#include <stdbool.h>

#ifdef __cplusplus
extern "C"
{
#endif

typedef struct MirPointerEvent MirPointerEvent;

MirPointerAxisSource mir_pointer_event_axis_source(MirPointerEvent const* event);

MirInputEventModifiers mir_pointer_event_modifiers(MirPointerEvent const* event);

MirPointerAction mir_pointer_event_action(MirPointerEvent const* event);

bool mir_pointer_event_button_state(MirPointerEvent const* event, MirPointerButton button);

MirPointerButtons mir_pointer_event_buttons(MirPointerEvent const* event);

float mir_pointer_event_axis_value(MirPointerEvent const* event, MirPointerAxis axis);

bool mir_pointer_event_axis_stop(MirPointerEvent const* event, MirPointerAxis axis);

MirInputEvent const* mir_pointer_event_input_event(MirPointerEvent const* event);

#ifdef __cplusplus
}
#endif

#endif /* MIR_TOOLKIT_POINTER_EVENT_H_ */