2020-01-19 12:30:09 +13:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef XDISPLAY_H
|
|
|
|
#define XDISPLAY_H
|
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
2020-02-11 18:15:59 +13:00
|
|
|
#include <X11/extensions/Xrandr.h>
|
2020-01-19 12:30:09 +13:00
|
|
|
#include <X11/extensions/XTest.h>
|
2020-02-04 03:49:27 +13:00
|
|
|
#include <libclipboard.h>
|
2020-01-19 12:30:09 +13:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h> /* For fputs() */
|
|
|
|
#include <string.h> /* For strdup() */
|
|
|
|
|
2020-02-11 18:15:59 +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);
|
|
|
|
|
2020-01-19 12:30:09 +13:00
|
|
|
/* Returns the main display, closed either on exit or when closeMainDisplay()
|
|
|
|
* is invoked. This removes a bit of the overhead of calling XOpenDisplay() &
|
|
|
|
* XCloseDisplay() everytime the main display needs to be used.
|
|
|
|
*
|
|
|
|
* Note that this is almost certainly not thread safe. */
|
|
|
|
Display *getXDisplay(void);
|
2020-02-04 03:49:27 +13:00
|
|
|
clipboard_c *getClipboard(void);
|
2020-01-19 12:30:09 +13:00
|
|
|
|
2020-01-26 03:29:52 +13:00
|
|
|
void XMove(int x, int y);
|
|
|
|
void XScroll(int x, int y);
|
|
|
|
void XButton(unsigned int button, int down);
|
|
|
|
void XKey(unsigned long key, int down);
|
|
|
|
|
2020-02-11 18:15:59 +13:00
|
|
|
void XClipboardSet(char *src);
|
|
|
|
char *XClipboardGet();
|
|
|
|
|
|
|
|
void XGetScreenConfigurations();
|
|
|
|
void XSetScreenConfiguration(int index, short rate);
|
|
|
|
int XGetScreenSize();
|
|
|
|
short XGetScreenRate();
|
|
|
|
|
|
|
|
void XDisplayClose(void);
|
|
|
|
void XDisplaySet(char *input);
|
2020-06-16 09:14:23 +12:00
|
|
|
|
2020-06-21 13:05:58 +12:00
|
|
|
void SetKeyboardLayout(char *layout);
|
2020-01-19 12:30:09 +13:00
|
|
|
#endif
|
|
|
|
|