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 #include <X11/Xlib.h>
25 #include <X11/Xutil.h>
26 #include <X11/Intrinsic.h>
27 
28 #include "jni.h"
29 
30 // Workaround for problematic IBM JDK 1.6.0 on ppc
31 #ifndef _JNI_IMPORT_OR_EXPORT_
32 #define _JNI_IMPORT_OR_EXPORT_
33 #endif
34 
35 #include "jawt_md.h"
36 #include "jawt.h"
37 
38 /*#include "../inc/com_sun_star_comp_beans_LocalOfficeWindow.h"*/
39 
40 #if defined assert
41 #undef assert
42 #endif
43 
44 #define assert(X) if (!X) { (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"), "assertion failed"); return;}
45 
46 
47 #define SYSTEM_WIN32   1
48 #define SYSTEM_WIN16   2
49 #define SYSTEM_JAVA    3
50 #define SYSTEM_OS2     4
51 #define SYSTEM_MAC     5
52 #define SYSTEM_XWINDOW 6
53 
54 JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow
55   (JNIEnv * env, jobject obj_this);
56 
57 /*****************************************************************************/
58 /*
59  * Class:     com_sun_star_comp_beans_LocalOfficeWindow
60  * Method:    getNativeWindowSystemType
61  * Signature: ()I
62  */
Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindowSystemType(JNIEnv * env,jobject obj_this)63 JNIEXPORT jint JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindowSystemType
64   (JNIEnv * env, jobject obj_this)
65 {
66     (void) env; /* avoid warning about unused parameter */
67     (void) obj_this; /* avoid warning about unused parameter */
68     return (SYSTEM_XWINDOW);
69 }
70 
71 
72 /*****************************************************************************/
73 /*
74  * Class:     com_sun_star_beans_LocalOfficeWindow
75  * Method:    getNativeWindow
76  * Signature: ()J
77  */
Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow(JNIEnv * env,jobject obj_this)78 JNIEXPORT jlong JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow
79   (JNIEnv * env, jobject obj_this)
80 {
81     (void) env; /* avoid warning about unused parameter */
82     (void) obj_this; /* avoid warning about unused parameter */
83 	return Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow(env, obj_this);
84 }
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96