diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index a819713df88..c4a2da5e7de 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -763,12 +763,12 @@ extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, * Return the data from the clipboad * @return clipboard data */ -extern GHOST_TUns8* getClipboard(int flag); +extern GHOST_TUns8* GHOST_getClipboard(int flag); /** * Put data to the Clipboard */ -extern void putClipboard(GHOST_TInt8 *buffer, int flag); +extern void GHOST_putClipboard(GHOST_TInt8 *buffer, int flag); #ifdef __cplusplus } diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp index 6943e85f12f..60634eeff8c 100644 --- a/intern/ghost/intern/GHOST_C-api.cpp +++ b/intern/ghost/intern/GHOST_C-api.cpp @@ -803,13 +803,13 @@ GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, return result; } -GHOST_TUns8* getClipboard(int flag) +GHOST_TUns8* GHOST_getClipboard(int flag) { GHOST_ISystem* system = GHOST_ISystem::getSystem(); return system->getClipboard(flag); } -void putClipboard(GHOST_TInt8 *buffer, int flag) +void GHOST_putClipboard(GHOST_TInt8 *buffer, int flag) { GHOST_ISystem* system = GHOST_ISystem::getSystem(); system->putClipboard(buffer, flag); diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index b41bffcfa6f..a63e23b9886 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -84,8 +84,7 @@ #include "mydevice.h" #include "blendef.h" - -#include "GHOST_C-api.h" +#include "winlay.h" #define TEXTXLOC 38 @@ -1363,7 +1362,7 @@ void txt_paste_clipboard(Text *text) { void get_selection_buffer(Text *text) { - char *buff = (char*)getClipboard(1); + char *buff = getClipboard(1); txt_insert_buf(text, buff); } @@ -1376,7 +1375,7 @@ void txt_copy_clipboard(Text *text) { copybuffer[bufferlength] = '\0'; temp = winNewLine(copybuffer); - putClipboard((GHOST_TInt8*)temp, 0); + putClipboard(temp, 0); MEM_freeN(temp); MEM_freeN(copybuffer); copybuffer= NULL; @@ -1539,7 +1538,7 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt) do_selection(st, G.qual&LR_SHIFTKEY); if (txt_has_sel(text)) { buffer = txt_sel_to_buf(text); - putClipboard((GHOST_TInt8*)buffer, 1); + putClipboard(buffer, 1); MEM_freeN(buffer); } do_draw= 1; diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c index 03e3742559b..05eb7cb50ab 100644 --- a/source/blender/src/ghostwinlay.c +++ b/source/blender/src/ghostwinlay.c @@ -833,3 +833,11 @@ void winlay_get_screensize(int *width_r, int *height_r) { Window *winlay_get_active_window(void) { return active_gl_window; } + +char *getClipboard(int flag) { + return (char*)GHOST_getClipboard(flag); +} + +void putClipboard(char *buffer, int flag) { + GHOST_putClipboard((GHOST_TInt8*)buffer, flag); +} diff --git a/source/blender/src/winlay.h b/source/blender/src/winlay.h index 2fdc2c70ac3..aecc1a97a42 100644 --- a/source/blender/src/winlay.h +++ b/source/blender/src/winlay.h @@ -86,3 +86,9 @@ Window* winlay_get_active_window(void); void winlay_process_events (int wait_for_event); void winlay_get_screensize (int *width_r, int *height_r); + + /* Copy and paste functions in ghostwinlay.c */ + +char *getClipboard(int flag); + +void putClipboard(char *buffer, int flag);