Changeset 218
- Timestamp:
- Aug 5, 2007, 6:49:01 AM (13 years ago)
- Location:
- trunk/Lucide
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Lucide/SOURCE/gui/clipbrd.cpp
r181 r218 43 43 #include <malloc.h> 44 44 #include <stdio.h> 45 #include <stdlib.h> 45 46 #include "cpconv.h" 46 47 47 48 #include "UClip.h" 49 50 51 static BOOL APIENTRY (*pUWinOpenClipbrd)(HAB) = NULL; 52 static BOOL APIENTRY (*pUWinEmptyClipbrd)(HAB) = NULL; 53 static BOOL APIENTRY (*pUWinSetClipbrdData)(HAB,ULONG,ULONG,ULONG) = NULL; 54 static BOOL APIENTRY (*pUWinCloseClipbrd)(HAB) = NULL; 55 56 static bool loadUClip(); 57 58 static HMODULE ucHandle = NULLHANDLE; 59 static bool uclipLoaded = loadUClip(); 60 61 62 static void freeUClip() 63 { 64 if ( ucHandle != NULLHANDLE ) { 65 DosFreeModule( ucHandle ); 66 } 67 } 68 69 static bool loadUClip() 70 { 71 bool res = false; 72 do 73 { 74 if ( DosLoadModule( NULL, 0, "UCLIP", &ucHandle ) != 0 ) 75 break; 76 if (DosQueryProcAddr(ucHandle,0,"UWinOpenClipbrd",(PFN *)&pUWinOpenClipbrd)!= 0) 77 break; 78 if (DosQueryProcAddr(ucHandle,0,"UWinEmptyClipbrd",(PFN *)&pUWinEmptyClipbrd)!= 0) 79 break; 80 if (DosQueryProcAddr(ucHandle,0,"UWinSetClipbrdData",(PFN *)&pUWinSetClipbrdData)!= 0) 81 break; 82 if (DosQueryProcAddr(ucHandle,0,"UWinCloseClipbrd",(PFN *)&pUWinCloseClipbrd)!= 0) 83 break; 84 85 res = true; 86 } while (0); 87 88 atexit( freeUClip ); 89 90 return res; 91 } 48 92 49 93 … … 73 117 size_t olen = 0; 74 118 75 if ( UWinOpenClipbrd( hab ) )119 if ( uclipLoaded ? pUWinOpenClipbrd( hab ) : WinOpenClipbrd( hab ) ) 76 120 { 77 UWinEmptyClipbrd( hab ); 121 if ( uclipLoaded ) { 122 pUWinEmptyClipbrd( hab ); 123 } else { 124 WinEmptyClipbrd( hab ); 125 } 78 126 79 127 size_t cSubs = 0; … … 94 142 memcpy( memuni, shmemuni, olen ); 95 143 96 UWinSetClipbrdData( hab, (ULONG)shmemuni, UCLIP_CF_UNICODETEXT, CFI_POINTER ); 144 if ( uclipLoaded ) { 145 pUWinSetClipbrdData( hab,(ULONG)shmemuni,UCLIP_CF_UNICODETEXT,CFI_POINTER ); 146 } else { 147 DosFreeMem( shmemuni ); 148 } 97 149 98 150 int liglen = uniLigaturesLength( (UniChar *)memuni ); … … 118 170 UniUconvFromUcs( objtosys, &tmpuni, &unilen, &tmpsys, &olen, &cSubs ); 119 171 120 UWinSetClipbrdData( hab, (ULONG)shmemsys, UCLIP_CF_TEXT, CFI_POINTER ); 172 if ( uclipLoaded ) { 173 pUWinSetClipbrdData( hab, (ULONG)shmemsys, UCLIP_CF_TEXT, CFI_POINTER ); 174 } else { 175 WinSetClipbrdData( hab, (ULONG)shmemsys, CF_TEXT, CFI_POINTER ); 176 } 121 177 } 122 178 delete memuni; 123 179 } 124 180 125 UWinCloseClipbrd( hab ); 181 if ( uclipLoaded ) { 182 pUWinCloseClipbrd( hab ); 183 } else { 184 WinCloseClipbrd( hab ); 185 } 126 186 } 127 187 -
trunk/Lucide/SOURCE/gui/makefile
r214 r218 78 78 lib libconv 79 79 lib libuls 80 lib UClip81 80 export LucideMain 82 81 | tmpmake.lnk >NUL -
trunk/Lucide/changelog
r216 r218 4 4 it will check file data to determine a suitable plugin (closed 5 5 ticket #43). 6 - UClip package is optional now. 6 7 - Updated NLS-files: German, ... 7 8
Note: See TracChangeset
for help on using the changeset viewer.