1 /************************************************************************ 2 * 3 * Copyright 2013 Seth Nickell <snickell@gmail.com> 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 ************************************************************************/ 19 20 #pragma once 21 22 namespace SC { namespace Apple { 23 24 void disableAppNap(); 25 26 namespace EventLoop { 27 28 // Setup the main application. This function must be called in the 29 // main thread and before any other calls to Cocoa methods. 30 void setup(); 31 // Run the event loop. This function must be called in the main thread. 32 // It blocks until the event loop finishes. 33 void run(); 34 // Ask the event loop to stop and terminate the program. 35 // This function can be called from any thread. 36 void quit(); 37 38 } // EventLoop 39 40 } // namespace Apple 41 } // namespace SC 42