Package icyllis.modernui.core
Class ActivityWindow
java.lang.Object
icyllis.modernui.core.Window
icyllis.modernui.core.ActivityWindow
- All Implemented Interfaces:
AutoCloseable
The activity window is the default implementation for almost everything.
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.modernui.core.Window
Window.State
-
Field Summary
Fields inherited from class icyllis.modernui.core.Window
LAST_SYSTEM_WINDOW, mHandle
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static ActivityWindow
createMainWindow
(String title, int width, int height) Creates the main window and initialize the view system.static ActivityWindow
createMainWindow
(String title, int width, int height, Monitor monitor) int
Returns the framebuffer height for this window in pixels.int
Returns the window height in virtual screen coordinates.int
Returns the window width in virtual screen coordinates.int
Returns the y-coordinate of the top-left corner of this window in virtual screen coordinate system.int
Returns the x-coordinate of the top-left corner of this window in virtual screen coordinate system.int
getWidth()
Returns the framebuffer width for this window in pixels.void
Methods inherited from class icyllis.modernui.core.Window
close, get, getHandle, hide, makeCurrent, maximize, minimize, restore, setIcon, setShouldClose, setTitle, shouldClose, show, swapBuffers, swapInterval
-
Method Details
-
createMainWindow
@NonNull public static ActivityWindow createMainWindow(@NonNull String title, int width, int height) Creates the main window and initialize the view system. Hints are set before.- Parameters:
title
- the initial titlewidth
- the window width in virtual screen coordinatesheight
- the window height in virtual screen coordinates- Returns:
- the main window
-
createMainWindow
-
getScreenX
public int getScreenX()Description copied from class:Window
Returns the y-coordinate of the top-left corner of this window in virtual screen coordinate system.- Overrides:
getScreenX
in classWindow
- Returns:
- the y-coordinate of this window
-
getScreenY
public int getScreenY()Description copied from class:Window
Returns the x-coordinate of the top-left corner of this window in virtual screen coordinate system.- Overrides:
getScreenY
in classWindow
- Returns:
- the x-coordinate of this window
-
getScreenWidth
public int getScreenWidth()Description copied from class:Window
Returns the window width in virtual screen coordinates.- Overrides:
getScreenWidth
in classWindow
- Returns:
- window width
-
getScreenHeight
public int getScreenHeight()Description copied from class:Window
Returns the window height in virtual screen coordinates.- Overrides:
getScreenHeight
in classWindow
- Returns:
- window height
-
getWidth
public int getWidth()Description copied from class:Window
Returns the framebuffer width for this window in pixels. -
getHeight
public int getHeight()Description copied from class:Window
Returns the framebuffer height for this window in pixels. -
center
-
install
-