]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/library/callback.h
Work around SWT 4.13 - 4.18 Win32 DnD bug 567422
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / library / callback.h
1 /*******************************************************************************
2  * Copyright (c) 2000, 2011 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 /**
16  * Callback implementation.
17  */
18 #ifndef INC_callback_H
19 #define INC_callback_H
20
21 #include "swt.h"
22
23 #if defined (_WIN32) || defined (_WIN32_WCE)
24 #include "windows.h"
25 #define RETURN_TYPE LRESULT CALLBACK
26 #define RETURN_CAST (LRESULT)
27 #endif
28
29 #if defined COCOA
30 #import <Foundation/Foundation.h>
31 #endif
32
33 #ifndef RETURN_TYPE
34 #define RETURN_TYPE jintLong
35 #endif
36
37 #ifndef RETURN_CAST
38 #define RETURN_CAST
39 #endif
40
41 /*
42 * Note that only x86 assembler is supported
43 */
44 #if !(defined(__i386__) || defined(_M_IX86) || defined(_X86_))
45 #undef USE_ASSEMBLER
46 #endif
47
48 #ifdef REDUCED_CALLBACKS
49 #define MAX_CALLBACKS 16
50 #else
51 #if (defined(USE_ASSEMBLER) || defined(GTK))
52 #define MAX_CALLBACKS 256
53 #else
54 #define MAX_CALLBACKS 128
55 #endif
56 #endif /* REDUCED_CALLBACKS */
57
58 #define MAX_ARGS 12
59
60 typedef struct CALLBACK_DATA {
61     jobject callback;
62     jmethodID methodID;
63         jobject object;
64         jboolean isStatic;
65         jboolean isArrayBased; 
66         jint argCount;
67         jintLong errorResult;
68 } CALLBACK_DATA;
69
70 #endif /* ifndef INC_callback_H */
71