Add remaining files
[juce-lv2.git] / juce / source / src / threads / juce_Process.h
blob3aeedea7cb0039731a3859e7daefe1a33f0cb2c3
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCE_PROCESS_JUCEHEADER__
27 #define __JUCE_PROCESS_JUCEHEADER__
29 #include "../text/juce_String.h"
32 //==============================================================================
33 /** Represents the current executable's process.
35 This contains methods for controlling the current application at the
36 process-level.
38 @see Thread, JUCEApplication
40 class JUCE_API Process
42 public:
43 //==============================================================================
44 enum ProcessPriority
46 LowPriority = 0,
47 NormalPriority = 1,
48 HighPriority = 2,
49 RealtimePriority = 3
52 /** Changes the current process's priority.
54 @param priority the process priority, where
55 0=low, 1=normal, 2=high, 3=realtime
57 static void setPriority (const ProcessPriority priority);
59 /** Kills the current process immediately.
61 This is an emergency process terminator that kills the application
62 immediately - it's intended only for use only when something goes
63 horribly wrong.
65 @see JUCEApplication::quit
67 static void terminate();
69 //==============================================================================
70 /** Returns true if this application process is the one that the user is
71 currently using.
73 static bool isForegroundProcess();
75 //==============================================================================
76 /** Raises the current process's privilege level.
78 Does nothing if this isn't supported by the current OS, or if process
79 privilege level is fixed.
81 static void raisePrivilege();
83 /** Lowers the current process's privilege level.
85 Does nothing if this isn't supported by the current OS, or if process
86 privilege level is fixed.
88 static void lowerPrivilege();
90 //==============================================================================
91 /** Returns true if this process is being hosted by a debugger.
93 static bool JUCE_CALLTYPE isRunningUnderDebugger();
96 private:
97 Process();
99 JUCE_DECLARE_NON_COPYABLE (Process);
103 #endif // __JUCE_PROCESS_JUCEHEADER__