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 TypeMethodDescriptionvoidstatic ActivityWindowcreateMainWindow(String title, int width, int height) Creates the main window and initialize the view system.static ActivityWindowcreateMainWindow(String title, int width, int height, Monitor monitor) intReturns the framebuffer height for this window in pixels.intReturns the window height in virtual screen coordinates.intReturns the window width in virtual screen coordinates.intReturns the y-coordinate of the top-left corner of this window in virtual screen coordinate system.intReturns the x-coordinate of the top-left corner of this window in virtual screen coordinate system.intgetWidth()Returns the framebuffer width for this window in pixels.voidMethods 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:WindowReturns the y-coordinate of the top-left corner of this window in virtual screen coordinate system.- Overrides:
getScreenXin classWindow- Returns:
- the y-coordinate of this window
-
getScreenY
public int getScreenY()Description copied from class:WindowReturns the x-coordinate of the top-left corner of this window in virtual screen coordinate system.- Overrides:
getScreenYin classWindow- Returns:
- the x-coordinate of this window
-
getScreenWidth
public int getScreenWidth()Description copied from class:WindowReturns the window width in virtual screen coordinates.- Overrides:
getScreenWidthin classWindow- Returns:
- window width
-
getScreenHeight
public int getScreenHeight()Description copied from class:WindowReturns the window height in virtual screen coordinates.- Overrides:
getScreenHeightin classWindow- Returns:
- window height
-
getWidth
public int getWidth()Description copied from class:WindowReturns the framebuffer width for this window in pixels. -
getHeight
public int getHeight()Description copied from class:WindowReturns the framebuffer height for this window in pixels. -
center
-
install
-