Commit Graph

24 Commits

Author SHA1 Message Date
Oriko
795067e08c HackStudio: Add new Terminals 2020-04-06 09:01:42 +02:00
Andreas Kling
37fc6c117c Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller 2020-03-08 13:06:51 +01:00
Andreas Kling
4697195645 LibGUI: Use set_layout<LayoutType>() in lots of client code 2020-03-04 13:49:48 +01:00
Andreas Kling
ceec1a7d38 AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
Andreas Kling
3d20da9ee4 Userspace: Use Core::Object::add() when building interfaces 2020-02-23 11:10:52 +01:00
Andreas Kling
6a9cc66b97 LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
Andreas Kling
d17e23bd27 LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
Andreas Kling
799b0a4fa8 LibGUI: Rename {H,V}BoxLayout => {Horizontal,Vertical}BoxLayout 2020-02-06 14:44:13 +01:00
Andreas Kling
f2a087126c LibC: Add posix_openpt(), grantpt() and unlockpt()
This makes getting a pseudoterminal pair a little bit more portable.
Note that grantpt() and unlockpt() are currently no-ops, since we've
already granted the pseudoterminal slave to the calling user.

We also accept O_CLOEXEC to posix_openpt(), unlike some systems. :^)
2020-02-05 21:17:41 +01:00
Andreas Kling
c5bd9d4ed1 LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
2020-02-02 15:15:33 +01:00
Andreas Kling
2d39da5405 LibCore: Put all classes in the Core namespace and remove the leading C
I've been wanting to do this for a long time. It's time we start being
consistent about how this stuff works.

The new convention is:

- "LibFoo" is a userspace library that provides the "Foo" namespace.

That's it :^) This was pretty tedious to convert and I didn't even
start on LibGUI yet. But it's coming up next.
2020-02-02 15:15:30 +01:00
Andreas Kling
d67da8c101 LibGUI: Add GHBoxLayout and GVBoxLayout convenience classes 2020-02-02 15:09:48 +01:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
joshua stein
d063a4ccf3 HackStudio: set sane $PATH early to include /usr/local/bin
Launching from the terminal inherits $PATH which includes
/usr/local/bin, but launching from the system menubar doesn't, so
HackStudio wasn't finding make installed from ports.
2020-01-16 12:42:25 +01:00
Sergey Bugaev
1f5001c581 HackStudio: Do not spawn an intermediary shell
The Shell also puts each command into its own process group,
which interferes with us trying to do the same here. We don't
really need the shell here anyway, but it means we'll have to
do command splitting ourselves.
2019-11-14 20:10:16 +01:00
Sergey Bugaev
8484635920 HackStudio: Add TerminalWrapper::kill_running_command()
Also put our child process into a new process group in order to be
able to kill it along with its own children.
2019-11-14 20:10:16 +01:00
Sergey Bugaev
cd11a8597a HackStudio: Add TerminalWrapper::on_command_exit 2019-11-14 20:10:16 +01:00
Sergey Bugaev
d3504b4f9b Terminal+HackStudio: Fix leaking PTM fd to child processes
The pseudoterminal *master* fd is not supposed to be inherited,
so make sure to open it with O_CLOEXEC.
2019-11-13 16:37:04 +01:00
Andreas Kling
4e25d69dba HackStudio: Move the ProcessStateWidget below the TerminalWidget
This looks a bit less janky when hiding/unhiding.. :^)
2019-10-24 22:32:27 +02:00
Andreas Kling
bced810880 HackStudio: Show the slave pty's PGID in the ProcessStateWidget
This is the closest I could figure out how to get to what's actively
running on the terminal view at the moment.

Perhaps we can bundle up every process with the same tty and sum it
all up somehow. I'm not sure.
2019-10-24 20:56:13 +02:00
Andreas Kling
272317bce2 HackStudio: Add a widget showing the state of console's running process
We now have a little widget that sits above the terminal view in the
build/application console. When a child process is running, we show its
PID, name, scheduling counter, and amount of resident memory in a live
little overview.

This is not working right just yet, since we don't know how to get to
the actually active PID on the TTY. Or, well, we find the active PID by
looking at the PGID of our fork()ed child.

This manages to find children spawned by Shell, but not children
spawned by make, for instance. I need to figure out how to find those.
2019-10-24 20:21:43 +02:00
Andreas Kling
654ffdef91 HackStudio: Add a simple "Build" action
Pressing Ctrl+B now invokes "make" in the project directory and routes
the output from the make command to the little terminal widget.
2019-10-22 22:15:43 +02:00
Andreas Kling
da0958a882 LibVT: Make TerminalWidget's automatic size policy updates optional
When embedding a TerminalWidget, you might not want it to automatically
update its own size policy based on the exact terminal buffer size.

This behavior is now passed as a flag to the TerminalWidget constructor
which makes it behave nicely both inside HackStudio and in Terminal.
2019-10-21 20:28:30 +02:00
Andreas Kling
43ccb28852 HackStudio: Embed a Terminal widget below the text editor
This will be very useful for running (and interacting with) programs
after we build them. :^)
2019-10-21 20:17:32 +02:00