OSDN Git Service

Bump version.
[lamexp/LameXP.git] / src / Global.h
index c5eae79..93c5445 100644 (file)
@@ -1,12 +1,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2020 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
+// it under the terms of the GNU GENERAL PUBLIC LICENSE as published by
 // the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version, but always including the *additional*
-// restrictions defined in the "License.txt" file.
+// (at your option) any later version; always including the non-optional
+// LAMEXP GNU GENERAL PUBLIC LICENSE ADDENDUM. See "License.txt" file!
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #pragma once
 
+#ifdef _MSC_VER
 #define _CRT_RAND_S
+#endif
+
 #include <cstdlib>
+#include <QtGlobal>
+#include <QString>
 
 //Forward declarations
-class QString;
-class QStringList;
 class QDate;
-class QTime;
+class QStringList;
 class QIcon;
-class QWidget;
-class QProcess;
-class QColor;
 class LockedFile;
-enum QtMsgType;
-
-//Variables
-extern const char* LAMEXP_DEFAULT_LANGID;
-extern const char* LAMEXP_DEFAULT_TRANSLATION;
 
 ///////////////////////////////////////////////////////////////////////////////
 // GLOBAL FUNCTIONS
 ///////////////////////////////////////////////////////////////////////////////
 
-const QIcon &lamexp_app_icon(void);
-QStringList lamexp_available_codepages(bool noAliases = true);
-bool lamexp_check_tool(const QString &toolName);
-void lamexp_finalization(void);
-int lamexp_init_ipc(void);
-bool lamexp_install_translator(const QString &language);
-bool lamexp_install_translator_from_file(const QString &qmFile);
-void lamexp_ipc_read(unsigned int *command, char* message, size_t buffSize);
-void lamexp_ipc_send(unsigned int command, const char* message);
-const QString lamexp_lookup_tool(const QString &toolName);
+/*
+ * Tools Support
+ */
+void           lamexp_tools_register(const QString &toolName, LockedFile *const file, const quint32 &version, const QString &tag = QString());
+bool           lamexp_tools_check   (const QString &toolName);
+const QString  lamexp_tools_lookup  (const QString &toolName);
+const quint32& lamexp_tools_version (const QString &toolName, QString *const tagOut = NULL);
+
+/*
+ * Version getters
+ */
+unsigned int lamexp_version_major    (void);
+unsigned int lamexp_version_minor    (void);
+unsigned int lamexp_version_build    (void);
+unsigned int lamexp_version_confg    (void);
+const char*  lamexp_version_release  (void);
+bool         lamexp_version_portable (void);
+bool         lamexp_version_demo     (void);
+const QDate& lamexp_version_expires  (void);
+unsigned int lamexp_toolver_neroaac  (void);
+unsigned int lamexp_toolver_fhgaacenc(void);
+unsigned int lamexp_toolver_fdkaacenc(void);
+unsigned int lamexp_toolver_qaacenc  (void);
+
+/*
+ * URL getters
+ */
+const char *lamexp_website_url(void);
 const char *lamexp_mulders_url(void);
-bool lamexp_portable_mode(void);
-QStringList lamexp_query_translations(void);
-void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned int version = 0, const QString *tag = NULL);
 const char *lamexp_support_url(void);
-unsigned int lamexp_tool_version(const QString &toolName, QString *tag = NULL);
-unsigned int lamexp_toolver_coreaudio(void);
-unsigned int lamexp_toolver_fhgaacenc(void);
-unsigned int lamexp_toolver_neroaac(void);
-unsigned int lamexp_toolver_qaacenc(void);
 const char *lamexp_tracker_url(void);
-unsigned int lamexp_translation_country(const QString &langId);
-bool lamexp_translation_init(void);
-QString lamexp_translation_name(const QString &language);
-bool lamexp_translation_register(const QString &langId, const QString &qmFile, const QString &langName, unsigned int &systemId, unsigned int &country);
-unsigned int lamexp_translation_sysid(const QString &langId);
-const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText, const QString *tag = NULL);
-unsigned int lamexp_version_build(void);
-unsigned int lamexp_version_confg(void);
-bool lamexp_version_demo(void);
-QDate lamexp_version_expires(void);
-unsigned int lamexp_version_major(void);
-unsigned int lamexp_version_minor(void);
-const char *lamexp_version_release(void);
-const char *lamexp_website_url(void);
+
+/*
+* Resources
+*/
+void lamexp_initialize_resources(void);
+
+/*
+ * Misc Functions
+ */
+const QIcon&  lamexp_app_icon(void);
+const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText, const QString &tag = QString());
 
 ///////////////////////////////////////////////////////////////////////////////
 // HELPER MACROS
 ///////////////////////////////////////////////////////////////////////////////
 
-#define NOBR(STR) (QString("<nobr>%1</nobr>").arg((STR)).replace("-", "&minus;"))
+#define L1S(STR) (QLatin1String((STR)))
+#define NOBREAK(STR) (QString("<div style='white-space:pre'>%1</div>").arg((STR)))