Browse Source

Misc fixes for mingw compatibility

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
c368805559
13 changed files with 33 additions and 15 deletions
  1. +5
    -0
      src/core/juce_Memory.h
  2. +4
    -0
      src/core/juce_TargetPlatform.h
  3. +1
    -1
      src/gui/components/juce_Desktop.cpp
  4. +1
    -1
      src/gui/components/windows/juce_TopLevelWindow.cpp
  5. +3
    -0
      src/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp
  6. +1
    -1
      src/native/linux/juce_linux_Windowing.cpp
  7. +1
    -1
      src/native/mac/juce_iphone_MiscUtilities.mm
  8. +1
    -1
      src/native/mac/juce_mac_MiscUtilities.mm
  9. +1
    -1
      src/native/windows/juce_win32_Fonts.cpp
  10. +5
    -1
      src/native/windows/juce_win32_Messaging.cpp
  11. +5
    -2
      src/native/windows/juce_win32_NativeIncludes.h
  12. +1
    -2
      src/native/windows/juce_win32_SystemStats.cpp
  13. +4
    -4
      src/native/windows/juce_win32_Windowing.cpp

+ 5
- 0
src/core/juce_Memory.h View File

@@ -192,6 +192,11 @@
#define juce_ThreadLocal __thread
#endif
//==============================================================================
#if JUCE_MINGW
/** This allocator is not defined in mingw gcc. */
#define alloca __builtin_alloca
#endif
//==============================================================================
/** Clears a block of memory. */


+ 4
- 0
src/core/juce_TargetPlatform.h View File

@@ -70,6 +70,10 @@
#ifdef _DEBUG
#define JUCE_DEBUG 1
#endif

#ifdef __MINGW32__
#define JUCE_MINGW 1
#endif
/** If defined, this indicates that the processor is little-endian. */
#define JUCE_LITTLE_ENDIAN 1


+ 1
- 1
src/gui/components/juce_Desktop.cpp View File

@@ -33,7 +33,7 @@ BEGIN_JUCE_NAMESPACE
#include "../graphics/geometry/juce_RectangleList.h"
extern void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords,
const bool clipToWorkArea) throw();
const bool clipToWorkArea);
//==============================================================================


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

@@ -135,7 +135,7 @@ private:
juce_ImplementSingleton_SingleThreaded (TopLevelWindowManager)
void juce_CheckCurrentlyFocusedTopLevelWindow() throw()
void juce_CheckCurrentlyFocusedTopLevelWindow()
{
if (TopLevelWindowManager::getInstanceWithoutCreating() != 0)
TopLevelWindowManager::getInstanceWithoutCreating()->startTimer (20);


+ 3
- 0
src/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp View File

@@ -32,6 +32,9 @@
namespace jpeglibNamespace
{
#if JUCE_INCLUDE_JPEGLIB_CODE
#if JUCE_MINGW
typedef unsigned char boolean;
#endif
extern "C"
{
#define JPEG_INTERNALS


+ 1
- 1
src/native/linux/juce_linux_Windowing.cpp View File

@@ -2563,7 +2563,7 @@ void juce_windowMessageReceive (XEvent* event)
}
//==============================================================================
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool /*clipToWorkArea*/) throw()
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool /*clipToWorkArea*/)
{
if (display == 0)
return;


+ 1
- 1
src/native/mac/juce_iphone_MiscUtilities.mm View File

@@ -181,7 +181,7 @@ bool Desktop::isScreenSaverEnabled() throw()
//==============================================================================
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool clipToWorkArea) throw()
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool clipToWorkArea)
{
const ScopedAutoReleasePool pool;
monitorCoords.clear();


+ 1
- 1
src/native/mac/juce_mac_MiscUtilities.mm View File

@@ -239,7 +239,7 @@ bool Desktop::isScreenSaverEnabled() throw()
#endif
//==============================================================================
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool clipToWorkArea) throw()
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool clipToWorkArea)
{
const ScopedAutoReleasePool pool;
monitorCoords.clear();


+ 1
- 1
src/native/windows/juce_win32_Fonts.cpp View File

@@ -102,7 +102,7 @@ const StringArray Font::findAllTypefaceNames() throw()
return results;
}
extern bool juce_IsRunningInWine() throw();
extern bool juce_IsRunningInWine();
void Font::getPlatformDefaultFontNames (String& defaultSans, String& defaultSerif, String& defaultFixed) throw()
{


+ 5
- 1
src/native/windows/juce_win32_Messaging.cpp View File

@@ -32,12 +32,16 @@
static const unsigned int specialId = WM_APP + 0x4400;
static const unsigned int broadcastId = WM_APP + 0x4403;
static const unsigned int specialCallbackId = WM_APP + 0x4402;
static const TCHAR* const messageWindowName = _T("JUCEWindow");
HWND juce_messageWindowHandle = 0;
extern long improbableWindowNumber; // defined in windowing.cpp

#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x0319
#endif
//==============================================================================


+ 5
- 2
src/native/windows/juce_win32_NativeIncludes.h View File

@@ -65,13 +65,16 @@
#include <iphlpapi.h>
#include <mapi.h>
#include <float.h>
#include <crtdbg.h>
#include <process.h>
#include <comutil.h>
#include <Exdisp.h>
#include <exdispid.h>
#include <shlobj.h>
#if ! JUCE_MINGW
#include <crtdbg.h>
#include <comutil.h>
#endif
#if JUCE_OPENGL
#include <gl/gl.h>
#endif


+ 1
- 2
src/native/windows/juce_win32_SystemStats.cpp View File

@@ -27,8 +27,7 @@
// compiled on its own).
#if JUCE_INCLUDED_FILE
extern void juce_updateMultiMonitorInfo() throw();
extern void juce_initialiseThreadEvents() throw();
extern void juce_initialiseThreadEvents();
//==============================================================================


+ 4
- 4
src/native/windows/juce_win32_Windowing.cpp View File

@@ -42,9 +42,9 @@
#define WM_APPCOMMAND 0x0319
#endif
extern void juce_repeatLastProcessPriority() throw(); // in juce_win32_Threads.cpp
extern void juce_CheckCurrentlyFocusedTopLevelWindow() throw(); // in juce_TopLevelWindow.cpp
extern bool juce_IsRunningInWine() throw();
extern void juce_repeatLastProcessPriority(); // in juce_win32_Threads.cpp
extern void juce_CheckCurrentlyFocusedTopLevelWindow(); // in juce_TopLevelWindow.cpp
extern bool juce_IsRunningInWine();
#ifndef ULW_ALPHA
#define ULW_ALPHA 0x00000002
@@ -2428,7 +2428,7 @@ static BOOL CALLBACK enumMonitorsProc (HMONITOR, HDC, LPRECT r, LPARAM userInfo)
return TRUE;
}
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool clipToWorkArea) throw()
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool clipToWorkArea)
{
EnumDisplayMonitors (0, 0, &enumMonitorsProc, (LPARAM) &monitorCoords);


Loading…
Cancel
Save