summaryrefslogtreecommitdiff
path: root/Userland/Demos
AgeCommit message (Collapse)Author
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-12Userland: Use Core::Timer::create_foo() factory functions where possibleSam Atkins
2023-01-09LibGfx: Make Rect::align_within() correct for TopCenter and BottomCenterAndreas Kling
Also update the LibGfxDemo to actually show off these alignments.
2023-01-07Everywhere: Use ElapsedTimer::elapsed_time() for comparisonsAndrew Kaster
Simplify a lot of uses of ElapsedTimer by converting the callers to elapsed_time from elapsed, as the AK::Time returned is better for unit conversions and comparisons against constants.
2023-01-07LibGUI+Userland: Rename `try_load_from_gml()` -> `load_from_gml()` :^)Sam Atkins
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07Userland: Replace all uses of `load_from_gml` with `try_load_from_gml`Sam Atkins
MOAR FIXMES! ;^)
2023-01-07LibFileSystemAccessClient: Rename try_* functions to try_*_deprecatedKarol Kosek
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. :^)
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.
2023-01-05LibGfx: Avoid rounding/truncating glyph positions till blittingMacDue
This keeps some overloads that accept ints to avoid adding calls to .to_type<float>() all over the place.
2023-01-03Screensaver: Add a screensaver launcher applicationTimothy Flynn
Similar to the Settings application, this adds a single Screensaver application to launch all screensaver demos. This is to declutter the taskbar menu a bit.
2023-01-03Demos: Rename Screensaver to GradientScreensaverTimothy Flynn
This is to avoid naming conflicts with an upcoming Screensaver launcher application.
2023-01-03Demos: Remove "Cube" applicationAndreas Kling
This wasn't doing anything interesting enough to justify being its own demo application. If we need a spinning cube, we can just load a cube model into 3DFileViewer. :^)
2023-01-02Everywhere: Remove unused includes of LibC/stdlib.hBen Wiederhake
These instances were detected by searching for files that include stdlib.h, but don't match the regex: \\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_ uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs| ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use anything from the stdlib. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Demos: Remove "Mouse" applicationAndreas Kling
This was a plain-looking test app for debugging mouse events. Mouse events work now, and if we want mouse testing facilities, they can be added to MouseSettings instead.
2023-01-02Demos: Remove "Fire" applicationAndreas Kling
This served no purpose other than looking somewhat neat.
2022-12-28Demos: Add ability to use scroll wheel in starfieldHawDevelopment
This change adds the ability to use the scroll wheel to change the speed in starfield.
2022-12-27Demos+LibDesktop: Centralize screensaver logicJelle Raaijmakers
We have 3 demos with pretty similar window logic and quitting behavior on user activity, so centralize that into `Desktop::Screensaver`.
2022-12-26Demos: Remove VirGLDemoStephan Unverwerth
All interesting code from the demo now lives in LibVirtGPU.
2022-12-16CatDog: Simplify animation frame logic and fix minor bugsAndre Eisenbach
Moved all images into a Vector instead of storing every animation frame in its own member variable. This greatly simplifies the bitmap selection logic and removes redundant if() checks. Also fixes minor state bugs. For example, CatDog woudld go to sleep immediately after actively moving for > 5 seconds. Also fixes arbitrary hardcoded values for mouse offset movement tresholds as well as inconsistent movement increments. This allows clicking anywhere on the CatDog window without moving CatDog. In addition to removing many member variables, the API interface is also cleaned up a bit to expose less CatDog internals. Nobody likes exposed CatDog internals ;). Variables and function are also renamed where necessary to (hopefully) improve readability.
2022-12-15VirGLDemo: Make a factory function for Demo and propagate errorsBaitinq
This removes a measly 1 FIXME :))
2022-12-14CatDog: Make a factory function for CatDog and propagate errorsAndreas Kling
This fixes an astonishing 22 FIXMEs. :^)
2022-12-10LibCore: Use `Core::Stream` for `ProcessStatisticsReader`Tim Schumacher
2022-12-09LibGUI: Split OpacitySlider into vertical and horizontal helper classesFrHun
2022-12-08LibGfx+Userland: Make PNGWriter::encode() return ErrorOr<ByteBuffer>Andreas Kling
This is a first step towards handling PNG encoding failures instead of just falling over and crashing the program. This initial step will cause encode() to return an error if the final ByteBuffer copy fails to allocate. There are more potential failures that will be surfaced by subsequent commits. Two FIXMEs were killed in the making of this patch. :^)
2022-12-08Mandelbrot: Make it possible for export_image to return an errorAndreas Kling
...and if we do get an error, present it to the user.
2022-12-08WindowServer+MouseSettings: Improve `buttons_switched` namingFiliph Sandström
Before this commit it was a bit ambiguous which buttons the function name were referring to; this instead now makes it clear that it's related to mouse input. Additionally, this also fixes incorrect getter naming leftover from yesteryear.
2022-12-07Meta+Userland: Pass Gfx::IntSize by valueMacDue
Just two ints like Gfx::IntPoint.
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-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
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 :^)
2022-11-30MouseDemo: Eliminate visual artifacts when filling in the colorAndreas Oppebøen
The drawing had several visual artifacts with the colors not perfectly filling out their outlines. By re-using the path for both stroke and fill, we ensure that the exact same floating point coordinates are used. Drawing the fill first and the stroke after also helps eliminate artifacts.
2022-11-30MouseDemo: Draw blue color for longer to indicate double clickAndreas Oppebøen
When double-clicking, the button remains blue a bit longer. This provides a convenient way to test the double click speed. Piggybacks the timer for the scroll indicators, which is a bit weird, but not noticeable.
2022-11-30MouseDemo: Restart timer when scrolling to avoid blinking indicatorAndreas Oppebøen
When scrolling, a timer is triggered to hide the indicator cross. When we continuously scroll, the indicator cross would then blink once the timer kicks in. Instead, let's cancel the current timer and schedule a new one, making the indicator visually smooth.
2022-11-30MouseDemo: Show distinct colors for primary vs secondary buttonAndreas Oppebøen
This shows mouse down of primary button in blue color, and secondary button in light blue color.
2022-11-30MouseDemo: Replace constructor with initialization at member definitionAndreas Oppebøen
This adheres to CodingStyle.md#other-punctuation which states: > Prefer initialization at member definition whenever possible Since the zero-arg constructor was only initializing members, it was simply removed.
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-13CatDog: Make it always on topdemostanis
2022-10-12Userland: Properly populate GENERATED_SOURCESAli Mohammad Pur
We previously put the generated headers in SOURCES, which did not mark them as GENERATED (and did not produce a proper dependency). This commit moves all generated headers into GENERATED_SOURCES, and removes useless header SOURCES.
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-09-18Everywhere: Fix order of includes and #pragma onceBen Wiederhake
2022-09-16LibGL: Make GL::create_context fallibleAndrew Kaster
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.
2022-09-11Tubes: Run clang-formatLinus Groh
2022-09-11Demos: Add Tubes :^)Jelle Raaijmakers
2022-09-10WidgetGallery: Port file picker to use FileSystemAccessClientnetworkException
Previously we would unveil the home directory of anon to allow showing anything in the file picker. This patch removes direct access to the home directory and instead makes WidgetGallery connect to FileSystemAccessServer to open a file, making the application more user agnostic and allowing directories outside /home/anon to be shown.
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.