rk_engine/cpp/events/events_x11.hpp

45 lines
1.3 KiB
C++

// Copyright (C) 2022 RozK
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef _RK_ENGINE_EVENTS_X11_H
#define _RK_ENGINE_EVENTS_X11_H
#include <X11/Xlib.h>
enum : unsigned {
RK_EVENTS_MASK = FocusChangeMask |
KeyPressMask | KeyReleaseMask |
ButtonPressMask | ButtonReleaseMask |
PointerMotionMask
};
struct rk_events_x11 {
Display * display;
Window window;
XIM input_manager;
XIC input_context;
bool focused;
bool key_autorepeat;
bool backup_autorepeat;
int motion_numerator;
int backup_numerator;
int motion_denominator;
int backup_denominator;
int motion_threshold;
int backup_threshold;
};
#endif // _RK_ENGINE_EVENTS_X11_H