Commit Graph

1946 Commits

Author SHA1 Message Date
Bananymous 78928b7eb4 Ports: Add curl port! 2024-06-17 21:40:13 +03:00
Bananymous 5236e1ef0d LibC: Add dummy functions for rename() and strftime()
I don't really want to implement them right now, but they are required
to exist for some ports.
2024-06-17 21:02:37 +03:00
Bananymous be7ed8e74a Kernel/LibC: Implement {get,set}sockopt()
These are pretty much dummy functions in the kernel side. Only case that
is handled is SOL_SOCKET with SO_ERROR. This is hard coded to return no
error. Network stack is currently synchronous, so all errors are already
reported through synchronous network functions.
2024-06-17 20:56:48 +03:00
Bananymous 78bcb85679 LibC: Implement gethostbyname()
This is not a POSIX function, but curl seems to depend on it. It is
even deprecated on linux...
2024-06-17 20:55:50 +03:00
Bananymous b98bb9eb27 LibC: Add HOST_NAME_MAX definition 2024-06-17 20:55:17 +03:00
Bananymous cad55a4da5 Kernel/LibC: Implement getsockname for ipv4 sockets 2024-06-17 20:54:45 +03:00
Bananymous 511fc870a1 BAN: Mark RefPtr and WeakPtr operator bool() as explicit 2024-06-17 20:19:36 +03:00
Bananymous dafd2fecf7 LibC: Implement gmtime() and localtime()
localtime() just returns gmtime() as there is no timezone support
2024-06-17 16:51:41 +03:00
Bananymous 9c5cca784e LibC: Implement bsearch() 2024-06-17 16:51:24 +03:00
Bananymous 1138165308 LibC: Define PF_* macros on sys/socket.h 2024-06-17 16:50:03 +03:00
Bananymous d7eb321d58 LibC: Make assert() macro a void expression 2024-06-17 16:49:26 +03:00
Bananymous 15f8c7014f BAN: Add line endings to d{warn,error}ln 2024-06-17 16:48:56 +03:00
Bananymous dd64e2060e WindowServer: Add support for background images
WindowServer now looks in _$HOME/.config/WindowServer.conf_ for a
configuration file that can specify a background image.

Also add default background image /usr/share/images/sample.ppm to the
base sysroot provided in the git repo.
2024-06-16 00:28:09 +03:00
Bananymous 14d4551476 LibImage: Add rgba getter for Image::Color
Actually the format is 0xAARRGGBB which is what my framebuffer uses.
2024-06-16 00:23:02 +03:00
Bananymous e6549b0fe8 LibImage: Implement (bi)cubic interpolation
This is kind of slow but yields much nicer results compared to
(bi)linear interpolation. I should probably add gamma correction...
2024-06-15 23:05:10 +03:00
Bananymous 157e05f57c image: Implement --scale argument to scale image to framebuffer
Also fix bug where red and blue channels were flipped
2024-06-15 17:24:01 +03:00
Bananymous 96efd1e8b9 LibImage: Implement image resize using nearest or bilinear filters 2024-06-15 17:23:24 +03:00
Bananymous 672ce40618 LibImage: Move userspace image parsing to its own library
The image utility now uses this tool instead of parsing images on its
own.
2024-06-14 11:05:54 +03:00
Bananymous 05e9d76c77 BAN: Implement will_{addition,multiplication}_overflow 2024-06-14 11:04:29 +03:00
Bananymous ea7fc7f6c4 Kernel: Implement read-only FAT12/16/32 driver with long name support
You can now mount FAT filesystems! This code might not work perfectly
but my quick testing seemed to work on all (FAT12/16/32) variants.
2024-06-14 01:04:12 +03:00
Bananymous 6b1d5d28be Kernel: VFS root now has to be block device instead of partition 2024-06-14 00:19:12 +03:00
Bananymous a9b0bfa740 LibC: Make ino_t always 64 bit 2024-06-14 00:18:21 +03:00
Bananymous cc6b80a55b BAN: Optimize Vector copy assignment to reduce allocations
If vector contains enough elements, it will now replace old elements
instead of clearing and reallocating
2024-06-14 00:17:28 +03:00
Bananymous 6707989cd5 BAN: Implement same_as and add requires for BAN::Function with lambda
BAN::Function(lambda) now requires that the object is callable and
returns the correct type. This allows overloads with different
callback formats.
2024-06-14 00:15:48 +03:00
Bananymous 766439db6d Kernel: Start work on adding support for new filesystems
Old code tried to create ext2 filesystem from all devices.
2024-06-11 10:50:26 +03:00
Bananymous d4903caafa Kernel: Combine consecutive mouse move and scroll events
This makes mouse work much smoother when running without kvm.
2024-06-11 00:07:31 +03:00
Bananymous caa0111c79 BAN: Implement back() for CircularQueue 2024-06-11 00:05:11 +03:00
Bananymous ffacff67cf LibFont: Move PSF code to separate file 2024-06-10 16:10:05 +03:00
Bananymous f43a7fdfb4 Ports/doom: Doom now runs inside a window 2024-06-10 16:10:05 +03:00
Bananymous 7bb1a3906d BuildSystem: Run kvm-ok to determine kvm access 2024-06-10 16:10:05 +03:00
Bananymous 530c259e71 Kernel: Close unix domain socket when it gets destoyed
Inode closing is something that needs a complete rework. Currently all
sockets are closed when close() is called, which leads to connection
closing if you fork()/exec() with socket being marked as CLOEXEC.

Inodes should probably only be closed once they are not referenced
anywhere.
2024-06-03 18:06:01 +03:00
Bananymous 843a6851c4 Userspace: Start work on a terminal emulator
Terminal is still missing some ANSI codes, cursor and pseudo terminal
support.

Shell's builtin start-gui now launches a Terminal instead of test
windows.
2024-06-03 18:04:33 +03:00
Bananymous 234051d6bc Shell: Optimize drawing characters at the end of a command 2024-06-03 18:03:19 +03:00
Bananymous 981c0eb8bc Shell: Only set terminal properties if STDIN is a TTY 2024-06-03 18:02:49 +03:00
Bananymous 1066855532 LibGUI: Mark Window's server fd as CLOEXEC and expose it through API 2024-06-03 18:01:34 +03:00
Bananymous f2d6518311 LibGUI: Add new drawing APIs to LibGUI::Window 2024-06-03 18:00:50 +03:00
Bananymous 765ccfa18c Kernel: Deliver SIGCHLD on process exit and ignore it properly 2024-06-03 17:58:24 +03:00
Bananymous 201aee3119 LibInput: Implement key_to_utf8_ansi
This function outputs utf8 encoding of a key event or ansi code for
everything it is applicable (arrows, ctrl+..., ...)
2024-06-03 17:52:43 +03:00
Bananymous 65f299038d BAN: Implement traits {true,false}_type with integral_constant 2024-06-03 17:51:44 +03:00
Bananymous bd1290706a Kernel: Implement SharedMemoryObject cloning 2024-06-03 03:41:00 +03:00
Bananymous 939cbf46e4 BAN: Implement BAN::UTF8::to_codepoint() for single byte types 2024-06-03 03:39:57 +03:00
Bananymous aec5a09caf Kernel/LibC: Implement SYS_ISATTY and isatty() 2024-06-03 03:36:25 +03:00
Bananymous 6346d1b6c7 Shell: Add builtin command for starting window server and test windows 2024-06-02 17:27:40 +03:00
Bananymous 05ee242b80 WindowServer: Add window title to title bar and send close events 2024-06-02 17:27:09 +03:00
Bananymous 64be3f05a3 LibGUI: Add 10 second timeout for connecting to WindowServer 2024-06-02 17:25:17 +03:00
Bananymous cfdce9be61 BAN: Mark RefPtr and WeakPtr helper destructors virtual
Also fix a bug in WeakPtr::lock() which would assert false if the
underlying weak link was not initialized
2024-06-02 16:50:26 +03:00
Bananymous 446220494e Kernel: Unix domain sockets close can now be detected
When a unix domain socket is closed and it has a connection to another
socket, it will make the other socket readable and recv will return 0.

This allows detection of socket closing
2024-06-02 16:48:55 +03:00
Bananymous f12ffa92a0 LibFont: Font::get_glyph() now returns nullptr if glyph does not exist
This allows getting glyphs with a single hash lookup
2024-05-31 13:05:07 +03:00
Bananymous b2a4797d16 BAN: Fix dwarnln and derrorln stop color 2024-05-31 13:04:36 +03:00
Bananymous 8bfacb0091 Kernel: Implement deletion of SMO objects 2024-05-31 13:04:23 +03:00