Commit graph

1470 commits

Author SHA1 Message Date
Andreas Kling
99978b771d LibGUI: Take scroll offset into account when manipulating table headers
Fixes #1271.
2020-02-22 15:04:02 +01:00
Andreas Kling
34b81f17c2 LibELF: Avoid unnecessarily recomputing loop boundaries over and over 2020-02-22 11:25:15 +01:00
Tibor Nagy
2eb9620415 LibGUI: Improve TreeView keyboard navigation
This commit adds two new behaviour to the key event handler of
the TreeView widget:

Pressing left now jumps to the parent node if the current treenode
is closed or has no children.

Pressing right now jumps to the first children node if the current
treenode is open.
2020-02-21 20:18:44 +01:00
Andreas Kling
c4c1ad2289 Toolchain: Build demangling into LibC except during toolchain build 2020-02-21 18:54:57 +01:00
Andreas Kling
4198061534 LibELF: Use the ELF_STRTAB string constant instead of hard-coding 2020-02-21 16:16:23 +01:00
Tibor Nagy
6e2a16c8a8 LibGfx+LibGUI: Allow theming the focus outline of AbstractButton 2020-02-20 14:19:30 +01:00
Tibor Nagy
c8bc53e987 LibGfx+LibGUI: Allow theming the text cursor 2020-02-20 14:19:30 +01:00
Andreas Kling
88b9fcb976 AK: Use size_t for ByteBuffer sizes
This matches what we already do for string types.
2020-02-20 13:20:34 +01:00
Andreas Kling
cd495786a8 LibC: Implement crappy version of pread()
This patch adds a crappy pread() just to get "git" working locally.
A proper version would be implemented in the kernel so that we don't
have to mess with the file descriptor's offset at all.
2020-02-20 06:59:23 +01:00
Andreas Kling
7c12d66f61 LibC: Stub out getpass() 2020-02-20 06:58:48 +01:00
Andreas Kling
c3b09c7242 LibC: Add h_errno and stub out getservbyname() 2020-02-20 06:58:16 +01:00
Andreas Kling
cf4da485e6 LibC: Add inet_ntoa() 2020-02-20 06:57:47 +01:00
Andreas Kling
0ba458cfa0 Kernel+LibC: Add SO_REUSEADDR macro
Note that this is not actually implemented, I'm just defining it.
2020-02-20 06:57:01 +01:00
Andreas Kling
2a1cad73fe LibC: Add an empty <netinet/tcp.h>
This is enough to placate anyone who includes it without actually using
anything from it. :^)
2020-02-20 06:51:28 +01:00
Andreas Kling
4ddae2c069 LibC: Add some missing macros to inttypes.h 2020-02-20 06:51:16 +01:00
Andreas Kling
124c588f81 LibC: Don't assert on fflush(nullptr)
We're supposed to flush all open streams when this happens, but since
we don't know how to do that yet, let's just log a FIXME and not crash.
2020-02-19 23:12:29 +01:00
Andreas Kling
e0d589c074 LibC: Add hack implementation of gmtime_r() matching gmtime() 2020-02-19 23:09:37 +01:00
Andreas Kling
26fb3f7269 LibELF: Short-circuit symbolication when there are no symbols 2020-02-19 22:18:41 +01:00
Andreas Kling
4a66de580e LibC: Always inline the printf character helpers 2020-02-19 22:11:04 +01:00
Andreas Kling
eaa680ab8e WindowServer+LibGUI: Force full window repaints after theme change
We were not repainting windows that were occluded at the time of the
theme changing. This patch adds a way to bypass occlusion testing when
invalidating window rects.

Fixes #1249.
2020-02-19 16:46:28 +01:00
Liav A
8a2dc5d188 LibC: Fix big endian definitions 2020-02-19 16:08:28 +01:00
Tibor Nagy
33864ab715 LibGUI: Update TextEditor to use ruler colors from the system theme 2020-02-19 12:24:39 +01:00
Tibor Nagy
5cf5ddf6cb LibGfx: Add ColorRoles for rulers 2020-02-19 12:24:39 +01:00
Andreas Kling
ef38c49619 WindowServer+LibGUI+LibHTML: Fix build with -std=c++2a 2020-02-19 12:03:01 +01:00
Sergey Bugaev
e0ecfc0c92 LibC: Statically allocate allocators
These allocators take up 660 bytes, combined. Let's not waste
two physical pages for them in each process :^)
2020-02-18 11:23:27 +01:00
Andreas Kling
189fa68c0b LibGUI: Expose GUI::Menu::menu_id() and also allow forced realization
Menu realization is when we instruct WindowServer to create the
server-side menu objects on our behalf.
2020-02-17 20:04:05 +01:00
thatlittlegit
4755f355c6 LibGUI: Add Yes/No and Yes/No/Cancel MessageBoxes 2020-02-17 16:28:21 +01:00
Andreas Kling
a78bc5e6fc LibGUI: Generate NotificationServer IPC messages during build
I hacked this to skip using flock since NotificationServer and LibGUI
depend on each other. There's probably a better solution.
2020-02-16 22:37:04 +01:00
Andreas Kling
30549502ca LibGUI: Generate NotificationServerEndpoint.h if needed 2020-02-16 22:28:48 +01:00
Andreas Kling
9f54ea9bcd NotificationServer: Add a system service for desktop notifications
This patch adds NotificationServer, which runs as the "notify" user
and provides an IPC API for desktop notifications.

LibGUI gains the GUI::Notification class for showing notifications.

NotificationServer is spawned on demand and will unspawn after
dimissing all visible notifications. :^)

Finally, this also comes with a small /bin/notify utility.
2020-02-16 21:58:17 +01:00
Andreas Kling
a6e69bda71 AK: Add basic Traits for RefPtr
This allows RefPtr to be stored in a HashTable<RefPtr<T>> :^)

It's unfortunate about the const_casts. We'll need to fix HashMap::get
to play nice with non-const Traits<T>::PeekType at some point.
2020-02-16 21:58:17 +01:00
Tibor Nagy
c7f549ba19 LibGUI: Add mouse wheel event and step property to Slider 2020-02-16 21:58:01 +01:00
Andreas Kling
69bb0c0246 malloc: Use 64KB blocks (instead of 4KB)
We now allocate 64KB at a time and divide them into chunks for handing
out to malloc() callers. This significantly reduces the number of
system calls made due to memory allocation.

This yields a ~15% speedup when compiling Process.cpp inside SerenityOS
(down from 24 sec to 20 sec on my machine.)

There's more performance on the table here, no doubt.
2020-02-16 14:11:14 +01:00
Andreas Kling
31e1af732f Kernel+LibC: Allow sys$mmap() callers to specify address alignment
This is exposed via the non-standard serenity_mmap() call in userspace.
2020-02-16 12:55:56 +01:00
Andreas Kling
14bd978928 Revert "LibC: Implement isblank()"
This reverts commit 4e79a60b78.

This broke the GCC port. Apparently isblank() was added in C99 and for
some reason it needs special treatment in headers.
2020-02-16 10:47:54 +01:00
Andreas Kling
fe343a0497 LibGUI: ItemView painting was not respecting the frame thickness
Fixes #1112.
2020-02-16 09:50:38 +01:00
Andreas Kling
2143da6434 LibGUI: Add forwarding header
This patch adds <LibGUI/Forward.h> and uses it a bunch.
It also dragged various header dependency reduction changes into it.
2020-02-16 09:41:56 +01:00
Andreas Kling
2e6ab58117 LibGfx: Reduce header dependencies of StylePainter 2020-02-16 09:41:56 +01:00
Tibor Nagy
9041e95e79 LibGUI: Render ScrollBar buttons as pressed when they are being pressed 2020-02-16 09:41:40 +01:00
Tibor Nagy
fc24b2b57d LibGUI: Make ResizeCorner theme-aware 2020-02-16 08:01:20 +01:00
Shannon Booth
42399167b3 LibCore: Add DirIterator::next_full_path() 2020-02-16 02:19:22 +01:00
Andreas Kling
a356e48150 Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
Tibor Nagy
7ec1b2e44b LibGUI: Unfocused TextEditors should use inactive selection colors 2020-02-15 18:42:13 +01:00
Tibor Nagy
4d95163400 LibGUI: Use inactive selection colors from palette instead of hardcoding them 2020-02-15 18:42:13 +01:00
Tibor Nagy
99192fd29f LibGfx: Add inactive selection colors 2020-02-15 18:42:13 +01:00
Andreas Kling
d5e167e725 LibBareMetal: Install headers so ports can pick them up 2020-02-15 13:31:41 +01:00
Andreas Kling
a4d857e3c5 LibIPC+IPCCompiler: Add IPC::Decoder, let classes decode themselves
This shaves ~5 seconds off of a full build, not too bad. Also it just
seems nicer to push this logic out to classes. It could be better but
it's a start. :^)
2020-02-15 12:11:19 +01:00
Andreas Kling
2ae9a56c3f LibIPC: Move IPC::Encoder functions out of line
Compiling anything that includes generated IPC messages is painfully
slow at the moment. This moves the encoding helpers out of line, which
helps a bit. Doing the same for decoding will help more.
2020-02-15 12:10:48 +01:00
Andreas Kling
ef01af1cb2 LibIPC+IPCCompiler: Remove some unused members from generated messages 2020-02-15 12:10:48 +01:00
Shannon Booth
6764b77788 LibCore: Add SkipParentAndBaseDir flag in DirIterator
Sometimes we may want to iterate over dotfiles but not include the
parent or base directory
2020-02-15 11:40:05 +01:00