diff options
Diffstat (limited to 'ldmicro/lib')
-rw-r--r-- | ldmicro/lib/linuxUI/linuxLD.cpp | 5 | ||||
-rw-r--r-- | ldmicro/lib/linuxUI/linuxLD.h | 21 | ||||
-rw-r--r-- | ldmicro/lib/linuxUI/linuxUI.cpp | 22 | ||||
-rw-r--r-- | ldmicro/lib/linuxUI/linuxUI.h | 28 |
4 files changed, 18 insertions, 58 deletions
diff --git a/ldmicro/lib/linuxUI/linuxLD.cpp b/ldmicro/lib/linuxUI/linuxLD.cpp index ce9899b..dd5f906 100644 --- a/ldmicro/lib/linuxUI/linuxLD.cpp +++ b/ldmicro/lib/linuxUI/linuxLD.cpp @@ -1,7 +1,6 @@ #include "linuxUI.h" std::vector<HEAPRECORD> HeapRecords; -std::vector<WNDCLASSEX> WindClassRecord; HANDLE HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize) { @@ -106,7 +105,7 @@ BOOL RegisterClassEx(const WNDCLASSEX *lpwcx) return TRUE; } -HANDLE LoadImage(HINSTANCE hinst, LPCTSTR lpszName, UINT uType, int cxDesired, +HICON LoadImage(HINSTANCE hinst, LPCTSTR lpszName, UINT uType, int cxDesired, int cyDesired, UINT fuLoad) { HICON pixbuf; @@ -118,7 +117,7 @@ HANDLE LoadImage(HINSTANCE hinst, LPCTSTR lpszName, UINT uType, int cxDesired, g_error_free(error); } - return (HANDLE) pixbuf; + return pixbuf; } void OutputDebugString(char* str) diff --git a/ldmicro/lib/linuxUI/linuxLD.h b/ldmicro/lib/linuxUI/linuxLD.h index 25d42bb..035543b 100644 --- a/ldmicro/lib/linuxUI/linuxLD.h +++ b/ldmicro/lib/linuxUI/linuxLD.h @@ -19,7 +19,7 @@ /// Image loading flags #define IMAGE_ICON 1 -#define LDMICRO_ICON "ldmicro.ico" +#define LDMICRO_ICON "../ldmicro.ico" /// Typedefs //typedef int64_t __int64; @@ -143,25 +143,8 @@ typedef struct tagNMHDR { UINT code; } NMHDR; -typedef struct tagWNDCLASSEX { - UINT cbSize; - UINT style; -// WNDPROC lpfnWndProc; - int cbClsExtra; - int cbWndExtra; - HINSTANCE hInstance; - HICON hIcon; -// HCURSOR hCursor; - HBRUSH hbrBackground; - LPCTSTR lpszMenuName; - LPCTSTR lpszClassName; - HICON hIconSm; -} WNDCLASSEX, *PWNDCLASSEX; - - /// Variables extern std::vector<HEAPRECORD> HeapRecord; -extern std::vector<WNDCLASSEX> WindClassRecord; /// Functions HANDLE HeapCreate( @@ -181,7 +164,7 @@ BOOL HeapFree( BOOL RegisterClassEx(const WNDCLASSEX *lpwcx); -HANDLE LoadImage( +HICON LoadImage( HINSTANCE hinst, LPCTSTR lpszName, UINT uType, diff --git a/ldmicro/lib/linuxUI/linuxUI.cpp b/ldmicro/lib/linuxUI/linuxUI.cpp index 907cb35..524046d 100644 --- a/ldmicro/lib/linuxUI/linuxUI.cpp +++ b/ldmicro/lib/linuxUI/linuxUI.cpp @@ -188,25 +188,3 @@ void CheckMenuItem(HMENU MenuName, HMENU MenuItem, UINT Check) break; } } - -HWID CreateWindowEx(DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, - DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, - HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam) -{ - - auto WinClR_it = std::find_if(WindClassRecord.begin(), WindClassRecord.end(), [&lpClassName](WNDCLASSEX &Record) { return Record.lpszClassName == lpClassName; }); - - if (WinClR_it == WindClassRecord.end()) - return NULL; - - HWID window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(window), lpWindowName); - gtk_window_set_default_size (GTK_WINDOW(window), nWidth, nHeight); - gtk_window_resize (GTK_WINDOW(window), nWidth, nHeight); - gtk_window_move(GTK_WINDOW(window), x, y); - gtk_widget_override_background_color(GTK_WIDGET(window), GTK_STATE_FLAG_NORMAL, WinClR_it->hbrBackground->getThis()); - gtk_window_set_default_icon(WinClR_it->hIcon); - gtk_window_set_icon(GTK_WINDOW(window), WinClR_it->hIcon); - - return window; -}
\ No newline at end of file diff --git a/ldmicro/lib/linuxUI/linuxUI.h b/ldmicro/lib/linuxUI/linuxUI.h index 4bd6e71..c2d923b 100644 --- a/ldmicro/lib/linuxUI/linuxUI.h +++ b/ldmicro/lib/linuxUI/linuxUI.h @@ -72,19 +72,19 @@ void EnableMenuItem(HMENU, HMENU, UINT); void CheckMenuItem(HMENU, HMENU, UINT); HBRUSH GetStockObject(int fnObject); -HWID CreateWindowEx( - DWORD dwExStyle, - LPCTSTR lpClassName, - LPCTSTR lpWindowName, - DWORD dwStyle, - int x, - int y, - int nWidth, - int nHeight, - HWND hWndParent, - HMENU hMenu, - HINSTANCE hInstance, - LPVOID lpParam -); +// HWID CreateWindowEx( +// DWORD dwExStyle, +// LPCTSTR lpClassName, +// LPCTSTR lpWindowName, +// DWORD dwStyle, +// int x, +// int y, +// int nWidth, +// int nHeight, +// HWND hWndParent, +// HMENU hMenu, +// HINSTANCE hInstance, +// LPVOID lpParam +// ); #endif
\ No newline at end of file |