The core DEGFX module
This module contains the core DEGFX functions for drawing on the screen and gettign input from the keyboard and the mouse. (../include/degfx/coregfx.h)
Part of the degfx library.
# define MXSCREEN
Screen bitmap
The macro MXSCREEN can be used to specify the screen redraw buffer. (../include/degfx/coregfx.h)
void mx_font_default(MX_FONT* font)
The DEGFX system takes over ownership of the specified font. This is done by creating a reference to the specified font marking the font for deletion. So the font is guaranteed to be deleted as necessary whevener no objects have references to the font and a new default font is set. (../include/degfx/coregfx.c)
unsigned mx_gfx_start(MX_GFX_ARGS* userargs)
Start DEGFX and set the graphics mode
If the requested mode has same size, depth, title and driver as the previous one then the graphics mode is not changed. (../include/degfx/coregfx.c)
If the arguments are 0 then default values are used. (../include/degfx/coregfx.c)
A NULL driver means use the current driver or if there is none, then use the default driver. (../include/degfx/coregfx.c)
Function returns 0 if gfx mode set failed. (../include/degfx/coregfx.c)
After successful mode set the screen area contains the screen dimensions. (../include/degfx/coregfx.c)
If a redraw buffer is specified any previous redraw buffer that was allocated will be deleted. (../include/degfx/coregfx.c)
If no redraw buffer specified then one will be allocated and locked. (../include/degfx/coregfx.c)
The session is incremented after every successfull mode set. (../include/degfx/coregfx.c)
The MX_GFX_ARGS struct (if present) is modified to the mode information actually set by the underlying driver. (../include/degfx/coregfx.c)
void mx_gfx_stop(void)
Stop DEGFX
This function stops the graphics mode and (depending on the driver) probably returns to a text mode. It can be called before the program return to the operating system however if the user does not do this it will be done automatically. (../include/degfx/coregfx.c)
The internal graphics redraw buffer is released. (../include/degfx/coregfx.c)
const MX_GFX_ARGS* mx_gfx_info(void)
This function returns information about the current graphics mode. (../include/degfx/coregfx.c)
void mx_gfx_redraw(MX_REDRAW_FUNC redraw)
This function sets the redraw callback. (../include/degfx/coregfx.c)
void mx_gfx_dirty(const MX_RECT* rect)
Mark part of the screen as dirty
This function marks a portion of the screen as dirty. (../include/degfx/coregfx.c)
unsigned mx_gfx_poll(void)
Poll the DEGFX grpahics/keyboard/mouse system
This function causes the conditions of the keyboard and mose to be read from the system. This should be done every time you want to read the keyboard of the mouse. Most drivers also redraw the screen during the poll. (../include/degfx/coregfx.c)
unsigned mx_gfx_pointer(int* x, int* y, int* b)
Get the mouse position and state
This function reads the mouse pointer position and button state. The function return non-zero if a new position has been read. (../include/degfx/coregfx.c)
If arguments are 0 then they are ignored. (../include/degfx/coregfx.c)
unsigned mx_gfx_hidepointer(unsigned hide)
Hide the pointer
This only works if DEGFX draws the pointer. This function does nothing on platforms that draw thier own pointer i.e. Win32GDI. (../include/degfx/coregfx.c)
Unlike many other graphics libraries you dont have to hide the pointer when drawing on the screen. This is not necessary with DEGFX because drawing takes place on an internal redraw buffer and the mouse is only added when blitting the innternal redraw buffer to the screen. (../include/degfx/coregfx.c)
unsigned mx_gfx_key(int* scan, int* ascii)
Return keypress information
If new keypress information is available the function return non-zero, otherwise no key has been pressed. (../include/degfx/coregfx.c)
If arguments are 0 then they are ignored. (../include/degfx/coregfx.c)
Generated by MXDOC 2.2 on Sun Feb 4 15:16:26 2007