Commit graph

65 commits

Author SHA1 Message Date
Daniel Collin 8b3c2e9b37
Merge dev -> master (#119)
* Deprecated update_with_buffer and added a temporary (update_with_buffer_size) for now. This will later be removed and the update_with_buffer is requiring the size to bu suplied

* Reparation for 0.14 release

* Missed one case

* Minor cleanup

* Switch to C scalar for Unix + rename

Reason is so we can always use optimized scalar even in debug.
Also removed _size so only update_with_buffer(..) takes width, height of the input buffer

* Implemented AspectRatio aware scale on nix

* Implemented image center

* Added UpperLeft center mode for unix

* Moving macOS over to sized update

* Fixed resize not working on macOS

* WIP on macOS

* More WIP on macOS version

* Bunch of macOS updates and fixes

* Fixed broken bg color on macOS

* Windows fixes WIP

* Remove some spamming

* More windows fixes

* Windows fixes for cursor and warnings

* Some cleanup

* rustfmt pass

* Fixed typo

* Added support for limiting update rate

* Added update rate to Windows

* Added update rate to macOS

* Misc fixes

* Fixed resources and maintance badge

* Updated readme

* Updated changelog

* Added rate limit
2019-12-16 08:24:48 +01:00
Daniel Collin 5772cc5380
Merge dev -> master (#111)
* Deprecated update_with_buffer and added a temporary (update_with_buffer_size) for now. This will later be removed and the update_with_buffer is requiring the size to bu suplied

* Reparation for 0.14 release

* Missed one case
2019-12-03 15:24:03 +01:00
Daniel Collin a2633f78ad
Raw window handle (#110)
* Added support for raw-window-handle

Ref #104

* Fixed some typos

* Fixed more typos

* windows fix

* Another windows fix

* Another typo

* More typos

* More windwos fixes

* Yet anonther Windows fix
2019-12-02 15:51:46 +01:00
Florian Blasius 9c86b47ec5 Add support for raspberry pi. (#108) 2019-11-29 19:54:52 +01:00
Daniel Collin b8d4ad098f Bump to 0.13 2019-08-30 17:43:42 +02:00
Daniel Collin 36dbf92a3a Bump version again 2019-07-21 11:09:09 +02:00
Daniel Collin c3c9591788 Bump to 0.12 2019-07-21 11:06:04 +02:00
Chris West d6271e513d Rewrite linux backend in rust (#70)
* x11-rs : don't build libminifb_native.a

* x11-rs : commented out all calls to the mfb_xxx functions.

* x11-rs : added handle field to Window, type is xlib::Window.

Also implemented the get_window_handle() method.

* x11-rs : created a DisplayInfo struct with a setup() method.

* x11-rs : fleshed out DisplayInfo::setup() method some more.

* x11-rs : updated Cargo.toml to require x11_dl "2.16".

That is because we need the XContext type, which seems to be
unavailable in the 2.14 version.

* x11-rs : code to call the XCreateWindow() function.

* x11-rs : call XMapRaise() and XFlush() on our window.

* x11-rs : more work on Window::new() -- ported more stuff from mfb_open().

* x11-rs : create the 'ximage' field in Window::new().

* x11-rs : removed SharedData struct, moved fields into Window.

* x11-rs : ported the set_window_title() method.

* x11-rs : ported creating a "draw_buffer" and the 1:1 scaling code.

* x11-rs : ported the scale_2x() function.

* x11-rs : ported the scale_4x() function.

* x11-rs : ported the set_position() method.

* x11-rs : ported the mfb_close() code, i.e. Drop trait on a Window.

* x11-rs : tidied up code computing "scale" value for a new window.

* x11-rs : implemented Drop trait for DisplayInfo.

* x11-rs : updated the get_scroll_wheel() method.

* x11-rs : tidy up update_with_buffer() and check buffer size.

* x11-rs : ported the check_formats() code.

* x11-rs : ported the init_cursors() code.

* x11-rs : ported the set_cursor_style() code.

* x11-rs : ported the raw_get_mouse_pos() code.

* x11-rs : moved the code implementing Drop trait for Window.

* x11-rs : ported the basic event loop (i.e. raw_process_events).

* x11-rs : ported code handling the WM_DELETE_WINDOW client message.

* x11-rs : added code file "src/os/unix/key_mapping.rs"

This file contains code to map an X keysym to a Unicode char,
which is done via a binary search on a large table.  I ported
the code to Rust and rewrote the binary search as a recursive
function.

* x11-rs : ported the XkbQueryExtension() code.

* x11-rs : fleshed out the process_key() code.

* x11-rs : added test code for keysym_to_unicode(), fixed a table entry.

* x11-rs : another test value for the key_mapping test code.

* x11-rs : ported the update_key_state() code.

* x11-rs : ported the char_callback() code.

* x11-rs : ported the mouse button handling code.

* x11-rs : ported code handling the XConfigureNotify event.

* x11-rs : code tidying, silence most compiler warnings.

* x11-rs : removed the native C code: X11MiniFB.c

* x11-rs : fixed bug in the button handling code.

* x11-rs : made the scale_2x() and scale_4x() code faster.

* merge error

* whitespace

* fix cursors: bad string handling

* upgrade x11-dl

* merge scaling implementations

* multi-window example
2019-03-30 08:18:42 +01:00
Richard Hozák 6c4cba9895 Update winapi (#69)
* Remove duplicate windows dependencies in favor of cfg attribute

* Replace user32 with winuser from winapi

* More replacements from winapi-rs

* Fix remaining type imports

* Remove user32, kernel32 and gdi32 sys crates

Everything comes from winapi-rs now.

* Specify only the features of winapi-rs we need

* Remove star glob imports
2019-03-21 09:55:06 +01:00
Nagy Tibor ceadd15e6c Bump orbclient to 0.3.20 on Redox, remove alpha handling hacks (#67) 2019-01-15 06:10:05 +01:00
tdaffin fb403498f0 Bump version to 0.11.2 (#64) 2018-12-20 07:22:36 +01:00
Daniel Collin 6137568ef5 Updated to 0.11.1 2018-11-13 21:41:00 +01:00
Daniel Collin d8918f39c8 Fixed incorrect version 2018-10-23 20:52:56 +02:00
Daniel Collin 79608b38a2 merge macos-metal -> master
commit 2d8e0c1692120e9997bd8d376be8a7cc2536429d
Author: Daniel Collin <daniel@collin.com>
Date:   Tue Oct 23 20:51:09 2018 +0200

    Bump to 0.11 and added info about macOS Metal

commit 0f77968317194f2f72b86da287c04484aeee762a
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 17:44:26 2018 +0200

    Tripple buffer textures

commit d268c10576c7e9063bd4605aed4a939d956eeb6b
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 16:59:20 2018 +0200

    Some cleanup

commit 5544773e62afec6f69d0c3b6309e60a543905fef
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 16:24:45 2018 +0200

    Working but no proper sync yet

commit 843a6625cfddac5a6e2d8e61170f796e763e4002
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 15:26:45 2018 +0200

    Working texture

commit 1d4446f1f10c497dde07e0d20c92eb8bb6f836ec
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 14:45:52 2018 +0200

    Removed vertex data

    We construct this in the shader instead

commit 2e8027d73a1635e26e412dbda6494193fd04a060
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 14:42:36 2018 +0200

    Fullscreen triangle setup

commit 5efd974704c11577944ffdeff9eb9dd4fa40bde0
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 14:16:23 2018 +0200

    Triangle on screen

commit d9cf4eb7557f73adfbe1764f3da94a837a4ef8d3
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Oct 21 12:17:04 2018 +0200

    Some hacky metal with clear screen
2018-10-23 20:51:50 +02:00
Daniel Collin 6a92232b75 Updated to 0.10.7 2018-08-10 09:23:30 +02:00
Daniel Collin 9b835f9331 Bump to 0.10.6 2018-05-18 22:14:53 +02:00
Daniel Collin 8d7eb6b000 Updated gcc -> cc 1.0 2018-05-18 21:58:55 +02:00
Nagy Tibor 5e16895b7d Update orbclient to 0.3.14 on Redox (#55) 2018-05-16 07:12:32 +01:00
Daniel Collin f1bd963821 Updated to 0.10.5 2018-05-05 15:21:46 +02:00
Jonas Schievink a48cffc2ac Cargo.toml: Remove homepage link (#49)
The `homepage` key is meant for dedicated library websites, a link to the repository is already provided by the `repository` key.
2018-02-15 16:46:36 -08:00
Daniel Collin ef748e8aa3 Bump to 0.10.4 because of kernel32 crate fix. 2018-01-08 14:13:36 +01:00
Thomas Versteeg 52d42a7115 Update kernel32-sys to 0.2.2 on Windows (#46)
* Update kernel32-sys to 0.2.2 on Windows GNU

kernel32-sys 0.1.4 won't compile on my system:

rustc 1.24.0-nightly (8503b3ff8 2017-12-04)
binary: rustc
commit-hash: 8503b3ff822c1ed01c89773d30e4e10b886d77a5
commit-date: 2017-12-04
host: x86_64-pc-windows-gnu
release: 1.24.0-nightly
LLVM version: 4.0

* Bump kernel32-sys to 0.2.2 for MSVC as well
2018-01-08 12:26:06 +01:00
Daniel Collin d643efeaef Bump to 0.10.3 2017-10-01 15:56:16 +02:00
Daniel Collin 9c7e700697 Fixed incorrect badges paths 2017-10-01 15:54:00 +02:00
Daniel Collin e03af08306 Updated some metadata for crates.io 2017-10-01 15:48:57 +02:00
Daniel Collin 89c38d8e64 Bump to 0.10.1 2017-08-15 22:09:31 +02:00
Daniel Collin 900deba9a7 Implemented bounds checking for update_with_buffer 2017-08-11 12:41:24 +02:00
Daniel Collin 6db90d717f Bumped to 0.9.2 2017-07-31 16:39:02 +02:00
Daniel Collin 5cec5afc6a Upgraded x11-dll to 2.14 2017-07-31 16:14:19 +02:00
xTibor f4bd8b7704 Redox support (#35) 2017-04-24 09:09:05 +02:00
Daniel Collin 4d0aa028c2 Updated to 0.9.1 2017-04-02 12:24:21 +02:00
Daniel Collin c3f6b9cac7 Updated to correct link for docs 2017-04-02 12:20:12 +02:00
Daniel Collin f77e9c7095 Bump to 0.9.0
Added get_unscaled_mouse_pos

Closes #27
2016-08-02 18:24:25 +02:00
Daniel Collin 9cd8c97694 Update to 0.8.4 2016-07-31 18:06:50 +02:00
Daniel Collin 82b44cd959 minifb 0.8.3
Closes #25
2016-07-29 11:05:30 +02:00
Daniel Collin 09ee02c09c Bump to 0.8.2 2016-07-08 20:29:21 +02:00
Daniel Collin 9266ddb1d8 Bump to 0.8.1
Closes #22
2016-07-08 14:32:44 +02:00
Daniel Collin a31a19337d Bump to 0.8.0 2016-06-24 13:14:46 +02:00
Daniel Collin 495f7c4cca Added set_title and set_cursor_style 2016-06-24 13:08:01 +02:00
Daniel Collin b231ee1b5a Bump to 0.7.1 2016-05-27 18:19:09 +02:00
Daniel Collin e25be80077 Bump to 0.7.0 because of callback work 2016-05-01 16:36:57 +02:00
Daniel Collin 3c3dcd7c07 Bump to 0.6.0 as API changed (get_size added) 2016-05-01 10:35:27 +02:00
Daniel Collin 3565e1cb3f Fixed F-keys not working correctly on Mac 2016-04-29 08:57:55 +02:00
Daniel Collin 7865b87c14 Version 0.5.1 2016-04-25 18:18:33 +02:00
Daniel Collin 5d9ca9e585 Merge work from menu branch 2016-03-04 17:36:28 +01:00
Daniel Collin 73813b63f4 Merged window-opts to master
commit 53e9cd45567a1308fdbd2e46763e15b2a3fa3d4c
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 18:31:38 2016 +0100

    Correct header for v0.4.0

commit fcf64d5dfad0796fee16ce8985e66d1b3e82c5a4
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 18:30:12 2016 +0100

    More cleanup

commit b7f4b187569a753656f19a74b78d8ada3fd95b70
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 18:29:23 2016 +0100

    Minor cleanup

commit 7392cd4a5aaad7f0d8332082c75d6cbc41d50ca6
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 18:28:06 2016 +0100

    Updated example added Changelog link

commit 236a82883a68e576ceb1e38a54b0a18fdc2e4465
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 18:24:58 2016 +0100

    Updated readme

commit e6bc68721513ca66c5566a19e6bfad33875b3280
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 18:20:42 2016 +0100

    Doc fixes

commit edfd688f045764b66c944d4aa616c6d48246816d
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 18:20:35 2016 +0100

    Updated with 0.4.0 release info

commit 784628fa9a1de93280592e634b522fd916a7588a
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 15:45:37 2016 +0100

    Fixed bad comment

commit 2c6d8730b566193b573afb5dc95a82987d1c4ce4
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 15:37:52 2016 +0100

    Linux support for WindowOptions

commit cbf7c17c3a92d676f5707095781071016e8b90e1
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 15:05:10 2016 +0100

    Updated Windows version with WindowOptions

commit ed1254245384e3e64c082a8368cbbe4a9f679efa
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 14:32:04 2016 +0100

    Added get_window_handle

commit e4a15f98c70facda7e7b2f30ba95a42091fa078c
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 14:30:34 2016 +0100

    Cleanup + links

commit 7dadb090d1037eade525093e2a541c99940e6a3a
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 14:25:41 2016 +0100

    And again

commit 70bdb0f88812e12bf9ca9adc55c1e52cc36c3ef9
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 14:24:44 2016 +0100

    Try link again

commit b4b7b3c4cda1d958e8f9cf6a2418db68ac32bcc5
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 14:21:54 2016 +0100

    Some cleanup

commit fb9845bae37f6ce9ba309b8a57128ce8c426fbca
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 13:16:23 2016 +0100

    Renamed resizeable to resize

commit 89c5af826612dbd887855dca3937e99856c9fcf2
Author: Daniel Collin <daniel@collin.com>
Date:   Sun Jan 31 12:59:57 2016 +0100

    Working on making Windows a bit more generic

    * Added WindowOptions that can configure how the Window should look and behave better (resize, title, borderless)
    * Renamed update -> update_with_buffer
    * Added update which doesn't take a buffer (used to updated the window without buffers)
2016-01-31 18:34:05 +01:00
Daniel Collin 9458a1b05e MouseMode::Clamp now clamps to [(0,0) (w-1,h-1)] 2016-01-29 20:56:26 +01:00
Daniel Collin 8bdbc850d5 Merge from mouse-support 2016-01-29 20:16:00 +01:00
Daniel Collin 4b68372d8f Fixed typo 2016-01-10 18:37:33 +01:00
Daniel Collin bef08c0b49 Re-licence under MIT/Apache-2.0
Closes #13
2016-01-10 18:36:57 +01:00