|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.newt.Screen
com.jogamp.newt.impl.ScreenImpl
public abstract class ScreenImpl
Field Summary | |
---|---|
protected AbstractGraphicsScreen |
aScreen
|
protected static boolean |
DEBUG_TEST_SCREENMODE_DISABLED
|
protected DisplayImpl |
display
|
protected String |
fqname
|
protected int |
hashCode
|
protected int |
height
|
protected int |
refCount
|
protected int |
screen_idx
|
protected static int |
usrHeight
|
protected static int |
usrWidth
|
protected int |
width
|
Fields inherited from class com.jogamp.newt.Screen |
---|
DEBUG, SCREEN_MODE_CHANGE_TIMEOUT, screenList, screensActive |
Constructor Summary | |
---|---|
ScreenImpl()
|
Method Summary | |
---|---|
int |
addReference()
See Display.addReference() |
void |
addScreenModeListener(ScreenModeListener sml)
|
protected abstract void |
closeNativeImpl()
|
static Screen |
create(Display display,
int idx)
|
void |
createNative()
Manual trigger the native creation, if it is not done yet.. This is useful to be able to request the AbstractGraphicsScreen , via
Screen.getGraphicsScreen() .Otherwise the abstract device won't be available before the dependent component (Window) is realized. |
protected abstract void |
createNativeImpl()
|
void |
destroy()
Manually trigger the destruction, incl. |
ScreenMode |
getCurrentScreenMode()
Return the current ScreenMode . |
protected ScreenMode |
getCurrentScreenModeImpl()
To be implemented by the native specification. Is called within a thread safe environment. |
Display |
getDisplay()
|
String |
getFQName()
|
AbstractGraphicsScreen |
getGraphicsScreen()
|
int |
getHeight()
|
int |
getIndex()
|
ScreenMode |
getOriginalScreenMode()
Return the original ScreenMode , as used at NEWT initialization. |
int |
getReferenceCount()
|
protected int[] |
getScreenModeFirstImpl()
To be implemented by the native specification. Is called within a thread safe environment. Is called only to collect the ScreenModes, usually at startup setting up modes. WARNING: must be synchronized with ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES ,
ie com.jogamp.newt.util.ScreenModeUtil#streamIn(com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, int[], int) Note: Additional 1st element is native mode id. |
protected int[] |
getScreenModeNextImpl()
To be implemented by the native specification. Is called within a thread safe environment. Is called only to collect the ScreenModes, usually at startup setting up modes. WARNING: must be synchronized with ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES ,
ie com.jogamp.newt.util.ScreenModeUtil#streamIn(com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, int[], int) Note: Additional 1st element is native mode id. |
List |
getScreenModes()
Return a list of available ScreenMode s. |
protected IntIntHashMap |
getScreenModesIdx2NativeIdx()
ScreenModeStatus bridge to native implementation |
protected ArrayHashSet |
getScreenModesOrig()
ScreenModeStatus bridge to native implementation |
int |
getWidth()
|
int |
hashCode()
return precomputed hashCode from FQN Screen.getFQName() |
boolean |
isNativeValid()
|
int |
removeReference()
See Display.removeReference() |
void |
removeScreenModeListener(ScreenModeListener sml)
|
void |
screenModeChanged(ScreenMode sm,
boolean success)
called after the screen mode has been changed |
void |
screenModeChangeNotify(ScreenMode sm)
called before the screen mode will be changed |
boolean |
setCurrentScreenMode(ScreenMode screenMode)
Set the current ScreenMode . |
protected boolean |
setCurrentScreenModeImpl(ScreenMode screenMode)
To be implemented by the native specification. Is called within a thread safe environment. |
protected void |
setScreenSize(int w,
int h)
|
String |
toString()
|
Methods inherited from class com.jogamp.newt.Screen |
---|
equals, getActiveScreenNumber, getAllScreens, getFirstScreenOf, getLastScreenOf |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final boolean DEBUG_TEST_SCREENMODE_DISABLED
protected DisplayImpl display
protected int screen_idx
protected String fqname
protected int hashCode
protected AbstractGraphicsScreen aScreen
protected int refCount
protected int width
protected int height
protected static int usrWidth
protected static int usrHeight
Constructor Detail |
---|
public ScreenImpl()
Method Detail |
---|
public static Screen create(Display display, int idx)
public int hashCode()
Screen
Screen.getFQName()
hashCode
in class Screen
public final void createNative() throws NativeWindowException
Screen
AbstractGraphicsScreen
, via
Screen.getGraphicsScreen()
.
This method is usually invoke by Screen.addReference()
This method invokes Display.addReference()
after creating the native peer,
which will issue Display.createNative()
if the reference count was 0.
createNative
in class Screen
NativeWindowException
- if the native creation failed.public final void destroy()
Screen
This method is usually invoke by Screen.removeReference()
This method invokes Display.removeReference()
after it's own destruction,
which will issue Display.destroy()
if the reference count becomes 0.
destroy
in class Screen
public final int addReference() throws NativeWindowException
Screen
Display.addReference()
addReference
in class Screen
NativeWindowException
- if the native creation failed.Screen.removeReference()
,
#setDestroyWhenUnused(boolean)
,
#getDestroyWhenUnused()
public final int removeReference()
Screen
Display.removeReference()
removeReference
in class Screen
Screen.addReference()
,
#setDestroyWhenUnused(boolean)
,
#getDestroyWhenUnused()
public final int getReferenceCount()
getReferenceCount
in class Screen
protected abstract void createNativeImpl()
protected abstract void closeNativeImpl()
public final String getFQName()
getFQName
in class Screen
Display.getFQName()
+ Screen.getIndex()
.protected void setScreenSize(int w, int h)
public final Display getDisplay()
getDisplay
in class Screen
public final int getIndex()
getIndex
in class Screen
Screen.getDisplay()
.public final AbstractGraphicsScreen getGraphicsScreen()
getGraphicsScreen
in class Screen
public final boolean isNativeValid()
isNativeValid
in class Screen
public final int getWidth()
getWidth
in class Screen
public final int getHeight()
getHeight
in class Screen
public String toString()
toString
in class Object
public final List getScreenModes()
Screen
ScreenMode
s.
getScreenModes
in class Screen
ScreenMode
s,
or null if not implemented for this native type Display.getType()
.public ScreenMode getOriginalScreenMode()
Screen
ScreenMode
, as used at NEWT initialization.
getOriginalScreenMode
in class Screen
Screen.getScreenModes()
.public ScreenMode getCurrentScreenMode()
Screen
ScreenMode
.
getCurrentScreenMode
in class Screen
Screen.getScreenModes()
.public boolean setCurrentScreenMode(ScreenMode screenMode)
Screen
ScreenMode
.
setCurrentScreenMode
in class Screen
screenMode
- to be made current, must be element of the list Screen.getScreenModes()
.
public void screenModeChangeNotify(ScreenMode sm)
ScreenModeListener
screenModeChangeNotify
in interface ScreenModeListener
public void screenModeChanged(ScreenMode sm, boolean success)
ScreenModeListener
screenModeChanged
in interface ScreenModeListener
public final void addScreenModeListener(ScreenModeListener sml)
addScreenModeListener
in class Screen
sml
- ScreenModeListener to be added for ScreenMode change eventspublic final void removeScreenModeListener(ScreenModeListener sml)
removeScreenModeListener
in class Screen
sml
- ScreenModeListener to be removed from ScreenMode change eventsprotected final ArrayHashSet getScreenModesOrig()
protected final IntIntHashMap getScreenModesIdx2NativeIdx()
protected int[] getScreenModeFirstImpl()
ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES
,
ie com.jogamp.newt.util.ScreenModeUtil#streamIn(com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, int[], int)
protected int[] getScreenModeNextImpl()
ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES
,
ie com.jogamp.newt.util.ScreenModeUtil#streamIn(com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, com.jogamp.common.util.ArrayHashSet, int[], int)
protected ScreenMode getCurrentScreenModeImpl()
protected boolean setCurrentScreenModeImpl(ScreenMode screenMode)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |