Program Listing for File 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/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_EVENT_H_
#define MIR_TOOLKIT_EVENT_H_
#include <mir_toolkit/events/enums.h>
#include <stddef.h>
#include <stdint.h>
#include <mir_toolkit/common.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MirWindowEvent MirWindowEvent;
typedef struct MirResizeEvent MirResizeEvent;
typedef struct MirPromptSessionEvent MirPromptSessionEvent;
typedef struct MirOrientationEvent MirOrientationEvent;
typedef struct MirCloseWindowEvent MirCloseWindowEvent;
typedef struct MirInputEvent MirInputEvent;
typedef struct MirWindowOutputEvent MirWindowOutputEvent;
typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent;
typedef struct MirWindowPlacementEvent MirWindowPlacementEvent;
typedef struct MirEvent MirEvent;
#ifdef __cplusplus
}
#endif
#include <mir_toolkit/events/input/input_event.h>
#include <mir_toolkit/events/resize_event.h>
#include <mir_toolkit/events/window_event.h>
#include <mir_toolkit/events/orientation_event.h>
#include <mir_toolkit/events/prompt_session_event.h>
#include <mir_toolkit/events/window_output_event.h>
#include <mir_toolkit/events/input_device_state_event.h>
#ifdef __cplusplus
extern "C" {
#endif
MirEventType mir_event_get_type(MirEvent const* event);
MirInputEvent const* mir_event_get_input_event(MirEvent const* event);
MirWindowEvent const* mir_event_get_window_event(MirEvent const* event);
MirResizeEvent const* mir_event_get_resize_event(MirEvent const* event);
MirPromptSessionEvent const* mir_event_get_prompt_session_event(MirEvent const* event);
MirOrientationEvent const* mir_event_get_orientation_event(MirEvent const* event);
MirWindowOutputEvent const* mir_event_get_window_output_event(MirEvent const* event);
MirInputDeviceStateEvent const* mir_event_get_input_device_state_event(MirEvent const* event);
MirWindowPlacementEvent const* mir_event_get_window_placement_event(MirEvent const* event);
/*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* _________________________
*< Don't use mir_event_ref >
* -------------------------
* \ ^__^
* \ (oo)\_______
* (__)\ )\/\
* ||----w |
* || ||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* NOTICE: mir_event_ref and mir_event_unref are implemented in terms of copy
* until such time that direct MirEvent access is deprecated. This means you
* must use the return value as your new reference.
*/
[[deprecated("Not meaningful: legacy of mirclient API")]]
MirEvent const* mir_event_ref(MirEvent const* event) __attribute__((warn_unused_result));
[[deprecated("Not meaningful: legacy of mirclient API")]]
void mir_event_unref(MirEvent const* event);
#ifdef __cplusplus
}
#endif
#endif /* MIR_TOOLKIT_EVENT_H_ */