Commit Graph

9 Commits

Author SHA1 Message Date
Carlos Aragonés
6b30baa7e4
Type prefixes (#34)
* update documentation

* Fix typo

* Added some examples

* changed window names

* Minor fix

* Added mfb_update_events to all platforms. Checked on Windows, X11 and Wayland

* simplify CMake

* Upgrade to CMake 3.5, simplify script and generalize it
Now the users only have to add_directory and link_libraries(minifb) in CMake

* Renamed typo scrool by scroll
Added some checks
Removed some warnings

* working Windows, X11 and Wayland

* fix issue 32

Co-authored-by: Carlos Aragones <>
Co-authored-by: caragones <carlos.aragonesmartinez-external@gemalto.com>
2020-03-06 07:06:54 +01:00
Carlos Aragonés
cdaa54f5d6 Direct mode (#23)
* update documentation

* Fix typo

* Added some examples

* changed window names

* Minor fix

* renamed callback setters (added _set_)
Direct / Poll Mode for asking events:
 bool            mfb_is_window_active(struct Window *window);
unsigned        mfb_get_window_width(struct Window *window);
unsigned        mfb_get_window_height(struct Window *window);
int             mfb_get_mouse_x(struct Window *window);            // Last mouse pos X
int             mfb_get_mouse_y(struct Window *window);            // Last mouse pos Y
float           mfb_get_mouse_scrool_x(struct Window *window);     // Mouse wheel X as a sum. When you call this function it resets.
float           mfb_get_mouse_scrool_y(struct Window *window);     // Mouse wheel Y as a sum. When you call this function it resets.
const uint8_t * mfb_get_mouse_button_buffer(struct Window *window);  // One byte for every button. Press (1), Release 0.
const uint8_t * mfb_get_key_buffer(struct Window *window);           // One byte for every key. Press (1), Release 0.

* Minor fixes

* Fixes related to mouse poll

* Minor fix on Win64
2019-11-14 16:18:42 +01:00
Carlos Aragonés
25a440f822 Update documentation (#20)
* update documentation

* Fix typo

* Minor fix
2019-06-09 08:50:42 +02:00
Marcus Fritzsch
b0f1590fc5 Basic wayland support though wl_shm (#8)
* x11: need to return somethin from processEvents()

* Added wayland support

* Documented how to use wayland support

* wayland: re-attach the buffer to actually trigger an update

* wayland: use the seat_listener
2017-01-24 20:14:11 +01:00
Daniel Collin
c04a118658 Fixed title 2017-01-24 11:12:57 +01:00
Daniel Collin
d13f5e070b Updated README 2014-06-06 18:23:32 +02:00
Daniel Collin
6a1100b611 Updated README 2014-06-06 18:16:01 +02:00
Daniel Collin
3f856d32bb Updated README 2014-06-06 18:10:29 +02:00
Daniel Collin
0b3bbaa0cb Initial commit 2014-06-06 07:41:52 +02:00