Adding a new file 'clipboard.cpp' to hold all of the ole clipboard stuff. also implemented data object to handle copying data between apps. npodb

This commit is contained in:
dougt%meer.net 2005-08-11 02:43:21 +00:00
parent 0d980a5ea1
commit a95d6e2b44
6 changed files with 406 additions and 343 deletions

Binary file not shown.

View File

@ -3,134 +3,9 @@
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: shunt - Win32 (WCE emulator) Release--------------------
--------------------Configuration: shunt - Win32 (WCE ARMV4) SmartPhone--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3362.tmp" with contents
[
/nologo /W3 /I "../include" /D "_i386_" /D "_X86_" /D "x86" /D "NDEBUG" /D _WIN32_WCE=420 /D "WIN32_PLATFORM_PSPC=400" /D UNDER_CE=420 /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /D "MOZCE_SHUNT_EXPORTS" /Fo"emulatorRel/" /Gs8192 /GF /O2 /c
"C:\builds\wince\mozilla\build\wince\shunt\stdio.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3362.tmp"
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3363.tmp" with contents
[
commctrl.lib coredll.lib corelibc.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /incremental:no /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib /out:"emulatorRel/shunt.dll" /implib:"emulatorRel/shunt.lib" /subsystem:windowsce,4.20 /MACHINE:IX86
.\emulatorRel\a2w.obj
.\emulatorRel\assert.obj
.\emulatorRel\direct.obj
.\emulatorRel\errno.obj
.\emulatorRel\io.obj
.\emulatorRel\mbstring.obj
.\emulatorRel\nclog.obj
.\emulatorRel\process.obj
.\emulatorRel\signal.obj
.\emulatorRel\stat.obj
.\emulatorRel\stdio.obj
.\emulatorRel\stdlib.obj
.\emulatorRel\string.obj
.\emulatorRel\time.obj
.\emulatorRel\w2a.obj
.\emulatorRel\win32.obj
.\emulatorRel\win32A.obj
.\emulatorRel\win32W.obj
]
Creating command line "link.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3363.tmp"
<h3>Output Window</h3>
Compiling...
stdio.cpp
Linking...
Creating library emulatorRel/shunt.lib and object emulatorRel/shunt.exp
<h3>Results</h3>
shunt.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: shunt - Win32 (WCE emulator) Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3367.tmp" with contents
[
/nologo /W3 /Zi /Od /I "../include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=420 /D "WIN32_PLATFORM_PSPC=400" /D UNDER_CE=420 /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /D "MOZCE_SHUNT_EXPORTS" /Fo"emulatorDbg/" /Fd"emulatorDbg/" /Gs8192 /GF /c
"C:\builds\wince\mozilla\build\wince\shunt\stdio.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3367.tmp"
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3368.tmp" with contents
[
commctrl.lib coredll.lib corelibc.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /incremental:yes /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib /out:"emulatorDbg/shunt.dll" /implib:"emulatorDbg/shunt.lib" /subsystem:windowsce,4.20 /MACHINE:IX86
.\emulatorDbg\a2w.obj
.\emulatorDbg\assert.obj
.\emulatorDbg\direct.obj
.\emulatorDbg\errno.obj
.\emulatorDbg\io.obj
.\emulatorDbg\mbstring.obj
.\emulatorDbg\nclog.obj
.\emulatorDbg\process.obj
.\emulatorDbg\signal.obj
.\emulatorDbg\stat.obj
.\emulatorDbg\stdio.obj
.\emulatorDbg\stdlib.obj
.\emulatorDbg\string.obj
.\emulatorDbg\time.obj
.\emulatorDbg\w2a.obj
.\emulatorDbg\win32.obj
.\emulatorDbg\win32A.obj
.\emulatorDbg\win32W.obj
]
Creating command line "link.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3368.tmp"
<h3>Output Window</h3>
Compiling...
stdio.cpp
Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/PDB:NONE' specification
Creating library emulatorDbg/shunt.lib and object emulatorDbg/shunt.exp
<h3>Results</h3>
shunt.dll - 0 error(s), 1 warning(s)
<h3>
--------------------Configuration: shunt - Win32 (WCE ARMV4) Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP336C.tmp" with contents
[
/nologo /W3 /I "../include" /D "ARM" /D "_ARM_" /D "ARMV4" /D "NDEBUG" /D _WIN32_WCE=420 /D "WIN32_PLATFORM_PSPC=400" /D UNDER_CE=420 /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /D "MOZCE_SHUNT_EXPORTS" /FR"ARMV4Rel/" /Fo"ARMV4Rel/" /O2 /MC /c
"C:\builds\wince\mozilla\build\wince\shunt\stdio.cpp"
]
Creating command line "clarm.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP336C.tmp"
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP336D.tmp" with contents
[
commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /incremental:no /nodefaultlib:"libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib" /out:"ARMV4Rel/shunt.dll" /implib:"ARMV4Rel/shunt.lib" /subsystem:windowsce,4.20 /align:"4096" /MACHINE:ARM
.\ARMV4Rel\a2w.obj
.\ARMV4Rel\assert.obj
.\ARMV4Rel\direct.obj
.\ARMV4Rel\errno.obj
.\ARMV4Rel\io.obj
.\ARMV4Rel\mbstring.obj
.\ARMV4Rel\nclog.obj
.\ARMV4Rel\process.obj
.\ARMV4Rel\signal.obj
.\ARMV4Rel\stat.obj
.\ARMV4Rel\stdio.obj
.\ARMV4Rel\stdlib.obj
.\ARMV4Rel\string.obj
.\ARMV4Rel\time.obj
.\ARMV4Rel\w2a.obj
.\ARMV4Rel\win32.obj
.\ARMV4Rel\win32A.obj
.\ARMV4Rel\win32W.obj
]
Creating command line "link.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP336D.tmp"
<h3>Output Window</h3>
Compiling...
stdio.cpp
Linking...
Creating library ARMV4Rel/shunt.lib and object ARMV4Rel/shunt.exp
@ -142,86 +17,39 @@ shunt.dll - 0 error(s), 0 warning(s)
--------------------Configuration: shunt - Win32 (WCE ARMV4) Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3371.tmp" with contents
[
/nologo /W3 /Zi /Od /I "../include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D _WIN32_WCE=420 /D "WIN32_PLATFORM_PSPC=400" /D UNDER_CE=420 /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /D "MOZCE_SHUNT_EXPORTS" /Fo"ARMV4Dbg/" /Fd"ARMV4Dbg/" /MC /c
"C:\builds\wince\mozilla\build\wince\shunt\stdio.cpp"
]
Creating command line "clarm.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3371.tmp"
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3372.tmp" with contents
[
commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /incremental:yes /debug /nodefaultlib:"libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib" /out:"ARMV4Dbg/shunt.dll" /implib:"ARMV4Dbg/shunt.lib" /subsystem:windowsce,4.20 /align:"4096" /MACHINE:ARM
.\ARMV4Dbg\a2w.obj
.\ARMV4Dbg\assert.obj
.\ARMV4Dbg\direct.obj
.\ARMV4Dbg\errno.obj
.\ARMV4Dbg\io.obj
.\ARMV4Dbg\mbstring.obj
.\ARMV4Dbg\nclog.obj
.\ARMV4Dbg\process.obj
.\ARMV4Dbg\signal.obj
.\ARMV4Dbg\stat.obj
.\ARMV4Dbg\stdio.obj
.\ARMV4Dbg\stdlib.obj
.\ARMV4Dbg\string.obj
.\ARMV4Dbg\time.obj
.\ARMV4Dbg\w2a.obj
.\ARMV4Dbg\win32.obj
.\ARMV4Dbg\win32A.obj
.\ARMV4Dbg\win32W.obj
]
Creating command line "link.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3372.tmp"
<h3>Output Window</h3>
Compiling...
stdio.cpp
Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/PDB:NONE' specification
Creating library ARMV4Dbg/shunt.lib and object ARMV4Dbg/shunt.exp
<h3>Results</h3>
shunt.dll - 0 error(s), 1 warning(s)
shunt.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: shunt - Win32 (WCE ARMV4) SmartPhone--------------------
--------------------Configuration: shunt - Win32 (WCE emulator) Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
shunt.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: shunt - Win32 (WCE ARMV4) Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
shunt.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: shunt - Win32 (WCE emulator) Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3376.tmp" with contents
[
/nologo /W3 /I "../include" /D "ARM" /D "_ARM_" /D "ARMV4" /D "NDEBUG" /D _WIN32_WCE=420 /D "WIN32_PLATFORM_PSPC=400" /D UNDER_CE=420 /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /D "MOZCE_SHUNT_EXPORTS" /FR"ARMV4SmartPhone/" /Fo"ARMV4SmartPhone/" /O2 /MC /c
"C:\builds\wince\mozilla\build\wince\shunt\stdio.cpp"
]
Creating command line "clarm.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3376.tmp"
Creating temporary file "C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3377.tmp" with contents
[
commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /incremental:no /nodefaultlib:"libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib" /out:"ARMV4SmartPhone/shunt.dll" /implib:"ARMV4SmartPhone/shunt.lib" /subsystem:windowsce,4.20 /align:"4096" /MACHINE:ARM
.\ARMV4SmartPhone\a2w.obj
.\ARMV4SmartPhone\assert.obj
.\ARMV4SmartPhone\direct.obj
.\ARMV4SmartPhone\errno.obj
.\ARMV4SmartPhone\io.obj
.\ARMV4SmartPhone\mbstring.obj
.\ARMV4SmartPhone\nclog.obj
.\ARMV4SmartPhone\process.obj
.\ARMV4SmartPhone\signal.obj
.\ARMV4SmartPhone\stat.obj
.\ARMV4SmartPhone\stdio.obj
.\ARMV4SmartPhone\stdlib.obj
.\ARMV4SmartPhone\string.obj
.\ARMV4SmartPhone\time.obj
.\ARMV4SmartPhone\w2a.obj
.\ARMV4SmartPhone\win32.obj
.\ARMV4SmartPhone\win32A.obj
.\ARMV4SmartPhone\win32W.obj
]
Creating command line "link.exe @C:\DOCUME~1\dougt\LOCALS~1\Temp\RSP3377.tmp"
<h3>Output Window</h3>
Compiling...
stdio.cpp
Linking...
Creating library ARMV4SmartPhone/shunt.lib and object ARMV4SmartPhone/shunt.exp

Binary file not shown.

View File

@ -63,7 +63,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib uuid.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
# SUBTRACT LINK32 /map
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE emulator) Debug"
@ -98,7 +98,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib uuid.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
# SUBTRACT LINK32 /map
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Release"
@ -133,7 +133,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# ADD LINK32 commctrl.lib coredll.lib uuid.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# SUBTRACT LINK32 /map
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Debug"
@ -168,7 +168,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# ADD LINK32 commctrl.lib coredll.lib uuid.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# SUBTRACT LINK32 /map
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) SmartPhone"
@ -206,7 +206,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x1000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# SUBTRACT BASE LINK32 /map
# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# ADD LINK32 commctrl.lib coredll.lib uuid.lib /nologo /base:"0x00100000" /stack:0x5000000 /entry:"_DllMainCRTStartup" /dll /pdb:none /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
# SUBTRACT LINK32 /map
!ENDIF
@ -302,6 +302,48 @@ DEP_CPP_ASSER=\
"..\mozce_internal.h"\
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\clipboard.cpp
!IF "$(CFG)" == "shunt - Win32 (WCE emulator) Release"
DEP_CPP_CLIPB=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE emulator) Debug"
DEP_CPP_CLIPB=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Release"
DEP_CPP_CLIPB=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Debug"
DEP_CPP_CLIPB=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) SmartPhone"
DEP_CPP_CLIPB=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
!ENDIF
# End Source File
@ -524,7 +566,9 @@ SOURCE=..\process.cpp
DEP_CPP_PROCE=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_PROCE=\
".\funcs.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE emulator) Debug"
@ -532,7 +576,9 @@ DEP_CPP_PROCE=\
DEP_CPP_PROCE=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_PROCE=\
".\funcs.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Release"
@ -540,7 +586,9 @@ DEP_CPP_PROCE=\
DEP_CPP_PROCE=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_PROCE=\
".\funcs.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Debug"
@ -556,7 +604,9 @@ DEP_CPP_PROCE=\
DEP_CPP_PROCE=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_PROCE=\
".\funcs.h"\
!ENDIF
@ -875,7 +925,9 @@ SOURCE=..\win32.cpp
DEP_CPP_WIN32=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_WIN32=\
".\funcs.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE emulator) Debug"
@ -883,7 +935,9 @@ DEP_CPP_WIN32=\
DEP_CPP_WIN32=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_WIN32=\
".\funcs.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Release"
@ -891,7 +945,9 @@ DEP_CPP_WIN32=\
DEP_CPP_WIN32=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_WIN32=\
".\funcs.h"\
!ELSEIF "$(CFG)" == "shunt - Win32 (WCE ARMV4) Debug"
@ -907,7 +963,9 @@ DEP_CPP_WIN32=\
DEP_CPP_WIN32=\
"..\include\mozce_defs.h"\
"..\mozce_internal.h"\
{$(INCLUDE)}"kfuncs.h"\
NODEP_CPP_WIN32=\
".\funcs.h"\
!ENDIF

310
build/wince/shunt/clipboard.cpp Executable file
View File

@ -0,0 +1,310 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is WinCE Shunt
*
* The Initial Developer of the Original Code is
* Douglas F. Turner II <dougt@meer.net>
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "mozce_internal.h"
extern "C" {
#if 0
}
#endif
static IDataObject* gDataObject = NULL;
static HWND gClipboardWND = NULL; /* we may need to free this */
void oleSetup()
{
if (gClipboardWND)
return;
WNDCLASS wndclass;
ZeroMemory( &wndclass, sizeof(WNDCLASS));
wndclass.style = CS_GLOBALCLASS;
wndclass.lpfnWndProc = DefWindowProc;
wndclass.lpszClassName = L"OLE_CLIPBOARD";
RegisterClass(&wndclass);
gClipboardWND = CreateWindow(L"OLE_Clipboard",
0,
0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
0,
0,
0,
0);
}
class ClipDataObj : public IDataObject
{
public:
ClipDataObj()
{
mRefCnt = 0;
}
~ClipDataObj()
{
}
STDMETHODIMP_(ULONG) AddRef()
{
mRefCnt++;
return mRefCnt;
}
STDMETHODIMP QueryInterface(REFIID iid, void **ppvObject)
{
// check to see what interface has been requested
if(iid == IID_IDataObject || iid == IID_IUnknown)
{
AddRef();
*ppvObject = this;
return S_OK;
}
else
{
*ppvObject = 0;
return E_NOINTERFACE;
}
}
STDMETHODIMP_(ULONG) Release()
{
mRefCnt--;
if (mRefCnt == 0)
{
delete this;
return 0;
}
return mRefCnt;
}
STDMETHODIMP GetData (FORMATETC *pFormatEtc, STGMEDIUM *pMedium)
{
oleSetup();
BOOL b = OpenClipboard(gClipboardWND);
if (!b)
return E_FAIL;
HANDLE hData = GetClipboardData(pFormatEtc->cfFormat);
LPVOID src = GlobalLock(hData);
if(src) {
ULONG size = GlobalSize(hData);
HANDLE hDest = GlobalAlloc(GHND, size);
LPVOID dest = GlobalLock(hDest);
memcpy(dest, src, size);
GlobalUnlock(hDest);
GlobalUnlock(hData);
hData = hDest;
}
pMedium->tymed = (hData == 0) ? TYMED_NULL : TYMED_HGLOBAL;
pMedium->hGlobal = (HGLOBAL)hData;
pMedium->pUnkForRelease = NULL;
return S_OK;
}
STDMETHODIMP GetDataHere (LPFORMATETC pFE, LPSTGMEDIUM pSTM)
{
return DATA_E_FORMATETC;
}
STDMETHODIMP QueryGetData (LPFORMATETC pFE)
{
return S_OK;
}
STDMETHODIMP GetCanonicalFormatEtc (LPFORMATETC pFE, LPFORMATETC pCanonFE)
{
pFE->ptd = NULL;
return E_NOTIMPL;
}
STDMETHODIMP SetData (LPFORMATETC pFE, LPSTGMEDIUM pSTM, BOOL release)
{
return E_NOTIMPL;
}
STDMETHODIMP EnumFormatEtc (DWORD dwDirection, LPENUMFORMATETC* ppEnum)
{
return E_NOTIMPL;
}
STDMETHODIMP DAdvise (LPFORMATETC pFE, DWORD flags, LPADVISESINK pAdvise, DWORD* pConn)
{
return OLE_E_ADVISENOTSUPPORTED;
}
STDMETHODIMP DUnadvise (DWORD pConn)
{
return OLE_E_ADVISENOTSUPPORTED;
}
STDMETHODIMP EnumDAdvise (LPENUMSTATDATA *ppEnum)
{
return OLE_E_ADVISENOTSUPPORTED;
}
private:
LONG mRefCnt;
};
MOZCE_SHUNT_API HRESULT mozce_OleSetClipboard(IDataObject * pDataObj)
{
MOZCE_PRECHECK
oleSetup();
if (gDataObject)
gDataObject->Release();
gDataObject = pDataObj;
if (pDataObj)
{
BOOL b = OpenClipboard(gClipboardWND);
if (!b)
return E_FAIL;
EmptyClipboard();
pDataObj->AddRef();
IEnumFORMATETC* enumerator = NULL;
pDataObj->EnumFormatEtc(DATADIR_GET, &enumerator);
if (!enumerator)
return S_OK;
FORMATETC etc;
while (S_OK == enumerator->Next(1, &etc, NULL))
{
if ( etc.tymed == TYMED_HGLOBAL )
{
STGMEDIUM medium;
pDataObj->GetData(&etc, &medium);
SetClipboardData( etc.cfFormat, medium.hGlobal);
}
}
enumerator->Release();
CloseClipboard();
}
return S_OK;
}
MOZCE_SHUNT_API HRESULT mozce_OleGetClipboard(IDataObject ** pDataObj)
{
MOZCE_PRECHECK
oleSetup();
if (pDataObj)
*pDataObj = gDataObject;
if (!*pDataObj)
{
*pDataObj = new ClipDataObj();
if (!*pDataObj)
return E_FAIL;
gDataObject = *pDataObj;
}
(*pDataObj)->AddRef();
return S_OK;
}
MOZCE_SHUNT_API HRESULT mozce_OleFlushClipboard()
{
MOZCE_PRECHECK
oleSetup();
mozce_OleSetClipboard(NULL);
return S_OK;
}
MOZCE_SHUNT_API BOOL mozce_IsClipboardFormatAvailable(UINT format)
{
if (gClipboardWND)
{
BOOL b = OpenClipboard(gClipboardWND);
if (!b)
return E_FAIL;
IEnumFORMATETC* enumerator = NULL;
gDataObject->EnumFormatEtc(DATADIR_GET, &enumerator);
if (!enumerator)
return S_OK;
FORMATETC etc;
while (S_OK == enumerator->Next(1, &etc, NULL))
{
if ( etc.cfFormat == format)
{
enumerator->Release();
CloseClipboard();
return true;
}
}
enumerator->Release();
CloseClipboard();
}
return IsClipboardFormatAvailable(format);
}
#if 0
{
#endif
} /* extern "C" */

View File

@ -1033,139 +1033,6 @@ MOZCE_SHUNT_API BOOL mozce_GdiFlush(void)
return TRUE;
}
static IDataObject* gDataObject = NULL;
static HWND gOlewnd = NULL; /* we may need to free this */
void oleSetup()
{
if (gOlewnd)
return;
WNDCLASS wndclass;
ZeroMemory( &wndclass, sizeof(WNDCLASS));
wndclass.style = CS_GLOBALCLASS;
wndclass.lpfnWndProc = DefWindowProc;
wndclass.lpszClassName = L"OLE_CLIPBOARD";
RegisterClass(&wndclass);
gOlewnd = CreateWindow(L"OLE_Clipboard",
0,
0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
0,
0,
0,
0);
}
MOZCE_SHUNT_API HRESULT mozce_OleSetClipboard(IDataObject * pDataObj)
{
MOZCE_PRECHECK
oleSetup();
if (gDataObject)
gDataObject->Release();
gDataObject = pDataObj;
if (pDataObj)
{
BOOL b = OpenClipboard(gOlewnd);
if (!b)
return E_FAIL;
EmptyClipboard();
pDataObj->AddRef();
IEnumFORMATETC* enumerator = NULL;
pDataObj->EnumFormatEtc(DATADIR_GET, &enumerator);
if (!enumerator)
return S_OK;
FORMATETC etc;
while (S_OK == enumerator->Next(1, &etc, NULL))
{
if ( etc.tymed == TYMED_HGLOBAL )
{
HANDLE h = SetClipboardData( etc.cfFormat, NULL);
if (!h)
return E_FAIL;
}
}
enumerator->Release();
CloseClipboard();
}
return S_OK;
}
MOZCE_SHUNT_API HRESULT mozce_OleGetClipboard(IDataObject ** pDataObj)
{
MOZCE_PRECHECK
oleSetup();
if (pDataObj)
*pDataObj = gDataObject;
if (!*pDataObj)
return E_FAIL;
(*pDataObj)->AddRef();
return S_OK;
}
MOZCE_SHUNT_API HRESULT mozce_OleFlushClipboard()
{
MOZCE_PRECHECK
oleSetup();
mozce_OleSetClipboard(NULL);
return S_OK;
}
MOZCE_SHUNT_API BOOL mozce_IsClipboardFormatAvailable(UINT format)
{
if (gOlewnd)
{
BOOL b = OpenClipboard(gOlewnd);
if (!b)
return E_FAIL;
IEnumFORMATETC* enumerator = NULL;
gDataObject->EnumFormatEtc(DATADIR_GET, &enumerator);
if (!enumerator)
return S_OK;
FORMATETC etc;
while (S_OK == enumerator->Next(1, &etc, NULL))
{
if ( etc.cfFormat == format)
{
enumerator->Release();
CloseClipboard();
return true;
}
}
enumerator->Release();
CloseClipboard();
}
return IsClipboardFormatAvailable(format);
}
#if 0
{
#endif