Andreas Kling
550b0b062b
AK: Rename RetainPtr.h => RefPtr.h, Retained.h => NonnullRefPtr.h.
2019-06-21 18:45:59 +02:00
Andreas Kling
e97d714bbc
Documentation: Update SmartPointers.md with new pointer names.
2019-06-21 18:42:17 +02:00
Andreas Kling
c26e3ce86b
Change "retain" to "ref" in various comments.
2019-06-21 18:40:24 +02:00
Andreas Kling
90b1354688
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
2019-06-21 18:37:47 +02:00
Andreas Kling
77b9fa89dd
AK: Rename Retainable => RefCounted.
...
(And various related renames that go along with it.)
2019-06-21 15:30:03 +02:00
Andreas Kling
ef1bfcb9d8
WindowServer: Move some event code from WSWindowManager to WSMenuBarKeeper.
2019-06-21 15:02:11 +02:00
Andreas Kling
ede598589a
WindowServer: Make most of WSMenuBarKeeper private.
...
The outside world doesn't need to know about all this stuff.
2019-06-21 11:12:45 +02:00
Andreas Kling
2e9cc75d11
WindowServer+Taskbar: Let WindowServer manage the "window menus".
...
Taskbar now simply asks the WindowServer to popup a window menu when right
clicking on a taskbar button.
This patch also implements the "close" menu item, and furthermore makes the
window menu show up when you left-click a window's titlebar icon. :^)
2019-06-21 11:03:43 +02:00
Andreas Kling
da475ce3f5
LibGUI: Refactor the keyboard activation code a bit to use WeakPtr<GWidget>.
2019-06-21 10:09:57 +02:00
Andreas Kling
41bcabd9aa
PaintBrush: Make a little icon for the spray tool.
2019-06-21 09:22:32 +02:00
Andreas Kling
9ac17c7bc9
WindowServer: Render the global menubar into a separate WSWindow.
...
Previously we were rendering the whole menubar on every compose(),
even if nothing changed about it. Now it's in its own window and can
be invalidated and painted separately.
2019-06-21 08:19:43 +02:00
Andreas Kling
d99b1a9ea0
LibHTML: Add the outline of a CSS stylesheet object graph.
2019-06-20 23:25:25 +02:00
Andreas Kling
2e2b97dc8a
LibHTML: Add layout() overrides for LayoutText and LayoutBlock.
2019-06-20 23:00:26 +02:00
Andreas Kling
8cb0c765ca
LookupServer: Use a CFile for loading /etc/hosts.
...
This fixes an issue with the lines having extra bytes at the end due after
converting from ByteBuffer to String.
2019-06-20 21:48:33 +02:00
Andreas Kling
a7dc1a7d6b
AK: Make StringImpl a bit smaller.
...
There's no need for a member char* m_characters if we always store them
in the inline buffer. So with this patch, we now do.
After that, rearrange the members a bit for ideal packing. :^)
2019-06-20 13:23:48 +02:00
Andreas Kling
8c0ae711d8
Kernel+LibC: Make page fault crashes a bit more readable.
...
We'll now try to detect crashes that were due to dereferencing nullptr,
uninitialized malloc() memory, or recently free()'d memory.
It's not perfect but I think it's pretty good. :^)
Also added some color to the most important parts of the crash log,
and added some more modes to /bin/crash for exercising this code.
Fixes #243 .
2019-06-19 20:52:12 +02:00
Andreas Kling
15bea7153a
Kernel: Symbolicate the crash address too, not just the call stack.
...
Also print it in shiny red to make it extra easy to spot. :^)
Fixes #244 .
2019-06-19 18:51:17 +02:00
Andreas Kling
c5d623e048
AK: Add some convenient functions to JsonValue.
2019-06-19 13:08:07 +02:00
Andreas Kling
9149a519f5
printf: Support printing negative values with %f or %g.
2019-06-18 14:47:52 +02:00
Andreas Kling
4080221547
WindowServer: Remove unused WSWindowManager::m_windows hash table.
2019-06-18 14:40:18 +02:00
Andreas Kling
203f8e5320
AK: Add IPv4Address(NetworkOrdered<dword>) constructor.
2019-06-18 11:40:39 +02:00
Andreas Kling
d9a48b5916
AK: Move IPv4Address from Kernel/Net/ to AK/ since it's quite useful.
2019-06-18 11:28:48 +02:00
Andreas Kling
9f7c11710f
printf: Treat %g as %f for now.
2019-06-18 09:46:39 +02:00
Andreas Kling
aa3df518e7
AK: Rename JsonObject::to_string() and pals to serialized().
...
And the variant that serializes into a StringBuilder is called serialize().
2019-06-18 09:37:47 +02:00
Andreas Kling
15fa4f1c55
AK: ScopeGuard.h needs StdLibExtras.h
2019-06-18 09:31:14 +02:00
Andreas Kling
4ee39d6292
AK: Override StringImpl's operator delete to silence valgrind.
2019-06-18 09:26:36 +02:00
Andreas Kling
92cda74724
AK: Fix leak in JsonValue::operator=(JsonValue&&).
...
Amusingly I introduced this leak while explaining that this type of leak is
a common bug, and saying I'm used to looking for it. :^)
2019-06-18 09:22:19 +02:00
Andreas Kling
4147394dcb
AK: Add JsonValue(const char*).
...
This should obviously become a string, but if we don't have it, constructing
from a string literal ends up creating a boolean value.
2019-06-18 09:11:31 +02:00
Andreas Kling
1a761ea4fd
AK: Add JsonValue(unsigned) ctor and as_string().
2019-06-18 08:55:58 +02:00
Andreas Kling
114768562a
AK: Including <AK/kstdio.h> should pull in <stdio.h> etc on host builds.
2019-06-18 08:53:26 +02:00
Andreas Kling
28a4963242
AK: Make ASSERT_NOT_REACHED() work nicely in host builds.
2019-06-18 08:52:21 +02:00
Andreas Kling
ee347effac
AK: Use a single StringBuilder throughout JSON serialization.
2019-06-17 21:36:54 +02:00
Andreas Kling
3b9fcab1af
VisualBuilder: Switch to JSON for the form output.
...
This makes widgets-within-widgets straightforward instead of confusing.
The UI doesn't actually let you put widgets inside one another just yet,
but at least now the output format won't be a problem. :^)
2019-06-17 19:50:30 +02:00
Andreas Kling
04a8fc9bd7
AK: Add some classes for JSON encoding.
...
This patch adds JsonValue, JsonObject and JsonArray. You can use them to
build up a JsonObject and then serialize it to a string via to_string().
This patch only implements encoding, no decoding yet.
2019-06-17 19:47:35 +02:00
Sergey Bugaev
7ccb84e58e
PaintBrush: Make spray circular.
2019-06-17 16:11:01 +02:00
Sergey Bugaev
9fa4e779ff
LibM: Rewrite trigonometric functions.
...
This way they seem to actually work as expected ;)
2019-06-17 16:11:01 +02:00
Robin Burchell
502c54e39a
Add a simple spray fill tool
...
Could do with some more tweaking no doubt, and it'd be nice to have a
circular spray, but this is better than nothing.
2019-06-17 05:54:32 +02:00
Andreas Kling
940eb1bbeb
Merge pull request #173 from faissaloo/serenity-keys
...
SerenityKeys
2019-06-16 22:37:33 +02:00
faissaloo
b7d1eee047
LibM: Add trigonometric approximations and misc mathematical functions
2019-06-16 22:14:49 +02:00
faissaloo
54005e6942
GWindow: Get rid of superflous variable
2019-06-16 21:07:55 +01:00
faissaloo
55e115b0cd
LibGUI: clang-format
2019-06-16 21:01:51 +01:00
Andreas Kling
0db2f3cbe6
LibHTML: Add a Frame class, start fleshing out recursive layout.
...
Layout is initiated from Frame::layout(). It makes the document's layout
node as wide as the frame, and then we'll take it from there.
2019-06-16 21:35:03 +02:00
faissaloo
770907f90c
GWindow: Cleanup
2019-06-16 16:55:39 +01:00
Andreas Kling
f49e5c6732
PaintBrush: Reduce debug spam in the color editor dialog.
2019-06-16 16:33:16 +02:00
Andreas Kling
cf17e385b5
PaintBrush: Allow editing palette colors by ctrl-clicking them.
...
Maybe the ColorDialog class could be fashioned into something generally
usable in LibGUI, but for now it lives in the PaintBrush app. :^)
2019-06-16 15:09:36 +02:00
Andreas Kling
017c0f87b4
Color: Add setters for the red, green and blue components.
2019-06-16 15:09:11 +02:00
Andreas Kling
1db169244a
GSpinBox: The initial text should be "0".
2019-06-16 15:08:52 +02:00
Robin Burchell
862682b1bb
SystemServer: Shut down after 5 seconds if testmode=1 is set on the kernel command line
2019-06-16 14:33:59 +02:00
Robin Burchell
0a3abcc0a8
Kernel: Expose kernel command line to userspace through /proc/cmdline
2019-06-16 14:33:59 +02:00
Callum Attryde
267672efee
Userland: Add wc program ( #228 )
...
Fixes #159 .
2019-06-16 14:13:57 +02:00