Initial commit

This commit is contained in:
Bassem Girgis
2018-12-20 17:34:07 -06:00
parent 7a2d899662
commit 81b4b9e273
34743 changed files with 5940233 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
// Fake Xlib.h
struct Display {};
typedef int Window, Colormap, GC;
typedef const char *XID;
struct XFontStruct { int ascent, descent; };
struct Screen {};
struct XColor { int pixel; };
enum { Success, ExposureMask };
inline Display *XOpenDisplay(void *) { return 0; }
inline Colormap DefaultColormap( Display *, int ) { return 0; }
inline void XParseColor( Display *, Colormap, const char *, XColor * ) {}
inline int XAllocColor( Display *, Colormap, XColor *) { return 0; }
inline Window XCreateSimpleWindow( Display *, Window, int, int, int, int, int, int, int ) { return 0; }
inline Window RootWindow( Display *, int ) { return 0; }
inline GC XCreateGC( Display *, Window, int, int ) { return 0; }
inline XID XLoadFont( Display *, const char * ) { return 0; }
inline int XSetFont( Display *, GC, XID ) { return 0; }
inline XID XGContextFromGC( GC ) { return 0; }
inline XFontStruct *XQueryFont( Display *, const char * ) { return 0; }
inline int XFreeFontInfo( char **, XFontStruct *, int ) { return 0; }
inline int XSelectInput( Display *, Window, int ) { return 0; }
inline int XMapWindow( Display *, Window ) { return 0; }
inline Screen *XDefaultScreenOfDisplay( Display * ) { return 0; }
inline int WidthOfScreen( Screen * ) { return 0; }
inline int HeightOfScreen( Screen * ) { return 0; }
inline int XMoveResizeWindow( Display *, Window, int, int, int, int ) { return 0; }
struct XEvent {};
inline int XCheckMaskEvent( Display *, int, XEvent * ) { return 0; }
inline int XSetStandardProperties( Display *, Window, const char *, int, int, int, int, int ) { return 0; }
struct XWindowAttributes { int width, height; };
inline int XGetWindowAttributes( Display *, Window, XWindowAttributes * ) { return 0; }
inline int XSetForeground( Display *, GC, unsigned long ) { return 0; }
inline int XSetBackground( Display *, GC, unsigned long ) { return 0; }
inline int XFillRectangle( Display *, Window, GC, int, int, int, int ) { return 0; }
inline int XDrawLine( Display *, Window, GC, int, int, int, int ) { return 0; }
inline int XDrawString( Display *, Window, GC, int, int, const char *, int ) { return 0; }
inline int XFlush( Display * ) { return 0; }
inline int XFreeGC( Display *, GC ) { return 0; }
inline int XDestroyWindow( Display *, Window ) { return 0; }
inline int XCloseDisplay( Display * ) { return 0; }
inline int XTextWidth( XFontStruct *, const char *, int ) { return 0; }

View File

@@ -0,0 +1 @@
// Fake Xutil.h

View File

@@ -0,0 +1,26 @@
#ifndef __FAKE__COMMCTRL_H__
#define __FAKE__COMMCTRL_H__
#include <windows.h>
#define PROGRESS_CLASS TEXT("PROGRESS_CLASS")
#define STATUSCLASSNAME TEXT("STATUSCLASSNAME")
enum { PBM_SETRANGE32, PBM_SETRANGE, PBM_SETPOS, PBM_SETSTEP, PBM_STEPIT, PBM_SETBARCOLOR,
SB_SETTEXTA, SB_SETPARTS, BS_AUTOCHECKBOX, BM_SETCHECK, BST_UNCHECKED, BM_GETCHECK,
BST_CHECKED, PBS_SMOOTH
};
#define ICC_BAR_CLASSES 1
#define ICC_PROGRESS_CLASS 2
struct INITCOMMONCONTROLSEX
{
DWORD dwSize;
DWORD dwICC;
};
inline void InitCommonControls() {}
inline int InitCommonControlsEx(INITCOMMONCONTROLSEX *) { return 0; }
#endif // __FAKE__COMMCTRL_H__

View File

@@ -0,0 +1,14 @@
// fake QApplication
class QWidget;
class QApplication
{
public:
QApplication(int &, char **) {}
void exec() {}
void setMainWidget(void *) {}
void processEvents() {}
static QWidget *desktop() { return 0; }
void *activeWindow() { return 0; }
};

View File

@@ -0,0 +1,2 @@
// fake qglobal.h
#define QT_VERSION 0x030000

View File

@@ -0,0 +1,10 @@
// fake QLabel
#include <qstring.h>
#include <qwidget.h>
class QLabel
{
public:
QLabel(void *) {}
void setText(const QString &) {}
};

View File

@@ -0,0 +1,8 @@
// fake qlayout.h
class QVBoxLayout
{
public:
QVBoxLayout(void *) {}
void addWidget(void *) {}
};

View File

@@ -0,0 +1,8 @@
// fake qmessagebox.h
class QMessageBox
{
public:
enum Icon { Information, Warning, Critical };
static void *standardIcon(Icon) { return 0; }
};

View File

@@ -0,0 +1,2 @@
// fake qpixmap.h

View File

@@ -0,0 +1,29 @@
// fake qprogressbar.h
class QColorGroup
{
public:
enum { Highlight };
};
class QColor
{
public:
QColor(int, int, int) {}
};
class QPalette
{
public:
void setColor(int, const QColor &) {}
};
class QProgressBar
{
public:
QProgressBar(int, void *) {}
void setProgress(int) {}
int progress() { return 0; }
QPalette palette() { return QPalette(); }
void setPalette(const QPalette &) {}
};

View File

@@ -0,0 +1,10 @@
// fake qstatusbar.h
class QStatusBar
{
public:
QStatusBar(void *) {}
void setProgress() {}
void addWidget(void *, int) {}
void removeWidget(void *) {}
};

View File

@@ -0,0 +1,17 @@
// fake qstring.h
#ifndef __FAKE__QSTRING_H
#define __FAKE__QSTRING_H
class QString
{
public:
QString() {}
QString(const char *) {}
bool operator==(const QString &) { return false; }
static QString number(int) { return QString(); }
};
inline QString operator+(const QString &, const QString &) { return QString(); }
#endif // __FAKE__QSTRING_H

View File

@@ -0,0 +1,23 @@
// fake qwidget.h
#ifndef __FAKE__QWIDGET_H
#define __FAKE__QWIDGET_H
class QString;
class QWidget
{
public:
bool isMinimized() { return false; }
void close(bool) {}
void showMinimized() {}
void showNormal() {}
void setCaption(const QString &) {}
void setIcon(void *) {}
int x() { return 0; }
int y() { return 0; }
int width() { return 0; }
int height() { return 0; }
void setGeometry(int, int, int, int) {}
};
#endif // __FAKE__QWIDGET_H

View File

@@ -0,0 +1,123 @@
#ifndef __FAKE__WINDOWS_H__
#define __FAKE__WINDOWS_H__
#include <stdio.h>
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long DWORD, ULONG, LRESULT, LPARAM, WPARAM;
typedef int BOOL;
enum { FALSE, TRUE };
typedef struct _HANDLE {} *HANDLE;
typedef struct _HBRUSH {} *HBRUSH;
typedef struct _HCURSOR {} *HCURSOR;
typedef struct _HEAP {} *HEAP;
typedef struct _HICON {} *HICON;
typedef struct _HINSTANCE {} *HINSTANCE;
typedef struct _HMENU {} *HMENU;
typedef struct _HMODULE {} *HMODULE;
typedef struct _HWND {} *HWND;
enum { INFINITE, CS_HREDRAW, CS_VREDRAW, COLOR_WINDOW, GWL_USERDATA, HWND_TOP, SPI_GETWORKAREA,
WS_CHILD, WS_VISIBLE, SM_CYCAPTION, SM_CYFRAME, SM_CXSCREEN, SM_CYSCREEN,
SW_SHOWNORMAL, SW_MINIMIZE, WM_SIZE, WM_SETICON, ICON_BIG, WS_OVERLAPPEDWINDOW,
WM_CREATE, WM_TIMER, WM_CLOSE, WM_DESTROY, WM_QUIT
};
typedef void *LPVOID;
#ifdef UNICODE
typedef wchar_t TCHAR;
#define TEXT(x) L##x
#else
typedef char TCHAR;
#define TEXT(x) x
#endif
typedef const TCHAR *LPCTSTR;
typedef char *LPSTR;
typedef const char *LPCSTR;
#define IDI_INFORMATION TEXT("IDI_INFORMATION")
#define IDI_WARNING TEXT("IDI_WARNING")
#define IDI_ERROR TEXT("IDI_ERROR")
typedef void (*LPPROC)(void);
#define WINAPI
#define CALLBACK
struct WNDCLASSEX
{
int cbSize;
int style;
LRESULT CALLBACK(*lpfnWndProc)(HWND, UINT, WPARAM, LPARAM);
int cbClsExtra;
int cbWndExtra;
HINSTANCE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCTSTR lpszMenuName;
LPCTSTR lpszClassName;
HICON hIconSm;
};
struct RECT
{
LONG left, right, top, bottom;
};
struct MSG
{
};
typedef struct
{
LPVOID lpCreateParams;
} CREATESTRUCT, *LPCREATESTRUCT;
inline HANDLE CreateEvent(LPVOID, BOOL, BOOL, LPVOID) { return 0; }
inline HANDLE CreateThread(LPVOID, int, DWORD WINAPI(*)(LPVOID), LPVOID, int, LPVOID) { return 0; }
inline int WaitForSingleObject(HANDLE, int) { return 0; }
inline int RegisterClassEx(WNDCLASSEX *) { return 0; }
inline int SetWindowLong(HWND, int, LONG) { return 0; }
inline LPARAM MAKELPARAM(unsigned short, unsigned short) { return 0; }
inline HWND CreateWindow(LPCTSTR, LPVOID, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID) { return 0; }
inline LRESULT SendMessage(HWND, UINT, WPARAM, LPARAM) { return 0; }
inline LONG GetSystemMetrics(int) { return 0; }
inline int SetWindowPos(HWND, int, LONG, LONG, LONG, LONG, int) { return 0; }
inline int SystemParametersInfo(int, int, LPVOID, int) { return 0; }
inline int ShowWindow(HWND, int) { return 0; }
inline int UpdateWindow(HWND) { return 0; }
inline int SetEvent(HANDLE) { return 0; }
inline BOOL GetMessage(MSG *, LPVOID, int, int) { return FALSE; }
inline int DispatchMessage(MSG *) { return 0; }
inline int GetClientRect(HWND, RECT *) { return 0; }
inline HICON LoadIcon(HINSTANCE, LPCTSTR) { return 0; }
inline unsigned lstrlenA(LPCSTR) { return 0; }
inline int lstrcmpA(LPCSTR, LPCSTR) { return 0; }
inline int lstrcpyA(LPSTR, LPCSTR) { return 0; }
inline int lstrcatA(LPSTR, LPCSTR) { return 0; }
#define wsprintfA sprintf
inline int SetWindowTextA(HWND, LPCSTR) { return 0; }
inline LPVOID HeapAlloc(HEAP, int, ULONG) { return 0; }
inline HEAP GetProcessHeap() { return 0; }
inline int HeapFree(HEAP, int, LPVOID) { return 0; }
inline int DestroyWindow(HWND) { return 0; }
inline LONG GetWindowLong(HWND, int) { return 0; }
inline LRESULT CALLBACK DefWindowProc(HWND, UINT, WPARAM, LPARAM) { return 0; }
inline HMODULE LoadLibraryA(LPCSTR) { return 0; }
inline LPPROC GetProcAddress(HMODULE, LPCSTR) { return 0; }
inline int SetTimer(HWND, unsigned, unsigned, unsigned) { return 0; }
inline int KillTimer(HWND, unsigned) { return 0; }
inline DWORD GetTickCount() { return 0; }
inline int ExitProcess(int) { return 0; }
inline bool IsIconic(HWND) { return 0; }
inline HWND GetForegroundWindow() { return 0; }
#endif // __FAKE__WINDOWS_H__