Design Pattern Examples
Overview of object-oriented design patterns
helpers/cursor.h File Reference

Declaration of the setcursorposition() and getcursorposition() functions for manipulating the cursor position on Windows terminals. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __CURSOR_H__
 

Functions

void disableinputecho (void)
 Disable echoing input until enableinputecho() is called.
 
void enableinputecho (void)
 Enable echoing input, which should be the default mode. Call this only after calling disableinputecho();.
 
void setcursorposition (int row, int column)
 Move the text cursor to the specified screen coordinates.
 
void getcursorposition (int *row, int *column)
 Retrieve the current cursor position in the console window.
 

Detailed Description

Declaration of the setcursorposition() and getcursorposition() functions for manipulating the cursor position on Windows terminals.

Definition in file helpers/cursor.h.

Macro Definition Documentation

◆ __CURSOR_H__

#define __CURSOR_H__

Definition at line 8 of file helpers/cursor.h.

Function Documentation

◆ disableinputecho()

void disableinputecho ( void  )

Disable echoing input until enableinputecho() is called.

Definition at line 112 of file cursor.c.

References _disableInputEcho(), and inputEchoDisabled.

Referenced by Flyweight_Exercise().

◆ enableinputecho()

void enableinputecho ( void  )

Enable echoing input, which should be the default mode. Call this only after calling disableinputecho();.

Definition at line 123 of file cursor.c.

References _enableInputEcho(), and inputEchoDisabled.

Referenced by Flyweight_Exercise().

◆ getcursorposition()

void getcursorposition ( int *  row,
int *  column 
)

Retrieve the current cursor position in the console window.

Parameters
rowReturns the row index from the top, starting at 0.
columnReturns the column index from the left, starting at 0.

Definition at line 143 of file cursor.c.

References _disableInputEcho(), _enableInputEcho(), inputEchoDisabled, split(), SplitList_Clear(), SplitList::strings, and SplitList::strings_count.

Referenced by Flyweight_Exercise().

◆ setcursorposition()

void setcursorposition ( int  row,
int  column 
)

Move the text cursor to the specified screen coordinates.

Parameters
rowRow index from top, starting at 0.
columnColumn index from left, starting at 0

Definition at line 134 of file cursor.c.

Referenced by Flyweight_Exercise().