summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/CPP/myWindows/StdAfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/7zip/unix/CPP/myWindows/StdAfx.h')
-rw-r--r--src/libs/7zip/unix/CPP/myWindows/StdAfx.h89
1 files changed, 85 insertions, 4 deletions
diff --git a/src/libs/7zip/unix/CPP/myWindows/StdAfx.h b/src/libs/7zip/unix/CPP/myWindows/StdAfx.h
index 629529dcf..86ce117a9 100644
--- a/src/libs/7zip/unix/CPP/myWindows/StdAfx.h
+++ b/src/libs/7zip/unix/CPP/myWindows/StdAfx.h
@@ -6,6 +6,7 @@
#include "config.h"
+#define MAXIMUM_WAIT_OBJECTS 64
#define NO_INLINE /* FIXME */
@@ -13,15 +14,16 @@
#include <pthread.h>
#endif
+#include "Common/Common.h"
#include "Common/MyWindows.h"
-#include "Common/Types.h"
+#include "Common/MyTypes.h"
-#include <windows.h>
+#include "../include_windows/tchar.h"
+#include "../include_windows/windows.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-#include <tchar.h>
#include <wchar.h>
#include <stddef.h>
#include <ctype.h>
@@ -36,6 +38,13 @@
#undef CS /* fix for Solaris 10 x86 */
+#ifdef __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
+
/***************************/
#ifndef ENV_HAVE_WCHAR__H
@@ -87,6 +96,23 @@ typedef wxWindow *HWND;
#define MessageBox MessageBoxW
int MessageBoxW(wxWindow * parent, const TCHAR * mes, const TCHAR * title,int flag);
+
+// FIXME
+#define IDCLOSE (5001) // wxID_CLOSE
+#define IDEXIT (5006) // wxID_EXIT
+#define IDOK (5100) // wxID_OK
+#define IDCANCEL (5101) // wxID_CANCEL
+#define IDABORT (5115) // wxID_ABORT
+#define IDYES (5103) // wxID_YES
+#define IDNO (5104) // wxID_NO
+#define IDHELP (5009) // wxID_HELP
+
+// Show
+#define SW_HIDE 0
+#define SW_SHOW 5
+
+
+
typedef void *HINSTANCE;
typedef int INT_PTR; // FIXME 64 bits ?
@@ -101,8 +127,63 @@ typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
typedef LONG_PTR LRESULT;
+
+#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xFFFF))
+#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
+
+
#define CALLBACK /* */
+#define ERROR_NEGATIVE_SEEK 0x100131 // FIXME
+#define FACILITY_WIN32 7 // FIXME
+#define __HRESULT_FROM_WIN32(x) ((HRESULT)(x) > 0 ? ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)) : (HRESULT)(x) ) // FIXME
+
+/************ Windows2.h ***********/
+
+typedef void * WNDPROC;
+typedef void * CREATESTRUCT;
+typedef struct
+{
+ HWND hwndFrom;
+
+ UINT code;
+#define NM_DBLCLK 1
+#define LVN_ITEMCHANGED 2
+#define LVN_COLUMNCLICK 3
+#define CBEN_BEGINEDIT 10
+#define CBEN_ENDEDITW 11
+
+
+} NMHDR;
+typedef NMHDR * LPNMHDR;
+
+typedef struct tagNMLISTVIEW
+{
+ NMHDR hdr;
+ INT iItem;
+ INT iSubItem;
+ UINT uNewState;
+ UINT uOldState;
+ // UINT uChanged;
+ // POINT ptAction;
+ LPARAM lParam;
+} NMLISTVIEW, *LPNMLISTVIEW;
+
+typedef void * LPNMITEMACTIVATE;
+
+#define NM_RCLICK 1234 /* FIXME */
+
+// FIXME
+#define WM_CREATE 1
+#define WM_COMMAND 2
+#define WM_NOTIFY 3
+#define WM_DESTROY 4
+#define WM_CLOSE 5
+
+#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
+#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xFFFF))
+
+
/************ LANG ***********/
typedef WORD LANGID;
@@ -120,5 +201,5 @@ LANGID GetSystemDefaultLangID(void);
#endif
-#endif
+#endif