Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
de37ff7979
5 changed files with 53 additions and 78 deletions
  1. +3
    -3
      build/macosx/platform_specific_code/juce_mac_FileChooser.mm
  2. +6
    -0
      build/macosx/platform_specific_code/juce_mac_NativeHeaders.h
  3. +1
    -1
      build/macosx/platform_specific_code/juce_mac_Windowing.mm
  4. +35
    -72
      juce_amalgamated.cpp
  5. +8
    -2
      src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp

+ 3
- 3
build/macosx/platform_specific_code/juce_mac_FileChooser.mm View File

@@ -126,9 +126,9 @@ void FileChooser::showPlatformDialog (OwnedArray<File>& results,


[panel setDelegate: delegate]; [panel setDelegate: delegate];


NSInteger result = [panel runModalForDirectory: juceStringToNS (currentFileOrDirectory.getParentDirectory().getFullPathName())
file: juceStringToNS (currentFileOrDirectory.getFileName())];
if (result == NSOKButton)
if ([panel runModalForDirectory: juceStringToNS (currentFileOrDirectory.getParentDirectory().getFullPathName())
file: juceStringToNS (currentFileOrDirectory.getFileName())]
== NSOKButton)
{ {
if (isSaveDialogue) if (isSaveDialogue)
{ {


+ 6
- 0
build/macosx/platform_specific_code/juce_mac_NativeHeaders.h View File

@@ -29,6 +29,9 @@
============================================================================== ==============================================================================
*/ */
#ifndef __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__
#define __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__
#include "../../../src/juce_core/basics/juce_StandardHeader.h" #include "../../../src/juce_core/basics/juce_StandardHeader.h"
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
@@ -47,4 +50,7 @@ private:
NSAutoreleasePool* pool; NSAutoreleasePool* pool;
}; };
END_JUCE_NAMESPACE END_JUCE_NAMESPACE
#endif

+ 1
- 1
build/macosx/platform_specific_code/juce_mac_Windowing.mm View File

@@ -2497,7 +2497,7 @@ static NSImage* juceImageToNSImage (const Image& image)
hasAlpha: image.hasAlphaChannel() hasAlpha: image.hasAlphaChannel()
isPlanar: NO isPlanar: NO
colorSpaceName: NSCalibratedRGBColorSpace colorSpaceName: NSCalibratedRGBColorSpace
bitmapFormat: 0
bitmapFormat: (NSBitmapFormat) 0
bytesPerRow: lineStride bytesPerRow: lineStride
bitsPerPixel: pixelStride * 8]; bitsPerPixel: pixelStride * 8];




+ 35
- 72
juce_amalgamated.cpp View File

@@ -29895,8 +29895,14 @@ static VstIntPtr handleGeneralCallback (VstInt32 opcode, VstInt32 index, VstInt3
return 0x0101; return 0x0101;
case audioMasterGetVendorString: case audioMasterGetVendorString:
case audioMasterGetProductString: case audioMasterGetProductString:
JUCEApplication::getInstance()
->getApplicationName().copyToBuffer ((char*) ptr, jmin (kVstMaxVendorStrLen, kVstMaxProductStrLen) - 1);
{
String hostName ("Juce VST Host");

if (JUCEApplication::getInstance() != 0)
hostName = JUCEApplication::getInstance()->getApplicationName();

hostName.copyToBuffer ((char*) ptr, jmin (kVstMaxVendorStrLen, kVstMaxProductStrLen) - 1);
}
break; break;


case audioMasterGetSampleRate: case audioMasterGetSampleRate:
@@ -65080,8 +65086,7 @@ public:
outputChanLabel->attachToComponent (outputChanList, true); outputChanLabel->attachToComponent (outputChanList, true);
} }


outputChanList->updateContent();
outputChanList->repaint();
outputChanList->refresh();
} }
else else
{ {
@@ -65101,8 +65106,7 @@ public:
inputChanLabel->attachToComponent (inputChanList, true); inputChanLabel->attachToComponent (inputChanList, true);
} }


inputChanList->updateContent();
inputChanList->repaint();
inputChanList->refresh();
} }
else else
{ {
@@ -65611,19 +65615,10 @@ void AudioDeviceSelectorComponent::resized()
y += audioDeviceSettingsComp->getHeight() + space; y += audioDeviceSettingsComp->getHeight() + space;
} }


VoidArray boxes;

if (midiInputsList != 0) if (midiInputsList != 0)
boxes.add (midiInputsList);

const int boxSpace = getHeight() - y;

for (int i = 0; i < boxes.size(); ++i)
{ {
MidiInputSelectorComponentListBox* const box = (MidiInputSelectorComponentListBox*) boxes.getUnchecked (i);

const int bh = box->getBestHeight (jmin (h * 8, boxSpace / boxes.size()) - space);
box->setBounds (lx, y, w, bh);
const int bh = midiInputsList->getBestHeight (jmin (h * 8, getHeight() - y - space));
midiInputsList->setBounds (lx, y, w, bh);
y += bh + space; y += bh + space;
} }


@@ -240391,7 +240386,7 @@ public:
} }


ShowCaret (hwnd); ShowCaret (hwnd);
SetCaretPos (x, y);
SetCaretPos (-1, -1);
} }


void repaint (int x, int y, int w, int h) void repaint (int x, int y, int w, int h)
@@ -243251,6 +243246,7 @@ class ActiveXControlData : public ComponentMovementWatcher
bool wasShowing; bool wasShowing;


public: public:
HWND controlHWND;
IStorage* storage; IStorage* storage;
IOleClientSite* clientSite; IOleClientSite* clientSite;
IOleObject* control; IOleObject* control;
@@ -243260,6 +243256,7 @@ public:
: ComponentMovementWatcher (owner_), : ComponentMovementWatcher (owner_),
owner (owner_), owner (owner_),
wasShowing (owner_ != 0 && owner_->isShowing()), wasShowing (owner_ != 0 && owner_->isShowing()),
controlHWND (0),
storage (new JuceIStorage()), storage (new JuceIStorage()),
clientSite (new JuceIOleClientSite (hwnd)), clientSite (new JuceIOleClientSite (hwnd)),
control (0) control (0)
@@ -243307,6 +243304,11 @@ public:
{ {
componentPeerChanged(); componentPeerChanged();
} }

static bool doesWindowMatch (const ActiveXControlComponent* const ax, HWND hwnd)
{
return ((ActiveXControlData*) ax->control)->controlHWND == hwnd;
}
}; };


static VoidArray activeXComps; static VoidArray activeXComps;
@@ -243373,9 +243375,7 @@ static LRESULT CALLBACK activeXHookWndProc (HWND hwnd, UINT message, WPARAM wPar
{ {
const ActiveXControlComponent* const ax = (const ActiveXControlComponent*) activeXComps.getUnchecked(i); const ActiveXControlComponent* const ax = (const ActiveXControlComponent*) activeXComps.getUnchecked(i);


HWND controlHWND = getHWND (ax);

if (controlHWND == hwnd)
if (ActiveXControlData::doesWindowMatch (ax, hwnd))
{ {
switch (message) switch (message)
{ {
@@ -243471,12 +243471,12 @@ bool ActiveXControlComponent::createControl (const void* controlIID)
control = info; control = info;
setControlBounds (Rectangle (x, y, getWidth(), getHeight())); setControlBounds (Rectangle (x, y, getWidth(), getHeight()));


HWND controlHWND = getHWND (this);
info->controlHWND = getHWND (this);


if (controlHWND != 0)
if (info->controlHWND != 0)
{ {
originalWndProc = (void*) GetWindowLongPtr (controlHWND, GWLP_WNDPROC);
SetWindowLongPtr (controlHWND, GWLP_WNDPROC, (LONG_PTR) activeXHookWndProc);
originalWndProc = (void*) GetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC);
SetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC, (LONG_PTR) activeXHookWndProc);
} }


return true; return true;
@@ -243517,7 +243517,7 @@ void* ActiveXControlComponent::queryInterface (const void* iid) const


void ActiveXControlComponent::setControlBounds (const Rectangle& newBounds) const void ActiveXControlComponent::setControlBounds (const Rectangle& newBounds) const
{ {
HWND hwnd = getHWND (this);
HWND hwnd = ((ActiveXControlData*) control)->controlHWND;


if (hwnd != 0) if (hwnd != 0)
MoveWindow (hwnd, newBounds.getX(), newBounds.getY(), newBounds.getWidth(), newBounds.getHeight(), TRUE); MoveWindow (hwnd, newBounds.getX(), newBounds.getY(), newBounds.getWidth(), newBounds.getHeight(), TRUE);
@@ -243525,7 +243525,7 @@ void ActiveXControlComponent::setControlBounds (const Rectangle& newBounds) cons


void ActiveXControlComponent::setControlVisible (const bool shouldBeVisible) const void ActiveXControlComponent::setControlVisible (const bool shouldBeVisible) const
{ {
HWND hwnd = getHWND (this);
HWND hwnd = ((ActiveXControlData*) control)->controlHWND;


if (hwnd != 0) if (hwnd != 0)
ShowWindow (hwnd, shouldBeVisible ? SW_SHOWNA : SW_HIDE); ShowWindow (hwnd, shouldBeVisible ? SW_SHOWNA : SW_HIDE);
@@ -253111,7 +253111,8 @@ END_JUCE_NAMESPACE
/********* Start of inlined file: juce_mac_Network.mm *********/ /********* Start of inlined file: juce_mac_Network.mm *********/


/********* Start of inlined file: juce_mac_NativeHeaders.h *********/ /********* Start of inlined file: juce_mac_NativeHeaders.h *********/
#include "../../../src/juce_core/basics/juce_StandardHeader. h"
#ifndef __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__
#define __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__


#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>


@@ -253128,6 +253129,8 @@ private:
}; };


END_JUCE_NAMESPACE END_JUCE_NAMESPACE

#endif
/********* End of inlined file: juce_mac_NativeHeaders.h *********/ /********* End of inlined file: juce_mac_NativeHeaders.h *********/


#include <IOKit/IOKitLib.h> #include <IOKit/IOKitLib.h>
@@ -253641,26 +253644,6 @@ END_JUCE_NAMESPACE


/********* Start of inlined file: juce_mac_AudioCDBurner.mm *********/ /********* Start of inlined file: juce_mac_AudioCDBurner.mm *********/


/********* Start of inlined file: juce_mac_NativeHeaders.h *********/
#include "../../../src/juce_core/basics/juce_StandardHeader. h"

#include <Cocoa/Cocoa.h>

BEGIN_JUCE_NAMESPACE

class AutoPool
{
public:
AutoPool() { pool = [[NSAutoreleasePool alloc] init]; }
~AutoPool() { [pool release]; }

private:
NSAutoreleasePool* pool;
};

END_JUCE_NAMESPACE
/********* End of inlined file: juce_mac_NativeHeaders.h *********/

#if JUCE_USE_CDBURNER #if JUCE_USE_CDBURNER


#import <DiscRecording/DiscRecording.h> #import <DiscRecording/DiscRecording.h>
@@ -255852,26 +255835,6 @@ END_JUCE_NAMESPACE


/********* Start of inlined file: juce_mac_FileChooser.mm *********/ /********* Start of inlined file: juce_mac_FileChooser.mm *********/


/********* Start of inlined file: juce_mac_NativeHeaders.h *********/
#include "../../../src/juce_core/basics/juce_StandardHeader. h"

#include <Cocoa/Cocoa.h>

BEGIN_JUCE_NAMESPACE

class AutoPool
{
public:
AutoPool() { pool = [[NSAutoreleasePool alloc] init]; }
~AutoPool() { [pool release]; }

private:
NSAutoreleasePool* pool;
};

END_JUCE_NAMESPACE
/********* End of inlined file: juce_mac_NativeHeaders.h *********/

#include <fnmatch.h> #include <fnmatch.h>


BEGIN_JUCE_NAMESPACE BEGIN_JUCE_NAMESPACE
@@ -255966,9 +255929,9 @@ void FileChooser::showPlatformDialog (OwnedArray<File>& results,


[panel setDelegate: delegate]; [panel setDelegate: delegate];


NSInteger result = [panel runModalForDirectory: juceStringToNS (currentFileOrDirectory.getParentDirectory().getFullPathName())
file: juceStringToNS (currentFileOrDirectory.getFileName())];
if (result == NSOKButton)
if ([panel runModalForDirectory: juceStringToNS (currentFileOrDirectory.getParentDirectory().getFullPathName())
file: juceStringToNS (currentFileOrDirectory.getFileName())]
== NSOKButton)
{ {
if (isSaveDialogue) if (isSaveDialogue)
{ {
@@ -259613,7 +259576,7 @@ static NSImage* juceImageToNSImage (const Image& image)
hasAlpha: image.hasAlphaChannel() hasAlpha: image.hasAlphaChannel()
isPlanar: NO isPlanar: NO
colorSpaceName: NSCalibratedRGBColorSpace colorSpaceName: NSCalibratedRGBColorSpace
bitmapFormat: 0
bitmapFormat: (NSBitmapFormat) 0
bytesPerRow: lineStride bytesPerRow: lineStride
bitsPerPixel: pixelStride * 8]; bitsPerPixel: pixelStride * 8];




+ 8
- 2
src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp View File

@@ -2309,8 +2309,14 @@ static VstIntPtr handleGeneralCallback (VstInt32 opcode, VstInt32 index, VstInt3
return 0x0101; return 0x0101;
case audioMasterGetVendorString: case audioMasterGetVendorString:
case audioMasterGetProductString: case audioMasterGetProductString:
JUCEApplication::getInstance()
->getApplicationName().copyToBuffer ((char*) ptr, jmin (kVstMaxVendorStrLen, kVstMaxProductStrLen) - 1);
{
String hostName ("Juce VST Host");
if (JUCEApplication::getInstance() != 0)
hostName = JUCEApplication::getInstance()->getApplicationName();
hostName.copyToBuffer ((char*) ptr, jmin (kVstMaxVendorStrLen, kVstMaxProductStrLen) - 1);
}
break; break;
case audioMasterGetSampleRate: case audioMasterGetSampleRate:


Loading…
Cancel
Save