Replace calls to time::precise_time_s with std::time::Instant.
Also replaced the type of a time variable with std::time::Duration
because it played nicely with using Instant
* Wayland implementation restructuration
* Moved previous X11 code into own module
* Moved some data into a common struct between wayland and x11
* Added glue
* Moved common unix functions into module
* Revert commits
* Update x11.rs
* Update x11.rs
* Cargo fmt
* Cargo fmt
* Initial Wayland struct and constructors
* Create Wayland window first
* Window::new constructor and removed error type
* Complete window creation
* More docs
* Fixed window creation
* Proper window creation
* Added byteorder
* Disallow resize and set_title
* Implement is_open() and get_window_handle()
* Fixed get_size() and implemented set_position()
* Wayland set_position was missing
* Added WIP update methods
* Improved update methods
* Added more prototype functions
* Get Keyboard and Mouse device
* outsource input device creation
* get proper mouse positions
* Properly get scroll wheel
* Implement HasRawWindowHandle for Wayland Window
* Implemented updaterate methods
* is active method
* More key handler methods
* Retrieve all events from keyboard and mouse
* Added more DisplayInfo methods
* Improvements for event handling
* Partial support for scaling
* Properly update buffer
* More imports
* Styling, etc.
* Merge
* More code to update the framebuffer
* Added scaling again
* Readded better event handling
* Properly render all colors as non-transparent ones
* Clear all events after being read
* update_with_buffer_stride is not WIP anymore
* Assume a connected keyboard and pointer device
* Moved keyboard and pointer from DisplayInfo into Window
* Support resizing and checking if the window is still open
* Rendering performance improvement
* Less warnings and some comments
* Byteorder now required anymore
* Not anymore resizing the ShmPool below its previous size and remove WlBuffers when told to
* Removed more magic numbers and added comments
* Proper size check of the buffer size
* Less conversions
* save the previous framebuffer size in DisplayInfo instead of seeking the fd
* Set the pixelformat statically depending on whether alpha channel is allowed or not
* Set the fd length only again when the size really changes
* Save resizability so that the size of the window doesnt get changed.
* Fix rerendering issue
* Fix rerendering issue
* Using unstable protocol to support server-side decorations
* Outsource buffer creation code
* Small improvements and comments
* Replaced usage of atomic types
* Cleanup
* Outsource Input handling into own struct
* Use mspc channels instead of Vec for input handling
* Implemented set_cursor_style()
* Proper cursorstyle into string decoding
* Implemented mouse buttons
* Scroll wheel fix
* Handle scroll events
* Updated code for new version of the wayland crate
* Reset scroll after each update
* Starting on keymap support with xkb
* Revert 19a590a
* Add missing bracket
* added missing minimum version for surface.damage_buffer()
* Fix for corrupted pointer images
* Implement scaling
* Remove comments
* Acknowledge only the last configure event when redrawing
* Assign the closure to the toplevel only once
* Own function for buffer filtering
* Dont truncate the fd anymore
* Proper damage surface
* Preventg display from getting dropped first
* custom BufferPool implementation
* Unneccessary printlns
* ack configure before committing
* set active field when keyboard focus enters/leaves the surface
* save modifiers each time they are changed
* Requires xkbcommon-sys to retrieve the keymap - will later be removed
* Prototype function to convert a key
* simplify keymap creation
* handle key event
* simplify button state evaluation
* Create wl_seat earlier so events are not getting missed
* Added key conversions and key offset
* Cargo fmt
* Update keyhandler
* Renaming
* Update xkb keys
* Input callback
* Numpad corrections
* Remove publicity from functions
* Retrieve input devices as early as possible
* TODO
* Small cleanup
* Proper key modifiers update
* Scale::FitScreen cant be implemented for now
* finish menu functions(copied from x11)
* Clean up some stuff
* unused variables
* Less warnings
* Comments and Variable naming improvements
* retrieve toplevel info now with an own method
* Constants
* Remove unused function
* Unused field
* Unused let binding
* Improve code readability
* Change note
* Comments
* Opinionated cleanup
* Comment out unused variables
Might be used later on
* Mouse buttons with boolean state
* Prototype UnixMenu functions
* Renaming
* unimplemented functions
* actually unimplemented
* Minor formatting change
* Remove unused fields
Even if they will be used later on, this would be a breaking change.
It's unnecessary to keep these around no matter what the future may
hold.
* Less unwraping now
* Feature gate x11 and wayland, both enabled by default
* Feature gate dependencies
* Menu is now is a new file for both x11 and wayland
* Feature gate everything
* Cargo fmt
* Simplify conditions
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
* Missing paranthesis
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
* Cargo fmt
* Proper debug message
* wayland deps
* xkb dev lib
* Update Cargo.toml
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
* Update .github/workflows/ci.yml
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
* Implement borderless on X11
Co-authored-by: Antonino Siena <a.siena@gmx.de>
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
* Wayland implementation restructuration
* Moved previous X11 code into own module
* Moved some data into a common struct between wayland and x11
* Added glue
* Moved common unix functions into module
* Revert commits
* Update x11.rs
* Update x11.rs
* Cargo fmt
* Cargo fmt
* Initial Wayland struct and constructors
* Create Wayland window first
* Window::new constructor and removed error type
* Complete window creation
* More docs
* Fixed window creation
* Proper window creation
* Added byteorder
* Disallow resize and set_title
* Implement is_open() and get_window_handle()
* Fixed get_size() and implemented set_position()
* Wayland set_position was missing
* Added WIP update methods
* Improved update methods
* Added more prototype functions
* Get Keyboard and Mouse device
* outsource input device creation
* get proper mouse positions
* Properly get scroll wheel
* Implement HasRawWindowHandle for Wayland Window
* Implemented updaterate methods
* is active method
* More key handler methods
* Retrieve all events from keyboard and mouse
* Added more DisplayInfo methods
* Improvements for event handling
* Partial support for scaling
* Properly update buffer
* More imports
* Styling, etc.
* Merge
* More code to update the framebuffer
* Added scaling again
* Readded better event handling
* Properly render all colors as non-transparent ones
* Clear all events after being read
* update_with_buffer_stride is not WIP anymore
* Assume a connected keyboard and pointer device
* Moved keyboard and pointer from DisplayInfo into Window
* Support resizing and checking if the window is still open
* Rendering performance improvement
* Less warnings and some comments
* Byteorder now required anymore
* Not anymore resizing the ShmPool below its previous size and remove WlBuffers when told to
* Removed more magic numbers and added comments
* Proper size check of the buffer size
* Less conversions
* save the previous framebuffer size in DisplayInfo instead of seeking the fd
* Set the pixelformat statically depending on whether alpha channel is allowed or not
* Set the fd length only again when the size really changes
* Save resizability so that the size of the window doesnt get changed.
* Fix rerendering issue
* Fix rerendering issue
* Using unstable protocol to support server-side decorations
* Outsource buffer creation code
* Small improvements and comments
* Replaced usage of atomic types
* Cleanup
* Outsource Input handling into own struct
* Use mspc channels instead of Vec for input handling
* Implemented set_cursor_style()
* Proper cursorstyle into string decoding
* Implemented mouse buttons
* Scroll wheel fix
* Handle scroll events
* Updated code for new version of the wayland crate
* Reset scroll after each update
* Starting on keymap support with xkb
* Revert 19a590a
* Add missing bracket
* added missing minimum version for surface.damage_buffer()
* Fix for corrupted pointer images
* Implement scaling
* Remove comments
* Acknowledge only the last configure event when redrawing
* Assign the closure to the toplevel only once
* Own function for buffer filtering
* Dont truncate the fd anymore
* Proper damage surface
* Preventg display from getting dropped first
* custom BufferPool implementation
* Unneccessary printlns
* ack configure before committing
* set active field when keyboard focus enters/leaves the surface
* save modifiers each time they are changed
* Requires xkbcommon-sys to retrieve the keymap - will later be removed
* Prototype function to convert a key
* simplify keymap creation
* handle key event
* simplify button state evaluation
* Create wl_seat earlier so events are not getting missed
* Added key conversions and key offset
* Cargo fmt
* Update keyhandler
* Renaming
* Update xkb keys
* Input callback
* Numpad corrections
* Remove publicity from functions
* Retrieve input devices as early as possible
* TODO
* Small cleanup
* Proper key modifiers update
* Scale::FitScreen cant be implemented for now
* finish menu functions(copied from x11)
* Clean up some stuff
* unused variables
* Less warnings
* Comments and Variable naming improvements
* retrieve toplevel info now with an own method
* Constants
* Remove unused function
* Unused field
* Unused let binding
* Improve code readability
* Change note
* Comments
* Opinionated cleanup
* Comment out unused variables
Might be used later on
* Mouse buttons with boolean state
* Prototype UnixMenu functions
* Renaming
* unimplemented functions
* actually unimplemented
* Minor formatting change
* Remove unused fields
Even if they will be used later on, this would be a breaking change.
It's unnecessary to keep these around no matter what the future may
hold.
* Less unwraping now
* Feature gate x11 and wayland, both enabled by default
* Feature gate dependencies
* Menu is now is a new file for both x11 and wayland
* Feature gate everything
* Cargo fmt
* Simplify conditions
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
* Missing paranthesis
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
* Cargo fmt
* Proper debug message
* wayland deps
* xkb dev lib
* Update Cargo.toml
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
* Update .github/workflows/ci.yml
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
Co-authored-by: Antonino Siena <a.siena@gmx.de>
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
* Added a topmost property to WindowOptons and initialized it to false in WindowOption's default method
* Added an mfb_topmost function that sets the window's floating level to NSFloatingWindowLevel so it will be topmost
* Added an extern definition of mfb_topmost and conditionally call it if WindowOptions.topmost is true
* changing mfb_topmost first arg name from win to window to staty consistent with rust extern declaration
std::error::Error::description is deprecated, so I changed the
fmt::Display implementation to rely on fmt::Debug implementation, which,
in turn, return human-readable messages like description was doing
* Wayland implementation restructuration
* Moved previous X11 code into own module
* Moved some data into a common struct between wayland and x11
* Added glue
* Moved common unix functions into module
* Revert commits
* Update x11.rs
* Update x11.rs
* Cargo fmt
* Cargo fmt
* 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
* 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
* 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
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.