Commit graph

166 commits

Author SHA1 Message Date
Itamar
bbedd320b5 Toolchain+LibC: Fix usage of crt files
We now configure the gcc spec files to use a different crt files for
static & PIE binaries.

This relieves us from the need to explicitly specify the desired crt0
file in cmake scripts.
2020-12-24 21:46:35 +01:00
William Marlow
39364bdda4 Build: Embed application icons directly in the executables.
New serenity_app() targets can be defined which allows application
icons to be emedded directly into the executable. The embedded
icons will then be used when creating an icon for that file in
LibGUI.
2020-12-21 00:12:59 +01:00
Lenny Maiorani
765936ebae
Everywhere: Switch from (void) to [[maybe_unused]] (#4473)
Problem:
- `(void)` simply casts the expression to void. This is understood to
  indicate that it is ignored, but this is really a compiler trick to
  get the compiler to not generate a warning.

Solution:
- Use the `[[maybe_unused]]` attribute to indicate the value is unused.

Note:
- Functions taking a `(void)` argument list have also been changed to
  `()` because this is not needed and shows up in the same grep
  command.
2020-12-21 00:09:48 +01:00
Itamar
efe4da57df Loader: Stabilize loader & Use shared libraries everywhere :^)
The dynamic loader is now stable enough to be used everywhere in the
system - so this commit does just that.
No More .a Files, Long Live .so's!
2020-12-14 23:05:53 +01:00
Itamar
58c583f584 LibC: Add libc.so
We now compile everything with -static flag so libc.a would be use
2020-12-14 23:05:53 +01:00
Itamar
09ccdc697b Demos: Add "DynamicObjectDemo" to demo the dynamic loader 2020-12-14 23:05:53 +01:00
Itamar
07b4957361 Loader: Add dynamic loader program
The dynamic loader exists as /usr/lib/Loader.so and is loaded by the
kernel when ET_DYN programs are executed.

The dynamic loader is responsible for loading the dependencies of the
main program, allocating TLS storage, preparing all loaded objects for
execution and finally jumping to the entry of the main program.
2020-12-14 23:05:53 +01:00
asynts
3b3edbc4d2 AK: Rename new_out to out and new_warn to warn. 2020-11-09 16:21:29 +01:00
Brendan Coles
9faca895d3 Demos: Use pledge and unveil 2020-11-02 13:15:54 +01:00
Brendan Coles
27ead7e2c2 Demos: Use GUI::Icon::default_icon to set application icon 2020-11-01 10:29:14 +01:00
Andreas Kling
982e066100 LibGfx: Move FontDatabase from LibGUI to LibGfx
Not sure why I put this into LibGUI in the first place.
2020-10-31 13:56:21 +01:00
Uma Sankar Yedida
9ccae7a908 WindowServer+LibGfx: Added Crosshair cursor 2020-10-30 19:10:15 +01:00
Andreas Kling
48647cc3ed Demos: Stop using Widget::foreground_color() 2020-10-08 23:21:39 +02:00
asynts
560c52989c Demos: Use new format functions. 2020-10-08 09:59:55 +02:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
Ben Wiederhake
b3909ac0dd Meta+Demos: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Peter Elliott
7907df7617 Applications: Use placeholders in TextBoxes where applicable 2020-09-21 20:15:10 +02:00
Ben Wiederhake
d6673b384e LibGfx: Remove redundant bits() method
In all circumstances, this returned exactly the same thing as scanline_u8(),
so let's just remove the silly detour.

This does not add any new dependency on Bitmap-internals, because that already existed.
2020-09-12 00:13:29 +02:00
Andreas Kling
b4f307f982 LibGUI+WindowServer: Rename window "override cursor" to just "cursor"
Let's just say each window has a cursor, there's not really overriding
going on.
2020-09-11 14:26:37 +02:00
Andreas Kling
0f9be82826 LibGfx: Move StandardCursor enum to LibGfx
This enum existed both in LibGUI and WindowServer which was silly and
error-prone.
2020-09-10 19:25:13 +02:00
Linus Groh
3ae55770c8 LibGfxDemo: Set window icon to app-libgfx-demo.png 2020-08-30 10:02:52 +02:00
Linus Groh
d61ea0da5f HelloWorld: Set window icon to app-hello-world.png 2020-08-30 10:02:52 +02:00
thankyouverycool
ebba297b42 Base: Move 16x16 common icons to /res/icons/16x16/
Drops the '16' suffix from filenames. Resizes inconsistent
audio-volume icons to intended size.
2020-08-27 15:38:02 +02:00
thankyouverycool
61ba39dfa0 Base: Create /res/graphics/ and relocate system art assets 2020-08-27 15:38:02 +02:00
Nico Weber
8b166e57df
Misc: Remove some unneeded includes of Timer.h and ElapsedTimer.h (#3286) 2020-08-25 09:41:56 +02:00
AnotherTest
682b2fdb75 LibWeb: Move OutOfProcessWebView into the Web namespace 2020-08-24 18:21:33 +02:00
Andreas Kling
b6e18133ae LibWeb: Rename WebContentView => OutOfProcessWebView 2020-08-17 18:05:35 +02:00
thankyouverycool
5558b2cf9f Base: Rename Pebbleton to reflect actual height
And update programs loading it from file.
2020-08-16 19:38:21 +02:00
Andreas Kling
a1e381a0f8 LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
2020-08-16 16:44:09 +02:00
Linus Groh
2e5c434e22 Misc: Use automatic window positioning in more applications
This is a follow up to #2936 / d3e3b4ae56aa79d9bde12ca1f143dcf116f89a4c.

Affected programs:
- Applications: Browser (Download, View source, Inspect DOM tree, JS
  console), Terminal (Settings)
- Demos: Cube, Eyes, Fire, HelloWorld, LibGfxDemo, WebView,
  WidgetGallery
- DevTools: HackStudio, Inspector, Profiler
- Games: 2048, Minesweeper, Snake, Solitaire
- Userland: test-web

A few have been left out where manual positioning is done on purpose,
e.g. ClipboardManager (to be close to the menu bar) or VisualBuilder (to
preserve alignment of the multiple application windows).
2020-08-15 17:38:19 +02:00
Ben Wiederhake
9d2d97a059 LibC: Avoid ninja-imports of system functions
This adds a new header <sys/internals.h>, which provides access to LibC internals.
This is in the interest of type-checking LibC itself, as well as enabling less-hacky
access for uses like LinkDemo.

And, of course, this progresses LibC towards building cleanly with -Wmissing-declarations.
2020-08-12 20:40:59 +02:00
Ben Wiederhake
b493c6cd39 DynamicLink: Tell compiler about invisible calls
This makes DynamicLink, and in fact all Demos, build cleanly with -Wmissing-declarations.

Note that this won't be necessary for 'normal' dynamic shared objects, as those
usually already declare their symbols in a header file.
2020-08-12 20:40:59 +02:00
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