MeVisLab Toolbox Reference
|
Finder / Launch services encapsulation. More...
#include <macLaunchServices.h>
Public Types | |
enum | LSRoles { LSRoleViewer = kLSRolesViewer , LSRoleEditor = kLSRolesEditor , LSRoleShell = kLSRolesShell , LSRoleAll = LSRoleViewer | LSRoleEditor | LSRoleShell } |
Specify the desired role or roles for an application to claim with respect to an item. More... | |
enum | LSLaunchFlags { LSLaunchNewInstance = 1 << 0 } |
Specify how to launch the application. More... | |
Static Public Member Functions | |
static std::string | getApplicationWithName (const std::string &appName) |
Return bundle location for bundle with given name, e.g. "iCal.app" (UTF8) More... | |
static std::string | getApplicationWithId (const std::string &id) |
Return bundle location for bundle with given id, e.g. "de.mevis.MeVisLab" (UTF8) More... | |
static bool | registerApplication (const std::string &app, bool forceUpdate=true) |
Add the bundle's document and URL claims to the Launch Services database (UTF8) More... | |
static bool | openDocument (const std::string &doc, LSRoles role=LSRoleAll, const std::string &app=std::string()) |
Open given document in given application (or the default application) using the given role (UTF8) More... | |
static bool | openDocument (const std::string &doc, const std::string &app) |
This is an overloaded member function, provided for convenience. More... | |
static bool | isApplicationOpen (const std::string &id) |
Return 'true' if application is already open (UTF8) More... | |
static bool | openApplication (const std::string &app, const std::list< std::string > &docs, const std::list< std::string > &argv, const std::map< std::string, std::string > &environment, LSLaunchFlags flags=static_cast< LSLaunchFlags >(0)) |
Launches the specified application (UTF8) More... | |
static bool | openApplication (const std::string &app, const std::list< std::string > &docs, const std::list< std::string > &argv, LSLaunchFlags flags=static_cast< LSLaunchFlags >(0)) |
This is an overloaded member function, provided for convenience. More... | |
static bool | openApplication (const std::string &app, const std::list< std::string > &docs, const std::map< std::string, std::string > &environment, LSLaunchFlags flags=static_cast< LSLaunchFlags >(0)) |
This is an overloaded member function, provided for convenience. More... | |
static bool | openApplication (const std::string &app, const std::map< std::string, std::string > &environment, LSLaunchFlags flags=static_cast< LSLaunchFlags >(0)) |
This is an overloaded member function, provided for convenience. More... | |
static bool | openApplication (const std::string &app, const std::list< std::string > &docs, LSLaunchFlags flags=static_cast< LSLaunchFlags >(0)) |
This is an overloaded member function, provided for convenience. More... | |
static bool | openApplication (const std::string &app, const std::string &doc, LSLaunchFlags flags=static_cast< LSLaunchFlags >(0)) |
This is an overloaded member function, provided for convenience. More... | |
static bool | openApplication (const std::string &app, LSLaunchFlags flags=static_cast< LSLaunchFlags >(0)) |
This is an overloaded member function, provided for convenience. More... | |
Finder / Launch services encapsulation.
Definition at line 29 of file macLaunchServices.h.
Specify how to launch the application.
Enumerator | |
---|---|
LSLaunchNewInstance |
Definition at line 42 of file macLaunchServices.h.
Specify the desired role or roles for an application to claim with respect to an item.
Enumerator | |
---|---|
LSRoleViewer | |
LSRoleEditor | |
LSRoleShell | |
LSRoleAll |
Definition at line 34 of file macLaunchServices.h.
|
static |
Return bundle location for bundle with given id, e.g. "de.mevis.MeVisLab" (UTF8)
|
static |
Return bundle location for bundle with given name, e.g. "iCal.app" (UTF8)
|
static |
Return 'true' if application is already open (UTF8)
|
static |
Launches the specified application (UTF8)
If the application is already running in the current session, it is made the front process (unless the LSLaunchNewInstance flag is used, which always causes a new process to be created)
|
inlinestatic |
This is an overloaded member function, provided for convenience.
Definition at line 74 of file macLaunchServices.h.
|
inlinestatic |
This is an overloaded member function, provided for convenience.
Definition at line 78 of file macLaunchServices.h.
|
inlinestatic |
This is an overloaded member function, provided for convenience.
Definition at line 86 of file macLaunchServices.h.
|
inlinestatic |
This is an overloaded member function, provided for convenience.
Definition at line 82 of file macLaunchServices.h.
|
static |
This is an overloaded member function, provided for convenience.
|
inlinestatic |
This is an overloaded member function, provided for convenience.
Definition at line 92 of file macLaunchServices.h.
|
inlinestatic |
This is an overloaded member function, provided for convenience.
Definition at line 61 of file macLaunchServices.h.
|
static |
Open given document in given application (or the default application) using the given role (UTF8)
The document may be referenced using an URL or an absolute file path. The function first tries to interpret 'doc' as an URL before referencing the document as posix file path. 'doc' may also reference a directory.
|
static |
Add the bundle's document and URL claims to the Launch Services database (UTF8)