Andreas Kling
2bd8118843
Kernel: Change the format of /proc/all to JSON.
...
Update ProcessManager, top and WSCPUMonitor to handle the new format.
Since the kernel is not allowed to use floating-point math, we now compile
the JSON classes in AK without JsonValue::Type::Double support.
To accomodate large unsigned ints, I added a JsonValue::Type::UnsignedInt.
2019-06-29 09:04:45 +02:00
Andreas Kling
561bfd3ed6
Terminal: Make it so typing resets the cursor blink timer.
...
Patch contributed by "pd"
2019-06-28 21:46:23 +02:00
Andreas Kling
96ca8bea6c
Terminal: Don't write erroneous characters to PTY when modifiers pressed.
...
Additionally the Alt modifier now generates the correct characters, as do
Insert/Delete/PgUp/PgDown.
Patch contributed by "pd"
2019-06-28 21:46:05 +02:00
Andreas Kling
274b41e47c
Terminal: Changex internal opacity representation to byte instead of float.
...
This lets us avoid some math during paint events.
Patch contributed by "pd"
2019-06-28 21:42:15 +02:00
Robin Burchell
933cd3848f
PaintBrush: Add size context menu to SprayTool
2019-06-28 15:27:23 +02:00
Robin Burchell
24ada6bd1f
PaintBrush: Add an erase tool
2019-06-28 15:27:23 +02:00
Lawrence Manning
f0a6b42066
Move common Application build steps into their own Makefile.common
...
Further consolidation is of course possible, eg the Games/ programs
follow the same rules more or less.
2019-06-25 21:35:50 +02:00
Andreas Kling
8247dad540
PaintBrush: Allow RGBA32 to use the bucket and spray tools.
...
Eventually I'd like to do some kind of bitmap layers, and we definitely want
alpha channel support then, so let's just not paint ourselves into an
uncomfortable corner early on. :^)
2019-06-25 20:33:44 +02:00
Andreas Kling
b529b4a3e6
PaintBrush: Add support for opening files.
...
Obviously this only supports whatever PNG files that load_png() can decode
at the moment.
2019-06-25 20:27:32 +02:00
Andreas Kling
eedb4f6b2f
QuickShow: Allow panning and zooming the image instead of stretching it.
...
This needs more work and polish, but it's a step in a more pleasant and
useful direction.
Also turn QuickShow into a fully-fledged "application". (By that, I really
just mean giving it its own Applications/ subdirectory.)
2019-06-23 16:35:43 +02:00
Andreas Kling
cf0d05d54a
Terminal: Don't compute buffer positions outside the possible area.
2019-06-23 15:34:36 +02:00
Andreas Kling
5aefd7f828
PaintBrush: Implement a thickness setting for the pen tool.
...
Painter gains the ability to draw lines with arbitrary thickness.
It's basically implemented by drawing filled rects for thickness>1.
In PaintBrush, Tool classes can now override on_contextmenu() to
provide a context menu for the toolbox button. :^)
2019-06-23 10:00:02 +02:00
Andreas Kling
08c04f0a41
Terminal: Add basic mouse selection with copy and paste.
...
Left mouse button selects (and copies the selection on mouse up).
The right mouse button then pastes whatever's on the clipboard. I always
liked this behavior in PuTTY, so now we have it here as well :^)
2019-06-23 09:18:17 +02:00
Andreas Kling
61b4da447d
PaintBrush: Fix compiler warnings.
2019-06-22 16:26:04 +02:00
Andreas Kling
4118aaaa32
Terminal: Fix compiler warnings.
2019-06-22 16:07:46 +02:00
Andreas Kling
25fd847ef2
PaintBrush: Add a color picker tool.
2019-06-22 12:05:35 +02:00
Andreas Kling
d343fb2429
AK: Rename Retainable.h => RefCounted.h.
2019-06-21 18:58:45 +02:00
Andreas Kling
550b0b062b
AK: Rename RetainPtr.h => RefPtr.h, Retained.h => NonnullRefPtr.h.
2019-06-21 18:45:59 +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
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
41bcabd9aa
PaintBrush: Make a little icon for the spray tool.
2019-06-21 09:22:32 +02:00
Sergey Bugaev
7ccb84e58e
PaintBrush: Make spray circular.
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
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
264890bfc3
PaintBrush: Flood filling with the same color is a no-op.
2019-06-16 06:34:29 +02:00
Andreas Kling
694b4a64bd
PaintBrush: Make little icons for the pen and bucket tools.
2019-06-15 17:52:53 +02:00
Andreas Kling
dcbddb4f8c
GraphicsBitmap: Provide templated versions of get_pixel() and set_pixel().
...
If we already know the bitmap format used, we can use these functions to
bypass the format checks and go straight to pixel manipulation.
2019-06-15 11:06:02 +02:00
Andreas Kling
150b3cf378
PaintBrush: Fix some silly logic typos in flood fill.
2019-06-15 10:48:20 +02:00
Andreas Kling
a8b2b96f38
PaintBrush: Use a Queue<Point> for the flood fill.
2019-06-15 10:39:45 +02:00
Andreas Kling
9443957c14
PaintBrush: Speed up the bucket tool with smarter use of Vector.
...
Put together a pretty well-performing queue using a Vector and an offset.
By using the new Vector::shift_left(int) instead of Vector::take_first()
we can avoid shifting the vector contents every time and instead only
do it every so often.
Maybe this could be generalized into a separate class, I'm not sure if it's
the best algorithm though, it's just what I came up with right now. :^)
2019-06-14 21:50:28 +02:00
Andreas Kling
e9c021de92
PaintBrush: Implement a naive but working bucket fill tool.
...
I've used a SinglyLinkedList<Point> for the flood fill queue, since Vector
was death slow. This could definitely be made faster with a better algorithm
and/or data structure. :^)
2019-06-14 19:11:22 +02:00
Andreas Kling
56cbe15033
PaintBrush: Factor out the pen tool into an actual PenTool class.
...
Also add a Tool base class, and an empty BucketTool subclass which is the
next thing to implement.
2019-06-14 18:51:57 +02:00
Andreas Kling
42f374d0f1
Terminal: Add support for DCH ('P' final)
...
Patch contributed by "pd"
2019-06-12 20:54:23 +02:00
Andreas Kling
c4d24bb4e9
PaintBrush: Start fleshing out a toolbox widget.
2019-06-12 05:58:31 +02:00
Andreas Kling
cadc65a82d
PaintBrush: Let's use Color::MidGray for the outside-the-bitmap area.
2019-06-11 20:39:32 +02:00
Andreas Kling
70564a78b2
PaintBrush: Tidy up the UI a bit. Add some more colors.
2019-06-11 20:37:58 +02:00
Andreas Kling
1372f10dda
Terminal: Add support for REP ('b' final)
...
Patch contributed by "pd"
2019-06-11 07:32:53 +02:00
Andreas Kling
6ef45bc0ef
PaintBrush: Add some placeholder menus so it looks proper.
2019-06-10 21:05:20 +02:00
Andreas Kling
1f756378e8
PaintBrush: Make it possible to switch colors using the PaletteWidget.
2019-06-10 20:07:26 +02:00
Andreas Kling
f86b1bdca1
PaintBrush: Add a PaletteWidget to allow color selection.
...
Also use different colors for left/right mouse button. :^)
2019-06-10 19:54:09 +02:00
Andreas Kling
642c82fbff
PaintBrush: Use draw_line() when drawing continuously.
2019-06-10 19:35:24 +02:00
Andreas Kling
d599544890
PaintBrush: Start working on a simple painting application.
2019-06-10 19:29:33 +02:00
Andreas Kling
39d1a9ae66
Meta: Tweak .clang-format to not wrap braces after enums.
2019-06-07 17:13:23 +02:00
Andreas Kling
0ed89440f1
ProcessManager+top: Rename "linear" size to "virtual" size.
...
I originally called it "linear" because that's how the Intel manual names
virtual addresses in many cases. I'm ready to accept that most people know
this as "virtual" so let's just call it that.
2019-06-07 12:44:29 +02:00
Andreas Kling
fd604a7c68
Applications: Run clang-format on everything.
2019-06-07 11:48:03 +02:00
Andreas Kling
4edc73ad1f
Terminal: Use the visual bell by default.
2019-06-07 08:45:39 +02:00
Andreas Kling
6e4f0b3cc5
Terminal: Reallocate kept lines when resizing the terminal.
...
Otherwise we end up with garbage text when making the window bigger.
2019-06-06 14:59:18 +02:00
Andreas Kling
e8f35ef311
Terminal: Store horizontal tabs in a Vector.
...
There's no need to muck around with manual malloc()/free() here.
2019-06-06 11:42:05 +02:00