better api for clipboard

This commit is contained in:
NishiOwO
2025-12-31 04:29:04 +09:00
parent 823c865791
commit 4bdda59693
29 changed files with 81 additions and 91 deletions

View File

@@ -147,6 +147,7 @@ struct _MwLLHandler {
void (*key_released)(MwLL handle, void* data);
void (*focus_in)(MwLL handle, void* data);
void (*focus_out)(MwLL handle, void* data);
void (*clipboard_received)(MwLL handle, void* data);
};
#ifdef __cplusplus
@@ -203,7 +204,7 @@ MWDECL void (*MwLLFocus)(MwLL handle);
MWDECL void (*MwLLGrabPointer)(MwLL handle, int toggle);
MWDECL void (*MwLLSetClipboard)(MwLL handle, const char* text);
MWDECL char* (*MwLLGetClipboard)(MwLL handle);
MWDECL void (*MwLLGetClipboard)(MwLL handle);
MWDECL void (*MwLLGetCursorCoord)(MwLL handle, MwPoint* point);
MWDECL void (*MwLLGetScreenSize)(MwLL handle, MwRect* rect);

View File

@@ -21,6 +21,7 @@ struct _MwLLGDI {
int grabbed;
int force_render;
int get_clipboard;
};
struct _MwLLGDIColor {

View File

@@ -39,6 +39,7 @@ typedef void (*MwHandlerChildrenProp)(MwWidget handle, MwWidget child, const cha
typedef void (*MwHandlerKey)(MwWidget handle, int key);
typedef void (*MwHandlerMouse)(MwWidget handle, void* ptr);
typedef void (*MwHandlerExecute)(MwWidget handle, const char* name, void* out, va_list args);
typedef void (*MwHandlerClipboardReceived)(MwWidget handle, const char* data);
typedef void (*MwUserHandler)(MwWidget handle, void* user_data, void* call_data);
typedef void (*MwErrorHandler)(int code, const char* message, void* user_data);
@@ -211,11 +212,11 @@ struct _MwClass {
MwHandler resize;
MwHandler children_update;
MwHandlerChildrenProp children_prop_change;
MwHandlerClipboardReceived clipboard_received;
void* reserved1;
void* reserved2;
void* reserved3;
void* reserved4;
void* reserved5;
};
#endif