Andreas Kling
8327b12291
Minesweeper: Remove use of copy_ref().
2019-07-11 15:53:01 +02:00
Andreas Kling
22528d8db3
GLabel: Make set_icon() take a GraphicsBitmap*.
...
Taking a RefPtr<GraphicsBitmap>&& was just making things unnecessarily
complicated for clients, and didn't actually improve anything.
2019-07-11 15:52:15 +02:00
Andreas Kling
992272761c
LibGUI: Remove use of copy_ref().
2019-07-11 15:49:47 +02:00
Andreas Kling
b0372883ff
AK: Remove use of copy_ref().
2019-07-11 15:45:11 +02:00
Andreas Kling
5254a320d8
Kernel: Remove use of copy_ref() in favor of regular RefPtr copies.
...
This is obviously more readable. If we ever run into a situation where
ref count churn is actually causing trouble in the future, we can deal with
it then. For now, let's keep it simple. :^)
2019-07-11 15:40:04 +02:00
Andreas Kling
560d037c41
AK: Make it more more pleasant to copy RefPtr's.
...
I had a silly ambition that we would avoid unnecessary ref count churn by
forcing explicit use of "copy_ref()" wherever a copy was actually needed.
This was making RefPtr a bit clunky to work with, for no real benefit.
This patch adds the missing copy construction/assignment stuff to RefPtr.
2019-07-11 15:38:38 +02:00
Andreas Kling
32fb7ecef4
AK: Remove weird RefPtr(RefPtr&) constructor.
2019-07-11 15:19:16 +02:00
Andreas Kling
3d9f783e31
AK: Make MappedFile non-copyable.
2019-07-11 15:14:30 +02:00
Andreas Kling
6534f5f083
AK: Remove weird NonnullRefPtr(NonnullRefPtr&) constructor.
2019-07-11 14:28:29 +02:00
Robin Burchell
bee39d8524
AK: Use operator== for comparison in Vector::contains_slow
2019-07-11 14:17:37 +02:00
Robin Burchell
2c4af740c7
AK: Add operator== & operator!= to Vector
2019-07-11 14:17:37 +02:00
Lawrence Manning
c3ecf753b2
AKString: add missing comparison operators
...
And some trivial tests.
2019-07-11 14:13:30 +02:00
Andreas Kling
26956db5ac
Travis: Try to install a modern C++ compiler for host compilations.
...
It seems like the newest Ubuntu supported by Travis is 16.04. The bundled
gcc is unable to compile the trendy and modern Serenity code, so let's try
to install a newer GCC on the CI bot. :^)
2019-07-10 22:03:46 +02:00
Andreas Kling
9c6fe21b49
FormCompiler: Build individual compilation units instead of all-at-a-time.
2019-07-10 21:28:04 +02:00
Andreas Kling
f07649faba
Build: Build the host-side FormCompiler before everything else.
...
Since we're gonna want to use this for building other apps, it should be
the very first thing we build.
2019-07-10 21:22:27 +02:00
Andreas Kling
3eb6a9a286
FormCompiler: Produce a C++ header file as output.
...
Also make sure the generated main widget has autofill turned on.
2019-07-10 21:14:25 +02:00
Andreas Kling
0bf5c6fa3a
Demos: Add a HelloWorld2 demo.
...
This is a simple test app with its UI generated from a VisualBuilder form.
The name is probably silly, but who cares. :^)
2019-07-10 21:13:29 +02:00
Andreas Kling
b3d431e390
GWidget: Add "set_autofill" as an alias for set_fill_with_background_color.
2019-07-10 21:12:09 +02:00
Andreas Kling
f465de8f76
GWidget: Add placeholder setters for the backcolor/forecolor properties.
2019-07-10 21:00:34 +02:00
Andreas Kling
8d67aa1e59
FormCompiler: Generate a basic UI skeleton holder struct.
...
The basic idea is that you would use it like this:
MyWidget::MyWidget(GWidget* parent)
: GWidget(parent)
{
m_ui = new UI_MyWidget;
set_main_widget(m_ui->main_widget);
...
}
2019-07-10 20:58:54 +02:00
Andreas Kling
2d3293dfbd
FormCompiler: Start working on a C++ code generator for VisualBuilder forms.
2019-07-10 20:41:31 +02:00
Andreas Kling
69fea8d41d
VisualBuilder: Expose the "name" property on all widgets.
2019-07-10 20:34:17 +02:00
Andreas Kling
b06d2c04dc
CObject: Add a "name" property.
...
This will be useful for things like the VisualBuilder code generator.
2019-07-10 20:33:53 +02:00
Andreas Kling
c33766f039
LibCore: Tweak slightly-off error message in CProcessStatisticsReader.
2019-07-10 15:32:30 +02:00
Andreas Kling
245ae479eb
ProcessManager: Use CProcessStatisticsReader to get process data.
...
It was silly to duplicate this functionality in so many places. Now everyone
uses CProcessStatisticsReader to parse /proc/all :^)
2019-07-10 15:27:52 +02:00
Andreas Kling
64d9b43734
WindowServer: Use CProcessStatisticsReader in WSCPUMonitor.
2019-07-10 15:22:44 +02:00
Andreas Kling
ea6363c540
top: Remove some unused code.
2019-07-10 15:22:42 +02:00
Andreas Kling
01216f3c3f
Userland+LibCore: Use CProcessStatisticsReader to implement top.
...
Also tweaked CProcessStatisticsReader a bit to simplify the API.
2019-07-10 13:56:28 +02:00
Andreas Kling
7083a0104a
LibGUI: Add GActionGroup, a way to group a bunch of GActions.
...
This can be used to make a bunch of actions mutually exclusive.
This patch only implements the exclusivity behavior for buttons.
2019-07-09 22:10:03 +02:00
Andreas Kling
2ae0333f5d
GAction: Remove "custom_data" and the related convenience constructors.
...
This mechanism was never actually used, just something I imagined would be
useful while I was first creating the class.
2019-07-09 21:28:52 +02:00
Andreas Kling
fe69b326e9
Build: Prepend $PRE_CXX before the C++ compiler.
...
This allows you to set e.g PRE_CXX=ccache in your environment and enjoy
cached rebuilds. This makes "./makeall.sh" take 5 seconds instead of 50
seconds on my machine. :^)
2019-07-09 19:24:05 +02:00
Andreas Kling
182c5d8aad
Kernel: Pick up standard includes from ../Toolchain, not ../Root
2019-07-09 17:28:26 +02:00
Andreas Kling
b149dd7584
LibC: Provide generic versions of memcpy() and memset() for non-i386 builds.
...
We don't actually do any non-i386 builds at the moment, this is just gently
steering in a nice direction for the future. :^)
2019-07-09 15:48:55 +02:00
Andreas Kling
c452aa891f
AK: Add Platform.h with an ARCH() macro.
...
You can currently use this to detect the CPU architecture like so:
#if ARCH(I386)
...
#elif ARCH(X86_64)
...
#else
...
#endif
This will be helpful for separating out architecture-specific code blocks.
2019-07-09 15:48:04 +02:00
Andreas Kling
149fd7e045
Kernel: Move PhysicalAddress.h into VM/
2019-07-09 15:04:45 +02:00
Andreas Kling
eca5c2bdf8
Kernel: Move VirtualAddress.h into VM/
2019-07-09 15:04:45 +02:00
Andreas Kling
23a6c2086b
Kernel: Move SharedMemory.{cpp,h} into FileSystem/
2019-07-09 15:04:45 +02:00
Andreas Kling
f4cec2f110
Kernel: Move File.{cpp,h} into FileSystem/
...
Also tweak the kernel's Makefile to use -nostdinc and -nostdinc++.
This prevents us from picking up random headers from ../Root, which may
include older versions of kernel headers.
Since we still need <initializer_list> for Vector, we specifically include
the necessary GCC path. This is a bit hackish but it works for now.
2019-07-09 15:04:45 +02:00
Andreas Kling
6c87d3afa9
Kernel: Move i8253.cpp => Arch/i386/PIT.cpp
2019-07-09 15:04:45 +02:00
Andreas Kling
9fdcede491
Kernel: Move PIC.cpp into Arch/i386/
2019-07-09 15:04:43 +02:00
Andreas Kling
aa2cfed6b0
Shell: Remove some unused code.
2019-07-09 13:51:41 +02:00
Andreas Kling
c110cf193d
Kernel: Have the open() syscall take an explicit path length parameter.
...
Instead of computing the path length inside the syscall handler, let the
caller do that work. This allows us to implement to new variants of open()
and creat(), called open_with_path_length() and creat_with_path_length().
These are suitable for use with e.g StringView.
2019-07-08 20:01:49 +02:00
Andreas Kling
fc4022d173
Shell: Handle SIGWINCH to get a nice behavior when resizing.
...
When resizing the terminal, we now clear the entire current line and reset
the shell's LineEditor input state. This makes it look and feel kinda the
same as xterm.
Fixes #286 .
2019-07-08 19:06:06 +02:00
Andreas Kling
2c81477f16
Terminal: Try to preserve line contents when resizing the terminal window.
...
This is still destructive when shrinking, but clearly better than throwing
everything away.
2019-07-08 19:02:08 +02:00
Andreas Kling
4d904340b4
Kernel: Don't interrupt blocked syscalls to dispatch ignored signals.
...
This was just causing syscalls to return EINTR for no reason.
2019-07-08 18:59:48 +02:00
Andreas Kling
cda5a6eca3
Kernel: Add LogStream operator<< for Process.
...
It simply prints "process-name(pid)", nothing fancy, but kinda useful.
2019-07-08 18:58:19 +02:00
Andreas Kling
fc127eb769
LibHTML: Create anonymous blocks around inline children of blocks.
2019-07-08 17:42:23 +02:00
Andreas Kling
2caec95d30
StringBuilder: Reset the internal builder length after building.
...
This puts the StringBuilder back into a pristine state, allowing you
to use it to build more strings after you've built one.
2019-07-08 15:57:25 +02:00
Andreas Kling
0e75aba7c3
StringView: Rename characters() to characters_without_null_termination().
...
This should make you think twice before trying to use the const char* from
a StringView as if it's a null-terminated string.
2019-07-08 15:38:44 +02:00
Andreas Kling
567551bc12
AK: Add some missing includes in SinglyLinkedList.
2019-07-08 14:06:22 +02:00