Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Burger::OSCursorImage Class Reference

Class to generate an operating system cursor. More...

Public Member Functions

 OSCursorImage () noexcept
 Default constructor.
 
 ~OSCursorImage ()
 Default destructor.
 
eError CreateMonoChromeImage (const uint8_t *pXor, const uint8_t *pAnd, uint_t uWidth, uint_t uHeight, int_t iHotX, int_t iHotY) noexcept
 Generate a monochrome cursor.
 
void Shutdown (void) noexcept
 Release memory.
 

Private Member Functions

 OSCursorImage (const OSCursorImage &)=delete
 
OSCursorImageoperator= (const OSCursorImage &)=delete
 
 OSCursorImage (OSCursorImage &&)=delete
 
OSCursorImageoperator= (OSCursorImage &&)=delete
 

Private Attributes

HICON__m_pCursorImage
 Windows only, handle to the cursor image.
 
uint_t m_uWidth
 Width of the cursor in pixels.
 
uint_t m_uHeight
 Height of the cursor in pixels.
 
int_t m_iHotX
 Anchor X coordinate of the cursor.
 
int_t m_iHotY
 Anchor Y coordinate of the cursor.
 

Friends

class OSCursor
 

Detailed Description

Class to generate an operating system cursor.


For desktop operating systems like MacOS, Windows and Linux, a mouse cursor is drawn and updated by the operating system. This class allows the creation of cursors from monochrome or color bitmaps for run time creation of a hardware cursor.

Constructor & Destructor Documentation

◆ OSCursorImage() [1/3]

Burger::OSCursorImage::OSCursorImage ( const OSCursorImage & )
privatedelete

◆ OSCursorImage() [2/3]

Burger::OSCursorImage::OSCursorImage ( OSCursorImage && )
privatedelete

◆ OSCursorImage() [3/3]

Burger::OSCursorImage::OSCursorImage ( )
noexcept

Default constructor.


Power up defaults. No cursor is generated.

◆ ~OSCursorImage()

Burger::OSCursorImage::~OSCursorImage ( )

Default destructor.


Release all resources allocated

See also
Shutdown()

Member Function Documentation

◆ CreateMonoChromeImage()

Burger::eError BURGER_API Burger::OSCursorImage::CreateMonoChromeImage ( const uint8_t * pXor,
const uint8_t * pAnd,
uint_t uWidth,
uint_t uHeight,
int_t iHotX,
int_t iHotY )
noexcept

Generate a monochrome cursor.


Given a black and white image, create a cursor.

Note
MacOS has a 16x16 maximum and Windows has a 32x32 maximum. Care should be used with this function.
Parameters
pXorPointer to the 1 bit per pixel bit map that is exclusive ored with the screen
pAndPointer to the 1 bit per pixel bit map that is and'd with the screen before the exclusive or
uWidthWidth of the cursor image in pixels
uHeightHeight of the cursor image in pixels
iHotXX coordinate of the hot spot in the cursor
iHotYY coordinate of the hot spot in the cursor
Returns
Zero on success, non-zero on failure
See also
Shutdown()

◆ operator=() [1/2]

OSCursorImage & Burger::OSCursorImage::operator= ( const OSCursorImage & )
privatedelete

◆ operator=() [2/2]

OSCursorImage & Burger::OSCursorImage::operator= ( OSCursorImage && )
privatedelete

◆ Shutdown()

void BURGER_API Burger::OSCursorImage::Shutdown ( void )
noexcept

Release memory.


Release all allocated resources in the class.

Friends And Related Symbol Documentation

◆ OSCursor

Member Data Documentation

◆ m_iHotX

int_t Burger::OSCursorImage::m_iHotX
private

Anchor X coordinate of the cursor.

◆ m_iHotY

int_t Burger::OSCursorImage::m_iHotY
private

Anchor Y coordinate of the cursor.

◆ m_pCursorImage

HICON__* Burger::OSCursorImage::m_pCursorImage
private

Windows only, handle to the cursor image.

◆ m_uHeight

uint_t Burger::OSCursorImage::m_uHeight
private

Height of the cursor in pixels.

◆ m_uWidth

uint_t Burger::OSCursorImage::m_uWidth
private

Width of the cursor in pixels.