Commit graph

244 commits

Author SHA1 Message Date
Daniel Collin 38fa50a4ef rustfmt 2019-11-27 07:59:15 +01:00
mishazawa 8d8c8a56db Add example Julia set (#106) 2019-11-27 07:57:32 +01:00
Daniel Collin bac71b2979
Switched from Travis/Appveyor to GH Actions (#103)
* Inital CI for GH

* Added Windows and macOS

* Lets try again

* Readme now points to GH CI

* Removed travis and appveor configs
2019-11-11 15:29:43 +01:00
Gary Guo bf4eb2d092 Handle missing Alt keys in X11 (#99) 2019-11-04 08:15:19 +01:00
Gary Guo e2acdad0c2 Fix window close handling (#98)
Currently we interned WM_DELETE_WINDOW but does not call
XSetWMProtocols to listen to it, causing a fatal error when
closing the window by clicking "X". This patch fixes the issue.
2019-11-02 09:03:49 +01:00
Venceslas 5234be4283 fix 'attempt to subtract with overflow' bug (#96)
* fix 'attempt to subtract with overflow' bug

* Little mistake
2019-10-29 09:30:18 +01:00
Daniel Collin 24d2ce4a99 Better modifier handling on macOS 2019-10-28 09:39:38 +01:00
Daniel Collin 644ff06483 Stop spam 2019-10-28 09:39:02 +01:00
Daniel Collin b4675905d2 WIP on macOS resizing support 2019-10-01 16:36:33 +02:00
Arif Roktim 0e3bf4a7e2 Improve documentation for method update_with_buffer of Window (#89) 2019-09-27 09:24:57 +02:00
Gary Guo c56ea6dae9 Improvement in doc and doc tests (#86)
* Fixed a few mistakes in docs
* Convert `ignore` examples to `no_run` examples, so `cargo test` will
  make sure they compiles.
2019-09-24 07:55:26 +02:00
Daniel Collin b8d4ad098f Bump to 0.13 2019-08-30 17:43:42 +02:00
Johannes Stölp e20257db79 unix: replaced scale functions with macro and added missing invocations (#79) 2019-08-23 07:26:14 +02:00
Daniel Collin 85459c8b43 Fixed typo 2019-07-21 12:09:43 +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
Daniel Collin b62382bf0c Fixed some compiler warnings 2019-07-21 10:37:47 +02:00
Daniel Collin 29721b0eeb Set back width to 640 2019-07-21 10:36:33 +02:00
Chris West 2b8094cc6c x11 and examples: resize (#72)
* warnings / clippy

* x11: remove deprecated, ignored position hints

* x11: only non-resizable windows have fixed size

* x11: handle resizes of ximage
2019-04-01 10:19:23 +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
Chris West ac624f5a26 raise shared_data update (#68)
This helps the check_buffer_size run against the actual
window size, which stops us from segfaulting if the
window size has changed unexpectedly, e.g. because a
window manager is evil.
2019-03-14 16:29:59 +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
Holden 0b5e39c396 Add additional derived traits to Key enum (#65)
* Add partial ord and partial eq to keys enum

* Derive eq on key

* Derive ord
2018-12-29 08:37:56 +01:00
tdaffin fb403498f0 Bump version to 0.11.2 (#64) 2018-12-20 07:22:36 +01:00
tdaffin 95d0e6f5e5 Update appveyor.yml to use starkat99's version (#63) 2018-12-18 17:41:14 +01:00
tdaffin 3aaf613edd Added Window.is_key_released (#62)
* Added Window.is_key_released

* Add is_key_released for the other platforms
2018-12-18 11:20:32 +01:00
Daniel Collin 6137568ef5 Updated to 0.11.1 2018-11-13 21:41:00 +01:00
Daniel Collin a8a969afee Fixed broken menu example 2018-11-13 21:38:55 +01:00
Daniel Collin 301da1c544
Removed broken screenshot 2018-10-25 11:00:38 +02: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 335f505ef2 Removed updateLayer 2018-10-20 09:33:21 +02:00
Daniel Collin 2e2bd93a1c fixed tabs 2018-10-20 09:31:46 +02:00
Daniel Collin 450502f672 Fixed macOS warnings 2018-10-19 22:05:15 +02:00
Daniel Collin 6a92232b75 Updated to 0.10.7 2018-08-10 09:23:30 +02:00
Lukas Kalbertodt 87e742047d Add debug impls (#56)
* Add missing `Debug` impls to public types

In one case, a missing Clone and Copy impl was added, too.

* Remove several `doc(hidden)` & make some modules private

I'm not quite sure why it was done the way it was. This change makes
items that were used in the public API visible in the documentation. It
also makes modules not used in the public API private.

* Add `#![deny(missing_debug_implementations)]` to crate root
2018-08-10 09:14:14 +02:00
Daniel Collin 9b835f9331 Bump to 0.10.6 2018-05-18 22:14:53 +02:00
Daniel Collin 3d70a5c7dc Added x16 and x32 scale to X11 2018-05-18 21:59:19 +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
Daniel Collin 26e6eca208 Fixed auto scaling and added X8 on Linux
Closes #51
Closes #52
2018-05-05 15:14:57 +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
Alexandru Ene 89f4d4ddd2 Fix Travis-CI build (#43) 2017-10-04 06:45:19 +02: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