1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

New method Process::makeForegroundProcess() (only implemented in OSX)

This commit is contained in:
jules 2012-07-31 21:06:12 +01:00
parent e0f1224a75
commit 67ee4a6201
6 changed files with 26 additions and 7 deletions

View file

@ -38,6 +38,13 @@ bool Process::isForegroundProcess()
#endif
}
void Process::makeForegroundProcess()
{
#if JUCE_MAC
[NSApp activateIgnoringOtherApps: YES];
#endif
}
void Process::raisePrivilege()
{
jassertfalse;

View file

@ -72,6 +72,11 @@ public:
*/
static bool isForegroundProcess();
/** Attempts to make the current process the active one.
(This is not possible on some platforms).
*/
static void makeForegroundProcess();
//==============================================================================
/** Raises the current process's privilege level.

View file

@ -112,9 +112,7 @@ public:
}
/** Selects an item.
If the item is already selected, no change notification will be sent out.
@see selectOnly, addToSelectionBasedOnModifiers
*/
void addToSelection (ParameterType item)
@ -248,7 +246,6 @@ public:
//==============================================================================
/** Returns the number of currently selected items.
@see getSelectedItem
*/
int getNumSelected() const noexcept
@ -257,9 +254,7 @@ public:
}
/** Returns one of the currently selected items.
Returns 0 if the index is out-of-range.
@see getNumSelected
*/
SelectableItemType getSelectedItem (const int index) const noexcept
@ -290,8 +285,7 @@ public:
*/
virtual void itemDeselected (SelectableItemType item) { (void) item; }
/** Used internally, but can be called to force a change message to be sent to the ChangeListeners.
*/
/** Used internally, but can be called to force a change message to be sent to the ChangeListeners. */
void changed (const bool synchronous = false)
{
if (synchronous)

View file

@ -625,6 +625,10 @@ bool Process::isForegroundProcess()
return true; // TODO
}
void Process::makeForegroundProcess()
{
}
//==============================================================================
void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType iconType,
const String& title, const String& message,

View file

@ -2556,6 +2556,10 @@ bool Process::isForegroundProcess()
return LinuxComponentPeer::isActiveApplication;
}
void Process::makeForegroundProcess()
{
}
//==============================================================================
void ModifierKeys::updateCurrentModifiers() noexcept
{

View file

@ -2800,6 +2800,11 @@ bool Process::isForegroundProcess()
return false;
}
void Process::makeForegroundProcess()
{
// is this possible in Windows?
}
//==============================================================================
class WindowsMessageBox : public AsyncUpdater
{