Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields

sdl4gcj::video::Screen Class Reference

Inheritance diagram for sdl4gcj::video::Screen:

Inheritance graph
[legend]
Collaboration diagram for sdl4gcj::video::Screen:

Collaboration graph
[legend]

Public Member Functions

native void updateRect (int x, int y, int w, int h)
 Make sure the given area is updated.
void updateRect (Rect rect)
 Make sure the given area is updated.
void updateRect ()
 Make sure the whole of screen is updated.
native void updateRects (Rect[] rects)
 Make sure the given areas are updated.
native void flip ()
 SDL_Flip(SDL_Surface* screen).
native void glSwapBuffers ()
 SDL_GL_SwapBuffers().
void setCursor (Cursor cursor)
 Set the currently active mouse cursor.
Cursor getCursor ()
 Get the currently active mouse cursor.
void setCursorVisible (boolean toggle)
 Toggle whether or not the cursor is shown on the screen.
boolean isCursorVisible ()
 Returns true if the cursor is visible.
native void iconifyWindow ()
 Iconify/Minimise the window.
native int toggleFullScreen ()
 Toggle fullscreen mode.
native boolean grabInput (boolean grabMode)
 Grab mouse and keyboard input.
native void setGrabInputMode (boolean grabMode)
 Grab mouse and keyboard input.
native boolean getGrabInputMode ()
 Get grab mode for mouse and keyboard input.
void freeSurface ()
 Free surface.
void displayFormat ()
 Convert a surface to the display format.
void displayForamtAlpha ()
void convertSurface (PixelFormat format, int flags)
 Converts a surface to the same format as another surface.

Static Public Member Functions

static native Rect[] listModes (PixelFormat format, int flags)
 Returns an array of available screen dimensions for the given format and video flags.
static Rect[] listModes (int flags)
 Returns an array of available screen dimensions for the given video flags.
static native int videoModeOK (int width, int height, int bpp, int flags)
 Check to see if a particular video mode is supported.
static native Screen setVideoMode (int width, int height, int bpp, int flags)
 Set up a video mode with the specified width, height and bits-per-pixel.
static native Screen getVideoSurface ()
 Get the current display surface.
static native VideoInfo getVideoInfo ()
 Get the information about the video hardware.
static native void setGamma (float redgamma, float greengamma, float bluegamma)
 Sets the color gamma function for the display.
static native void setGammaRamp (int[] redtable, int[] greentable, int[] bluetable)
 Sets the color gamma lookup tables for the display.
static void setRedGammaRamp (int[] redTable)
 Sets the red gamma lookup tables for the display.
static void setGreenGammaRamp (int[] greenTable)
 Sets the green gamma lookup tables for the display.
static void setBlueGammaRamp (int[] blueTable)
 Sets the blue gamma lookup tables for the display.
static native int[] getRedGammaRamp ()
 Gets the red gamma lookup tables for the display.
static native int[] getGreenGammaRamp ()
 Gets the green gamma lookup tables for the display.
static native int[] getBlueGammaRamp ()
 Gets the blue gamma lookup tables for the display.
static native void setCaption (String windowCaption, String iconCaption)
 Set window title and icon name.
static void setWindowCaption (String windowCaption)
 Set the window caption.
static void setIconCaption (String iconCaption)
 Set the icon caption.
static native String getWindowCaption ()
 Gets the window caption.
static native String getIconCaption ()
 Gets the icon caption.
static native void setIcon (Surface icon, byte[] mask)
 Set the icon for the display window.
static void setIcon (Surface icon)
 Set the icon for the display window.
static native void glSetAttribute (int attr, int value)
 SDL_GL_SetAttribute(SDL_GLattr attr, int value).
static native int glGetAttribute (int attr)
 SDL_GL_GetAttribute(SDL_GLattr attr).

Private Member Functions

 Screen ()
void initRGBSurface (int flags, int width, int height, int bpp, int rmask, int gmask, int bmask, int amask)
void initRGBSurfaceFrom (byte[] pixels, int width, int height, int bpp, int pitch, int rmask, int gmask, int bmask, int amask)
void initRGBSurfaceFrom (short[] pixels, int width, int height, int bpp, int pitch, int rmask, int gmask, int bmask, int amask)
void initRGBSurfaceFrom (int[] pixels, int width, int height, int bpp, int pitch, int rmask, int gmask, int bmask, int amask)

Static Private Attributes

static Screen singleton = null

Constructor & Destructor Documentation

sdl4gcj::video::Screen::Screen  )  [inline, private]
 


Member Function Documentation

void sdl4gcj::video::Screen::convertSurface PixelFormat  format,
int  flags
[inline]
 

Converts a surface to the same format as another surface.

SDL_ConvertSurface() wrapper.

Reimplemented from sdl4gcj::video::Surface.

void sdl4gcj::video::Screen::displayForamtAlpha  )  [inline]
 

void sdl4gcj::video::Screen::displayFormat  )  [inline]
 

Convert a surface to the display format.

SDL_DisplayFormat() wrapper.

Reimplemented from sdl4gcj::video::Surface.

native void sdl4gcj::video::Screen::flip  ) 
 

SDL_Flip(SDL_Surface* screen).

void sdl4gcj::video::Screen::freeSurface  )  [inline]
 

Free surface.

SDL_FreeSurface() wrapper.

Reimplemented from sdl4gcj::video::Surface.

static native int [] sdl4gcj::video::Screen::getBlueGammaRamp  )  [static]
 

Gets the blue gamma lookup tables for the display.

SDL_GetGammaRamp(NULL, NULL, bluetable)

Cursor sdl4gcj::video::Screen::getCursor  )  [inline]
 

Get the currently active mouse cursor.

SDL_Cursor* SDL_GetCursor() wrapper.

native boolean sdl4gcj::video::Screen::getGrabInputMode  ) 
 

Get grab mode for mouse and keyboard input.

SDL_WM_GrabInput() wrapper.

Returns:
current grab mode

static native int [] sdl4gcj::video::Screen::getGreenGammaRamp  )  [static]
 

Gets the green gamma lookup tables for the display.

SDL_GetGammaRamp(NULL, greentable, NULL)

static native String sdl4gcj::video::Screen::getIconCaption  )  [static]
 

Gets the icon caption.

SDL_WM_GetCaption(char** title, char* icon) wrapper.

static native int [] sdl4gcj::video::Screen::getRedGammaRamp  )  [static]
 

Gets the red gamma lookup tables for the display.

SDL_GetGammaRamp(redtable, NULL, NULL)

static native VideoInfo sdl4gcj::video::Screen::getVideoInfo  )  [static]
 

Get the information about the video hardware.

SDL_GetVideoInfo()

static native Screen sdl4gcj::video::Screen::getVideoSurface  )  [static]
 

Get the current display surface.

SDL_GetVideoSurface()

static native String sdl4gcj::video::Screen::getWindowCaption  )  [static]
 

Gets the window caption.

SDL_WM_GetCaption(char** title, char* icon) wrapper.

static native int sdl4gcj::video::Screen::glGetAttribute int  attr  )  [static]
 

SDL_GL_GetAttribute(SDL_GLattr attr).

static native void sdl4gcj::video::Screen::glSetAttribute int  attr,
int  value
[static]
 

SDL_GL_SetAttribute(SDL_GLattr attr, int value).

native void sdl4gcj::video::Screen::glSwapBuffers  ) 
 

SDL_GL_SwapBuffers().

native boolean sdl4gcj::video::Screen::grabInput boolean  grabMode  ) 
 

Grab mouse and keyboard input.

SDL_WM_GrabInput() wrapper.

Returns:
new grab mode

native void sdl4gcj::video::Screen::iconifyWindow  ) 
 

Iconify/Minimise the window.

SDL_WM_IconifyWindow()

void sdl4gcj::video::Screen::initRGBSurface int  flags,
int  width,
int  height,
int  bpp,
int  rmask,
int  gmask,
int  bmask,
int  amask
[inline, private]
 

Reimplemented from sdl4gcj::video::Surface.

void sdl4gcj::video::Screen::initRGBSurfaceFrom int[]  pixels,
int  width,
int  height,
int  bpp,
int  pitch,
int  rmask,
int  gmask,
int  bmask,
int  amask
[inline, private]
 

Reimplemented from sdl4gcj::video::Surface.

void sdl4gcj::video::Screen::initRGBSurfaceFrom short[]  pixels,
int  width,
int  height,
int  bpp,
int  pitch,
int  rmask,
int  gmask,
int  bmask,
int  amask
[inline, private]
 

Reimplemented from sdl4gcj::video::Surface.

void sdl4gcj::video::Screen::initRGBSurfaceFrom byte[]  pixels,
int  width,
int  height,
int  bpp,
int  pitch,
int  rmask,
int  gmask,
int  bmask,
int  amask
[inline, private]
 

Reimplemented from sdl4gcj::video::Surface.

boolean sdl4gcj::video::Screen::isCursorVisible  )  [inline]
 

Returns true if the cursor is visible.

SDL_ShowCursor(int toggle) wrapper.

static Rect [] sdl4gcj::video::Screen::listModes int  flags  )  [inline, static]
 

Returns an array of available screen dimensions for the given video flags.

Same as Screen.listModes(null, flags);

Returns:
Array of available screen dimensions. If there are no dimensions available, return null. If any dimension is okay for the given format, return zero length array.
See also:
VideoConstants.SDL_SWSURFACE

VideoConstants.SDL_HWSURFACE

VideoConstants.SDL_ASYNCBLIT

VideoConstants.SDL_ANYFORMAT

VideoConstants.SDL_HWPALETTE

VideoConstants.SDL_DOUBLEBUF

VideoConstants.SDL_FULLSCREEN

VideoConstants.SDL_OPENGL

VideoConstants.SDL_OPENGLBLIT

VideoConstants.SDL_RESIZABLE

VideoConstants.SDL_NOFRAME

static native Rect [] sdl4gcj::video::Screen::listModes PixelFormat  format,
int  flags
[static]
 

Returns an array of available screen dimensions for the given format and video flags.

SDL_ListModes(SDL_PixelFormat* format, Uint32 flags) wrapper.

Returns:
Array of available screen dimensions. If there are no dimensions available, return null. If any dimension is okay for the given format, return zero length array.
See also:
VideoConstants.SDL_SWSURFACE

VideoConstants.SDL_HWSURFACE

VideoConstants.SDL_ASYNCBLIT

VideoConstants.SDL_ANYFORMAT

VideoConstants.SDL_HWPALETTE

VideoConstants.SDL_DOUBLEBUF

VideoConstants.SDL_FULLSCREEN

VideoConstants.SDL_OPENGL

VideoConstants.SDL_OPENGLBLIT

VideoConstants.SDL_RESIZABLE

VideoConstants.SDL_NOFRAME

static void sdl4gcj::video::Screen::setBlueGammaRamp int[]  blueTable  )  [inline, static]
 

Sets the blue gamma lookup tables for the display.

SDL_SetGammaRamp(blueTable, null, null)

static native void sdl4gcj::video::Screen::setCaption String  windowCaption,
String  iconCaption
[static]
 

Set window title and icon name.

SDL_WM_SetCaption(char* title, char* icon) wrapper.

void sdl4gcj::video::Screen::setCursor Cursor  cursor  )  [inline]
 

Set the currently active mouse cursor.

SDL_SetCursor(SDL_Cursor* cursor) wrapper.

void sdl4gcj::video::Screen::setCursorVisible boolean  toggle  )  [inline]
 

Toggle whether or not the cursor is shown on the screen.

SDL_ShowCursor(int toggle) wrapper.

static native void sdl4gcj::video::Screen::setGamma float  redgamma,
float  greengamma,
float  bluegamma
[static]
 

Sets the color gamma function for the display.

SDL_SetGamma(float redgamma, float greengamma, float, bluegamma)

static native void sdl4gcj::video::Screen::setGammaRamp int[]  redtable,
int[]  greentable,
int[]  bluetable
[static]
 

Sets the color gamma lookup tables for the display.

SDL_SetGammaRamp(Uint16* redtable, Uint16* greentable, Uint16* bluetable)

native void sdl4gcj::video::Screen::setGrabInputMode boolean  grabMode  ) 
 

Grab mouse and keyboard input.

SDL_WM_GrabInput() wrapper.

static void sdl4gcj::video::Screen::setGreenGammaRamp int[]  greenTable  )  [inline, static]
 

Sets the green gamma lookup tables for the display.

SDL_SetGammaRamp(greenTable, null, null)

static void sdl4gcj::video::Screen::setIcon Surface  icon  )  [inline, static]
 

Set the icon for the display window.

Win32 icons must be 32x32. This method must be called before the first call to Screen.setVideoMode(). The entire icon surface will be used as the icon. SDL_WM_SetIcon(SDL_Surface* icon, Uint8* mask) wrapper.

static native void sdl4gcj::video::Screen::setIcon Surface  icon,
byte[]  mask
[static]
 

Set the icon for the display window.

Win32 icons must be 32x32. This method must be called before the first call to Screen.setVideoMode(). It takes an icon surface, and a mask in MSB format. SDL_WM_SetIcon(SDL_Surface* icon, Uint8* mask) wrapper.

static void sdl4gcj::video::Screen::setIconCaption String  iconCaption  )  [inline, static]
 

Set the icon caption.

SDL_WM_SetCaption(NULL, iconCaption) wrapper.

static void sdl4gcj::video::Screen::setRedGammaRamp int[]  redTable  )  [inline, static]
 

Sets the red gamma lookup tables for the display.

SDL_SetGammaRamp(redTable, null, null)

static native Screen sdl4gcj::video::Screen::setVideoMode int  width,
int  height,
int  bpp,
int  flags
[static]
 

Set up a video mode with the specified width, height and bits-per-pixel.

SDL_SetVideoMode(int w, int h, int bpp, int flags) wrapper.

See also:
VideoConstants.SDL_SWSURFACE

VideoConstants.SDL_HWSURFACE

VideoConstants.SDL_ASYNCBLIT

VideoConstants.SDL_ANYFORMAT

VideoConstants.SDL_HWPALETTE

VideoConstants.SDL_DOUBLEBUF

VideoConstants.SDL_FULLSCREEN

VideoConstants.SDL_OPENGL

VideoConstants.SDL_OPENGLBLIT

VideoConstants.SDL_RESIZABLE

VideoConstants.SDL_NOFRAME

static void sdl4gcj::video::Screen::setWindowCaption String  windowCaption  )  [inline, static]
 

Set the window caption.

SDL_WM_SetCaption(windowCaption, NULL) wrapper.

native int sdl4gcj::video::Screen::toggleFullScreen  ) 
 

Toggle fullscreen mode.

Toggles the application between windowed and fullscreen mode, if supported. SDL_WM_ToggleFullScreen() wrapper.

Returns:
0 on failure or 1 on success.

void sdl4gcj::video::Screen::updateRect  )  [inline]
 

Make sure the whole of screen is updated.

void sdl4gcj::video::Screen::updateRect Rect  rect  )  [inline]
 

Make sure the given area is updated.

native void sdl4gcj::video::Screen::updateRect int  x,
int  y,
int  w,
int  h
 

Make sure the given area is updated.

This is equivalent to SDL_UpdateRect() function.

native void sdl4gcj::video::Screen::updateRects Rect[]  rects  ) 
 

Make sure the given areas are updated.

This is equivalent to SDL_UpdateRects() function.

static native int sdl4gcj::video::Screen::videoModeOK int  width,
int  height,
int  bpp,
int  flags
[static]
 

Check to see if a particular video mode is supported.

SDL_VideoModeOK(int w, int h, int bpp, int flags) wrapper.

Returns:
0 if the requested mode is not supported under any bit depth, or returns the bits-per-pixel of the closest available mode with the given size and flags.
See also:
VideoConstants.SDL_SWSURFACE

VideoConstants.SDL_HWSURFACE

VideoConstants.SDL_ASYNCBLIT

VideoConstants.SDL_ANYFORMAT

VideoConstants.SDL_HWPALETTE

VideoConstants.SDL_DOUBLEBUF

VideoConstants.SDL_FULLSCREEN

VideoConstants.SDL_OPENGL

VideoConstants.SDL_OPENGLBLIT

VideoConstants.SDL_RESIZABLE

VideoConstants.SDL_NOFRAME


Field Documentation

Screen sdl4gcj::video::Screen::singleton = null [static, private]
 


The documentation for this class was generated from the following file:
Generated on Mon Apr 24 14:07:34 2006 for sdl4gcj by  doxygen 1.4.3