Andreas Kling
8f89cc85d1
LibCore: Add DateTime::from_timestamp(time_t)
2020-02-11 19:48:46 +01:00
Andreas Kling
b8cf83926a
LibCore: Add a basic Core::DateTime class
...
This is just to have a pleasant way to print the current time for now:
dbg() << Core::DateTime::now();
Or if you want it as a string:
Core::DateTime::now().to_string();
2020-02-11 19:43:29 +01:00
Andreas Kling
29aa8373d4
LibC: Add localtime_r()
2020-02-11 19:36:59 +01:00
Andreas Kling
57e4410044
Revert "LibC: Remove isfoo() declarations from ctype.h"
...
This reverts commit 2ba06662b6
.
This broke the toolchain build. Apparently libstdc++v3 depends on the
declarations of isfoo() helpers.
2020-02-11 19:36:47 +01:00
Andreas Kling
2ba06662b6
LibC: Remove isfoo() declarations from ctype.h
...
We'll keep the definitions in ctype.cpp so you can link against them
but there's no reason to have competing declarations and macros.
2020-02-11 17:41:16 +01:00
Andreas Kling
92e2afe584
LibGUI: Tweak C++ syntax highlighting colors a bit :^)
2020-02-11 13:07:21 +01:00
Andreas Kling
9a09437c46
LibGUI: Splitter should forget resize candidates after cursor leaves
...
Otherwise we'll keep highlighting the grabbable rect even after the
cursor has left the splitter widget.
2020-02-11 11:53:38 +01:00
Andreas Kling
8a605922bb
LibGUI: Make splitters 1px wider as 3px is slightly too narrow
2020-02-11 11:53:38 +01:00
Andreas Kling
1fc887c576
LibGUI: Only highlight grabbable area between a Splitter's children
...
We were previously cheating by setting the entire splitter's background
color to the hover highlight color. This looked goofy whenever there
were transparent widgets inside a splitter, since the highlighted color
would shine through when hovering.
This was especially noticeable in SystemMonitor, which now looks much
better. :^)
2020-02-11 11:53:38 +01:00
Andreas Kling
3f58f0e87c
LibGfx: Add Rect::operator!=(Rect)
2020-02-11 11:53:38 +01:00
Andreas Kling
f4fa758959
LibGUI: Add a Widget::did_layout() that gets called after layout
...
This will allow widgets to implement post-layout behaviors.
2020-02-11 11:53:38 +01:00
Andreas Kling
7aa62665a3
LibGUI: Factor out Splitter hit testing into a separate function
2020-02-11 11:53:38 +01:00
Shannon Booth
7b6d450b6a
LibGfx: Assert that an empty bitmap is not created
2020-02-11 11:00:09 +01:00
Andreas Kling
7323d085dd
LibGUI: Single-line GUI::TextEditor should not have "go to line" action
2020-02-10 19:49:49 +01:00
Andreas Kling
580a94bc44
Kernel+LibC: Merge sys$stat() and sys$lstat()
...
There is now only one sys$stat() instead of two separate syscalls.
2020-02-10 19:49:49 +01:00
Andreas Kling
3713d31750
LibCore: TCP and UDP servers should parent Notifiers to themselves
...
This makes things look a little more neat in Inspector. :^)
2020-02-10 14:15:56 +01:00
William McPherson
aa149b9330
LibAudio/Piano: Replace floats with doubles
...
We should default to double-precision so that clients can make the
choice to use float or double.
2020-02-10 14:04:27 +01:00
William McPherson
d55d2b2794
LibAudio/aplay: Handle WAV header errors properly
...
We shouldn't just ASSERT() if the header parse fails. This was crashing
Piano completely.
2020-02-10 14:04:27 +01:00
Andreas Kling
6cbd72f54f
AK: Remove bitrotted Traits::dump() mechanism
...
This was only used by HashTable::dump() which I used when doing the
first HashTable implementation. Removing this allows us to also remove
most includes of <AK/kstdio.h>.
2020-02-10 11:55:34 +01:00
Liav A
7c4dd0c8cf
LibELF: Use VirtualAddress class from LibBareMetal
2020-02-09 19:38:17 +01:00
Liav A
de3637d85f
LibBareMetal: Add Memory definitions
...
Add classes of VirtualAddress & PhysicalAddress.
2020-02-09 19:38:17 +01:00
Liav A
2a699cec98
LibC: Apply a change for the Bootstrapper environment
2020-02-09 19:38:17 +01:00
Liav A
7c507c27bf
LibBareMetal: Creating a new library for freestanding environments
2020-02-09 19:38:17 +01:00
Andreas Kling
67ccdbe384
LibCore: Add File::is_directory() helpers
2020-02-09 14:15:55 +01:00
Andreas Kling
3a7e49fe07
LibCore: Allow constructing a Core::HttpRequest from a raw HTTP request
...
This patch adds a very simple HTTP request parser that can be useful
for implementing say.. a web server. :^)
2020-02-09 14:15:55 +01:00
Andreas Kling
3b95d61b22
LibGfx: Naive RGB/HSV conversion
2020-02-08 12:30:12 +01:00
Andreas Kling
2b0b7cc5a4
Net: Add a basic sys$shutdown() implementation
...
Calling shutdown prevents further reads and/or writes on a socket.
We should do a few more things based on the type of socket, but this
initial implementation just puts the basic mechanism in place.
Work towards #428 .
2020-02-08 00:54:43 +01:00
Andreas Kling
bb8e65be41
LibGUI+HackStudio: Move syntax highlighting from HackStudio to LibGUI
...
This patch introduces the GUI::SyntaxHighlighter class, which can be
attached to a GUI::TextEditor to provide syntax highlighting.
The C++ syntax highlighting from HackStudio becomes a new class called
GUI::CppSyntaxHighlighter. This will make it possible to get C++ syntax
highlighting in any app that uses a GUI::TextEditor. :^)
Sidenote: It does feel a bit weird having a C++ lexer in a GUI toolkit
library, and we'll probably end up moving this out to a separate place
as this functionality grows larger.
2020-02-07 20:07:15 +01:00
Andreas Kling
6a9cc66b97
LibGUI: Remove leading G from filenames
2020-02-06 20:33:02 +01:00
Andreas Kling
2e219255a2
IPCCompiler: Put message classes in the Messages namespace
2020-02-06 20:21:49 +01:00
Andreas Kling
73110e25a9
WindowServer: Move classes into WindowServer namespace
...
Also remove the leading WS from names and filenames.
2020-02-06 20:03:37 +01:00
William McPherson
82d17d2c79
LibAudio: Implement Audio::WavWriter
...
This class mirrors WavLoader and uses the same variable names so they
can be read side-by-side.
In a simple use-case, you construct a WavWriter object with your file
path and audio parameters, call write_samples() with your bytes and then
either finalize() to finish writing the file or allow the destructor to
do it automatically.
finalize() is needed because the WAV header cannot be written until the
size of the data section is known. You only need to call this manually
if you want to write a WAV file and then immediately load it.
You can also use one WavWriter instance multiple times by repeatedly
calling finalize() and set_file().
2020-02-06 19:13:53 +01:00
Andreas Kling
97edc82a26
LibAudio: Remove leading A from filenames
2020-02-06 15:18:03 +01:00
Andreas Kling
258d798b34
LibCore: Merge the CSyscallUtils namespace into Core
2020-02-06 15:04:57 +01:00
Andreas Kling
d17e23bd27
LibCore: Remove leading C from filenames
2020-02-06 15:04:03 +01:00
Andreas Kling
7415e6ef9f
LibIPC: Remove leading I from filenames
2020-02-06 14:54:09 +01:00
Andreas Kling
799b0a4fa8
LibGUI: Rename {H,V}BoxLayout => {Horizontal,Vertical}BoxLayout
2020-02-06 14:44:13 +01:00
Andreas Kling
dccf335d5b
LibGUI: Add HorizontalSlider and VerticalSlider convenience classes
2020-02-06 14:43:16 +01:00
Andreas Kling
6a71ba1deb
LibGUI: Add HorizontalSplitter and VerticalSplitter convenience classes
2020-02-06 14:40:59 +01:00
Andreas Kling
8bb75084fd
LibGfx: Unpublish FloatPoint from the global namespace
2020-02-06 14:35:54 +01:00
Andreas Kling
5c2028db24
LibGfx: Unpublish FloatSize from the global namespace
2020-02-06 14:35:06 +01:00
Andreas Kling
8505d8d15d
LibGfx: Unpublish FloatRect from the global namespace
2020-02-06 14:33:05 +01:00
Andreas Kling
418adf3e86
LibPthread: Install immediately after building
2020-02-06 14:29:07 +01:00
Andreas Kling
fb4930754e
LibM: Install immediately after building
2020-02-06 14:28:35 +01:00
Andreas Kling
5c06c32df4
LibGfx: Prefer using Gfx::Bitmap::load_from_file instead of load_png()
...
Code that just wants to open a Gfx::Bitmap from a file should not be
calling the PNG codec directly.
2020-02-06 13:39:17 +01:00
Andreas Kling
f8b00aa290
LibGfx: Unpublish Gfx::Size from the global namespace
2020-02-06 13:32:14 +01:00
Andreas Kling
9b87843af1
LibGfx: Unpublish Gfx::Point from global namespace
2020-02-06 13:08:32 +01:00
Andreas Kling
20cfd2a6bf
LibGfx: Unpublish Gfx::Rect from global namespace
2020-02-06 13:02:38 +01:00
Andreas Kling
c39d44fc2e
LibGfx: Rename GraphicsBitmap.{cpp,h} => Bitmap.{cpp,h}
2020-02-06 12:07:05 +01:00
Andreas Kling
9ac94d393e
LibGfx: Rename from LibDraw :^)
2020-02-06 12:04:00 +01:00