2014-06-06 08:13:41 +00:00
|
|
|
#ifndef _MINIFB_H_
|
|
|
|
#define _MINIFB_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#define MFB_RGB(r, g, b) (((unsigned int)r) << 16) | (((unsigned int)g) << 8) | b
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-06-06 16:18:34 +00:00
|
|
|
// Create a window that is used to display the buffer sent into the mfb_update function, returns 0 if fails
|
2014-06-06 08:13:41 +00:00
|
|
|
int mfb_open(const char* name, int width, int height);
|
|
|
|
|
|
|
|
// Update the display. Input buffer is assumed to be a 32-bit buffer of the size given in the open call
|
2014-06-06 16:10:20 +00:00
|
|
|
// Will return -1 when ESC key is pressed (later on will return keycode and -1 on other close signal)
|
2014-06-06 08:13:41 +00:00
|
|
|
int mfb_update(void* buffer);
|
|
|
|
|
|
|
|
// Close the window
|
|
|
|
void mfb_close();
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|