Commit graph

4087 commits

Author SHA1 Message Date
Andreas Kling 73fdbba59c AK: Rename <AK/AKString.h> to <AK/String.h>
This was a workaround to be able to build on case-insensitive file
systems where it might get confused about <string.h> vs <String.h>.

Let's just not support building that way, so String.h can have an
objectively nicer name. :^)
2019-09-06 15:36:54 +02:00
Andreas Kling b4a2bb9383 GScrollBar: Scrolling with the mouse wheel should use step increments 2019-09-06 15:01:08 +02:00
rhin123 1adec6d54b TextEditor: Removed unnecessary use of for_each
Didn't notice that m_visual_rect existed :P
2019-09-06 07:17:57 +02:00
rhin123 8fc2034ca1 VBForm: Fixed cursor not changing on resize /w multiple selections
We were resetting the cursor during multiple selections since our
mouse can only be over a single widget at a time.
2019-09-06 07:17:57 +02:00
Andreas Kling 7a906ab539 LibGUI: Teach GScrollableWidget how to hide unnecessary scrollbars
This is now an opt-in mode enabled by calling:

    should_hide_unnecessary_scrollbars(true)

This patch enables the mode for GTreeView and GTableView. :^)
2019-09-05 21:37:15 +02:00
Andreas Kling fb39e46d3d Utf8View: Try fixing the travis-ci build
There's some overload ambiguity when doing Utf8View("literal")
2019-09-05 19:06:39 +02:00
Sergey Bugaev 6d3f52c4a4 Terminal: Add some basic emoji support
This is not as perfect as it is elsewhere in the system, as we cannot
really change how terminal "thinks about" characters and bytes. What
we can do though, and what this commit does, is to *render* emojis, but
make it seem as if they take up all the space, and all the columns their
bytes would take if they were all regular characters.
2019-09-05 16:37:39 +02:00
Sergey Bugaev 22e6978c71 WindowServer+LibGUI+FontEditor: Encode special characters as UTF-8 2019-09-05 16:37:39 +02:00
Sergey Bugaev 84bc6a92a7 LibDraw: Add emoji drawing support to Painter
From here on, all strings displayed to the user are expected to
be encoded as UTF-8. The next few commits will deal with a few
existing places where this requirement is currently violated.

https://github.com/SerenityOS/serenity/issues/490
2019-09-05 16:37:39 +02:00
Sergey Bugaev 27380b9d2b LibDraw: Add emoji support to the Font class
https://github.com/SerenityOS/serenity/issues/490
2019-09-05 16:37:39 +02:00
Sergey Bugaev 9d64c60e01 LibDraw: Introduce an Emoji class
This class can locate and load emojis, which are expected to be stored
as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the
character codepoint.

https://github.com/SerenityOS/serenity/issues/490
2019-09-05 16:37:39 +02:00
Sergey Bugaev 55197ed4ef AK: Log UTF-8 validation errors 2019-09-05 16:37:39 +02:00
Sergey Bugaev c379f43d2a AK: Add some more utility methods to Utf8View 2019-09-05 16:37:39 +02:00
Drew Stratford 95fe775d81 Kernel: Add SysV stack alignment to signal trampoline
In both dispatch signal and asm_signal_trampoline we
now ensure that the stack is 16 byte aligned, as per
the System V ABI.
2019-09-05 16:37:09 +02:00
Drew Stratford 81d0f96f20 Kernel: Use user stack for signal handlers.
This commit drastically changes how signals are handled.

In the case that an unblocked thread is signaled it works much
in the same way as previously. However, when a blocking syscall
is interrupted, we set up the signal trampoline on the user
stack, complete the blocking syscall, return down the kernel
stack and then jump to the handler. This means that from the
kernel stack's perspective, we only ever get one system call deep.

The signal trampoline has also been changed in order to properly
store the return value from system calls. This is necessary due
to the new way we exit from signaled system calls.
2019-09-05 16:37:09 +02:00
Drew Stratford 259a1d56b0 Thread: added member m_kernel_stack_top.
This value stores the top of a threads kernel_stack.
2019-09-05 16:37:09 +02:00
Andreas Kling bf43d94a2f Kernel: Disable interrupts throughout ~Region()
We don't want an interrupt handler to access the VM data structures
while their internal consistency is broken.
2019-09-05 11:15:05 +02:00
rhin123 5594f19624 TextEditor: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 3261ffb2fd Snake: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 aab28ea9c0 Minesweeper: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 4f3812ad14 VisualBuilder: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 9f8a2af921 Terminal: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 1f666abcd2 SystemMonitor: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 2d8318a474 QuickShow: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 962b65b42f Piano: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 a538968cc2 PaintBrush: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 7df4cfe606 IRCCient: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 86c68210f0 FileManager: Added GCommonActions 2019-09-05 09:40:54 +02:00
rhin123 f468634494 TextEditorWidget: Added GCommonActions 2019-09-05 09:40:54 +02:00
Andreas Kling c4d59f64d1 GDirectoryModel: Add a 32x32 filetype icon for sound files 2019-09-04 21:48:03 +02:00
Andreas Kling 5cfd67ecbb FileManager: Open ".wav" files in SoundPlayer when activated
Now you can double-click on WAV files in the FileManager. Neato! :^)
2019-09-04 20:20:36 +02:00
Andreas Kling 1188a036e9 SoundPlayer: Start working on a GUI sound player application
This can play anything that AWavLoader can load (so obviously only WAV
files at the moment.)

It works by having a timer that wakes up every 100ms and tries to send
a sample buffer to the AudioServer. If our server-side queue is full
then we wait until the next timer iteration and try again.

We display the most recently enqueued sample buffer in a nice little
widget that just plots the samples in green-on-black. :^)
2019-09-04 20:18:41 +02:00
Andreas Kling 6693e56603 LibAudio: Allow tweaking how much get_more_samples() reads from file 2019-09-04 20:13:32 +02:00
Andreas Kling a98de0b6ee LibAudio: Add AClientConnetion::try_enqueue() API
This is a variant of the enqueue() API that returns immediately and
may fail. It's useful when you don't want to block until the audio
server can receive your sample buffer.
2019-09-04 20:12:24 +02:00
Andreas Kling 2441c1fde2 IRCClient: Use GAboutDialog :^) 2019-09-04 19:11:37 +02:00
Andreas Kling 75eb84c7e4 IRCClient: Size columns to-fit in the window and member views 2019-09-04 19:07:59 +02:00
Andreas Kling f4042903b9 Shell: Okay I keep messing up this history file code.. actually fix it!
It's not safe to return a CFile by-value. CFile is a CObjects and they
are honestly not very good at being values..
2019-09-04 19:01:34 +02:00
Andreas Kling e12bbc097f IRCClient: Add 16x16 icon 2019-09-04 18:56:39 +02:00
Andreas Kling 52f62c2d7e IRCClient: Tweak UI to look less padding-bloated 2019-09-04 18:54:43 +02:00
Andreas Kling 123a3cad77 GLayout: Change default spacing to 3 pixels 2019-09-04 18:54:03 +02:00
Andreas Kling a6bb955c9d GSplitter: Change default spacing to 3 pixels 2019-09-04 18:53:46 +02:00
Andreas Kling 2216c7ecc6 IRCClient: Make the auto-join on connect feature actually do something 2019-09-04 17:37:11 +02:00
Andreas Kling 0b1981ddae Shell: Oops, don't exit() when ~/.history does not exist 2019-09-04 15:16:07 +02:00
Andreas Kling 16de02cce0 CIODevice: Add is_open() 2019-09-04 15:13:55 +02:00
Andreas Kling ce837d157f Shell: Don't open ~/.history for writing on startup
When we only want to read the file, we should open it for reading.
2019-09-04 14:59:29 +02:00
Andreas Kling cc98ea1956 Json: Add serializer fast-path for string values
Passing these through the generic JsonValue path was causing us to
instantiate temporary JsonValues that incurred a heap allocation.
This avoids that by adding specialized overloads for string types.
2019-09-04 14:40:11 +02:00
Andreas Kling 14a228a6f8 Meta: Let's try giving Travis some valid YAML this time.. 2019-09-04 11:45:43 +02:00
Andreas Kling e25ade7579 Kernel: Rename "vmo" to "vmobject" everywhere 2019-09-04 11:27:14 +02:00
Andreas Kling e5500e2a22 Kernel: Fix wrong I/O ports for the ATA alternate status registers
The alternate status register is not part of the same set of registers
as all the other stuff.

Also rename wait_400ns() to io_delay() since we had no guarantee that
it was waiting for 400ns..
2019-09-04 11:11:03 +02:00
Andreas Kling 8cbb38a237 Kernel: Remove unused gunk from PATADiskDevice 2019-09-04 11:06:10 +02:00