< prev index next >

src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 21,30 **** --- 21,34 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ + #ifdef HEADLESS + #error This file should not be included in headless library + #endif + #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xos.h> #include <X11/Xatom.h> #ifdef __linux__
*** 71,86 **** struct ComponentIDs componentIDs; struct MenuComponentIDs menuComponentIDs; - #ifndef HEADLESS - extern Display* awt_init_Display(JNIEnv *env, jobject this); extern void freeNativeStringArray(char **array, jsize length); extern char** stringArrayToNative(JNIEnv *env, jobjectArray array, jsize * ret_length); - #endif /* !HEADLESS */ /* This function gets called from the static initializer for FileDialog.java to initialize the fieldIDs for fields that may be accessed from C */ JNIEXPORT void JNICALL --- 75,87 ----
*** 308,322 **** (JNIEnv *env, jclass cls) { } JNIEXPORT jboolean JNICALL AWTIsHeadless() { - #ifdef HEADLESS - return JNI_TRUE; - #else return JNI_FALSE; - #endif } JNIEXPORT void JNICALL Java_java_awt_Dialog_initIDs (JNIEnv *env, jclass cls) { } --- 309,319 ----
< prev index next >