1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 #if defined _MSC_VER
25 #pragma warning(push, 1)
26 #endif
27 #include <windows.h>
28 #if defined _MSC_VER
29 #pragma warning(pop)
30 #endif
31
32 #include "jawt.h"
33
34 #if defined _MSC_VER
35 #pragma warning(push, 1)
36 #endif
37 #include "jawt_md.h"
38 #if defined _MSC_VER
39 #pragma warning(pop)
40 #endif
41
42 #if defined assert
43 #undef assert
44 #endif
45
46 #define assert(X) if (!X) { (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"), "assertion failed"); return 0L;}
47
48
49 #define SYSTEM_WIN32 1
50 #define SYSTEM_WIN16 2
51 #define SYSTEM_JAVA 3
52 #define SYSTEM_OS2 4
53 #define SYSTEM_MAC 5
54 #define SYSTEM_XWINDOW 6
55
56 #define OLD_PROC_KEY "oldwindowproc"
57
58 static LRESULT APIENTRY OpenOfficeWndProc( HWND , UINT , WPARAM , LPARAM );
59
60 JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow
61 (JNIEnv * env, jobject obj_this);
62
63 /*****************************************************************************/
64 /*
65 * Class: com_sun_star_beans_LocalOfficeWindow
66 * Method: getNativeWindowSystemType
67 * Signature: ()I
68 */
Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindowSystemType(JNIEnv * env,jobject obj_this)69 JNIEXPORT jint JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindowSystemType
70 (JNIEnv * env, jobject obj_this)
71 {
72 (void) env; // unused
73 (void) obj_this; // unused
74 return (SYSTEM_WIN32);
75 }
76
77
78 /*****************************************************************************/
79 /*
80 * Class: com_sun_star_beans_LocalOfficeWindow
81 * Method: getNativeWindow
82 * Signature: ()J
83 */
Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow(JNIEnv * env,jobject obj_this)84 JNIEXPORT jlong JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow
85 (JNIEnv * env, jobject obj_this)
86 {
87 return Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow( env, obj_this );
88 }
89
90
91
92
93
94
95
96
97
98
99