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