AllegroPlus
 All Classes Functions Variables Pages
Public Member Functions | Static Public Member Functions | List of all members
Allegro::DisplayPlus Class Reference

Wrapper for ALLEGRO_DISPLAY More...

#include <DisplayPlus.h>

Public Member Functions

 DisplayPlus ()
 Default constructor.
 DisplayPlus (const int w, const int h)
 Default constructor.
 ~DisplayPlus ()
 Destructor.
void CreateDisplay (const int w, const int h)
 Creates a display.
bool AcknowledgeResize ()
 Determines if we can acknowledge resize.
ALLEGRO_BITMAP * GetBackbuffer () const
 Gets the backbuffer.
int GetFlags () const
 Gets the flags.
int GetFormat () const
 Gets the format.
int GetHeight () const
 Gets the height.
int GetRefreshRate () const
 Gets the refresh rate.
int GetWidth () const
 Gets the width.
void GetWindowPosition (int &x, int &y)
 Gets a window position.
bool ResizeDisplay (const int w, const int h)
 Resize display.
void SetIcon (ALLEGRO_BITMAP *icon)
 Sets an icon.
int GetOption (const int option) const
 Gets an option.
void SetWindowPosition (const int x, const int y)
 Sets a window position.
void SetWindowTitle (const char *title)
 Sets a window title.
void SetWindowTitle (const std::string &title)
 Sets a window title.
bool SetFlag (int flag, bool onOff)
 Sets a flag.
ALLEGRO_EVENT_SOURCE * GetEventSource () const
 Gets the event source.

Static Public Member Functions

static int GetNewFlags ()
 Gets the new flags.
static int GetNewRefreshRate ()
 Gets the new refresh rate.
static void GetNewWindowPosition (int &x, int &y)
 Gets a new window position.
static void SetNewOption (int option, int value, int importance)
 Sets a new option.
static int GetNewOption (int option, int &importance)
 Gets a new option.
static void ResetNewOptions ()
 Resets the new options.
static void SetNewFlags (int flags)
 Sets a new flags.
static void SetNewRefreshRate (int refreshRate)
 Sets a new refresh rate.
static void SetNewWindowPosition (int x, int y)
 Sets a new window position.
static void ResetNewWindowPosition ()
 Resets the new window position.
static void FlipDisplay ()
 Flip display.
static bool InhibitScreensaver (bool inhibit)
 Inhibit screensaver.
static void UpdateRegion (int x, int y, int width, int height)
 Updates the region.
static bool WaitForVsync ()
 Determines if we can wait for vsync.

Detailed Description

Wrapper for ALLEGRO_DISPLAY

Constructor & Destructor Documentation

Allegro::DisplayPlus::DisplayPlus ( void  )

Default constructor.

Allegro::DisplayPlus::DisplayPlus ( const int  w,
const int  h 
)

Default constructor.

Parameters
wThe const int to process.
hThe const int to process.
Allegro::DisplayPlus::~DisplayPlus ( void  )

Destructor.

Member Function Documentation

bool Allegro::DisplayPlus::AcknowledgeResize ( void  )

Determines if we can acknowledge resize.

Returns
true if it succeeds, false if it fails.
void Allegro::DisplayPlus::CreateDisplay ( const int  w,
const int  h 
)

Creates a display.

Parameters
wThe const int to process.
hThe const int to process.
void Allegro::DisplayPlus::FlipDisplay ( void  )
static

Flip display.

ALLEGRO_BITMAP * Allegro::DisplayPlus::GetBackbuffer ( void  ) const

Gets the backbuffer.

Returns
null if it fails, else the backbuffer.
ALLEGRO_EVENT_SOURCE * Allegro::DisplayPlus::GetEventSource ( void  ) const

Gets the event source.

Returns
null if it fails, else the event source.
int Allegro::DisplayPlus::GetFlags ( void  ) const

Gets the flags.

Returns
The flags.
int Allegro::DisplayPlus::GetFormat ( void  ) const

Gets the format.

Returns
The format.
int Allegro::DisplayPlus::GetHeight ( void  ) const

Gets the height.

Returns
The height.
int Allegro::DisplayPlus::GetNewFlags ( void  )
static

Gets the new flags.

Returns
The new flags.
int Allegro::DisplayPlus::GetNewOption ( int  option,
int &  importance 
)
static

Gets a new option.

Parameters
optionThe option.
importanceThe importance.
Returns
The new option.
int Allegro::DisplayPlus::GetNewRefreshRate ( void  )
static

Gets the new refresh rate.

Returns
The new refresh rate.
void Allegro::DisplayPlus::GetNewWindowPosition ( int &  x,
int &  y 
)
static

Gets a new window position.

Parameters
xThe int & to process.
yThe int & to process.
Returns
The new window position.
int Allegro::DisplayPlus::GetOption ( const int  option) const

Gets an option.

Parameters
optionThe option.
Returns
The option.
int Allegro::DisplayPlus::GetRefreshRate ( void  ) const

Gets the refresh rate.

Returns
The refresh rate.
int Allegro::DisplayPlus::GetWidth ( void  ) const

Gets the width.

Returns
The width.
void Allegro::DisplayPlus::GetWindowPosition ( int &  x,
int &  y 
)

Gets a window position.

Parameters
xThe const int to process.
yThe const int to process.
bool Allegro::DisplayPlus::InhibitScreensaver ( bool  inhibit)
static

Inhibit screensaver.

Parameters
inhibittrue to inhibit.
void Allegro::DisplayPlus::ResetNewOptions ( void  )
static

Resets the new options.

void Allegro::DisplayPlus::ResetNewWindowPosition ( void  )
static

Resets the new window position.

bool Allegro::DisplayPlus::ResizeDisplay ( const int  w,
const int  h 
)

Resize display.

Parameters
wThe const int to process.
hThe const int to process.
Returns
true if it succeeds, false if it fails.
bool Allegro::DisplayPlus::SetFlag ( int  flag,
bool  onOff 
)

Sets a flag.

Parameters
flagThe flag.
onOfftrue to disable, false to enable the on.
Returns
true if it succeeds, false if it fails.
void Allegro::DisplayPlus::SetIcon ( ALLEGRO_BITMAP *  icon)

Sets an icon.

Parameters
icon[in,out] If non-null, the icon.
void Allegro::DisplayPlus::SetNewFlags ( int  flags)
static

Sets a new flags.

Parameters
flagsThe flags.
void Allegro::DisplayPlus::SetNewOption ( int  option,
int  value,
int  importance 
)
static

Sets a new option.

Parameters
optionThe option.
valueThe value.
importanceThe importance.
void Allegro::DisplayPlus::SetNewRefreshRate ( int  refreshRate)
static

Sets a new refresh rate.

Parameters
refreshRateThe refresh rate.
void Allegro::DisplayPlus::SetNewWindowPosition ( int  x,
int  y 
)
static

Sets a new window position.

Parameters
xThe x coordinate.
yThe y coordinate.
void Allegro::DisplayPlus::SetWindowPosition ( const int  x,
const int  y 
)

Sets a window position.

Parameters
xThe const int to process.
yThe const int to process.
void Allegro::DisplayPlus::SetWindowTitle ( const char *  title)

Sets a window title.

Parameters
titleThe title.
void Allegro::DisplayPlus::SetWindowTitle ( const std::string &  title)

Sets a window title.

Parameters
titleThe title.
void Allegro::DisplayPlus::UpdateRegion ( int  x,
int  y,
int  width,
int  height 
)
static

Updates the region.

Parameters
xThe x coordinate.
yThe y coordinate.
widthThe width.
heightThe height.
bool Allegro::DisplayPlus::WaitForVsync ( void  )
static

Determines if we can wait for vsync.

Returns
true if it succeeds, false if it fails.