1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #if defined _MSC_VER
29 #pragma warning(push, 1)
30 #endif
31 #include <windows.h>
32 #if defined _MSC_VER
33 #pragma warning(pop)
34 #endif
35 
36 #include "jawt.h"
37 
38 #if defined _MSC_VER
39 #pragma warning(push, 1)
40 #endif
41 #include "jawt_md.h"
42 #if defined _MSC_VER
43 #pragma warning(pop)
44 #endif
45 
46 #if defined assert
47 #undef assert
48 #endif
49 
50 #define assert(X) if (!X) { (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"), "assertion failed"); return 0L;}
51 
52 
53 #define SYSTEM_WIN32   1
54 #define SYSTEM_WIN16   2
55 #define SYSTEM_JAVA    3
56 #define SYSTEM_OS2     4
57 #define SYSTEM_MAC     5
58 #define SYSTEM_XWINDOW 6
59 
60 #define OLD_PROC_KEY "oldwindowproc"
61 
62 static LRESULT APIENTRY OpenOfficeWndProc( HWND , UINT , WPARAM , LPARAM );
63 
64 JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow
65   (JNIEnv * env, jobject obj_this);
66 
67 /*****************************************************************************/
68 /*
69  * Class:     com_sun_star_beans_LocalOfficeWindow
70  * Method:    getNativeWindowSystemType
71  * Signature: ()I
72  */
73 JNIEXPORT jint JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindowSystemType
74   (JNIEnv * env, jobject obj_this)
75 {
76     (void) env; // unused
77     (void) obj_this; // unused
78     return (SYSTEM_WIN32);
79 }
80 
81 
82 /*****************************************************************************/
83 /*
84  * Class:     com_sun_star_beans_LocalOfficeWindow
85  * Method:    getNativeWindow
86  * Signature: ()J
87  */
88 JNIEXPORT jlong JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow
89   (JNIEnv * env, jobject obj_this)
90 {
91 	return Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow( env, obj_this );
92 }
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103