Dirty rectangle updating system
This module implements a dirty-rectangle updating system. (../include/detk/drs.h)
Part of the detk library.
typedef void (*MX_FLUSH_FUNC) (MX_RECT* rect);
Flush callback function for dirty rectangle updating
This typedef defines a user defined callback function where dirty portions of the screen are determined. Inside the callback the user should place code to actually update the screen area. The updating rectangle can be modified by the callback to indicate what portions of the screen are actually updated. (../include/detk/drs.h)
void mx_drs_area(int w, int h)
Initialize dirty-rectangle system
This function initializes the dirty-rectangle updating system for a screen of the given dimensions. (../include/detk/drs.c)
unsigned mx_drs_dirtychanged(void)
Return if parts of the screen need updating
This function returns zero if there are no dirty areas of the screen. If the function return false then a following call to mx_drs_update() will not call the flush callback. This is useful to determine if a call to mx_drs_update() could (potentially) update the screen. It is not guaranteed that if this function returns true that mx_drs_update() will in fact call the fluch callback function. (../include/detk/drs.c)
unsigned mx_drs_update(MX_FLUSH_FUNC dflush)
Call the flush function with the parts of the screen needing updating
This function calls a user defined callback function with the areas of the screen marked as dirty by the mx_drs_dirty() function. (../include/detk/drs.c)
This functions return zero if no portion of the screen requires updating. (../include/detk/drs.c)
The updated areas (after possible modification in the callback) are guaranteed to bo non-overlapping. (../include/detk/drs.c)
The callback function may modify the area to indicate the area actually updated. (../include/detk/drs.c)
After this function returns the entire dirty area of the screen will have been updated though the callback and the entire screen will be marked as clean. (../include/detk/drs.c)
void mx_drs_dirty(const MX_RECT* rrect, unsigned mark)
Mark a portion of the screen as needing updating
This function marks a portion of the screen as dirty or clean. (../include/detk/drs.c)
Generated by MXDOC 2.2 on Sun Feb 4 15:16:27 2007