Commit Graph

311 Commits

Author SHA1 Message Date
Andrés Vieira
488d755ccd Docs: Add cal(1) man page 2019-12-24 11:48:16 +01:00
Andreas Kling
2cdab2c925 Themes: Add a simple "Dark" theme :^) 2019-12-24 02:25:50 +01:00
Andreas Kling
df3a2dba43 LibDraw: Add Button and ButtonText system theme colors
These are now separate from the Window and WindowText colors.
2019-12-24 02:25:50 +01:00
Andreas Kling
411058b2a3 WindowServer+LibGUI: Implement basic color theming
Color themes are loaded from .ini files in /res/themes/
The theme can be switched from the "Themes" section in the system menu.

The basic mechanism is that WindowServer broadcasts a SharedBuffer with
all of the color values of the current theme. Clients receive this with
the response to their initial WindowServer::Greet handshake.

When the theme is changed, WindowServer tells everyone by sending out
an UpdateSystemTheme message with a new SharedBuffer to use.

This does feel somewhat bloated somehow, but I'm sure we can iterate on
it over time and improve things.

To get one of the theme colors, use the Color(SystemColor) constructor:

    painter.fill_rect(rect, SystemColor::HoverHighlight);

Some things don't work 100% right without a reboot. Specifically, when
constructing a GWidget, it will set its own background and foreground
colors based on the current SystemColor::Window and SystemColor::Text.
The widget is then stuck with these values, and they don't update on
system theme change, only on app restart.

All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-23 20:33:01 +01:00
Andreas Kling
91ba94fbd4 LibHTML: Support the :only-child pseudo class 2019-12-16 19:52:11 +01:00
Andreas Kling
085cafd80a LibHTML: Support the :empty pseudo class 2019-12-16 19:46:02 +01:00
Andreas Kling
c1474e594e LibHTML: Support the :first-child and :last-child pseudo classes 2019-12-16 19:34:52 +01:00
Andreas Kling
e1940f365b WindowServer+MenuApplets: Move the "Audio" applet to its own program
This patch introduces the second MenuApplet: Audio. To make this work,
menu applet windows now also receive mouse events.

There's still some problem with mute/unmute via clicking not actually
working, but the call goes from the applet program over IPC to the
AudioServer, where something goes wrong with the state change message.
Need to look at that separately.

Anyways, it's pretty cool to have more applets running in their own
separate processes. :^)
2019-12-16 15:33:42 +01:00
Andreas Kling
e4267020c4 ProfileViewer: Show kernel frames with a red icon :^) 2019-12-14 16:16:53 +01:00
Valtteri Koskivuori
c0696ad3aa LookupServer: Switch to a more privacy-respecting DNS provider 2019-12-11 12:01:16 +01:00
Andreas Kling
5d7c0b0123 Fonts: Add two little marker glyphs to CsillaThin7x10
ASCII values 0x1 and 0x2 of this font now contain little helper glyphs
for showing left and right side markers around something.
2019-12-10 22:06:52 +01:00
Andreas Kling
e339c2bce8 WindowServer: Disambiguate "dragging" a bit, use "moving" more instead
Windows that are being moved around by the user are now called "moving"
windows instead of "dragging" windows, to avoid confusion with the
drag and drop stuff.
2019-12-08 23:41:02 +01:00
Andreas Kling
39c2d04a9b WindowServer: Add a dedicated drag cursor 2019-12-08 20:29:14 +01:00
Andreas Kling
20bbeba6d5 CPUGraph: Launch the CPUGraph menu applet on startup 2019-12-05 19:44:22 +01:00
Sergey Bugaev
f2546d15ce Taskbar: Add a quick launch bar
This is a tiny bar at the left of the taskbar where you can put
your most used apps to launch them with a single click. In a way,
it's another replacement for the Launcher, in addition to the app
menu. Unlike the launcher and the menu, it's not meant to be the
primary way to launch apps; it's only a faster way to launch a few
most often used utilities.
2019-12-04 14:32:15 +01:00
Andreas Kling
f41ae755ec Kernel: Crash on memory access in non-readable regions
This patch makes it possible to make memory regions non-readable.
This is enforced using the "present" bit in the page tables.
A process that hits an not-present page fault in a non-readable
region will be crashed.
2019-12-02 19:18:52 +01:00
Andreas Kling
4e6cd541c9 PaintBrush: Add a "line" tool for drawing straight lines
This implements "preview" of the line by allowing tool subclasses to
hook the second_paint_event on the PaintableWidget.

Work towards #375.
2019-11-29 22:41:19 +01:00
Andreas Kling
f99e554c5e Calculator: Add a 16x16 app icon 2019-11-29 21:04:19 +01:00
Andreas Kling
e56daf547c Kernel: Disallow syscalls from writeable memory
Processes will now crash with SIGSEGV if they attempt making a syscall
from PROT_WRITE memory.

This neat idea comes from OpenBSD. :^)
2019-11-29 16:30:05 +01:00
Sergey Bugaev
fe0aa2ca53 Base: Document SystemServer 2019-11-26 19:58:25 +01:00
Sergey Bugaev
52b0bd06a8 SystemServer: Implement lazy spawning
For services explicitly configured as lazy, SystemServer will now listen
on the socket and only spawn the service once a client attempts to connect
to the socket.
2019-11-26 19:58:25 +01:00
Sergey Bugaev
ab98969403 LookupServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev
9eaac26eda ProtocolServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev
bd55938985 AudioServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev
22a05621d5 WindowServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev
396ad4d6b2 SystemServer: Implement keepalive
When reaping a child, SystemServer will now match up child's pid with its own
record of the services, and respawn the service if keepalive is enabled for it.

For example, we want to restart the WindowServer if it crashes, but we wouldn't
want to restart the Terminal if it gets closed.
2019-11-26 19:58:25 +01:00
Sergey Bugaev
b93065359e SystemServer: Read service list from a config file
This replaces the hardcoded services list with a very simple config
file in /etc/SystemServer.ini :^)

Closes https://github.com/SerenityOS/serenity/issues/610
2019-11-26 19:58:25 +01:00
Andreas Kling
6d1c4ae5a9 LibHTML: Implement basic <form> and <input> element support
This patch adds "submit" inputs and default (text box) inputs, as well
as form elements that can be submitted.

Layout of input elements is implemented via a new LayoutWidget class
that allows you to put an arbitrary GWidget in the layout tree.
At the moment, the DOM node sets the initial size of the LayoutWidget,
and then the positioning is done by the normal layout algorithm.

We also now support submitting a <form method="GET">, which does a full
replacing load with a URL based on the form's action + a query string
built from the name/value of input elements within the submitted form.

This is pretty neat! :^)
2019-11-25 21:21:55 +01:00
Andreas Kling
10d67879c3 Base: Import the 1st and 2nd Acid tests for web standards compliance
Getting these to work will take a lot of work, but most of it will be
pretty fun, so I guess we start by importing them. :^)
2019-11-25 17:48:51 +01:00
Andreas Kling
05b1ecf1b1 LibHTML: Draw each CSS border edge separately with their own style
The borders still look very wrong with any border-width other than 1,
but at least we can see that they have the right color, and end up in
mostly the right place :^)
2019-11-25 13:17:14 +01:00
Hüseyin ASLITÜRK
197b2dcd36 Base: Add trq.json and en.json 2019-11-25 11:53:02 +01:00
Andreas Kling
9009390f9c WindowServer: Add an audio icon to the menu bar
Clicking on this icon toggles the AudioServer muted state.

It currently does not react to muted state changes caused by other
programs, since it has no way of learning about those from AudioServer,
other than performing a synchronous IPC call (GetMuted), which we don't
want to be doing in the WindowServer :^)
2019-11-22 22:15:39 +01:00
Andreas Kling
6fbe0f17f2 Docs: Add avol(1) 2019-11-22 21:52:52 +01:00
Andreas Kling
61ba19f031 LibHTML: Handle stand-alone attribute selectors
A selector like "[foo]" is now parsed as a universal selector component
with an attribute match type. Pretty neat :^)
2019-11-21 20:19:00 +01:00
Andreas Kling
8946e50986 LibHTML: Implement some attribute selector support
This patch adds a[foo] and a[foo=bar] attribute selectors.

Note that an attribute selector is an optional part of a selector
component, and not a component on its own.
2019-11-21 20:07:43 +01:00
Andreas Kling
7b3f1218be little: Make this build by default, and add some curlies 2019-11-18 19:01:50 +01:00
Andreas Kling
70e220a81f Docs: Add note about EINVAL to isatty(3) 2019-11-17 20:09:12 +01:00
Andreas Kling
1bb296ea70 Docs: Add isatty(3) man page 2019-11-17 20:03:42 +01:00
Andreas Kling
3d558f47b0 Docs: Add uname(1) and uname(2) man pages 2019-11-17 19:48:11 +01:00
Andreas Kling
189f234b47 Docs: Add info about -T and -t to crash(1) 2019-11-17 19:23:35 +01:00
Andreas Kling
fabdc8cdcb Base: Add Help.af :^)
Whoops, I forgot to add an .af file for the Help app!
2019-11-12 21:25:52 +01:00
Andreas Kling
f3e7dc65cd Katica10: Tweak the 'L' and 'Q' glyphs 2019-11-12 19:14:38 +01:00
Andreas Kling
dd2900eda0 Launcher: Remove the Launcher app, and all hacks in support of it
The Launcher's functionality has been replaced by the app shortcuts in
the system menu.

There were various window management hacks to ensure that the launcher
stayed below all other windows while also being movable, etc.
2019-11-11 13:13:08 +01:00
Andreas Kling
26f41c7ecb Base: Add .af files for Minesweeper, Snake and VisualBuilder 2019-11-11 13:13:08 +01:00
Andreas Kling
77de51d251 Base: Add Piano.af and SoundPlayer.af 2019-11-11 13:13:08 +01:00
Andreas Kling
3a71c018bf Base: Put DisplayProperties, FontEditor and PaintBrush into a category
These apps are now in a "Graphics" category :^)
2019-11-11 13:13:08 +01:00
Andreas Kling
bd0a8d078f Base: Add TextEditor.af 2019-11-11 13:13:08 +01:00
Andreas Kling
b6a6f34caa WindowServer: Populate system menu with app launchers from /res/apps
The new system directory /res/apps now contains ".af" files describing
applications (name, category, executable path, and icon.)
These are used to populate the system menu with application shortcuts.

This will replace the Launcher app. :^)
2019-11-11 13:13:08 +01:00
Andreas Kling
a04ab219d1 HackStudio: Use a visually distinct icon for the cursor tool
Using the default cursor bitmap as the cursor tool icon in HackStudio
was predictably making it impossible to tell if it's the real cursor
or not. Replace it with a color-inverted cursor. :^)
2019-11-10 21:19:08 +01:00
Andreas Kling
2da058c7f2 HackStudio: Use the GWidget class registry to populate the toolbar
This will allow HackStudio to learn about new GWidget types without
having to do anything in HackStudio :^)
2019-11-10 12:57:37 +01:00
Marcel Schneider
edd0959c83 Base: Add link to bettermotherfuckingwebsite in welcome.html 2019-11-10 12:52:23 +01:00
Till Mayer
660db0f79a SoundPlayer: Added 32x32 icon for the about dialog 2019-11-09 20:55:47 +01:00
Hüseyin ASLITÜRK
aba6e6de6a FileManager: Remember my last position and size. 2019-11-09 20:50:53 +01:00
Andreas Kling
d016d5e365 HackStudio: Start fleshing out the GUI for a GUI designer :^)
I'll be reconstructing parts of the VisualBuilder application here and
then we can retire VisualBuilder entirely once all the functionality
is available in HackStudio.
2019-11-09 00:41:00 +01:00
Andreas Kling
306cd0d840 Base: Add a local copy of bettermotherfuckingwebsite.com for testing 2019-11-07 21:40:04 +01:00
Till Mayer
e7ccbdbe30 SoundPlayer: Added playback control icons and application icon 2019-11-04 20:55:46 +01:00
Hüseyin ASLITÜRK
e2f0ac13a4 FileManager: Remember my last view mode (#731) 2019-11-04 17:27:56 +01:00
Andreas Kling
7c71040ba9 HackStudio: Show documentation preview in tooltip on identifier hover
When hovering over a C++ token that we have a man page for, we now show
the man page in a tooltip window.

This feels rather bulky at the moment, but the basic mechanism is quite
neat and just needs a bunch of tuning.
2019-10-30 20:28:44 +01:00
Andreas Kling
d24164ac6a HackStudio: Add little icons for ".cpp" and ".h" files
This makes it easier to tell them apart in locator suggestions. :^)
2019-10-28 19:08:48 +01:00
Andreas Kling
307cbf83c3 HackStudio: Start building a C++ lexer to help with syntax highlighting 2019-10-25 19:52:44 +02:00
Andreas Kling
84a2208b5c HackStudio: Add some toolbar icons to liven up the UI a bit :^) 2019-10-24 22:25:26 +02:00
Andreas Kling
5a2dd451b5 HackStudio: Add "little" test project file list 2019-10-23 12:28:25 +02:00
Andreas Kling
708543c3d6 HackStudio: Add a simple "Run" action
Ctrl+R will now execute "make run" in the project directory. :^)
2019-10-22 22:18:46 +02:00
Andreas Kling
a6b153abf1 HackStudio: Show the currently open file in bold (in the project list)
Also import a little default C++ project called "little" :^)
2019-10-22 21:38:58 +02:00
Andreas Kling
2638a94094 HackStudio: Add a simple app icon and some initial menus 2019-10-21 22:13:20 +02:00
Andreas Kling
eb77e680ed LibHTML: Implement "text-align: justify"
In order for this to work nicely, I made the line box classes use float
instead of int for its geometry information.

Justification works by distributing all of the whitespace on the line
(including the trailing whitespace before the line break) evenly across
the spaces in-between words.

We should probably use floating point (or maybe fixed point?) for all
the layout metrics stuff. But one thing at a time. :^)
2019-10-20 12:55:55 +02:00
Andreas Kling
c41bae3d54 LibHTML+Browser: Support scrolling to anchor with <a href="#foo">
This patch implements basic support for <a href="#foo"> fragment links.

To figure out where we actually want to scroll to, we have to do
something different based on the layout node's box type. So if it's a
regular LayoutBox we can just use the LayoutBox::position().

However, if it's an inline layout node, we use the position of the
first line box fragment in the containing block contributed by this
layout node or one of its descendants.
2019-10-20 10:07:26 +02:00
Andreas Kling
5a34225999 LibHTML: Implement basic tiled background image support
It's now possible to set a page background image via <body background>.
Also, HtmlView now officially handles rendering the body element's
background (color, image or both.) LayoutBox is responsible for all
other background rendering.

Note that it's not yet possible to use CSS background-image properties
directly, since we can't parse them yet. :^)
2019-10-19 11:49:46 +02:00
Andreas Kling
06f084fedd LibHTML: Add the <center> element
This is really just "center { display: block; text-align: center; }" in
the default stylesheet, but it totally works!
2019-10-16 20:33:00 +02:00
Andreas Kling
6dbba6ad85 LibHTML: Implement CSS text-align: left/center/right
This was easier than I imagined; we just shift each line box to the
left based on the alignment and the remaining space on each line. :^)
2019-10-16 20:32:17 +02:00
Andreas Kling
61ef17b87a LibHTML: Implement basic :hover pseudo-class support
This is currently very aggressive. Whenever the Document's hovered node
changes, we invalidate all style and do a full relayout.

It does look cool though. So cool that I'm adding it to the default
stylesheet. :^)
2019-10-14 17:55:04 +02:00
Brandon Scott
48ef1d1bd1 HexEditor: Initial application release
The very first release of the Hex Editor for Serenity.
2019-10-13 08:45:49 +02:00
Andreas Kling
08209cc665 LibHTML: Handle comments in the CSS parser
Turn consume_whitespace() into consume_whitespace_or_comments() and
have it swallow /* comments */ as well.
2019-10-13 00:28:15 +02:00
Andreas Kling
b083a233d8 LibHTML: Add Comment and CharacterData nodes and improve HTML parsing
This patch adds the CharacterData subclass of Node, which is now the
parent class of Text and a new Comment class.

A Comment node is one of these in HTML: <!--hello friends-->
Since these occur somewhat frequently on the web, we need to be able
to parse them.

This patch also adds a child rejection mechanism to the DOM tree.
Nodes can now override is_child_allowed(Node) and return false if they
don't want a particular Node to become a child of theirs. This is used
to prevent Document from taking on unwanted children.
2019-10-12 23:34:05 +02:00
Andreas Kling
6242459c0f LibHTML: Implement the <br> element for line breaking
The <br> element will produce a special LayoutBreak node in the layout
tree, which forces a break in the line layout whenever encountered.

This patch also makes LayoutBlock use the current line-height as the
minimum effective height for each line box. This ensures that having
multiple <br> elements in a row doesn't create 0-height line boxes.
2019-10-12 13:47:49 +02:00
Andreas Kling
76266862d1 LibGUI+WindowServer: Add a "Hand" cursor to the standard cursors 2019-10-10 21:35:12 +02:00
Andreas Kling
fdbad6284c LibHTML: Implement the <blink> element
Just in time for Serenity's 1st birthday, here is the <blink> element!

This patch adds a bunch of different mechanisms to enable partial
repaints of the layout tree (LayoutNode::set_needs_display()))
It also adds LayoutNode::is_visible(), which can be toggled to prevent
a LayoutNode from rendering anything (it still takes up space though.)
2019-10-09 21:25:29 +02:00
Andreas Kling
3be6d1aff0 LibHTML: Add ResourceLoader to support protocol-agnostic URL loading
We now support loading both file:// and http:// URLs. Feel free to
visit http://www.serenityos.org/ and enjoy the fancy good times. :^)
2019-10-08 19:37:15 +02:00
Andreas Kling
71e8ddcd1c LibHTML: Start adding support for <link rel="stylesheet">
This patch adds basic support for external stylesheets. It currently
only works with file:// URLs.

We do a synchronous full relayout after loading a stylesheet, which is
definitely on the aggressive side, but it gives us something to work
on improving. :^)
2019-10-07 19:06:47 +02:00
Andreas Kling
122d12e617 LibDraw: Parse some more color string formats found on the web
This patch adds the 17 color names from CSS2.1, as well as support for
the "#rgb" shorthand where each component is a hex digit that gets
multiplied by 17.
2019-10-06 21:40:14 +02:00
Andreas Kling
bedb00603c LibHTML: Add adjacent (+) and general (~) sibling combinators
This patch implements two more selector features:

- "div + p" matches the <p> sibling immediately after a <div>.
- "div ~ p" matches all <p> siblings after a <div>.
2019-10-06 19:59:07 +02:00
Andreas Kling
cad326f323 LibHTML: Implement immediate-child selectors (#foo > #bar) 2019-10-06 15:41:16 +02:00
Andreas Kling
156b35742a LibHTML: Implement matching for descendant selectors
The CSS engine now correctly matches selectors like "#foo #bar #baz".
2019-10-06 15:34:42 +02:00
Conrad Pankoff
6eef6f4f1d Base: Add a page for image features to the www directory 2019-10-06 14:33:00 +02:00
Andreas Kling
31e361b827 Base: Add a little welcome page for the browser at ~/www/welcome.html 2019-10-05 10:29:52 +02:00
Andreas Kling
4f47146433 LibGUI: Add a "reload" action to GCommonActions 2019-10-05 10:14:09 +02:00
Andreas Kling
3feb452bf4 Base: Add a little HTML test for presentational hints 2019-10-04 21:15:52 +02:00
Sergey Bugaev
afdc5688ec LibC: Implement dirname() and basename()
And write section 3 man pages for them.
2019-10-03 08:23:54 +02:00
Sergey Bugaev
8fbcfa934a Base: Add some "See also" links to the man pages
We can do this now that we have link support in LibMarkdown and LibHTML ^)
2019-10-03 08:23:54 +02:00
Andreas Kling
53db492aba Base: Rename the "html" test directory to "www"
It was conflicting with the html program and I'm too lazy to deal with
that right now. :^)
2019-10-01 20:16:09 +02:00
Brandon Scott
08a1fb8f1a LibGUI+PaintBrush: Fix to GFilePicker and PaintBrush enhancements.
GFilePicker
- Fixed GFilePicker to use new ref-counted construct method to stop crashing on open dialog.
  - PaintBrush is still crashing on open dialog due to an unrelated issue.

PaintBrush
- Created 16x16 icon for PaintBrush
- Moved Open option into App menu.
- Changed help menu to make use of the standardized About dialog.
2019-10-01 09:17:56 +02:00
Larkin Nickle
3fb88cb76d Help+man.md: Add man sections
Also correct minor formatting mistake in TelnetServer.md.
2019-09-30 21:38:39 +02:00
Larkin Nickle
e7c2467231 Add TelnetServer man page 2019-09-30 21:38:39 +02:00
Andreas Kling
3900eebf15 FileManager+LibGUI+html: Add an icon to represent HTML files
This also becomes the app icon for the little "html" program. :^)
2019-09-29 21:00:41 +02:00
Andreas Kling
17c06d7c9a Base: Move HTML test pages into /home/anon/html
Also add a simple test page for inline style sheets.
2019-09-29 18:07:36 +02:00
Andreas Kling
b5c587a106 Base: Add some title attributes to the small HTML test file :^) 2019-09-29 12:26:15 +02:00
Andreas Kling
dba74abe93 Base: Fix minor typos in man pages 2019-09-28 23:06:22 +02:00
Andreas Kling
3ed41abba4 Base: Add a little hyperlink to the small HTML test page
This will be useful for testing rendering, hit testing, etc.
2019-09-28 23:00:47 +02:00
Andreas Kling
eb18825fce Base: Add man pages for create_shared_buffer() and share_buffer_with() 2019-09-28 21:16:26 +02:00
Andreas Kling
5673ff3694 Base: Add a bold variant of the Pebbleton 11px font 2019-09-28 19:14:23 +02:00