A collection of miscellaneous platform-specific utilities. More...
Static Public Member Functions | |
| static void | beep () |
| Plays the operating system's default alert 'beep' sound. | |
| static bool | openDocument (const String &documentURL, const String ¶meters) |
| Tries to launch the system's default reader for a given file or URL. | |
| static bool | launchEmailWithAttachments (const String &targetEmailAddress, const String &emailSubject, const String &bodyText, const StringArray &filesToAttach) |
| Tries to launch the system's default email app to let the user create an email. | |
| static const String | cfStringToJuceString (CFStringRef cfString) |
| MAC ONLY - Turns a Core CF String into a juce one. | |
| static CFStringRef | juceStringToCFString (const String &s) |
| MAC ONLY - Turns a juce string into a Core CF one. | |
| static bool | makeFSRefFromPath (FSRef *destFSRef, const String &path) |
| MAC ONLY - Turns a file path into an FSRef, returning true if it succeeds. | |
| static const String | makePathFromFSRef (FSRef *file) |
| MAC ONLY - Turns an FSRef into a juce string path. | |
| static const String | convertToPrecomposedUnicode (const String &s) |
| MAC ONLY - Converts any decomposed unicode characters in a string into their precomposed equivalents. | |
| static OSType | getTypeOfFile (const String &filename) |
| MAC ONLY - Gets the type of a file from the file's resources. | |
| static bool | isBundle (const String &filename) |
| MAC ONLY - Returns true if this file is actually a bundle. | |
| static void | addItemToDock (const File &file) |
| MAC ONLY - Adds an item to the dock. | |
| static int | getOSXMinorVersionNumber () |
| MAC ONLY - Returns the current OS version number. | |
| static const String | getRegistryValue (const String ®ValuePath, const String &defaultValue=String::empty) |
| WIN32 ONLY - Returns a string from the registry. | |
| static void | setRegistryValue (const String ®ValuePath, const String &value) |
| WIN32 ONLY - Sets a registry value as a string. | |
| static bool | registryValueExists (const String ®ValuePath) |
| WIN32 ONLY - Returns true if the given value exists in the registry. | |
| static void | deleteRegistryValue (const String ®ValuePath) |
| WIN32 ONLY - Deletes a registry value. | |
| static void | deleteRegistryKey (const String ®KeyPath) |
| WIN32 ONLY - Deletes a registry key (which is registry-talk for 'folder'). | |
| static void | registerFileAssociation (const String &fileExtension, const String &symbolicDescription, const String &fullDescription, const File &targetExecutable, int iconResourceNumber) |
| WIN32 ONLY - Creates a file association in the registry. | |
| static void *JUCE_CALLTYPE | getCurrentModuleInstanceHandle () throw () |
| WIN32 ONLY - This returns the HINSTANCE of the current module. | |
| static void JUCE_CALLTYPE | setCurrentModuleInstanceHandle (void *newHandle) throw () |
| WIN32 ONLY - Sets a new module handle to be used by the library. | |
| static const String JUCE_CALLTYPE | getCurrentCommandLineParams () throw () |
| WIN32 ONLY - Gets the command-line params as a string. | |
| static void | fpuReset () |
| Clears the floating point unit's flags. | |
| static void * | loadDynamicLibrary (const String &pathOrFilename) |
| Loads a dynamically-linked library into the process's address space. | |
| static void | freeDynamicLibrary (void *libraryHandle) |
| Frees a dynamically-linked library. | |
| static void * | getProcedureEntryPoint (void *libraryHandle, const String &procedureName) |
| Finds a procedure call in a dynamically-linked library. | |
A collection of miscellaneous platform-specific utilities.
| static void PlatformUtilities::beep | ( | ) | [static] |
Plays the operating system's default alert 'beep' sound.
| static bool PlatformUtilities::openDocument | ( | const String & | documentURL, | |
| const String & | parameters | |||
| ) | [static] |
Tries to launch the system's default reader for a given file or URL.
| static bool PlatformUtilities::launchEmailWithAttachments | ( | const String & | targetEmailAddress, | |
| const String & | emailSubject, | |||
| const String & | bodyText, | |||
| const StringArray & | filesToAttach | |||
| ) | [static] |
Tries to launch the system's default email app to let the user create an email.
| static const String PlatformUtilities::cfStringToJuceString | ( | CFStringRef | cfString | ) | [static] |
MAC ONLY - Turns a Core CF String into a juce one.
| static CFStringRef PlatformUtilities::juceStringToCFString | ( | const String & | s | ) | [static] |
MAC ONLY - Turns a juce string into a Core CF one.
| static bool PlatformUtilities::makeFSRefFromPath | ( | FSRef * | destFSRef, | |
| const String & | path | |||
| ) | [static] |
MAC ONLY - Turns a file path into an FSRef, returning true if it succeeds.
| static const String PlatformUtilities::makePathFromFSRef | ( | FSRef * | file | ) | [static] |
MAC ONLY - Turns an FSRef into a juce string path.
MAC ONLY - Converts any decomposed unicode characters in a string into their precomposed equivalents.
| static OSType PlatformUtilities::getTypeOfFile | ( | const String & | filename | ) | [static] |
MAC ONLY - Gets the type of a file from the file's resources.
| static bool PlatformUtilities::isBundle | ( | const String & | filename | ) | [static] |
MAC ONLY - Returns true if this file is actually a bundle.
| static void PlatformUtilities::addItemToDock | ( | const File & | file | ) | [static] |
MAC ONLY - Adds an item to the dock.
| static int PlatformUtilities::getOSXMinorVersionNumber | ( | ) | [static] |
MAC ONLY - Returns the current OS version number.
E.g. if it's running on 10.4, this will be 4, 10.5 will return 5, etc.
| static const String PlatformUtilities::getRegistryValue | ( | const String & | regValuePath, | |
| const String & | defaultValue = String::empty | |||
| ) | [static] |
WIN32 ONLY - Returns a string from the registry.
The path is a string for the entire path of a value in the registry, e.g. "HKEY_CURRENT_USER\Software\foo\bar"
| static void PlatformUtilities::setRegistryValue | ( | const String & | regValuePath, | |
| const String & | value | |||
| ) | [static] |
WIN32 ONLY - Sets a registry value as a string.
This will take care of creating any groups needed to get to the given registry value.
| static bool PlatformUtilities::registryValueExists | ( | const String & | regValuePath | ) | [static] |
WIN32 ONLY - Returns true if the given value exists in the registry.
| static void PlatformUtilities::deleteRegistryValue | ( | const String & | regValuePath | ) | [static] |
WIN32 ONLY - Deletes a registry value.
| static void PlatformUtilities::deleteRegistryKey | ( | const String & | regKeyPath | ) | [static] |
WIN32 ONLY - Deletes a registry key (which is registry-talk for 'folder').
| static void PlatformUtilities::registerFileAssociation | ( | const String & | fileExtension, | |
| const String & | symbolicDescription, | |||
| const String & | fullDescription, | |||
| const File & | targetExecutable, | |||
| int | iconResourceNumber | |||
| ) | [static] |
WIN32 ONLY - Creates a file association in the registry.
This lets you set the exe that should be launched by a given file extension.
| fileExtension | the file extension to associate, including the initial dot, e.g. ".txt" | |
| symbolicDescription | a space-free short token to identify the file type | |
| fullDescription | a human-readable description of the file type | |
| targetExecutable | the executable that should be launched | |
| iconResourceNumber | the icon that gets displayed for the file type will be found by looking up this resource number in the executable. Pass 0 here to not use an icon |
| static void* JUCE_CALLTYPE PlatformUtilities::getCurrentModuleInstanceHandle | ( | ) | throw () [static] |
WIN32 ONLY - This returns the HINSTANCE of the current module.
In a normal Juce application this will be set to the module handle of the application executable.
If you're writing a DLL using Juce and plan to use any Juce messaging or windows, you'll need to make sure you use the setCurrentModuleInstanceHandle() to set the correct module handle in your DllMain() function, because the win32 system relies on the correct instance handle when opening windows.
| static void JUCE_CALLTYPE PlatformUtilities::setCurrentModuleInstanceHandle | ( | void * | newHandle | ) | throw () [static] |
WIN32 ONLY - Sets a new module handle to be used by the library.
| static const String JUCE_CALLTYPE PlatformUtilities::getCurrentCommandLineParams | ( | ) | throw () [static] |
WIN32 ONLY - Gets the command-line params as a string.
This is needed to avoid unicode problems with the argc type params.
| static void PlatformUtilities::fpuReset | ( | ) | [static] |
Clears the floating point unit's flags.
Only has an effect under win32, currently.
| static void* PlatformUtilities::loadDynamicLibrary | ( | const String & | pathOrFilename | ) | [static] |
Loads a dynamically-linked library into the process's address space.
| pathOrFilename | the platform-dependent name and search path |
| static void PlatformUtilities::freeDynamicLibrary | ( | void * | libraryHandle | ) | [static] |
Frees a dynamically-linked library.
| libraryHandle | a handle created by loadDynamicLibrary |
| static void* PlatformUtilities::getProcedureEntryPoint | ( | void * | libraryHandle, | |
| const String & | procedureName | |||
| ) | [static] |
Finds a procedure call in a dynamically-linked library.
| libraryHandle | a library handle returned by loadDynamicLibrary | |
| procedureName | the name of the procedure call to try to load |
1.6.3