neko/server/internal/desktop/xorg/xorg.h

49 lines
1.3 KiB
C
Raw Normal View History

2020-01-19 12:30:09 +13:00
#pragma once
2022-09-14 07:40:40 +12:00
#include <X11/Xlib.h>
2021-11-08 05:09:00 +13:00
#include <X11/XKBlib.h>
2022-09-14 07:40:40 +12:00
#include <X11/Xutil.h>
2021-11-08 05:09:00 +13:00
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/XTest.h>
2022-09-14 07:40:40 +12:00
#include <X11/extensions/Xfixes.h>
#include <stdlib.h>
2021-11-08 05:09:00 +13:00
extern void goCreateScreenSize(int index, int width, int height, int mwidth, int mheight);
extern void goSetScreenRates(int index, int rate_index, short rate);
Display *getXDisplay(void);
2022-09-14 07:40:40 +12:00
int XDisplayOpen(char *input);
void XDisplayClose(void);
2021-11-08 05:09:00 +13:00
void XMove(int x, int y);
2022-09-14 07:40:40 +12:00
void XCursorPosition(int *x, int *y);
2021-11-08 05:09:00 +13:00
void XScroll(int x, int y);
void XButton(unsigned int button, int down);
2022-09-14 07:40:40 +12:00
typedef struct xkeyentry_t {
KeySym keysym;
KeyCode keycode;
struct xkeyentry_t *next;
} xkeyentry_t;
2023-01-15 09:15:52 +13:00
typedef struct xkeycode_t {
KeyCode keycode;
struct xkeycode_t *next;
} xkeycode_t;
2022-09-14 07:40:40 +12:00
static void XKeyEntryAdd(KeySym keysym, KeyCode keycode);
static KeyCode XKeyEntryGet(KeySym keysym);
static KeyCode XkbKeysymToKeycode(Display *dpy, KeySym keysym);
void XKey(KeySym keysym, int down);
2021-11-08 05:09:00 +13:00
void XGetScreenConfigurations();
void XSetScreenConfiguration(int index, short rate);
int XGetScreenSize();
short XGetScreenRate();
2022-09-14 07:40:40 +12:00
void XSetKeyboardModifier(int mod, int on);
char XGetKeyboardModifiers();
XFixesCursorImage *XGetCursorImage(void);
2021-11-08 05:09:00 +13:00
2022-09-14 07:40:40 +12:00
char *XGetScreenshot(int *w, int *h);