diff options
author | Sven Gothel <[email protected]> | 2008-05-30 13:35:03 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-05-30 13:35:03 +0000 |
commit | acdd8ef2e4af64871c62b8b9b84af83a32fd1aba (patch) | |
tree | 6fcd5b019550b31b2b2235fbe25c174628ffeb0b /src/classes/com/sun/javafx/newt/Screen.java | |
parent | efcbd94ea40dd4fb532707765535bd1af1639a03 (diff) |
Completing com.sun.javafx.newt.* package, WIP, working under X11/ES1.1.
- Fixed:
- EGLDrawable[Factory]
- Object target is a 'long[3]' with [display, screen, window]
native handles.
Depending on the platform, display and screen handles may be 0.
- Moved EGL.eglGetDisplay and EGL.eglInitialize
from EGLDrawableFactory -> EGLDrawable,
since the factory has no notion of the native handles,
but the display is necessary.
- newt.*:
- Added Display and Screen abstraction
- Added 'long[] Window.getHandles()',
to feed EGLDrawableFactory.getGLDrawable() with the 3 native handles.
- MouseEvent:
- Java: Clicked and Dragged working
- native/X11: SelectInput with proper args
- KeyEvent:
- native/X11: added XSetInputFocus and XLookupString
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1652 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/javafx/newt/Screen.java')
-rwxr-xr-x | src/classes/com/sun/javafx/newt/Screen.java | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/classes/com/sun/javafx/newt/Screen.java b/src/classes/com/sun/javafx/newt/Screen.java new file mode 100755 index 000000000..b698a0248 --- /dev/null +++ b/src/classes/com/sun/javafx/newt/Screen.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any kind. ALL + * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + */ + +package com.sun.javafx.newt; + +public class Screen { + + public Screen(Display display) { + this(display, 0); + } + + public Screen(Display display, int idx) { + this.display=display; + this.index=idx; + this.handle=-1; + } + + public Display getDisplay() { + return display; + } + + public int getIndex() { + return index; + } + + public long getHandle() { + return handle; + } + + /** + * native handle + * + * write once .. + */ + public void setHandle(long handle) { + if(this.handle<0) { + this.handle=handle; + } + } + + protected Display display; + protected int index; + protected long handle; +} + |