Changed getClipbaord and putClipboard functions to be more ghost like
authorRicki Myers <antihc3@gmail.com>
Sat, 8 Mar 2008 04:22:52 +0000 (04:22 +0000)
committerRicki Myers <antihc3@gmail.com>
Sat, 8 Mar 2008 04:22:52 +0000 (04:22 +0000)
Changed getClipboard to GHOST_getClipboard and putClipboard to GHOST_putClipboard

Removed ghost calls from blender and added the calls to winlay.h and ghostwinlay.c
This cleand up casts in drawtext.c

intern/ghost/GHOST_C-api.h
intern/ghost/intern/GHOST_C-api.cpp
source/blender/src/drawtext.c
source/blender/src/ghostwinlay.c
source/blender/src/winlay.h

index a819713df88c80ebf243b1a22f3607f0b208cffc..c4a2da5e7de0912ed6d2f2f9d2a18deb216cfd3c 100644 (file)
@@ -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
 }
index 6943e85f12fba69eefd135a0e884c12a55de1606..60634eeff8c239fb6dfe11a7b18e6fe9e9ae3cce 100644 (file)
@@ -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);
index b41bffcfa6f8704187f1c199a1cd23ece2e50b24..a63e23b98864ea0f9207941956ae825245a4f16a 100644 (file)
@@ -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;
index 03e3742559b6a5bc52e257359ed3e25895559741..05eb7cb50ab3adaa9eec5cdfbb1bc004b262f883 100644 (file)
@@ -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);
+}
index 2fdc2c70ac36a4cbafe38b9361ad20ffec69a632..aecc1a97a42d79039f978699f33b92d3a40111f6 100644 (file)
@@ -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);