summaryrefslogtreecommitdiff
path: root/Userland/Demos/Eyes
AgeCommit message (Collapse)Author
2023-05-05LibGUI: Make `Application`'s construction fallibleLucas CHOLLET
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.
2023-04-25Applications: Update man page links for applicationsTim Ledbetter
This commit updates all application man page links to point to the Applications subdirectory.
2023-04-19LibGUI+Userland: Make Window::*add_menu take name using new stringKarol Kosek
2023-01-13Userland: Remove a bunch of unveil calls on /sys/kernel/processesLiav A
These are not needed anymore since the introduction of the new get_root_session_id syscall.
2023-01-06LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)Sam Atkins
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.
2022-12-07Meta+Userland: Pass Gfx::IntPoint by valueMacDue
This is just two ints or 8 bytes or the size of the reference on x86_64 or AArch64.
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-10-25Applications: Use new global variables at /sys/kernel/ directoryLiav A
2022-10-25Userland: Let applications make use of make_command_palette_action()demostanis
2022-10-03Userland: Unveil /proc/all in applications which require itTimothy Flynn
These were missed in 7af5eef. It is needed for any application using e.g. FileSystemAccessServer.
2022-10-03Userland: Tighten promises by removing 'proc' where it isn't usedTimothy Flynn
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().
2022-10-03SystemServer+LoginServer+Userland: Switch to sid-based socketsPeter Elliott
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
2022-09-29AK+Everywhere: Replace "protocol" with "scheme" url helpersnetworkException
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
2022-08-25Eyes: Add an option to show/hide the window frameMacDue
This works the same as in the Cube demo, and now allows enjoying the eyes without any obstructions :^) The window frame can now be disabled with the -h/--hide-window command-line option, or via toggle in the GUI.
2022-08-14Everywhere: Replace hardcoded anon's uid in unveil path with `%uid`Lucas CHOLLET
2022-08-14LibCore+LaunchServer: Move portal directory to `/tmp/user/%uid`Lucas CHOLLET
The `/tmp/user` directory is owned by root, this solution prevents malicious users to interfere with other users' portals. This commit also moves `launch`'s portal in the user directory.
2022-07-19LaunchServer+SystemServer: Move the portal to a user-specific directoryLucas CHOLLET
Various changes are needed to support this: - The directory is created by Core::Account on login (and located in /tmp). - Service's sockets are now deleted on exit (to allow re-creation) - SystemServer needs to handle SIGTERM to correctly destroy services.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
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.
2022-06-01LibGfx: Rename draw_ellipse/circle to fill_ellipse/circleMacDue
This makes these functions more consistent with the non-aa painter.
2022-05-07Demos/Eyes: Render eyes antialiasedMacDue
This looks good, and is a good way to test ellipse rendering is working properly.
2022-03-18Eyes: Add 'Contents' action to help menuLinus Groh
2022-02-15Demos: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2021-12-18Eyes: Convert to try_create_default_iconAstraeus-
2021-12-05Demos: Cast unused smart-pointer return values to voidSam Atkins
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-25Eyes: Use TRY() a lot more :^)pbrw
2021-09-08Eyes: Switch to new mouse-tracking methodBen Wiederhake
2021-08-01Demos: Remove unused header includesBrian Gianforcaro
2021-07-21Userland: Add GUI::Window::add_menu() and use it everywhereAndreas Kling
Applications previously had to create a GUI::Menubar object, add menus to it, and then call GUI::Window::set_menubar(). This patch introduces GUI::Window::add_menu() which creates the menubar automatically and adds items to it. Application code becomes slightly simpler as a result. :^)
2021-07-19Everywhere: Use AK/Math.h if applicableHendiadyoin1
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage.
2021-07-08AK+Userland: Add generic `AK::abs()` function and use itDaniel Bertalan
Previously, in LibGFX's `Point` class, calculated distances were passed to the integer `abs` function, even if the stored type was a float. This caused the value to unexpectedly be truncated. Luckily, this API was not used with floating point types, but that can change in the future, so why not fix it now :^) Since we are in C++, we can use function overloading to make things easy, and to automatically use the right version. This is even better than the LibC/LibM functions, as using a bit of hackery, they are able to be constant-evaluated. They use compiler intrinsics, so they do not depend on external code and the compiler can emit the most optimized code by default. Since we aren't using the C++ standard library's trick of importing everything into the `AK` namespace, this `abs` function cannot be exported to the global namespace, as the names would clash.
2021-07-04WindowServer: Make most remaining WindowServer IPC calls asyncAndreas Kling
The only remaining sync call from client to server is now the call that switches a window's backing store. That one actually relies on the synchronization to hand over ownership of the backing stores, so it has to stay synchronous for now.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-05-13Userland: Tighten a *lot* of pledges! :^)Andreas Kling
Since applications using Core::EventLoop no longer need to create a socket in /tmp/rpc/, and also don't need to listen for incoming connections on this socket, we can remove a whole bunch of pledges!
2021-05-12Everywhere: Add Alt shortcuts to remaining top-level menusLinus Groh
Not sure why some menus did have one and others didn't, even in the same application - now they all do. :^) I added character shortcuts to some menu actions as well.
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-05-01Everywhere: Rename app_menu to file_menu or game_menuAndreas Kling
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-13Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"Andreas Kling
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
2021-03-25Userland: Turn all application menus into window menus :^)Andreas Kling
2021-03-12Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)Andreas Kling
Good-bye LogStream. Long live AK::Format!
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-01-16Everywhere: Drop "shared_buffer" in most GUI programs, pledge "recvfd"Andreas Kling
Now that WindowServer broadcasts the system theme using an anonymous file, we need clients to pledge "recvfd" so they can receive it. Some programs keep the "shared_buffer" pledge since it's still used for a handful of things.
2021-01-15Everywhere: Pledge "sendfd" in WindowServer client programsAndreas Kling
This is needed for the new way we transfer window backing stores.
2021-01-12Demos: Move to Userland/Demos/Andreas Kling