Path: blob/master/SLICK_HOME/src/org/newdawn/slick/gui/GUIContext.java
1457 views
package org.newdawn.slick.gui;12import org.lwjgl.input.Cursor;3import org.newdawn.slick.Font;4import org.newdawn.slick.Input;5import org.newdawn.slick.SlickException;6import org.newdawn.slick.opengl.ImageData;78/**9* The context in which GUI components are created and rendered10*11* @author kevin12*/13public interface GUIContext {1415/**16* Get the input system17*18* @return The input system available to this game container19*/20public Input getInput();2122/**23* Get the accurate system time24*25* @return The system time in milliseconds26*/27public long getTime();2829/**30* Get the width of the standard screen resolution31*32* @return The screen width33*/34public abstract int getScreenWidth();3536/**37* Get the height of the standard screen resolution38*39* @return The screen height40*/41public abstract int getScreenHeight();4243/**44* Get the width of the game canvas45*46* @return The width of the game canvas47*/48public int getWidth();4950/**51* Get the height of the game canvas52*53* @return The height of the game canvas54*/55public int getHeight();5657/**58* Get the default system font59*60* @return The default system font61*/62public Font getDefaultFont();6364/**65* Set the mouse cursor to be displayed - this is a hardware cursor and hence66* shouldn't have any impact on FPS.67*68* @param ref The location of the image to be loaded for the cursor69* @param hotSpotX The x coordinate of the hotspot within the cursor image70* @param hotSpotY The y coordinate of the hotspot within the cursor image71* @throws SlickException Indicates a failure to load the cursor image or create the hardware cursor72*/73public abstract void setMouseCursor(String ref, int hotSpotX, int hotSpotY) throws SlickException;7475/**76* Set the mouse cursor to be displayed - this is a hardware cursor and hence77* shouldn't have any impact on FPS.78*79* @param data The image data from which the cursor can be construted80* @param hotSpotX The x coordinate of the hotspot within the cursor image81* @param hotSpotY The y coordinate of the hotspot within the cursor image82* @throws SlickException Indicates a failure to load the cursor image or create the hardware cursor83*/84public abstract void setMouseCursor(ImageData data, int hotSpotX, int hotSpotY) throws SlickException;8586/**87* Set the mouse cursor to be displayed - this is a hardware cursor and hence88* shouldn't have any impact on FPS.89*90* @param cursor The cursor to use91* @param hotSpotX The x coordinate of the hotspot within the cursor image92* @param hotSpotY The y coordinate of the hotspot within the cursor image93* @throws SlickException Indicates a failure to load the cursor image or create the hardware cursor94*/95public abstract void setMouseCursor(Cursor cursor, int hotSpotX, int hotSpotY) throws SlickException;9697/**98* Set the default mouse cursor - i.e. the original cursor before any native99* cursor was set100*/101public abstract void setDefaultMouseCursor();102}103104105