]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/library/os.h
Remove invalid SHA-256-Digests
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / library / os.h
1 /*******************************************************************************
2  * Copyright (c) 2000, 2018 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14
15 #ifndef INC_os_H
16 #define INC_os_H
17
18 #include <windows.h>
19 #include <WindowsX.h>
20 #include <commctrl.h>
21 #include <commdlg.h>
22 #include <oaidl.h>
23 #include <shlobj.h>
24 #include <ole2.h>
25 #include <olectl.h>
26 #include <objbase.h>
27 #include <shlwapi.h>
28 #include <shellapi.h>
29 #include <wininet.h>
30 #include <mshtmhst.h>
31 #include <Tabflicks.h>
32 #include <initguid.h>
33 #include <oleacc.h>
34 #include <usp10.h>
35 #include <uxtheme.h>
36 #include <msctf.h>
37 #include <intsafe.h>
38
39 /* Optional custom definitions to exclude some types */
40 #include "defines.h"
41
42 #define OS_LOAD_FUNCTION LOAD_FUNCTION
43
44 #include "os_custom.h"
45
46 #define NATIVE_TRY(env, that, func) \
47         __try {
48 #define NATIVE_CATCH(env, that, func) \
49         } __except(EXCEPTION_EXECUTE_HANDLER) { \
50                 jclass expClass = (*env)->FindClass(env, "org/eclipse/swt/SWTError");  \
51                 if (expClass) { \
52                         char buffer[64]; \
53                         wsprintfA(buffer, "caught native exception: 0x%x", GetExceptionCode()); \
54                         (*env)->ThrowNew(env, expClass, buffer); \
55                 } \
56         }
57
58 #define OS_NATIVE_ENTER_TRY(env, that, func) \
59         OS_NATIVE_ENTER(env, that, func); \
60         NATIVE_TRY(env, that, func);
61 #define OS_NATIVE_EXIT_CATCH(env, that, func) \
62         NATIVE_CATCH(env, that, func); \
63         OS_NATIVE_EXIT(env, that, func);
64
65 #endif /* INC_os_H */