Commit Graph

125 Commits

Author SHA1 Message Date
Andreas Kling
8eefdbdce8 LibGUI: Add horizontal scrollbar to GTableView.
Now we can scroll content in both directions if it won't fit in the view.
2019-02-28 17:58:53 +01:00
Andreas Kling
28652a0bf7 LibGUI: GTableView was accidentally obscuring the last row. 2019-02-28 16:42:18 +01:00
Andreas Kling
75fabef57b LibGUI: Add GVariant class and use it for table model data. 2019-02-28 16:20:29 +01:00
Andreas Kling
62b4f39cd4 LibGUI: GTableView should clear the selection if clicking outside items. 2019-02-28 14:05:02 +01:00
Andreas Kling
6af2ce0f7e LibGUI: Re-enable the update rect coalescing. 2019-02-28 13:58:04 +01:00
Andreas Kling
7eb42b5ffb LibGUI: GTableView paints itself completely, no need for auto filling. 2019-02-28 13:57:41 +01:00
Andreas Kling
827ec99a8f LibGUI: Update GTableView's scrollbar range in response to resize. 2019-02-28 13:25:52 +01:00
Andreas Kling
fd280a6a03 LibGUI: Pad GTableView cells on the right side as well. 2019-02-28 11:31:07 +01:00
Andreas Kling
b4c20789fb LibGUI: Allow specifying per-column text alignment. 2019-02-28 11:27:04 +01:00
Andreas Kling
40c8dd80d1 LibGUI: Draw separators between GTableView column headers. 2019-02-28 11:04:03 +01:00
Andreas Kling
dc9f8a9361 LibGUI: Take ProcessManager's process view and turn it into GTableView.
Make it sufficiently generic that it can be reused for any table data. :^)
2019-02-28 10:57:09 +01:00
Andreas Kling
6e571b66f1 ProcessManager: Move ProcessTableModel class to its own files. 2019-02-28 10:20:04 +01:00
Andreas Kling
166aadc4e1 ProcessManager: Start working on a graphical process manager.
I need a table view widget for this thing, so I'm also using this to
prototype a model/view thingy.
2019-02-28 01:43:50 +01:00
Andreas Kling
6e70ba7d1d LibGUI: GWindow should only discard the backing store on actual resize. 2019-02-27 18:52:12 +01:00
Andreas Kling
3f29a12d90 More compat work. Rename libraries from LibFoo.a => libfoo.a
This makes it more straightforward to build a cross-compiler toolchain.
Also move math stuff from LibC to LibM.
2019-02-26 13:30:57 +01:00
Andreas Kling
c90962b842 LibGUI: Make toolbars a bit bigger by default. 2019-02-26 11:14:35 +01:00
Andreas Kling
9444ed0117 LibGUI: Remove gradient from the default button style.
Buttons actually look nicer without the gradient. :^)
2019-02-26 11:14:07 +01:00
Andreas Kling
ae90043424 WindowServer+LibGUI: Send the window size along with Paint server messages.
This way GWindow doesn't need to do synchronous IPC to fetch the appropriate
size for the window's backing store. This is mostly only relevant during
live resize.
2019-02-26 10:53:21 +01:00
Andreas Kling
1effe70543 WindowServer+LibGUI: Fix global mouse tracking with recursive widget trees.
Also avoid sending multiple copies of mouse events to global trackers.
2019-02-26 10:34:05 +01:00
Andreas Kling
95cfa49f1b LibGUI: Make event receivers be weak pointers. 2019-02-26 00:51:49 +01:00
Andreas Kling
9624b54703 More moving towards using signed types.
I'm still feeling this out, but I am starting to like the general idea.
2019-02-25 22:06:55 +01:00
Andreas Kling
901b7d5d91 Fix a bunch of compiler warnings. Not all, but a lot. 2019-02-25 19:05:51 +01:00
Andreas Kling
15fb917f28 Convert more RetainPtr use to Retained. 2019-02-25 16:04:08 +01:00
Andreas Kling
2cfcbdc735 AK: Add Retained<T>, like RetainPtr, but never null.
Also use some Clang attribute wizardry to get a warning for use-after-move.
2019-02-25 12:43:52 +01:00
Andreas Kling
d7753c7c8d Move over to building all of userspace with i686-pc-serenity-g++. 2019-02-22 14:45:14 +01:00
Andreas Kling
75b100673f Switch over to building everything with i686-elf-g++. 2019-02-22 10:45:32 +01:00
Andreas Kling
f5f136931a Kernel: Start adding various file system permission checks.
Fail with EACCES in various situations. Fix userland bugs that were exposed.
2019-02-21 15:45:31 +01:00
Andreas Kling
6084cd0c56 Add concept of size increments to windowing system.
Use this to implement incremental resizing for Terminal so that we only
ever resize to fit a perfect number of rows and columns.

This is very nice. :^)
2019-02-21 00:21:23 +01:00
Andreas Kling
fa02d2a39b Rework the rendering model so that clients instantiate backing stores.
This makes interactive resizing work a lot better, althought it's still not
perfect. There are still glitches and unpleasant flashes of zeroed memory.
2019-02-20 22:08:14 +01:00
Andreas Kling
59b8183c4b WindowServer: Support resizing windows.
This is pretty limited and not entirely stable, but it does work! :^)
2019-02-20 15:34:55 +01:00
Andreas Kling
9763eb44f9 LibGUI: Pack toolbar buttons closer together. 2019-02-20 11:56:28 +01:00
Andreas Kling
bf30502560 LibGUI: Implement enter/leave events (with WindowServer support.)
Windows now learn when the mouse cursor leaves or enters them.
Use this to implement GWidget::{enter,leave}_event() and use that
to implement the CoolBar button effect. :^)
2019-02-20 10:12:19 +01:00
Andreas Kling
d353c7c3d6 LibGUI: Support different button styles.
I want to try an MS Office 97 "CoolBar" inspired look for my toolbars.
This is only the painting support, we still need hover events to implement
the actual effect.
2019-02-20 09:22:38 +01:00
Andreas Kling
dc753b58a5 LibGUI: Improve GBoxLayout so it can better support GToolBar.
Added spacing and margin concepts to GLayout. Support layout a sequence
of nothing but fixed-size objects in the desired orientation. :^)
2019-02-20 09:04:28 +01:00
Andreas Kling
b704d3d295 LibGUI: Add a GToolBar class that can be populated with GActions.
The same action can be added to both a menu and a toolbar.
Use this to put a toolbar into FileManager. This is pretty neat. :^)
2019-02-20 02:39:46 +01:00
Andreas Kling
9b71307d49 WindowServer: Support windows with alpha channels. And per-WSWindow opacity.
This patch also adds a Format concept to GraphicsBitmap. For now there are
only two formats: RGB32 and RGBA32. Windows with alpha channel have their
backing stores created in the RGBA32 format.

Use this to make Terminal windows semi-transparent for that comfy rice look.
There is one problem here, in that window compositing overdraw incurs
multiple passes of blending of the same pixels. This leads to a mismatch in
opacity which is obviously not good. I will work on this in a later patch.

The alpha blending is currently straight C++. It should be relatively easy
to optimize this using SSE instructions.

For now I'm just happy with the cute effect. :^)
2019-02-19 01:42:53 +01:00
Andreas Kling
8eedbbc9ca Prune compiler flags a bit. Let's go with -march=i686 for now. 2019-02-17 15:17:21 +01:00
Andreas Kling
8321908abe LibGUI: Tweak the scrollbar and button styles a bit. 2019-02-17 12:08:28 +01:00
Andreas Kling
4b15dd2bca LibGUI: Rename GEventLoop::exit() and GApplication::exit() to quit().
These functions don't exit immediately, but rather on the next iteration
of the event loop.

Since exit() is already used by the standard library, let's call it quit()
instead. That way, saying exit() means the same thing here as anywhere else.
2019-02-17 09:59:56 +01:00
Andreas Kling
18062f4ad6 LibGUI: Remove some debugging noise. 2019-02-17 01:05:24 +01:00
Andreas Kling
10d6f9ce31 SharedGraphics: Removed some unused stuff from Font. 2019-02-17 00:36:55 +01:00
Andreas Kling
640360e958 Move WindowServer to userspace.
This is a monster patch that required changing a whole bunch of things.
There are performance and stability issues all over the place, but it works.
Pretty cool, I have to admit :^)
2019-02-17 00:13:47 +01:00
Andreas Kling
df6aaaeeef Enable -Wimplicit-fallthrough. 2019-02-15 12:39:16 +01:00
Andreas Kling
29c49356e3 WindowServer: Rename GUI_Foo to WSAPI_Foo. 2019-02-15 09:17:18 +01:00
Andreas Kling
a54cd84c59 Move WindowServer API types header into WindowServer/. 2019-02-15 09:14:21 +01:00
Andreas Kling
c7f5213d5b LibGUI: Add some extremely primitive retrying for the server connection. 2019-02-14 17:43:20 +01:00
Andreas Kling
bf58241c11 Port the WindowServer and LibGUI to communicate through local sockets.
This is really cool! :^)

Apps currently refuse to start if the WindowServer isn't listening on the
socket in /wsportal. This makes sense, but I guess it would also be nice
to have some sort of "wait for server on startup" mode.

This has performance issues, and I'll work on those, but this stuff seems
to actually work and I'm very happy with that.
2019-02-14 17:18:35 +01:00
Andreas Kling
427df5f312 LibGUI: Yield (using select()) in GEventLoop::wait_for_specific_event().
This is factored a bit stupidly. It would be nicer to just have the
read() in drain_events_from_server() be blocking, but the fd is opened
with O_NONBLOCK right now.

This makes everything run real snappy once again. :^)
2019-02-14 10:06:41 +01:00
Andreas Kling
222a6f7bbc WindowServer: Post error messages to clients on protocol failure. 2019-02-14 09:32:34 +01:00
Andreas Kling
f529b845ec WindowServer: Convert entire API to be message-based.
One big step towards userspace WindowServer. :^)
2019-02-14 01:21:32 +01:00