Browse Source

Tidied up some DynamicLibrary stuff and fixed a drop-shadow problem on mac.

tags/2021-05-28
Julian Storer 14 years ago
parent
commit
b1a77fa391
27 changed files with 499 additions and 543 deletions
  1. +5
    -5
      Builds/Linux/Makefile
  2. +6
    -6
      Builds/MacOSX/Juce.xcodeproj/project.pbxproj
  3. +2
    -2
      Builds/VisualStudio2005/Juce.vcproj
  4. +2
    -2
      Builds/VisualStudio2008/Juce.vcproj
  5. +2
    -2
      Builds/VisualStudio2008_DLL/Juce.vcproj
  6. +2
    -2
      Builds/VisualStudio2010/Juce.vcxproj
  7. +3
    -3
      Builds/VisualStudio2010/Juce.vcxproj.filters
  8. +6
    -6
      Builds/iOS/Juce.xcodeproj/project.pbxproj
  9. +4
    -4
      Juce.jucer
  10. +193
    -196
      juce_amalgamated.cpp
  11. +5
    -2
      juce_amalgamated.h
  12. +1
    -1
      src/core/juce_StandardHeader.h
  13. +1
    -0
      src/gui/components/windows/juce_ResizableWindow.cpp
  14. +3
    -0
      src/gui/components/windows/juce_TopLevelWindow.h
  15. +26
    -4
      src/native/common/juce_posix_SharedCode.h
  16. +0
    -18
      src/native/linux/juce_linux_Threads.cpp
  17. +0
    -19
      src/native/mac/juce_mac_Threads.mm
  18. +125
    -0
      src/native/windows/juce_win32_ComSmartPtr.h
  19. +0
    -80
      src/native/windows/juce_win32_DynamicLibraryLoader.h
  20. +0
    -54
      src/native/windows/juce_win32_Misc.cpp
  21. +0
    -1
      src/native/windows/juce_win32_NativeCode.cpp
  22. +13
    -94
      src/native/windows/juce_win32_NativeIncludes.h
  23. +32
    -37
      src/native/windows/juce_win32_Network.cpp
  24. +6
    -1
      src/native/windows/juce_win32_Threads.cpp
  25. +3
    -3
      src/native/windows/juce_win32_WASAPI.cpp
  26. +58
    -0
      src/native/windows/juce_win32_Windowing.cpp
  27. +1
    -1
      src/threads/juce_DynamicLibrary.h

+ 5
- 5
Builds/Linux/Makefile View File

@@ -329,8 +329,8 @@ OBJECTS := \
$(OBJDIR)/juce_win32_NativeCode_c247c7f6.o \
$(OBJDIR)/juce_win32_Network_6c84a66.o \
$(OBJDIR)/juce_win32_OpenGLComponent_d0d99a46.o \
$(OBJDIR)/juce_win32_Registry_86da784f.o \
$(OBJDIR)/juce_win32_QuickTimeMovieComponent_be08e5f.o \
$(OBJDIR)/juce_win32_Registry_86da784f.o \
$(OBJDIR)/juce_win32_SystemStats_6446cd68.o \
$(OBJDIR)/juce_win32_Threads_ee986e61.o \
$(OBJDIR)/juce_win32_WASAPI_c7c6c3c3.o \
@@ -1838,14 +1838,14 @@ $(OBJDIR)/juce_win32_OpenGLComponent_d0d99a46.o: ../../src/native/windows/juce_w
@echo "Compiling juce_win32_OpenGLComponent.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_win32_Registry_86da784f.o: ../../src/native/windows/juce_win32_Registry.cpp
$(OBJDIR)/juce_win32_QuickTimeMovieComponent_be08e5f.o: ../../src/native/windows/juce_win32_QuickTimeMovieComponent.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_win32_Registry.cpp"
@echo "Compiling juce_win32_QuickTimeMovieComponent.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_win32_QuickTimeMovieComponent_be08e5f.o: ../../src/native/windows/juce_win32_QuickTimeMovieComponent.cpp
$(OBJDIR)/juce_win32_Registry_86da784f.o: ../../src/native/windows/juce_win32_Registry.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling juce_win32_QuickTimeMovieComponent.cpp"
@echo "Compiling juce_win32_Registry.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/juce_win32_SystemStats_6446cd68.o: ../../src/native/windows/juce_win32_SystemStats.cpp


+ 6
- 6
Builds/MacOSX/Juce.xcodeproj/project.pbxproj View File

@@ -324,8 +324,8 @@
A46B0025A68136ED993E0D85 = { isa = PBXBuildFile; fileRef = 50159A5B7A552A6C1EB557F3; };
B99678E919BF547A3A3F5D6E = { isa = PBXBuildFile; fileRef = CDA5FCC51F6C1E84D7DC3274; };
5B714CDD0082419BFED7D2D4 = { isa = PBXBuildFile; fileRef = B14735381ADB00741166E330; };
5B33FFE120A47EF42CBC05E4 = { isa = PBXBuildFile; fileRef = 0EB41C0AB478EE02D8C851F9; };
2DD498313DA488A5063C4C1B = { isa = PBXBuildFile; fileRef = 09AE0882D58BE1715219556A; };
5B33FFE120A47EF42CBC05E4 = { isa = PBXBuildFile; fileRef = 0EB41C0AB478EE02D8C851F9; };
552D45FB250C62F86CD02A57 = { isa = PBXBuildFile; fileRef = FBE07C5CC622A5D36BDAB9E1; };
0E8E9829E95E32163F45482D = { isa = PBXBuildFile; fileRef = B07C853EB60D8D8691BC1B4B; };
6801797B247CB3A6890C0AB0 = { isa = PBXBuildFile; fileRef = 5D32C8856093B33438AEB758; };
@@ -1019,10 +1019,10 @@
F3B50EE3939E9F16D13C3C7C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_AudioCDReader.cpp"; path = "../../src/native/windows/juce_win32_AudioCDReader.cpp"; sourceTree = "SOURCE_ROOT"; };
9C4D1018ECC0BA07346453EF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_AutoLinkLibraries.h"; path = "../../src/native/windows/juce_win32_AutoLinkLibraries.h"; sourceTree = "SOURCE_ROOT"; };
3A37CD82212075940421CE4F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_CameraDevice.cpp"; path = "../../src/native/windows/juce_win32_CameraDevice.cpp"; sourceTree = "SOURCE_ROOT"; };
B296F736C0CD6AC15BE6424B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_ComSmartPtr.h"; path = "../../src/native/windows/juce_win32_ComSmartPtr.h"; sourceTree = "SOURCE_ROOT"; };
7F3EF672D07ECE3E13AAF267 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Direct2DGraphicsContext.cpp"; path = "../../src/native/windows/juce_win32_Direct2DGraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; };
249959E338D7750E56A9F2F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectShowComponent.cpp"; path = "../../src/native/windows/juce_win32_DirectShowComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
58B70C726D186B4E770300BC = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectSound.cpp"; path = "../../src/native/windows/juce_win32_DirectSound.cpp"; sourceTree = "SOURCE_ROOT"; };
BA66E265749F75DBA86EC3F1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_DynamicLibraryLoader.h"; path = "../../src/native/windows/juce_win32_DynamicLibraryLoader.h"; sourceTree = "SOURCE_ROOT"; };
DCD09B6EF4A4A109DE01F152 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_FileChooser.cpp"; path = "../../src/native/windows/juce_win32_FileChooser.cpp"; sourceTree = "SOURCE_ROOT"; };
7527A5E8F4F39581159D3E5B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Files.cpp"; path = "../../src/native/windows/juce_win32_Files.cpp"; sourceTree = "SOURCE_ROOT"; };
1DBF9DAAD0690CB2CA4E9960 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Fonts.cpp"; path = "../../src/native/windows/juce_win32_Fonts.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -1033,8 +1033,8 @@
E7625D7A06CBC11F40A56A70 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_NativeIncludes.h"; path = "../../src/native/windows/juce_win32_NativeIncludes.h"; sourceTree = "SOURCE_ROOT"; };
CDA5FCC51F6C1E84D7DC3274 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Network.cpp"; path = "../../src/native/windows/juce_win32_Network.cpp"; sourceTree = "SOURCE_ROOT"; };
B14735381ADB00741166E330 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_OpenGLComponent.cpp"; path = "../../src/native/windows/juce_win32_OpenGLComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
0EB41C0AB478EE02D8C851F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Registry.cpp"; path = "../../src/native/windows/juce_win32_Registry.cpp"; sourceTree = "SOURCE_ROOT"; };
09AE0882D58BE1715219556A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_QuickTimeMovieComponent.cpp"; path = "../../src/native/windows/juce_win32_QuickTimeMovieComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
0EB41C0AB478EE02D8C851F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Registry.cpp"; path = "../../src/native/windows/juce_win32_Registry.cpp"; sourceTree = "SOURCE_ROOT"; };
FBE07C5CC622A5D36BDAB9E1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_SystemStats.cpp"; path = "../../src/native/windows/juce_win32_SystemStats.cpp"; sourceTree = "SOURCE_ROOT"; };
B07C853EB60D8D8691BC1B4B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Threads.cpp"; path = "../../src/native/windows/juce_win32_Threads.cpp"; sourceTree = "SOURCE_ROOT"; };
5D32C8856093B33438AEB758 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_WASAPI.cpp"; path = "../../src/native/windows/juce_win32_WASAPI.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -1862,10 +1862,10 @@
F3B50EE3939E9F16D13C3C7C,
9C4D1018ECC0BA07346453EF,
3A37CD82212075940421CE4F,
B296F736C0CD6AC15BE6424B,
7F3EF672D07ECE3E13AAF267,
249959E338D7750E56A9F2F8,
58B70C726D186B4E770300BC,
BA66E265749F75DBA86EC3F1,
DCD09B6EF4A4A109DE01F152,
7527A5E8F4F39581159D3E5B,
1DBF9DAAD0690CB2CA4E9960,
@@ -1876,8 +1876,8 @@
E7625D7A06CBC11F40A56A70,
CDA5FCC51F6C1E84D7DC3274,
B14735381ADB00741166E330,
0EB41C0AB478EE02D8C851F9,
09AE0882D58BE1715219556A,
0EB41C0AB478EE02D8C851F9,
FBE07C5CC622A5D36BDAB9E1,
B07C853EB60D8D8691BC1B4B,
5D32C8856093B33438AEB758,
@@ -2387,8 +2387,8 @@
A46B0025A68136ED993E0D85,
B99678E919BF547A3A3F5D6E,
5B714CDD0082419BFED7D2D4,
5B33FFE120A47EF42CBC05E4,
2DD498313DA488A5063C4C1B,
5B33FFE120A47EF42CBC05E4,
552D45FB250C62F86CD02A57,
0E8E9829E95E32163F45482D,
6801797B247CB3A6890C0AB0,


+ 2
- 2
Builds/VisualStudio2005/Juce.vcproj View File

@@ -922,10 +922,10 @@
<File RelativePath="..\..\src\native\windows\juce_win32_AudioCDReader.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_AutoLinkLibraries.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_CameraDevice.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_ComSmartPtr.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Direct2DGraphicsContext.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DirectShowComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DirectSound.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DynamicLibraryLoader.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_FileChooser.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Files.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Fonts.cpp"/>
@@ -936,8 +936,8 @@
<File RelativePath="..\..\src\native\windows\juce_win32_NativeIncludes.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Network.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_OpenGLComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_QuickTimeMovieComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_SystemStats.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Threads.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_WASAPI.cpp"/>


+ 2
- 2
Builds/VisualStudio2008/Juce.vcproj View File

@@ -922,10 +922,10 @@
<File RelativePath="..\..\src\native\windows\juce_win32_AudioCDReader.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_AutoLinkLibraries.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_CameraDevice.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_ComSmartPtr.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Direct2DGraphicsContext.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DirectShowComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DirectSound.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DynamicLibraryLoader.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_FileChooser.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Files.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Fonts.cpp"/>
@@ -936,8 +936,8 @@
<File RelativePath="..\..\src\native\windows\juce_win32_NativeIncludes.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Network.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_OpenGLComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_QuickTimeMovieComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_SystemStats.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Threads.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_WASAPI.cpp"/>


+ 2
- 2
Builds/VisualStudio2008_DLL/Juce.vcproj View File

@@ -924,10 +924,10 @@
<File RelativePath="..\..\src\native\windows\juce_win32_AudioCDReader.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_AutoLinkLibraries.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_CameraDevice.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_ComSmartPtr.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Direct2DGraphicsContext.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DirectShowComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DirectSound.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_DynamicLibraryLoader.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_FileChooser.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Files.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Fonts.cpp"/>
@@ -938,8 +938,8 @@
<File RelativePath="..\..\src\native\windows\juce_win32_NativeIncludes.h"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Network.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_OpenGLComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_QuickTimeMovieComponent.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_SystemStats.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_Threads.cpp"/>
<File RelativePath="..\..\src\native\windows\juce_win32_WASAPI.cpp"/>


+ 2
- 2
Builds/VisualStudio2010/Juce.vcxproj View File

@@ -412,8 +412,8 @@
<ClCompile Include="..\..\src\native\windows\juce_win32_NativeCode.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_Network.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_OpenGLComponent.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_QuickTimeMovieComponent.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_Registry.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_SystemStats.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_Threads.cpp"/>
<ClCompile Include="..\..\src\native\windows\juce_win32_WASAPI.cpp"/>
@@ -792,7 +792,7 @@
<ClInclude Include="..\..\src\native\mac\juce_osx_MessageQueue.h"/>
<ClInclude Include="..\..\src\native\mac\juce_osx_ObjCHelpers.h"/>
<ClInclude Include="..\..\src\native\windows\juce_win32_AutoLinkLibraries.h"/>
<ClInclude Include="..\..\src\native\windows\juce_win32_DynamicLibraryLoader.h"/>
<ClInclude Include="..\..\src\native\windows\juce_win32_ComSmartPtr.h"/>
<ClInclude Include="..\..\src\native\windows\juce_win32_NativeIncludes.h"/>
<ClInclude Include="..\..\src\native\android\juce_android_NativeIncludes.h"/>
<ClInclude Include="..\..\src\text\juce_CharacterFunctions.h"/>


+ 3
- 3
Builds/VisualStudio2010/Juce.vcxproj.filters View File

@@ -1171,10 +1171,10 @@
<ClCompile Include="..\..\src\native\windows\juce_win32_OpenGLComponent.cpp">
<Filter>Juce\Source\native\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\native\windows\juce_win32_Registry.cpp">
<ClCompile Include="..\..\src\native\windows\juce_win32_QuickTimeMovieComponent.cpp">
<Filter>Juce\Source\native\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\native\windows\juce_win32_QuickTimeMovieComponent.cpp">
<ClCompile Include="..\..\src\native\windows\juce_win32_Registry.cpp">
<Filter>Juce\Source\native\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\src\native\windows\juce_win32_SystemStats.cpp">
@@ -2307,7 +2307,7 @@
<ClInclude Include="..\..\src\native\windows\juce_win32_AutoLinkLibraries.h">
<Filter>Juce\Source\native\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\native\windows\juce_win32_DynamicLibraryLoader.h">
<ClInclude Include="..\..\src\native\windows\juce_win32_ComSmartPtr.h">
<Filter>Juce\Source\native\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\src\native\windows\juce_win32_NativeIncludes.h">


+ 6
- 6
Builds/iOS/Juce.xcodeproj/project.pbxproj View File

@@ -324,8 +324,8 @@
A46B0025A68136ED993E0D85 = { isa = PBXBuildFile; fileRef = 50159A5B7A552A6C1EB557F3; };
B99678E919BF547A3A3F5D6E = { isa = PBXBuildFile; fileRef = CDA5FCC51F6C1E84D7DC3274; };
5B714CDD0082419BFED7D2D4 = { isa = PBXBuildFile; fileRef = B14735381ADB00741166E330; };
5B33FFE120A47EF42CBC05E4 = { isa = PBXBuildFile; fileRef = 0EB41C0AB478EE02D8C851F9; };
2DD498313DA488A5063C4C1B = { isa = PBXBuildFile; fileRef = 09AE0882D58BE1715219556A; };
5B33FFE120A47EF42CBC05E4 = { isa = PBXBuildFile; fileRef = 0EB41C0AB478EE02D8C851F9; };
552D45FB250C62F86CD02A57 = { isa = PBXBuildFile; fileRef = FBE07C5CC622A5D36BDAB9E1; };
0E8E9829E95E32163F45482D = { isa = PBXBuildFile; fileRef = B07C853EB60D8D8691BC1B4B; };
6801797B247CB3A6890C0AB0 = { isa = PBXBuildFile; fileRef = 5D32C8856093B33438AEB758; };
@@ -1019,10 +1019,10 @@
F3B50EE3939E9F16D13C3C7C = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_AudioCDReader.cpp"; path = "../../src/native/windows/juce_win32_AudioCDReader.cpp"; sourceTree = "SOURCE_ROOT"; };
9C4D1018ECC0BA07346453EF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_AutoLinkLibraries.h"; path = "../../src/native/windows/juce_win32_AutoLinkLibraries.h"; sourceTree = "SOURCE_ROOT"; };
3A37CD82212075940421CE4F = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_CameraDevice.cpp"; path = "../../src/native/windows/juce_win32_CameraDevice.cpp"; sourceTree = "SOURCE_ROOT"; };
B296F736C0CD6AC15BE6424B = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_ComSmartPtr.h"; path = "../../src/native/windows/juce_win32_ComSmartPtr.h"; sourceTree = "SOURCE_ROOT"; };
7F3EF672D07ECE3E13AAF267 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Direct2DGraphicsContext.cpp"; path = "../../src/native/windows/juce_win32_Direct2DGraphicsContext.cpp"; sourceTree = "SOURCE_ROOT"; };
249959E338D7750E56A9F2F8 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectShowComponent.cpp"; path = "../../src/native/windows/juce_win32_DirectShowComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
58B70C726D186B4E770300BC = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_DirectSound.cpp"; path = "../../src/native/windows/juce_win32_DirectSound.cpp"; sourceTree = "SOURCE_ROOT"; };
BA66E265749F75DBA86EC3F1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_DynamicLibraryLoader.h"; path = "../../src/native/windows/juce_win32_DynamicLibraryLoader.h"; sourceTree = "SOURCE_ROOT"; };
DCD09B6EF4A4A109DE01F152 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_FileChooser.cpp"; path = "../../src/native/windows/juce_win32_FileChooser.cpp"; sourceTree = "SOURCE_ROOT"; };
7527A5E8F4F39581159D3E5B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Files.cpp"; path = "../../src/native/windows/juce_win32_Files.cpp"; sourceTree = "SOURCE_ROOT"; };
1DBF9DAAD0690CB2CA4E9960 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Fonts.cpp"; path = "../../src/native/windows/juce_win32_Fonts.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -1033,8 +1033,8 @@
E7625D7A06CBC11F40A56A70 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_win32_NativeIncludes.h"; path = "../../src/native/windows/juce_win32_NativeIncludes.h"; sourceTree = "SOURCE_ROOT"; };
CDA5FCC51F6C1E84D7DC3274 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Network.cpp"; path = "../../src/native/windows/juce_win32_Network.cpp"; sourceTree = "SOURCE_ROOT"; };
B14735381ADB00741166E330 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_OpenGLComponent.cpp"; path = "../../src/native/windows/juce_win32_OpenGLComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
0EB41C0AB478EE02D8C851F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Registry.cpp"; path = "../../src/native/windows/juce_win32_Registry.cpp"; sourceTree = "SOURCE_ROOT"; };
09AE0882D58BE1715219556A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_QuickTimeMovieComponent.cpp"; path = "../../src/native/windows/juce_win32_QuickTimeMovieComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
0EB41C0AB478EE02D8C851F9 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Registry.cpp"; path = "../../src/native/windows/juce_win32_Registry.cpp"; sourceTree = "SOURCE_ROOT"; };
FBE07C5CC622A5D36BDAB9E1 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_SystemStats.cpp"; path = "../../src/native/windows/juce_win32_SystemStats.cpp"; sourceTree = "SOURCE_ROOT"; };
B07C853EB60D8D8691BC1B4B = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_Threads.cpp"; path = "../../src/native/windows/juce_win32_Threads.cpp"; sourceTree = "SOURCE_ROOT"; };
5D32C8856093B33438AEB758 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_win32_WASAPI.cpp"; path = "../../src/native/windows/juce_win32_WASAPI.cpp"; sourceTree = "SOURCE_ROOT"; };
@@ -1862,10 +1862,10 @@
F3B50EE3939E9F16D13C3C7C,
9C4D1018ECC0BA07346453EF,
3A37CD82212075940421CE4F,
B296F736C0CD6AC15BE6424B,
7F3EF672D07ECE3E13AAF267,
249959E338D7750E56A9F2F8,
58B70C726D186B4E770300BC,
BA66E265749F75DBA86EC3F1,
DCD09B6EF4A4A109DE01F152,
7527A5E8F4F39581159D3E5B,
1DBF9DAAD0690CB2CA4E9960,
@@ -1876,8 +1876,8 @@
E7625D7A06CBC11F40A56A70,
CDA5FCC51F6C1E84D7DC3274,
B14735381ADB00741166E330,
0EB41C0AB478EE02D8C851F9,
09AE0882D58BE1715219556A,
0EB41C0AB478EE02D8C851F9,
FBE07C5CC622A5D36BDAB9E1,
B07C853EB60D8D8691BC1B4B,
5D32C8856093B33438AEB758,
@@ -2391,8 +2391,8 @@
A46B0025A68136ED993E0D85,
B99678E919BF547A3A3F5D6E,
5B714CDD0082419BFED7D2D4,
5B33FFE120A47EF42CBC05E4,
2DD498313DA488A5063C4C1B,
5B33FFE120A47EF42CBC05E4,
552D45FB250C62F86CD02A57,
0E8E9829E95E32163F45482D,
6801797B247CB3A6890C0AB0,


+ 4
- 4
Juce.jucer View File

@@ -1422,14 +1422,14 @@
resource="0" file="src/native/windows/juce_win32_AutoLinkLibraries.h"/>
<FILE id="Ay6VgqxOG" name="juce_win32_CameraDevice.cpp" compile="1"
resource="0" file="src/native/windows/juce_win32_CameraDevice.cpp"/>
<FILE id="anmnYd" name="juce_win32_ComSmartPtr.h" compile="0" resource="0"
file="src/native/windows/juce_win32_ComSmartPtr.h"/>
<FILE id="c4BNPC" name="juce_win32_Direct2DGraphicsContext.cpp" compile="1"
resource="0" file="src/native/windows/juce_win32_Direct2DGraphicsContext.cpp"/>
<FILE id="lWJ3cT" name="juce_win32_DirectShowComponent.cpp" compile="1"
resource="0" file="src/native/windows/juce_win32_DirectShowComponent.cpp"/>
<FILE id="CVNbte6ov" name="juce_win32_DirectSound.cpp" compile="1"
resource="0" file="src/native/windows/juce_win32_DirectSound.cpp"/>
<FILE id="WuS4E8Pvz" name="juce_win32_DynamicLibraryLoader.h" compile="0"
resource="0" file="src/native/windows/juce_win32_DynamicLibraryLoader.h"/>
<FILE id="bHW3fjXfz" name="juce_win32_FileChooser.cpp" compile="1"
resource="0" file="src/native/windows/juce_win32_FileChooser.cpp"/>
<FILE id="T3W3aGOvf" name="juce_win32_Files.cpp" compile="1" resource="0"
@@ -1450,10 +1450,10 @@
file="src/native/windows/juce_win32_Network.cpp"/>
<FILE id="b6VjPJxV4" name="juce_win32_OpenGLComponent.cpp" compile="1"
resource="0" file="src/native/windows/juce_win32_OpenGLComponent.cpp"/>
<FILE id="J1VD4Mcx" name="juce_win32_Registry.cpp" compile="1" resource="0"
file="src/native/windows/juce_win32_Registry.cpp"/>
<FILE id="Hl7dGm8qs" name="juce_win32_QuickTimeMovieComponent.cpp"
compile="1" resource="0" file="src/native/windows/juce_win32_QuickTimeMovieComponent.cpp"/>
<FILE id="J1VD4Mcx" name="juce_win32_Registry.cpp" compile="1" resource="0"
file="src/native/windows/juce_win32_Registry.cpp"/>
<FILE id="y50XdiuL8" name="juce_win32_SystemStats.cpp" compile="1"
resource="0" file="src/native/windows/juce_win32_SystemStats.cpp"/>
<FILE id="Z2lkCeIwN" name="juce_win32_Threads.cpp" compile="1" resource="0"


+ 193
- 196
juce_amalgamated.cpp View File

@@ -676,8 +676,12 @@
#define WM_APPCOMMAND 0x0319
#endif


/*** Start of inlined file: juce_win32_ComSmartPtr.h ***/
#ifndef __JUCE_WIN32_COMSMARTPTR_JUCEHEADER__
#define __JUCE_WIN32_COMSMARTPTR_JUCEHEADER__

/** A simple COM smart pointer.
Avoids having to include ATL just to get one of these.
*/
template <class ComClass>
class ComSmartPtr
@@ -770,6 +774,23 @@ protected:
int refCount;
};

#endif // __JUCE_WIN32_COMSMARTPTR_JUCEHEADER__

/*** End of inlined file: juce_win32_ComSmartPtr.h ***/

/* Used with DynamicLibrary to simplify importing functions

functionName: function to import
localFunctionName: name you want to use to actually call it (must be different)
returnType: the return type
object: the DynamicLibrary to use
params: list of params (bracketed)
*/
#define JUCE_DLL_FUNCTION(functionName, localFunctionName, returnType, object, params) \
typedef returnType (WINAPI *type##localFunctionName) params; \
type##localFunctionName localFunctionName \
= (type##localFunctionName)object.getFunction (#functionName);

#endif // __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__

/*** End of inlined file: juce_win32_NativeIncludes.h ***/
@@ -80508,6 +80529,7 @@ int ResizableWindow::getDesktopWindowStyleFlags() const
void ResizableWindow::addToDesktop()
{
Component::addToDesktop (ResizableWindow::getDesktopWindowStyleFlags());
setDropShadowEnabled (isDropShadowEnabled()); // force an update to clear away any fake shadows if necessary.
}

void ResizableWindow::clearContentComponent()
@@ -244590,63 +244612,6 @@ BEGIN_JUCE_NAMESPACE

// Now include the actual code files..

/*** Start of inlined file: juce_win32_DynamicLibraryLoader.h ***/
#ifndef __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__
#define __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__

#ifndef DOXYGEN

// use with DynamicLibraryLoader to simplify importing functions
//
// functionName: function to import
// localFunctionName: name you want to use to actually call it (must be different)
// returnType: the return type
// object: the DynamicLibraryLoader to use
// params: list of params (bracketed)
//
#define DynamicLibraryImport(functionName, localFunctionName, returnType, object, params) \
typedef returnType (WINAPI *type##localFunctionName) params; \
type##localFunctionName localFunctionName \
= (type##localFunctionName)object.findProcAddress (#functionName);

// loads and unloads a DLL automatically
class JUCE_API DynamicLibraryLoader
{
public:
DynamicLibraryLoader (const String& name = String::empty)
: libHandle (0)
{
load (name);
}

~DynamicLibraryLoader()
{
load (String::empty);
}

bool load (const String& name)
{
FreeLibrary ((HMODULE) libHandle);
libHandle = name.isNotEmpty() ? LoadLibrary (name.toWideCharPointer()) : 0;
return libHandle != 0;
}

void* findProcAddress (const String& functionName)
{
return (void*) GetProcAddress ((HMODULE) libHandle, functionName.toUTF8()); // (void* cast is required for mingw)
}

private:
void* libHandle;
};

#endif
#endif // __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__

/*** End of inlined file: juce_win32_DynamicLibraryLoader.h ***/



/*** Start of inlined file: juce_win32_SystemStats.cpp ***/
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
@@ -244992,6 +244957,7 @@ String SystemStats::getComputerName()
/*** End of inlined file: juce_win32_SystemStats.cpp ***/



/*** Start of inlined file: juce_win32_Threads.cpp ***/
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
@@ -245275,6 +245241,8 @@ void Process::terminate()

bool DynamicLibrary::open (const String& name)
{
close();

JUCE_TRY
{
handle = LoadLibrary (name.toWideCharPointer());
@@ -245284,12 +245252,15 @@ bool DynamicLibrary::open (const String& name)
return handle != nullptr;
}

void DynamicLibrary::close() noexcept
void DynamicLibrary::close()
{
JUCE_TRY
{
if (handle != nullptr)
{
FreeLibrary ((HMODULE) handle);
handle = nullptr;
}
}
JUCE_CATCH_ALL
}
@@ -246632,8 +246603,8 @@ namespace MACAddressHelpers
{
void getViaGetAdaptersInfo (Array<MACAddress>& result)
{
DynamicLibraryLoader dll ("iphlpapi.dll");
DynamicLibraryImport (GetAdaptersInfo, getAdaptersInfo, DWORD, dll, (PIP_ADAPTER_INFO, PULONG))
DynamicLibrary dll ("iphlpapi.dll");
JUCE_DLL_FUNCTION (GetAdaptersInfo, getAdaptersInfo, DWORD, dll, (PIP_ADAPTER_INFO, PULONG))

if (getAdaptersInfo != 0)
{
@@ -246660,8 +246631,8 @@ namespace MACAddressHelpers

void getViaNetBios (Array<MACAddress>& result)
{
DynamicLibraryLoader dll ("netapi32.dll");
DynamicLibraryImport (Netbios, NetbiosCall, UCHAR, dll, (PNCB))
DynamicLibrary dll ("netapi32.dll");
JUCE_DLL_FUNCTION (Netbios, NetbiosCall, UCHAR, dll, (PNCB))

if (NetbiosCall != 0)
{
@@ -246717,45 +246688,40 @@ bool Process::openEmailWithAttachments (const String& targetEmailAddress,
const String& bodyText,
const StringArray& filesToAttach)
{
HMODULE h = LoadLibraryA ("MAPI32.dll");

typedef ULONG (WINAPI *MAPISendMailType) (LHANDLE, ULONG, lpMapiMessage, ::FLAGS, ULONG);

MAPISendMailType mapiSendMail = (MAPISendMailType) GetProcAddress (h, "MAPISendMail");
bool ok = false;
DynamicLibrary mapiLib ("MAPI32.dll");
MAPISendMailType mapiSendMail = (MAPISendMailType) mapiLib.getFunction ("MAPISendMail");

if (mapiSendMail != 0)
{
MapiMessage message = { 0 };
message.lpszSubject = (LPSTR) emailSubject.toUTF8().getAddress();
message.lpszNoteText = (LPSTR) bodyText.toUTF8().getAddress();
if (mapiSendMail == nullptr)
return false;

MapiRecipDesc recip = { 0 };
recip.ulRecipClass = MAPI_TO;
String targetEmailAddress_ (targetEmailAddress);
if (targetEmailAddress_.isEmpty())
targetEmailAddress_ = " "; // (Windows Mail can't deal with a blank address)
recip.lpszName = (LPSTR) targetEmailAddress_.toUTF8().getAddress();
message.nRecipCount = 1;
message.lpRecips = &recip;
MapiMessage message = { 0 };
message.lpszSubject = (LPSTR) emailSubject.toUTF8().getAddress();
message.lpszNoteText = (LPSTR) bodyText.toUTF8().getAddress();

HeapBlock <MapiFileDesc> files;
files.calloc (filesToAttach.size());
MapiRecipDesc recip = { 0 };
recip.ulRecipClass = MAPI_TO;
String targetEmailAddress_ (targetEmailAddress);
if (targetEmailAddress_.isEmpty())
targetEmailAddress_ = " "; // (Windows Mail can't deal with a blank address)
recip.lpszName = (LPSTR) targetEmailAddress_.toUTF8().getAddress();
message.nRecipCount = 1;
message.lpRecips = &recip;

message.nFileCount = filesToAttach.size();
message.lpFiles = files;
HeapBlock <MapiFileDesc> files;
files.calloc (filesToAttach.size());

for (int i = 0; i < filesToAttach.size(); ++i)
{
files[i].nPosition = (ULONG) -1;
files[i].lpszPathName = (LPSTR) filesToAttach[i].toUTF8().getAddress();
}
message.nFileCount = filesToAttach.size();
message.lpFiles = files;

ok = (mapiSendMail (0, 0, &message, MAPI_DIALOG | MAPI_LOGON_UI, 0) == SUCCESS_SUCCESS);
for (int i = 0; i < filesToAttach.size(); ++i)
{
files[i].nPosition = (ULONG) -1;
files[i].lpszPathName = (LPSTR) filesToAttach[i].toUTF8().getAddress();
}

FreeLibrary (h);
return ok;
return mapiSendMail (0, 0, &message, MAPI_DIALOG | MAPI_LOGON_UI, 0) == SUCCESS_SUCCESS;
}

#endif
@@ -251368,6 +251334,63 @@ void LookAndFeel::playAlertSound()
MessageBeep (MB_OK);
}

void SystemClipboard::copyTextToClipboard (const String& text)
{
if (OpenClipboard (0) != 0)
{
if (EmptyClipboard() != 0)
{
const int bytesNeeded = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer()) + 4;

if (bytesNeeded > 0)
{
HGLOBAL bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT, bytesNeeded + sizeof (WCHAR));

if (bufH != 0)
{
WCHAR* const data = static_cast <WCHAR*> (GlobalLock (bufH));

if (data != nullptr)
{
text.copyToUTF16 (data, bytesNeeded);
GlobalUnlock (bufH);

SetClipboardData (CF_UNICODETEXT, bufH);
}
}
}
}

CloseClipboard();
}
}

String SystemClipboard::getTextFromClipboard()
{
String result;

if (OpenClipboard (0) != 0)
{
HANDLE bufH = GetClipboardData (CF_UNICODETEXT);

if (bufH != 0)
{
const WCHAR* const data = (const WCHAR*) GlobalLock (bufH);

if (data != nullptr)
{
result = String (data, (int) (GlobalSize (bufH) / sizeof (WCHAR)));

GlobalUnlock (bufH);
}
}

CloseClipboard();
}

return result;
}

void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /*allowMenusAndBars*/)
{
if (enableOrDisable)
@@ -252068,59 +252091,6 @@ void FileChooser::showPlatformDialog (Array<File>& results, const String& title_
// compiled on its own).
#if JUCE_INCLUDED_FILE

void SystemClipboard::copyTextToClipboard (const String& text)
{
if (OpenClipboard (0) != 0)
{
if (EmptyClipboard() != 0)
{
const int bytesNeeded = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer()) + 4;

if (bytesNeeded > 0)
{
HGLOBAL bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT, bytesNeeded + sizeof (WCHAR));

if (bufH != 0)
{
WCHAR* const data = static_cast <WCHAR*> (GlobalLock (bufH));
text.copyToUTF16 (data, bytesNeeded);
GlobalUnlock (bufH);

SetClipboardData (CF_UNICODETEXT, bufH);
}
}
}

CloseClipboard();
}
}

String SystemClipboard::getTextFromClipboard()
{
String result;

if (OpenClipboard (0) != 0)
{
HANDLE bufH = GetClipboardData (CF_UNICODETEXT);

if (bufH != 0)
{
const WCHAR* const data = (const WCHAR*) GlobalLock (bufH);

if (data != nullptr)
{
result = String (data, (int) (GlobalSize (bufH) / sizeof (WCHAR)));

GlobalUnlock (bufH);
}
}

CloseClipboard();
}

return result;
}

bool juce_IsRunningInWine()
{
HMODULE ntdll = GetModuleHandle (_T("ntdll.dll"));
@@ -260712,9 +260682,9 @@ public:

void setMMThreadPriority()
{
DynamicLibraryLoader dll ("avrt.dll");
DynamicLibraryImport (AvSetMmThreadCharacteristicsW, avSetMmThreadCharacteristics, HANDLE, dll, (LPCWSTR, LPDWORD))
DynamicLibraryImport (AvSetMmThreadPriority, avSetMmThreadPriority, HANDLE, dll, (HANDLE, AVRT_PRIORITY))
DynamicLibrary dll ("avrt.dll");
JUCE_DLL_FUNCTION (AvSetMmThreadCharacteristicsW, avSetMmThreadCharacteristics, HANDLE, dll, (LPCWSTR, LPDWORD))
JUCE_DLL_FUNCTION (AvSetMmThreadPriority, avSetMmThreadPriority, HANDLE, dll, (HANDLE, AVRT_PRIORITY))

if (avSetMmThreadCharacteristics != 0 && avSetMmThreadPriority != 0)
{
@@ -262806,12 +262776,12 @@ void Thread::yield()
versions, and a lot of distros seem to ship with obsolete versions)
*/
#if defined (CPU_ISSET) && ! defined (SUPPORT_AFFINITIES)
#define SUPPORT_AFFINITIES 1
#define SUPPORT_AFFINITIES 1
#endif

void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
{
#if SUPPORT_AFFINITIES
#if SUPPORT_AFFINITIES
cpu_set_t affinity;
CPU_ZERO (&affinity);

@@ -262829,13 +262799,34 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
sched_setaffinity (getpid(), sizeof (cpu_set_t), &affinity);
sched_yield();

#else
#else
/* affinities aren't supported because either the appropriate header files weren't found,
or the SUPPORT_AFFINITIES macro was turned off
*/
jassertfalse;
(void) affinityMask;
#endif
#endif
}

bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}

void DynamicLibrary::close()
{
if (handle != nullptr)
{
dlclose (handle);
handle = nullptr;
}
}

void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}

/*** End of inlined file: juce_posix_SharedCode.h ***/
@@ -264021,24 +264012,6 @@ void Process::lowerPrivilege()
}
}

bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}

void DynamicLibrary::close() noexcept
{
if (handle != nullptr)
dlclose (handle);
}

void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}

#endif

/*** End of inlined file: juce_linux_Threads.cpp ***/
@@ -271994,24 +271967,6 @@ void Process::setPriority (ProcessPriority)
// xxx
}

bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}

void DynamicLibrary::close() noexcept
{
if (handle != nullptr)
dlclose (handle);
}

void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}

#endif

/*** End of inlined file: juce_mac_Threads.mm ***/
@@ -272843,12 +272798,12 @@ void Thread::yield()
versions, and a lot of distros seem to ship with obsolete versions)
*/
#if defined (CPU_ISSET) && ! defined (SUPPORT_AFFINITIES)
#define SUPPORT_AFFINITIES 1
#define SUPPORT_AFFINITIES 1
#endif

void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
{
#if SUPPORT_AFFINITIES
#if SUPPORT_AFFINITIES
cpu_set_t affinity;
CPU_ZERO (&affinity);

@@ -272866,13 +272821,34 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
sched_setaffinity (getpid(), sizeof (cpu_set_t), &affinity);
sched_yield();

#else
#else
/* affinities aren't supported because either the appropriate header files weren't found,
or the SUPPORT_AFFINITIES macro was turned off
*/
jassertfalse;
(void) affinityMask;
#endif
#endif
}

bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}

void DynamicLibrary::close()
{
if (handle != nullptr)
{
dlclose (handle);
handle = nullptr;
}
}

void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}

/*** End of inlined file: juce_posix_SharedCode.h ***/
@@ -289783,12 +289759,12 @@ void Thread::yield()
versions, and a lot of distros seem to ship with obsolete versions)
*/
#if defined (CPU_ISSET) && ! defined (SUPPORT_AFFINITIES)
#define SUPPORT_AFFINITIES 1
#define SUPPORT_AFFINITIES 1
#endif

void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
{
#if SUPPORT_AFFINITIES
#if SUPPORT_AFFINITIES
cpu_set_t affinity;
CPU_ZERO (&affinity);

@@ -289806,13 +289782,34 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
sched_setaffinity (getpid(), sizeof (cpu_set_t), &affinity);
sched_yield();

#else
#else
/* affinities aren't supported because either the appropriate header files weren't found,
or the SUPPORT_AFFINITIES macro was turned off
*/
jassertfalse;
(void) affinityMask;
#endif
#endif
}

bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}

void DynamicLibrary::close()
{
if (handle != nullptr)
{
dlclose (handle);
handle = nullptr;
}
}

void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}

/*** End of inlined file: juce_posix_SharedCode.h ***/


+ 5
- 2
juce_amalgamated.h View File

@@ -73,7 +73,7 @@ namespace JuceDummyNamespace {}
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 54
#define JUCE_BUILDNUMBER 7
#define JUCE_BUILDNUMBER 8

/** Current Juce version number.

@@ -22203,7 +22203,7 @@ public:
bool open (const String& name);

/** Releases the currently-open DLL, or has no effect if none was open. */
void close() noexcept;
void close();

/** Tries to find a named function in the currently-open DLL, and returns a pointer to it.
If no library is open, or if the function isn't found, this will return a null pointer.
@@ -56753,6 +56753,9 @@ public:
/** Turns the drop-shadow on and off. */
void setDropShadowEnabled (bool useShadow);

/** True if drop-shadowing is enabled. */
bool isDropShadowEnabled() const noexcept { return useDropShadow; }

/** Sets whether an OS-native title bar will be used, or a Juce one.

@see isUsingNativeTitleBar


+ 1
- 1
src/core/juce_StandardHeader.h View File

@@ -33,7 +33,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 54
#define JUCE_BUILDNUMBER 7
#define JUCE_BUILDNUMBER 8
/** Current Juce version number.


+ 1
- 0
src/gui/components/windows/juce_ResizableWindow.cpp View File

@@ -106,6 +106,7 @@ int ResizableWindow::getDesktopWindowStyleFlags() const
void ResizableWindow::addToDesktop()
{
Component::addToDesktop (ResizableWindow::getDesktopWindowStyleFlags());
setDropShadowEnabled (isDropShadowEnabled()); // force an update to clear away any fake shadows if necessary.
}
//==============================================================================


+ 3
- 0
src/gui/components/windows/juce_TopLevelWindow.h View File

@@ -97,6 +97,9 @@ public:
/** Turns the drop-shadow on and off. */
void setDropShadowEnabled (bool useShadow);
/** True if drop-shadowing is enabled. */
bool isDropShadowEnabled() const noexcept { return useDropShadow; }
/** Sets whether an OS-native title bar will be used, or a Juce one.
@see isUsingNativeTitleBar


+ 26
- 4
src/native/common/juce_posix_SharedCode.h View File

@@ -868,12 +868,12 @@ void Thread::yield()
versions, and a lot of distros seem to ship with obsolete versions)
*/
#if defined (CPU_ISSET) && ! defined (SUPPORT_AFFINITIES)
#define SUPPORT_AFFINITIES 1
#define SUPPORT_AFFINITIES 1
#endif
void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
{
#if SUPPORT_AFFINITIES
#if SUPPORT_AFFINITIES
cpu_set_t affinity;
CPU_ZERO (&affinity);
@@ -891,11 +891,33 @@ void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
sched_setaffinity (getpid(), sizeof (cpu_set_t), &affinity);
sched_yield();
#else
#else
/* affinities aren't supported because either the appropriate header files weren't found,
or the SUPPORT_AFFINITIES macro was turned off
*/
jassertfalse;
(void) affinityMask;
#endif
#endif
}
//==============================================================================
bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}
void DynamicLibrary::close()
{
if (handle != nullptr)
{
dlclose (handle);
handle = nullptr;
}
}
void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}

+ 0
- 18
src/native/linux/juce_linux_Threads.cpp View File

@@ -111,22 +111,4 @@ void Process::lowerPrivilege()
}
}
bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}
void DynamicLibrary::close() noexcept
{
if (handle != nullptr)
dlclose (handle);
}
void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}
#endif

+ 0
- 19
src/native/mac/juce_mac_Threads.mm View File

@@ -63,23 +63,4 @@ void Process::setPriority (ProcessPriority)
// xxx
}
bool DynamicLibrary::open (const String& name)
{
close();
handle = dlopen (name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
return handle != 0;
}
void DynamicLibrary::close() noexcept
{
if (handle != nullptr)
dlclose (handle);
}
void* DynamicLibrary::getFunction (const String& functionName) noexcept
{
return handle != nullptr ? dlsym (handle, functionName.toUTF8()) : nullptr;
}
#endif

+ 125
- 0
src/native/windows/juce_win32_ComSmartPtr.h View File

@@ -0,0 +1,125 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-11 by Raw Material Software Ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the GNU General
Public License (Version 2), as published by the Free Software Foundation.
A copy of the license is included in the JUCE distribution, or can be found
online at www.gnu.org/licenses.
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.rawmaterialsoftware.com/juce for more information.
==============================================================================
*/
#ifndef __JUCE_WIN32_COMSMARTPTR_JUCEHEADER__
#define __JUCE_WIN32_COMSMARTPTR_JUCEHEADER__
//==============================================================================
/** A simple COM smart pointer.
*/
template <class ComClass>
class ComSmartPtr
{
public:
ComSmartPtr() throw() : p (0) {}
ComSmartPtr (ComClass* const p_) : p (p_) { if (p_ != 0) p_->AddRef(); }
ComSmartPtr (const ComSmartPtr<ComClass>& p_) : p (p_.p) { if (p != 0) p->AddRef(); }
~ComSmartPtr() { release(); }
operator ComClass*() const throw() { return p; }
ComClass& operator*() const throw() { return *p; }
ComClass* operator->() const throw() { return p; }
ComSmartPtr& operator= (ComClass* const newP)
{
if (newP != 0) newP->AddRef();
release();
p = newP;
return *this;
}
ComSmartPtr& operator= (const ComSmartPtr<ComClass>& newP) { return operator= (newP.p); }
// Releases and nullifies this pointer and returns its address
ComClass** resetAndGetPointerAddress()
{
release();
p = 0;
return &p;
}
HRESULT CoCreateInstance (REFCLSID classUUID, DWORD dwClsContext = CLSCTX_INPROC_SERVER)
{
#ifndef __MINGW32__
return ::CoCreateInstance (classUUID, 0, dwClsContext, __uuidof (ComClass), (void**) resetAndGetPointerAddress());
#else
return E_NOTIMPL;
#endif
}
template <class OtherComClass>
HRESULT QueryInterface (REFCLSID classUUID, ComSmartPtr<OtherComClass>& destObject) const
{
if (p == 0)
return E_POINTER;
return p->QueryInterface (classUUID, (void**) destObject.resetAndGetPointerAddress());
}
template <class OtherComClass>
HRESULT QueryInterface (ComSmartPtr<OtherComClass>& destObject) const
{
return this->QueryInterface (__uuidof (OtherComClass), destObject);
}
private:
ComClass* p;
void release() { if (p != 0) p->Release(); }
ComClass** operator&() throw(); // private to avoid it being used accidentally
};
//==============================================================================
/** Handy base class for writing COM objects, providing ref-counting and a basic QueryInterface method.
*/
template <class ComClass>
class ComBaseClassHelper : public ComClass
{
public:
ComBaseClassHelper() : refCount (1) {}
virtual ~ComBaseClassHelper() {}
HRESULT __stdcall QueryInterface (REFIID refId, void** result)
{
#ifndef __MINGW32__
if (refId == __uuidof (ComClass)) { AddRef(); *result = dynamic_cast <ComClass*> (this); return S_OK; }
#endif
if (refId == IID_IUnknown) { AddRef(); *result = dynamic_cast <IUnknown*> (this); return S_OK; }
*result = 0;
return E_NOINTERFACE;
}
ULONG __stdcall AddRef() { return ++refCount; }
ULONG __stdcall Release() { const int r = --refCount; if (r == 0) delete this; return r; }
protected:
int refCount;
};
#endif // __JUCE_WIN32_COMSMARTPTR_JUCEHEADER__

+ 0
- 80
src/native/windows/juce_win32_DynamicLibraryLoader.h View File

@@ -1,80 +0,0 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-11 by Raw Material Software Ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the GNU General
Public License (Version 2), as published by the Free Software Foundation.
A copy of the license is included in the JUCE distribution, or can be found
online at www.gnu.org/licenses.
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------
To release a closed-source product which uses JUCE, commercial licenses are
available: visit www.rawmaterialsoftware.com/juce for more information.
==============================================================================
*/
#ifndef __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__
#define __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__
#ifndef DOXYGEN
//==============================================================================
// use with DynamicLibraryLoader to simplify importing functions
//
// functionName: function to import
// localFunctionName: name you want to use to actually call it (must be different)
// returnType: the return type
// object: the DynamicLibraryLoader to use
// params: list of params (bracketed)
//
#define DynamicLibraryImport(functionName, localFunctionName, returnType, object, params) \
typedef returnType (WINAPI *type##localFunctionName) params; \
type##localFunctionName localFunctionName \
= (type##localFunctionName)object.findProcAddress (#functionName);
//==============================================================================
// loads and unloads a DLL automatically
class JUCE_API DynamicLibraryLoader
{
public:
DynamicLibraryLoader (const String& name = String::empty)
: libHandle (0)
{
load (name);
}
~DynamicLibraryLoader()
{
load (String::empty);
}
bool load (const String& name)
{
FreeLibrary ((HMODULE) libHandle);
libHandle = name.isNotEmpty() ? LoadLibrary (name.toWideCharPointer()) : 0;
return libHandle != 0;
}
void* findProcAddress (const String& functionName)
{
return (void*) GetProcAddress ((HMODULE) libHandle, functionName.toUTF8()); // (void* cast is required for mingw)
}
private:
void* libHandle;
};
#endif
#endif // __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__

+ 0
- 54
src/native/windows/juce_win32_Misc.cpp View File

@@ -28,60 +28,6 @@
#if JUCE_INCLUDED_FILE
//==============================================================================
void SystemClipboard::copyTextToClipboard (const String& text)
{
if (OpenClipboard (0) != 0)
{
if (EmptyClipboard() != 0)
{
const int bytesNeeded = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer()) + 4;
if (bytesNeeded > 0)
{
HGLOBAL bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT, bytesNeeded + sizeof (WCHAR));
if (bufH != 0)
{
WCHAR* const data = static_cast <WCHAR*> (GlobalLock (bufH));
text.copyToUTF16 (data, bytesNeeded);
GlobalUnlock (bufH);
SetClipboardData (CF_UNICODETEXT, bufH);
}
}
}
CloseClipboard();
}
}
String SystemClipboard::getTextFromClipboard()
{
String result;
if (OpenClipboard (0) != 0)
{
HANDLE bufH = GetClipboardData (CF_UNICODETEXT);
if (bufH != 0)
{
const WCHAR* const data = (const WCHAR*) GlobalLock (bufH);
if (data != nullptr)
{
result = String (data, (int) (GlobalSize (bufH) / sizeof (WCHAR)));
GlobalUnlock (bufH);
}
}
CloseClipboard();
}
return result;
}
//==============================================================================
bool juce_IsRunningInWine()
{


+ 0
- 1
src/native/windows/juce_win32_NativeCode.cpp View File

@@ -100,7 +100,6 @@ BEGIN_JUCE_NAMESPACE
#define JUCE_INCLUDED_FILE 1
// Now include the actual code files..
#include "juce_win32_DynamicLibraryLoader.h"
#include "juce_win32_SystemStats.cpp"
#include "juce_win32_Threads.cpp"
#include "juce_win32_Files.cpp"


+ 13
- 94
src/native/windows/juce_win32_NativeIncludes.h View File

@@ -23,7 +23,6 @@
==============================================================================
*/
//==============================================================================
#ifndef __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__
#define __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__
@@ -201,100 +200,20 @@
#define WM_APPCOMMAND 0x0319
#endif
//==============================================================================
/** A simple COM smart pointer.
Avoids having to include ATL just to get one of these.
*/
template <class ComClass>
class ComSmartPtr
{
public:
ComSmartPtr() throw() : p (0) {}
ComSmartPtr (ComClass* const p_) : p (p_) { if (p_ != 0) p_->AddRef(); }
ComSmartPtr (const ComSmartPtr<ComClass>& p_) : p (p_.p) { if (p != 0) p->AddRef(); }
~ComSmartPtr() { release(); }
operator ComClass*() const throw() { return p; }
ComClass& operator*() const throw() { return *p; }
ComClass* operator->() const throw() { return p; }
ComSmartPtr& operator= (ComClass* const newP)
{
if (newP != 0) newP->AddRef();
release();
p = newP;
return *this;
}
ComSmartPtr& operator= (const ComSmartPtr<ComClass>& newP) { return operator= (newP.p); }
// Releases and nullifies this pointer and returns its address
ComClass** resetAndGetPointerAddress()
{
release();
p = 0;
return &p;
}
HRESULT CoCreateInstance (REFCLSID classUUID, DWORD dwClsContext = CLSCTX_INPROC_SERVER)
{
#ifndef __MINGW32__
return ::CoCreateInstance (classUUID, 0, dwClsContext, __uuidof (ComClass), (void**) resetAndGetPointerAddress());
#else
return E_NOTIMPL;
#endif
}
template <class OtherComClass>
HRESULT QueryInterface (REFCLSID classUUID, ComSmartPtr<OtherComClass>& destObject) const
{
if (p == 0)
return E_POINTER;
return p->QueryInterface (classUUID, (void**) destObject.resetAndGetPointerAddress());
}
template <class OtherComClass>
HRESULT QueryInterface (ComSmartPtr<OtherComClass>& destObject) const
{
return this->QueryInterface (__uuidof (OtherComClass), destObject);
}
private:
ComClass* p;
void release() { if (p != 0) p->Release(); }
ComClass** operator&() throw(); // private to avoid it being used accidentally
};
#include "juce_win32_ComSmartPtr.h"
//==============================================================================
/** Handy base class for writing COM objects, providing ref-counting and a basic QueryInterface method.
/* Used with DynamicLibrary to simplify importing functions
functionName: function to import
localFunctionName: name you want to use to actually call it (must be different)
returnType: the return type
object: the DynamicLibrary to use
params: list of params (bracketed)
*/
template <class ComClass>
class ComBaseClassHelper : public ComClass
{
public:
ComBaseClassHelper() : refCount (1) {}
virtual ~ComBaseClassHelper() {}
HRESULT __stdcall QueryInterface (REFIID refId, void** result)
{
#ifndef __MINGW32__
if (refId == __uuidof (ComClass)) { AddRef(); *result = dynamic_cast <ComClass*> (this); return S_OK; }
#endif
if (refId == IID_IUnknown) { AddRef(); *result = dynamic_cast <IUnknown*> (this); return S_OK; }
*result = 0;
return E_NOINTERFACE;
}
ULONG __stdcall AddRef() { return ++refCount; }
ULONG __stdcall Release() { const int r = --refCount; if (r == 0) delete this; return r; }
protected:
int refCount;
};
#define JUCE_DLL_FUNCTION(functionName, localFunctionName, returnType, object, params) \
typedef returnType (WINAPI *type##localFunctionName) params; \
type##localFunctionName localFunctionName \
= (type##localFunctionName)object.getFunction (#functionName);
#endif // __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__

+ 32
- 37
src/native/windows/juce_win32_Network.cpp View File

@@ -361,8 +361,8 @@ namespace MACAddressHelpers
{
void getViaGetAdaptersInfo (Array<MACAddress>& result)
{
DynamicLibraryLoader dll ("iphlpapi.dll");
DynamicLibraryImport (GetAdaptersInfo, getAdaptersInfo, DWORD, dll, (PIP_ADAPTER_INFO, PULONG))
DynamicLibrary dll ("iphlpapi.dll");
JUCE_DLL_FUNCTION (GetAdaptersInfo, getAdaptersInfo, DWORD, dll, (PIP_ADAPTER_INFO, PULONG))
if (getAdaptersInfo != 0)
{
@@ -389,8 +389,8 @@ namespace MACAddressHelpers
void getViaNetBios (Array<MACAddress>& result)
{
DynamicLibraryLoader dll ("netapi32.dll");
DynamicLibraryImport (Netbios, NetbiosCall, UCHAR, dll, (PNCB))
DynamicLibrary dll ("netapi32.dll");
JUCE_DLL_FUNCTION (Netbios, NetbiosCall, UCHAR, dll, (PNCB))
if (NetbiosCall != 0)
{
@@ -447,45 +447,40 @@ bool Process::openEmailWithAttachments (const String& targetEmailAddress,
const String& bodyText,
const StringArray& filesToAttach)
{
HMODULE h = LoadLibraryA ("MAPI32.dll");
typedef ULONG (WINAPI *MAPISendMailType) (LHANDLE, ULONG, lpMapiMessage, ::FLAGS, ULONG);
MAPISendMailType mapiSendMail = (MAPISendMailType) GetProcAddress (h, "MAPISendMail");
bool ok = false;
DynamicLibrary mapiLib ("MAPI32.dll");
MAPISendMailType mapiSendMail = (MAPISendMailType) mapiLib.getFunction ("MAPISendMail");
if (mapiSendMail != 0)
{
MapiMessage message = { 0 };
message.lpszSubject = (LPSTR) emailSubject.toUTF8().getAddress();
message.lpszNoteText = (LPSTR) bodyText.toUTF8().getAddress();
MapiRecipDesc recip = { 0 };
recip.ulRecipClass = MAPI_TO;
String targetEmailAddress_ (targetEmailAddress);
if (targetEmailAddress_.isEmpty())
targetEmailAddress_ = " "; // (Windows Mail can't deal with a blank address)
recip.lpszName = (LPSTR) targetEmailAddress_.toUTF8().getAddress();
message.nRecipCount = 1;
message.lpRecips = &recip;
HeapBlock <MapiFileDesc> files;
files.calloc (filesToAttach.size());
message.nFileCount = filesToAttach.size();
message.lpFiles = files;
for (int i = 0; i < filesToAttach.size(); ++i)
{
files[i].nPosition = (ULONG) -1;
files[i].lpszPathName = (LPSTR) filesToAttach[i].toUTF8().getAddress();
}
if (mapiSendMail == nullptr)
return false;
MapiMessage message = { 0 };
message.lpszSubject = (LPSTR) emailSubject.toUTF8().getAddress();
message.lpszNoteText = (LPSTR) bodyText.toUTF8().getAddress();
ok = (mapiSendMail (0, 0, &message, MAPI_DIALOG | MAPI_LOGON_UI, 0) == SUCCESS_SUCCESS);
MapiRecipDesc recip = { 0 };
recip.ulRecipClass = MAPI_TO;
String targetEmailAddress_ (targetEmailAddress);
if (targetEmailAddress_.isEmpty())
targetEmailAddress_ = " "; // (Windows Mail can't deal with a blank address)
recip.lpszName = (LPSTR) targetEmailAddress_.toUTF8().getAddress();
message.nRecipCount = 1;
message.lpRecips = &recip;
HeapBlock <MapiFileDesc> files;
files.calloc (filesToAttach.size());
message.nFileCount = filesToAttach.size();
message.lpFiles = files;
for (int i = 0; i < filesToAttach.size(); ++i)
{
files[i].nPosition = (ULONG) -1;
files[i].lpszPathName = (LPSTR) filesToAttach[i].toUTF8().getAddress();
}
FreeLibrary (h);
return ok;
return mapiSendMail (0, 0, &message, MAPI_DIALOG | MAPI_LOGON_UI, 0) == SUCCESS_SUCCESS;
}


+ 6
- 1
src/native/windows/juce_win32_Threads.cpp View File

@@ -314,6 +314,8 @@ void Process::terminate()
//==============================================================================
bool DynamicLibrary::open (const String& name)
{
close();
JUCE_TRY
{
handle = LoadLibrary (name.toWideCharPointer());
@@ -323,12 +325,15 @@ bool DynamicLibrary::open (const String& name)
return handle != nullptr;
}
void DynamicLibrary::close() noexcept
void DynamicLibrary::close()
{
JUCE_TRY
{
if (handle != nullptr)
{
FreeLibrary ((HMODULE) handle);
handle = nullptr;
}
}
JUCE_CATCH_ALL
}


+ 3
- 3
src/native/windows/juce_win32_WASAPI.cpp View File

@@ -822,9 +822,9 @@ public:
void setMMThreadPriority()
{
DynamicLibraryLoader dll ("avrt.dll");
DynamicLibraryImport (AvSetMmThreadCharacteristicsW, avSetMmThreadCharacteristics, HANDLE, dll, (LPCWSTR, LPDWORD))
DynamicLibraryImport (AvSetMmThreadPriority, avSetMmThreadPriority, HANDLE, dll, (HANDLE, AVRT_PRIORITY))
DynamicLibrary dll ("avrt.dll");
JUCE_DLL_FUNCTION (AvSetMmThreadCharacteristicsW, avSetMmThreadCharacteristics, HANDLE, dll, (LPCWSTR, LPDWORD))
JUCE_DLL_FUNCTION (AvSetMmThreadPriority, avSetMmThreadPriority, HANDLE, dll, (HANDLE, AVRT_PRIORITY))
if (avSetMmThreadCharacteristics != 0 && avSetMmThreadPriority != 0)
{


+ 58
- 0
src/native/windows/juce_win32_Windowing.cpp View File

@@ -2889,6 +2889,64 @@ void LookAndFeel::playAlertSound()
MessageBeep (MB_OK);
}
//==============================================================================
void SystemClipboard::copyTextToClipboard (const String& text)
{
if (OpenClipboard (0) != 0)
{
if (EmptyClipboard() != 0)
{
const int bytesNeeded = CharPointer_UTF16::getBytesRequiredFor (text.getCharPointer()) + 4;
if (bytesNeeded > 0)
{
HGLOBAL bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT, bytesNeeded + sizeof (WCHAR));
if (bufH != 0)
{
WCHAR* const data = static_cast <WCHAR*> (GlobalLock (bufH));
if (data != nullptr)
{
text.copyToUTF16 (data, bytesNeeded);
GlobalUnlock (bufH);
SetClipboardData (CF_UNICODETEXT, bufH);
}
}
}
}
CloseClipboard();
}
}
String SystemClipboard::getTextFromClipboard()
{
String result;
if (OpenClipboard (0) != 0)
{
HANDLE bufH = GetClipboardData (CF_UNICODETEXT);
if (bufH != 0)
{
const WCHAR* const data = (const WCHAR*) GlobalLock (bufH);
if (data != nullptr)
{
result = String (data, (int) (GlobalSize (bufH) / sizeof (WCHAR)));
GlobalUnlock (bufH);
}
}
CloseClipboard();
}
return result;
}
//==============================================================================
void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /*allowMenusAndBars*/)
{


+ 1
- 1
src/threads/juce_DynamicLibrary.h View File

@@ -60,7 +60,7 @@ public:
bool open (const String& name);
/** Releases the currently-open DLL, or has no effect if none was open. */
void close() noexcept;
void close();
/** Tries to find a named function in the currently-open DLL, and returns a pointer to it.
If no library is open, or if the function isn't found, this will return a null pointer.


Loading…
Cancel
Save