OSDN Git Service

Happy new year 2016!
[x264-launcher/x264-launcher.git] / src / global.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Simple x264 Launcher
3 // Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>
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 along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 //
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
21
22 #pragma once
23
24 #define _CRT_RAND_S
25 #include <cstdlib>
26 #include <stdexcept>
27
28 //Forward declarations
29 class QString;
30 class QStringList;
31 class QDate;
32 class QTime;
33 class QIcon;
34 class QWidget;
35 class LockedFile;
36 class QProcess;
37
38 ///////////////////////////////////////////////////////////////////////////////
39 // GLOBAL FUNCTIONS
40 ///////////////////////////////////////////////////////////////////////////////
41
42 //Utility functions
43 const QString &x264_data_path(void);
44 QString x264_path2ansi(const QString &longPath, bool makeLowercase = false);
45 QString x264_query_reg_string(const bool bUser, const QString &path, const QString &name);
46 bool x264_set_thread_execution_state(const bool systemRequired);
47
48 //Version getters
49 unsigned int x264_version_major(void);
50 unsigned int x264_version_minor(void);
51 unsigned int x264_version_build(void);
52 bool         x264_is_prerelease(void);
53 bool         x264_is_portable  (void);
54
55 ///////////////////////////////////////////////////////////////////////////////
56 // HELPER MACROS
57 ///////////////////////////////////////////////////////////////////////////////
58
59 //Check for CPU-compatibility options
60 #if !defined(_M_X64) && defined(_MSC_VER) && defined(_M_IX86_FP)
61         #if (_M_IX86_FP != 0)
62                 #error We should not enabled SSE or SSE2 in release builds!
63         #endif
64 #endif