OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

macos.h
Go to the documentation of this file.
1 /* $Id: macos.h 25663 2013-08-05 20:36:06Z michi_cc $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef MACOS_H
13 #define MACOS_H
14
16 void ShowMacDialog(const char *title, const char *message, const char *button_label);
17
18 void GetMacOSVersion(int *return_major, int *return_minor, int *return_bugfix);
19
27 static inline bool MacOSVersionIsAtLeast(long major, long minor, long bugfix)
28 {
29 int version_major, version_minor, version_bugfix;
30 GetMacOSVersion(&version_major, &version_minor, &version_bugfix);
31
32 if (version_major < major) return false;
33 if (version_major == major && version_minor < minor) return false;
34 if (version_major == major && version_minor == minor && version_bugfix < bugfix) return false;
35
36 return true;
37 }
38
39 bool IsMonospaceFont(CFStringRef name);
40
41 #endif /* MACOS_H */