summaryrefslogtreecommitdiff
path: root/Userland/Demos
AgeCommit message (Collapse)Author
2023-02-21Userland: Fix remaining smart pointer const-correctness issuesAndreas Kling
2023-02-18LibGUI+Userland: Stop returning Layout from `Widget::(try_)set_layout()`Sam Atkins
Nobody uses this return value any more. It also lets us remove a whole bunch of `(void)` casts. :^)
2023-02-18Userland: Specify margins and spacing in the GUI::Layout constructorSam Atkins
2023-02-17WidgetGallery: Use dynamic layout techniques in the sliders tabFrHun
2023-02-13LibCore: Remove `Stream.h`Tim Schumacher
2023-02-13LibCore: Move Stream-based file into the `Core` namespaceTim Schumacher
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-02-04LibGUI+Userland: Switch order of parameters for InputBox::showKarol Baraniecki
Because usage of the input_type parameter is now higher than of the placeholder parameter, this makes for a cleaner API.
2023-02-04Userland: Replace manual checking by using GUI::InputType::NonemptyTextKarol Baraniecki
Do this where we were already checking if the input was empty after the InputBox was submitted. Those places gain interactive input validation. :^)
2023-01-28AK: Remove `try_` prefix from FixedArray creation functionsLinus Groh
2023-01-26LibGfx: Remove `try_` prefix from bitmap creation functionsTim Schumacher
Those don't have any non-try counterpart, so we might as well just omit it.
2023-01-17LibGfxDemo: Draw diagonal dotted and dashed linesArda Cinar
2023-01-15WidgetGallery: Use the non-deprecated API of `LibFileSystemAccessClient`Lucas CHOLLET
The patch is tiny as WidgetGallery is only using `LibFSAC` for its file picker.
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