clipboard change hook fully integrated
This commit is contained in:
parent
b3d043ea23
commit
362c3cea86
|
@ -1155,11 +1155,11 @@ STRUCT Color_Table{
|
|||
TYPEDEF_FUNC Color_Table Modify_Color_Table_Function(struct Application_Links *app, Frame_Info frame);
|
||||
#define MODIFY_COLOR_TABLE_SIG(name) Color_Table name(struct Application_Links *app, Frame_Info frame)
|
||||
|
||||
ENUM(i32, Clipboard_Change_Flag){
|
||||
clipboard_from_os = 0x1,
|
||||
ENUM(u32, Clipboard_Change_Flag){
|
||||
ClipboardFlag_FromOS = 0x1,
|
||||
};
|
||||
TYPEDEF_FUNC void Clipboard_Change_Hook_Function(struct Application_Links *app, String contents, u32 flags);
|
||||
#define CLIPBOARD_CHANGE_HOOK_SIG(name) void name(struct Application_Links *app, String contents, u32 flags)
|
||||
TYPEDEF_FUNC void Clipboard_Change_Hook_Function(struct Application_Links *app, String contents, Clipboard_Change_Flag flags);
|
||||
#define CLIPBOARD_CHANGE_HOOK_SIG(name) void name(struct Application_Links *app, String contents, Clipboard_Change_Flag flags)
|
||||
|
||||
TYPEDEF_FUNC Rect_i32 Get_View_Buffer_Region_Function(struct Application_Links *app, View_ID view_id, Rect_i32 sub_region);
|
||||
#define GET_VIEW_BUFFER_REGION_SIG(name) Rect_i32 name(struct Application_Links *app, View_ID view_id, Rect_i32 sub_region)
|
||||
|
|
4
4ed.cpp
4
4ed.cpp
|
@ -963,8 +963,8 @@ App_Step_Sig(app_step){
|
|||
if (clipboard.str != 0){
|
||||
String *dest = working_set_next_clipboard_string(&models->mem.heap, &models->working_set, clipboard.size);
|
||||
dest->size = eol_convert_in(dest->str, clipboard.str, clipboard.size);
|
||||
if(input->clipboard_changed && models->clipboard_change) {
|
||||
models->clipboard_change(&models->app_links, *dest, clipboard_from_os);
|
||||
if (input->clipboard_changed && models->clipboard_change != 0){
|
||||
models->clipboard_change(&models->app_links, *dest, ClipboardFlag_FromOS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,4 +24,5 @@ IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1))
|
|||
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
|
||||
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))
|
||||
|
||||
|
||||
SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
|
||||
IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))
|
||||
|
|
Loading…
Reference in New Issue