< prev index next >

modules/javafx.graphics/src/main/java/com/sun/glass/ui/View.java

Print this page
rev 10048 : 8166564: @native for mac builds
Reviewed-by: kcr


 386     protected void _finishInputMethodComposition(long ptr) {
 387         // Action needed only on Windows.
 388     }
 389 
 390     /*
 391         Read by the checkNotClosed method which could be called from lock/unlock on render thread
 392      */
 393     private volatile long ptr; // Native handle (NSView*, or internal structure pointer)
 394     private Window window; // parent window
 395     private EventHandler eventHandler;
 396 
 397     private int width = -1;     // not set
 398     private int height = -1;    // not set
 399 
 400     private boolean isValid = false; // true between ViewEvent.Add & ViewEvent.REMOVE
 401     private boolean isVisible = false;
 402     private boolean inFullscreen = false;
 403 
 404     static final public class Capability {
 405         // we need these for native code
 406         static final public int k3dKeyValue                     = 0;
 407         static final public int kSyncKeyValue                   = 1;
 408         static final public int k3dProjectionKeyValue           = 2;
 409         static final public int k3dProjectionAngleKeyValue      = 3;
 410         static final public int k3dDepthKeyValue                = 4;
 411         static final public int kHiDPIAwareKeyValue             = 5;
 412 
 413         static final public Object k3dKey                       = Integer.valueOf(k3dKeyValue); // value must be Boolean
 414         static final public Object kSyncKey                     = Integer.valueOf(kSyncKeyValue); // value must be Boolean
 415         static final public Object k3dProjectionKey             = Integer.valueOf(k3dProjectionKeyValue); // value must be Boolean
 416         static final public Object k3dProjectionAngleKey        = Integer.valueOf(k3dProjectionAngleKeyValue); // value must be Float
 417         static final public Object k3dDepthKey                  = Integer.valueOf(k3dDepthKeyValue); // value must be Integer(depth), where depth = 0, 4, 8, 16, 32etc
 418         static final public Object kHiDPIAwareKey               = Integer.valueOf(kHiDPIAwareKeyValue); // value must be Boolean; default = false (i.e. NOT HiDPI-aware)
 419     }
 420 
 421 
 422     protected abstract long _create(Map capabilities);
 423     protected View() {
 424         Application.checkEventThread();
 425         this.ptr = _create(Application.GetApplication().getDeviceDetails());
 426         if (this.ptr == 0L) {
 427             throw new RuntimeException("could not create platform view");
 428         }
 429     }
 430 
 431     private void checkNotClosed() {




 386     protected void _finishInputMethodComposition(long ptr) {
 387         // Action needed only on Windows.
 388     }
 389 
 390     /*
 391         Read by the checkNotClosed method which could be called from lock/unlock on render thread
 392      */
 393     private volatile long ptr; // Native handle (NSView*, or internal structure pointer)
 394     private Window window; // parent window
 395     private EventHandler eventHandler;
 396 
 397     private int width = -1;     // not set
 398     private int height = -1;    // not set
 399 
 400     private boolean isValid = false; // true between ViewEvent.Add & ViewEvent.REMOVE
 401     private boolean isVisible = false;
 402     private boolean inFullscreen = false;
 403 
 404     static final public class Capability {
 405         // we need these for native code
 406         @Native static final public int k3dKeyValue                     = 0;
 407         @Native static final public int kSyncKeyValue                   = 1;
 408         @Native static final public int k3dProjectionKeyValue           = 2;
 409         @Native static final public int k3dProjectionAngleKeyValue      = 3;
 410         @Native static final public int k3dDepthKeyValue                = 4;
 411         @Native static final public int kHiDPIAwareKeyValue             = 5;
 412 
 413         static final public Object k3dKey                       = Integer.valueOf(k3dKeyValue); // value must be Boolean
 414         static final public Object kSyncKey                     = Integer.valueOf(kSyncKeyValue); // value must be Boolean
 415         static final public Object k3dProjectionKey             = Integer.valueOf(k3dProjectionKeyValue); // value must be Boolean
 416         static final public Object k3dProjectionAngleKey        = Integer.valueOf(k3dProjectionAngleKeyValue); // value must be Float
 417         static final public Object k3dDepthKey                  = Integer.valueOf(k3dDepthKeyValue); // value must be Integer(depth), where depth = 0, 4, 8, 16, 32etc
 418         static final public Object kHiDPIAwareKey               = Integer.valueOf(kHiDPIAwareKeyValue); // value must be Boolean; default = false (i.e. NOT HiDPI-aware)
 419     }
 420 
 421 
 422     protected abstract long _create(Map capabilities);
 423     protected View() {
 424         Application.checkEventThread();
 425         this.ptr = _create(Application.GetApplication().getDeviceDetails());
 426         if (this.ptr == 0L) {
 427             throw new RuntimeException("could not create platform view");
 428         }
 429     }
 430 
 431     private void checkNotClosed() {


< prev index next >