Commit graph

134 commits

Author SHA1 Message Date
Ben Wiederhake
5692fa6c39 Eyes: Introduce and use icons
The icons are made using a screenshot which was then scaled down.
The 16x16 icon needed some light post-processing to look good.
2020-07-29 01:34:22 +02:00
AnotherTest
f8becd4df8 Eyes: Fix division by zero when invoked as 'Eyes' 2020-07-27 12:57:27 +02:00
AnotherTest
2c6a983b34 Eyes: Allow constructing an eye-grid
Because a line of eyes is just not impressive enough.
This does not change any of the default behaviours except breaking the
line of eyes at 13 eyes (the 'sweet spot' for the default resolution)
2020-07-27 12:30:57 +02:00
Andreas Kling
299824de73 LibGUI: Rename GUI::Image => GUI::ImageWidget
"Image" was a bit too vague, "ImageWidget" is obviously a widget of
some sort.
2020-07-23 17:31:08 +02:00
Brian Gianforcaro
76e34968fa Demos: Setup window icon for Mouse demo
The icon was set in the launcher, and the About dialog, but was
missing form the actual window.
2020-07-19 11:18:27 +02:00
thankyouverycool
19e883e45a WidgetGallery: Add more widgets
Adds combo and input boxes + more variation for existing widgets.
2020-07-18 16:27:57 +02:00
Tom
27bd2eab22 LibWeb: Require parent window argument for MessageBox
Since the vast majority of message boxes should be modal, require
the parent window to be passed in, which can be nullptr for the
rare case that they don't. By it being the first argument, the
default arguments also don't need to be explicitly stated in most
cases, and it encourages passing in a parent window handle.

Fix up several message boxes that should have been modal.
2020-07-16 16:10:21 +02:00
thankyouverycool
066ae29c07 Base+Demos: Add icons to WidgetGallery 2020-07-08 23:48:26 +02:00
Linus Groh
e99cb74a0c WidgetGallery: Add "Cursors" tab 2020-07-07 23:11:39 +02:00
Andrew Kaster
02018af0cc Demos: Print out ELF Auxiliary Vector in LinkDemo
This is a test program anyway, so let's double check that the auxv
is done properly here.
2020-07-07 10:38:54 +02:00
Andreas Kling
7a7e39c7af LibWeb: Move WebContentView from Demos/WebView into LibWeb 2020-07-06 20:36:34 +02:00
Andreas Kling
32243e1df2 WebContent: Plumb link clicks to the WebContentView :^)
You can now react to links being clicked via the on_link_click hook.
2020-07-06 20:02:30 +02:00
Andreas Kling
58b1ba2545 WebContent: Plumb hovered links from WebContent process over to widget
Also add a little GUI::StatusBar to the demo app so we can see the
hovered link URL's live. :^)
2020-07-05 16:59:20 +02:00
Andreas Kling
554b58d85f WebContent: Add double buffering to the WebContentView
This removes the remaining flicker in the WebContentView widget and
makes it feel pretty good to use it. :^)

The increase in memory use is something we'll have to address in the
future with more sophisticated solutions like tiling, etc.
2020-07-05 16:33:33 +02:00
Andreas Kling
131bc8fd31 WebContent: Plumb scroll-into-view requests from server to client
The WebContentView widget will now be able to react to scroll-into-view
requests from the WebContent process.
2020-07-05 15:57:07 +02:00
Kevin Meyer
0f6c5783d3
WebContent: Use available size for bitmap (#2701)
After adding the scrolling feature, content available space reduced and
thus the bitmap size was always larger, than the inner size.
This lead to the horizontal scrollbar always beeing engaged.
2020-07-05 12:45:56 +02:00
Andreas Kling
c15f9e7593 WebContent: Plumb title changes over to the WebContentView
WebContentView now fires its on_title_change hook, like Web::PageView.
We use this in the WebView test app to update the window title. :^)
2020-07-04 23:40:17 +02:00
Andreas Kling
cb3287597d WebContent: Give the WebContentView a proper GUI::Frame look :^) 2020-07-04 23:27:36 +02:00
Andreas Kling
8914e945cb WebContent: Translate mouse event coordinates into content space
The WebContentView widget now passes content space coordinates along
with the various mouse events. :^)
2020-07-04 23:23:36 +02:00
Andreas Kling
e91871aed7 WebContent: Basic scrolling support! :^)
The WebContentView widget now inherits from GUI::ScrollableWidget and
will pass its scroll offset over to the WebContent process as it's
changing. This is not super efficient and can get a bit laggy, but it
will do fine as an initial scrolling implementation.

Just like the single-process Web::PageView widget, WebContentView also
paints scrolled content by translating the Gfx::Painter.
2020-07-04 23:19:32 +02:00
Andreas Kling
ada3c9ca46 WebContent: Put some debug spam behind an #ifdef 2020-07-04 23:19:12 +02:00
Andreas Kling
a4b5350aff WebContent: Notify client when web content selection changes
The WebContentView widgets reacts to this by requesting a repaint.
2020-07-04 20:57:57 +02:00
Andreas Kling
1dd1595043 LibGUI: Make GUI::Application a Core::Object
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
2020-07-04 14:05:57 +02:00
Andreas Kling
59537cf257 WebContent: Turn it into a MultiInstance service :^)
Port the WebContent service to the new MultiInstance mechanism that
Sergey added. This means that every new WebContentView gets its very
own segregated WebContent process.
2020-06-21 21:54:30 +02:00
Hüseyin ASLITÜRK
dff5abb073 LibGfxDemo: Fix "90s-bg.png" path
Incorrect image file path cause the application to crash on startup.
2020-06-19 20:34:09 +02:00
Hüseyin ASLITÜRK
900aaf68d4 WidgetGallery: Add Image component demo for png and animated gif files 2020-06-18 16:35:57 +02:00
Andreas Kling
e58a13e3f6 WebContent: Pass mouse events through to the WebContent process
Just send the incoming mouse events across to the other side and let
LibWeb deal with them. :^)
2020-06-17 20:09:44 +02:00
Andreas Kling
0bac2ad3b3 WebContent: Allow the WebContent process to trigger repaints
After layout, we may want to repaint the page, so we now listen for the
PageClient::page_did_invalidate() notification and use it to drive a
client-side repaint.

Note that an invalidation request from LibWeb makes a full roundtrip
to the WebContent client and back since the client drives painting.
2020-06-17 20:09:44 +02:00
Andreas Kling
c45c5ded34 WebContent: Start work on browser process separation :^)
The "WebContent" service provides a very restricted instance of LibWeb
running as an unprivileged user account. This will be used to implement
process separation in Browser, among other things.

This first cut of the service only spawns a single WebContent process
when someone connects to /tmp/portal/webcontent. We will soon switch
this over to spawning a new process for each connection.

Since this feature is very immature, we'll be bringing it up inside of
Demos/WebView as a separate demo program. Eventually this will become
a reusable widget that anyone can embed and easily get out-of-process
web content in their GUI.

This is pretty, pretty cool! :^)
2020-06-17 20:09:44 +02:00
Andreas Kling
116cf92156 LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Emanuele Torre
937d0be762 Meta: Add a script check the presence of "#pragma once" in header files
.. and make travis run it.

I renamed check-license-headers.sh to check-style.sh and expanded it so
that it now also checks for the presence of "#pragma once" in .h files.

It also checks the presence of a (single) blank line above and below the
"#pragma once" line.

I also added "#pragma once" to all the files that need it: even the ones
we are not check.
I also added/removed blank lines in order to make the script not fail.

I also ran clang-format on the files I modified.
2020-05-29 07:59:45 +02:00
AnotherTest
21a574f6d2 Eyes: Resize the window based on the number of eyes 2020-05-25 19:06:06 +02:00
AnotherTest
46dacbfb3e Eyes: Correctly calculate the eye bounds for arbitrary number of eyes 2020-05-25 19:06:06 +02:00
Sergey Bugaev
174ac5d348 Demos: Add Eyes demo
This is a neat clone of xeyes. It demoes the new ellipse filling functionality,
as well as the existing global mouse cursor tracking functionality :^)
2020-05-24 23:30:12 +02:00
Hüseyin ASLITÜRK
63539d655c Demos: WidgetGallery, Add MessageBox question icon option 2020-05-20 13:54:10 +02:00
tgsm
56c4538085 Demos: Compile LibGfxDemo with the new CMake build system 2020-05-16 22:59:19 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Andreas Kling
977863ea07 LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking
a button.
2020-05-12 20:31:16 +02:00
Linus Groh
0669dbcf5d LibGfx: Add support for dashed lines
Non-configurable for now.
2020-05-10 19:41:00 +02:00
Linus Groh
d3d29ea1cc Demos: Add LibGfx Demo :^) 2020-05-10 13:34:59 +02:00
Linus Groh
d097835939 Demos: Add missing copyright header to Mouse/main.cpp 2020-05-09 23:45:16 +02:00
pierre
662e47e140 MouseDemo: A more visual approach for MouseEvents :^) 2020-05-07 12:21:52 +02:00
Ben Wiederhake
b80ad2d791 MouseDemo: Add menu, using the new icon :^) 2020-05-04 09:58:14 +02:00
Andreas Kling
b8f778a430 Demos: Add a little "Mouse" demo for showing mouse button states
This was very helpful when adding support for 5-button mice! :^)
2020-05-02 22:13:54 +02:00
Brendan Coles
548ecceb75 Screensaver: Add app-screensaver.png 16x16 icon 2020-05-02 14:12:45 +02:00
Brendan Coles
905de7df58 Fire: Add app-fire.png 16x16 icon 2020-05-02 11:42:29 +02:00
Brendan Coles
6c1e842a7e Cube: Add app-cube.png 16x16 icon 2020-05-02 11:42:21 +02:00
Brendan Coles
24b9e57b15 Screensaver: Draw screen before first timer iteration and seed srand() 2020-04-28 09:36:28 +02:00
Brendan Coles
c4d3723087 Fire: Use LibC srand() 2020-04-28 09:30:01 +02:00
Hüseyin ASLITÜRK
30e95d017e Demos: Add ColorInput, TabWidget and MessageBox demos in WidgetGallery 2020-04-23 11:49:02 +02:00