Age | Commit message (Collapse) | Author |
|
That's what this class really is; in fact that's what the first line of
the comment says it is.
This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
|
|
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.
This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.
From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
|
|
|
|
|
|
|
|
This now defaults to serializing the path with percent decoded segments
(which is what all callers expect), but has an option not to. This fixes
`file://` URLs with spaces in their paths.
The name has been changed to serialize_path() path to make it more clear
that this method will generate a new string each call (except for the
cannot_be_a_base_url() case). A few callers have then been updated to
avoid repeatedly calling this function.
|
|
Both applications eventually reach LibGPU's loading of a dynamic library
(e.g. LibSoftGPU) which requires this pledge.
The pledge was always required, but went unchecked until 01318d8f9b.
|
|
Usage of models is now done by `LibFileSystemAccessClient`.
|
|
This patch allows two things:
- Factorizing code that was in main and the open action
- Displaying the full path of non-unveiled paths
Indeed, looking for the path of a fd is not allowed if the file isn't
unveiled. By setting the title in `load_file()` we are actually relying
on the value returned by `LibFSAC` who is actually authorized to
retrieve the entire path.
|
|
|
|
|
|
These tests are already performed by `LibFileSystemAccessClient`.
|
|
It was the only function to not use the `LibFSAC`, it will allow us to:
- Not unveil some file
- Drop some tests on to-be-read-from file as they are performed in
`LibFSAC`.
|
|
As it was using the `lines()` method of `Core::DeprecatedFile`, this
patch also introduce the usage of `BufferedFile` to take advantage of
its API: `can_read_line()` and `read_line()`.
|
|
As usual, this removes many unused includes and moves used includes
further down the chain.
|
|
Those don't have any non-try counterpart, so we might as well just omit
it.
|
|
These are not needed anymore since the introduction of the new
get_root_session_id syscall.
|
|
Let's accumulate frame times in AK::Time and only convert to ms for
display.
|
|
These functions return the deprecated `Core::File` class, so let's mark
it as such to avoid possible confusion between future non try_*
functions which will use Core::Stream family classes and to possibly
grab someone's attention. :^)
|
|
Rip that bandaid off!
This does the following, in one big, awkward jump:
- Replace all uses of `set_main_widget<Foo>()` with the `try` version.
- Remove `set_main_widget<Foo>()`.
- Rename the `try` version to just be `set_main_widget` because it's now
the only one.
The majority of places that call `set_main_widget<Foo>()` are inside
constructors, so this unfortunately gives us a big batch of new
`release_value_but_fixme_should_propagate_errors()` calls.
|
|
Fixes 3 FIXMEs.
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
Before this, shortcuts would not work due to key events not
being propagated to the window.
|
|
This patch will switch cursor to DragCopy when a user enters a widget
while dragging file(s), giving them a visual clue that it *might* be
dropped into this widget.
This is a rather naive approach, as the cursor icon will change for any
kind of file, as currently programs don't know the drag contents before
dropping it. But after all I think it's better than nothing. :^)
|
|
|
|
|
|
These were missed in 7af5eef. It is needed for any application using
e.g. FileSystemAccessServer.
|
|
This is a partial revert of commit 7af5eef. After 97d15e9, the 'proc'
promise is not needed for operations using getsid().
This also fixes launching several applications in which 7af5eef added
the 'proc' promise only in the second call to pledge().
|
|
This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.
Userland: Switch over servers to sid based sockets
Userland: Properly pledge and unveil for sid based sockets
|
|
URL had properly named replacements for protocol(), set_protocol() and
create_with_file_protocol() already. This patch removes these function
and updates all call sites to use the functions named according to the
specification.
See https://url.spec.whatwg.org/#concept-url-scheme
|
|
Propagate errors in places that are already set up to handle them, like
WebGLRenderingContext and the Tubes demo, and convert other callers
to using MUST.
|
|
|
|
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).
No functional changes.
|
|
|
|
This loads libsoftgpu.so during GLContext creation and instantiates the
device class which is then passed into the GLContext constructor.
|
|
I went into fullscreen mode, via the View menu, before looking at the
associated key (F11). I had to kill Qemu to be able to escape.
Escape is an intuitive way to exit most fullscreen modes.
|
|
|
|
|
|
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
|
|
This commit also removed the redundant `filename` parameter from
`GLContextWidget::load_file`, since the filename is already stored
within the file itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We only showed frame times down to the millisecond. Our FPS counter was
based off of that, allowing for a limited set of possible FPS values.
Convert these calculations to floating point so we get more useful FPS
and frame time values.
|
|
|
|
With this change, System::foo() becomes Core::System::foo().
Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
|
|
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
|