-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
external: reuploaded mxtk library directly
- Loading branch information
1 parent
8cccb10
commit 88c9f63
Showing
118 changed files
with
11,508 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
cmake_minimum_required(VERSION 2.8.12) | ||
|
||
project(mxtk) | ||
|
||
if(NOT WIN32) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
endif() | ||
|
||
file(GLOB SOURCES_COMMON "src/common/*.cpp") | ||
if(MSVC) | ||
file(GLOB SOURCES_PLATFORM "src/win32/*.cpp") | ||
else() | ||
file(GLOB SOURCES_PLATFORM "src/qt/*.cpp") | ||
endif() | ||
|
||
list(APPEND SOURCES_COMMON ${SOURCES_PLATFORM}) | ||
add_library(${PROJECT_NAME} STATIC ${SOURCES_COMMON}) | ||
|
||
target_include_directories(${PROJECT_NAME} PRIVATE | ||
"include" | ||
"src/qt" | ||
) | ||
|
||
if(NOT MSVC) | ||
target_compile_options(${PROJECT_NAME} PRIVATE -fno-exceptions) # GCC/Clang flag | ||
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-write-strings) # GCC/Clang flag | ||
target_compile_options(${PROJECT_NAME} PRIVATE -fvisibility=hidden) # GCC/Clang flag | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE _LINUX=1 LINUX=1) # It seems enough for all non-Win32 systems | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE stricmp=strcasecmp strnicmp=strncasecmp) | ||
if(NOT MINGW) | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE _snprintf=snprintf _vsnprintf=vsnprintf) | ||
endif() | ||
else() | ||
# disable annoying CRT warnings | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS=1 _CRT_NONSTDC_NO_DEPRECATE=1) | ||
endif() | ||
|
||
if(MSVC) | ||
# debug mode compiler flags | ||
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:/Od>) # disable optimizing at all | ||
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:/ZI>) # enable "Edit and Continue" MSVC feature | ||
target_link_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>: | ||
/INCREMENTAL | ||
/SAFESEH:NO | ||
>) | ||
|
||
# release mode compiler flags | ||
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Release>:/Ob1>) # disable force function inlining, to prevent segfault in release mode | ||
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Release>:/O1>) # enable optimizing to minimize size | ||
endif() | ||
|
||
if(WIN32) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE | ||
"shlwapi" | ||
"comctl32" | ||
"comdlg32" | ||
"glu32" | ||
"gdi32" | ||
"opengl32" | ||
"winmm" | ||
) | ||
else() | ||
find_package(Qt5 COMPONENTS OpenGL REQUIRED) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE | ||
Qt5::OpenGL | ||
"GL" | ||
) | ||
endif() | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
POSITION_INDEPENDENT_CODE 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// mxToolKit (c) 1999 by Mete Ciragan | ||
// | ||
// file: gl.h | ||
// implementation: all | ||
// last modified: Mar 14 1999, Mete Ciragan | ||
// copyright: The programs and associated files contained in this | ||
// distribution were developed by Mete Ciragan. The programs | ||
// are not in the public domain, but they are freely | ||
// distributable without licensing fees. These programs are | ||
// provided without guarantee or warrantee expressed or | ||
// implied. | ||
// | ||
#ifndef INCLUDED_MTKGL | ||
#define INCLUDED_MTKGL | ||
|
||
|
||
|
||
#ifdef WIN32 | ||
#include "windows.h" | ||
#endif | ||
|
||
|
||
|
||
#include "GL/gl.h" | ||
|
||
|
||
|
||
#endif // INCLUDED_MTKGL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
// | ||
// mxToolKit (c) 1999 by Mete Ciragan | ||
// | ||
// file: mx.h | ||
// implementation: all | ||
// last modified: Jun 13 1999, Mete Ciragan | ||
// copyright: The programs and associated files contained in this | ||
// distribution were developed by Mete Ciragan. The programs | ||
// are not in the public domain, but they are freely | ||
// distributable without licensing fees. These programs are | ||
// provided without guarantee or warrantee expressed or | ||
// implied. | ||
// | ||
#ifndef INCLUDED_MX | ||
#define INCLUDED_MX | ||
|
||
|
||
|
||
#ifdef WIN32 | ||
#include <windows.h> | ||
#endif | ||
|
||
|
||
|
||
#ifndef INCLUDED_MXBUTTON | ||
#include <mx/mxAccelerator.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXBUTTON | ||
#include <mx/mxButton.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXCHECKBOX | ||
#include <mx/mxCheckBox.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXCHOICE | ||
#include <mx/mxChoice.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXCHOOSECOLOR | ||
#include <mx/mxChooseColor.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXEVENT | ||
#include <mx/mxEvent.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXFILEDIALOG | ||
#include <mx/mxFileDialog.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXGLWINDOW | ||
#include <mx/mxGlWindow.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXGROUPBOX | ||
#include <mx/mxGroupBox.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXINIT | ||
#include <mx/mxInit.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXLABEL | ||
#include <mx/mxLabel.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXLINEEDIT | ||
#include <mx/mxLineEdit.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXLINKEDLIST | ||
#include <mx/mxLinkedList.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXLISTBOX | ||
#include <mx/mxListBox.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXMENU | ||
#include <mx/mxMenu.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXMENUBAR | ||
#include <mx/mxMenuBar.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXMESSAGEBOX | ||
#include <mx/mxMessageBox.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXMULTILINEEDIT | ||
#include <mx/mxMultiLineEdit.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXPOPUPMENU | ||
#include <mx/mxPopupMenu.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXPROGRESSBAR | ||
#include <mx/mxProgressBar.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXRADIOBUTTON | ||
#include <mx/mxRadioButton.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXSLIDER | ||
#include <mx/mxSlider.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXTAB | ||
#include <mx/mxTab.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXTOGGLEBUTTON | ||
#include <mx/mxToggleButton.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXTOOLTIP | ||
#include <mx/mxToolTip.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXTREEVIEW | ||
#include <mx/mxTreeView.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXWIDGET | ||
#include <mx/mxWidget.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXWINDOW | ||
#include <mx/mxWindow.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXPATH | ||
#include <mx/mxPath.h> | ||
#endif | ||
|
||
#ifndef INCLUDED_MXSTRING | ||
#include <mx/mxString.h> | ||
#endif | ||
|
||
|
||
|
||
#endif // INCLUDED_MX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// mxToolKit (c) 1999 by Mete Ciragan | ||
// | ||
// file: mxAccelerator.h | ||
// implementation: all | ||
// last modified: Jun 13 1999, Mete Ciragan | ||
// copyright: The programs and associated files contained in this | ||
// distribution were developed by Mete Ciragan. The programs | ||
// are not in the public domain, but they are freely | ||
// distributable without licensing fees. These programs are | ||
// provided without guarantee or warrantee expressed or | ||
// implied. | ||
// | ||
#ifndef INCLUDED_MXACCELERATOR | ||
#define INCLUDED_MXACCELERATOR | ||
|
||
|
||
|
||
class mxAccelerator | ||
{ | ||
public: | ||
// NO CREATORS | ||
mxAccelerator() {} | ||
virtual ~mxAccelerator () {} | ||
|
||
// MANIPULATORS | ||
static void add (int key, int flags, int cmd); | ||
static void loadTable (); | ||
static void removeAll (); | ||
|
||
private: | ||
// NOT IMPLEMENTED | ||
mxAccelerator (const mxAccelerator&); | ||
mxAccelerator& operator= (const mxAccelerator&); | ||
}; | ||
|
||
|
||
|
||
#endif // INCLUDED_MXACCELERATOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// | ||
// mxToolKit (c) 1999 by Mete Ciragan | ||
// | ||
// file: mxBmp.h | ||
// implementation: all | ||
// last modified: Apr 15 1999, Mete Ciragan | ||
// copyright: The programs and associated files contained in this | ||
// distribution were developed by Mete Ciragan. The programs | ||
// are not in the public domain, but they are freely | ||
// distributable without licensing fees. These programs are | ||
// provided without guarantee or warrantee expressed or | ||
// implied. | ||
// | ||
#ifndef INCLUDED_MXBMP | ||
#define INCLUDED_MXBMP | ||
|
||
|
||
|
||
#ifndef INCLUDED_MXIMAGE | ||
#include <mx/mxImage.h> | ||
#endif | ||
|
||
|
||
#pragma pack( push, 1 ) | ||
typedef struct | ||
{ | ||
word bfType; | ||
int bfSize; | ||
word bfReserved1; | ||
word bfReserved2; | ||
int bfOffBits; | ||
} mxBitmapFileHeader; | ||
|
||
typedef struct tagMxBitmapFileHeader | ||
{ | ||
int biSize; | ||
int biWidth; | ||
int biHeight; | ||
word biPlanes; | ||
word biBitCount; | ||
int biCompression; | ||
int biSizeImage; | ||
int biXPelsPerMeter; | ||
int biYPelsPerMeter; | ||
int biClrUsed; | ||
int biClrImportant; | ||
} mxBitmapInfoHeader; | ||
|
||
typedef struct | ||
{ | ||
byte rgbBlue; | ||
byte rgbGreen; | ||
byte rgbRed; | ||
byte rgbReserved; | ||
} mxBitmapRGBQuad; | ||
#pragma pack( pop ) | ||
|
||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
mxImage *mxBmpRead (const char *filename); | ||
bool mxBmpWrite (const char *filename, mxImage *image); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
|
||
#endif // INCLUDED_MXBMP |
Oops, something went wrong.