implement MwLLGetClipboard for X11
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
efbf90945a
commit
f1c4a12cf3
12 changed files with 144 additions and 35 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
MwWidget window, instructions, text;
|
||||
|
||||
void resize(MwWidget handle, void* user_data, void* call_data) {
|
||||
static void resize(MwWidget handle, void* user_data, void* call_data) {
|
||||
unsigned int w, h;
|
||||
|
||||
(void)user_data;
|
||||
|
|
@ -23,7 +23,7 @@ void resize(MwWidget handle, void* user_data, void* call_data) {
|
|||
MwNheight, h - 125 - 50 * 3,
|
||||
NULL);
|
||||
}
|
||||
void clipboard(MwWidget handle, void* user_data, void* call_data) {
|
||||
static void clipboard(MwWidget handle, void* user_data, void* call_data) {
|
||||
char* clipboard = call_data;
|
||||
|
||||
(void)handle;
|
||||
|
|
@ -36,6 +36,10 @@ void clipboard(MwWidget handle, void* user_data, void* call_data) {
|
|||
MwForceRender(window);
|
||||
}
|
||||
|
||||
static void tick(MwWidget handle, void* user_data, void* call_data) {
|
||||
MwGetClipboard(handle);
|
||||
}
|
||||
|
||||
int main() {
|
||||
MwLibraryInit();
|
||||
|
||||
|
|
@ -53,6 +57,7 @@ int main() {
|
|||
MwAddUserHandler(window, MwNclipboardHandler, clipboard, NULL);
|
||||
MwAddUserHandler(instructions, MwNclipboardHandler, clipboard, NULL);
|
||||
MwAddUserHandler(text, MwNclipboardHandler, clipboard, NULL);
|
||||
MwAddUserHandler(window, MwNtickHandler, tick, NULL);
|
||||
|
||||
resize(window, NULL, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ void handler_theme(MwWidget handle, void* user_data, void* call_data) {
|
|||
(void)call_data;
|
||||
|
||||
MwVaApply(window,
|
||||
MwNdarkTheme, MwGetInteger(window, MwNdarkTheme) == 0 ? 1 : 0,
|
||||
NULL);
|
||||
MwNdarkTheme, MwGetInteger(window, MwNdarkTheme) == 0 ? 1 : 0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void handler_look(MwWidget handle, void* user_data, void* call_data) {
|
||||
|
|
@ -26,8 +26,8 @@ void handler_look(MwWidget handle, void* user_data, void* call_data) {
|
|||
(void)call_data;
|
||||
|
||||
MwVaApply(window,
|
||||
MwNmodernLook, MwGetInteger(window, MwNmodernLook) == 0 ? 1 : 0,
|
||||
NULL);
|
||||
MwNmodernLook, MwGetInteger(window, MwNmodernLook) == 0 ? 1 : 0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void handler_font(MwWidget handle, void* user_data, void* call_data) {
|
||||
|
|
@ -36,8 +36,8 @@ void handler_font(MwWidget handle, void* user_data, void* call_data) {
|
|||
(void)call_data;
|
||||
|
||||
MwVaApply(window,
|
||||
MwNbitmapFont, MwGetInteger(window, MwNbitmapFont) == 0 ? 1 : 0,
|
||||
NULL);
|
||||
MwNbitmapFont, MwGetInteger(window, MwNbitmapFont) == 0 ? 1 : 0,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void resize(MwWidget handle, void* user_data, void* call_data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue