summaryrefslogtreecommitdiff
path: root/Userland/Demos
AgeCommit message (Collapse)Author
2021-07-05Fire: Make the main widget a GUI::FrameAndreas Kling
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-06-07CatDog: Enhance the speech bubble artificial intelligenceBrian Gianforcaro
Enable cat dog to greet you, and help you with yak shave sessions.
2021-06-06AK+Everywhere: Disallow constructing Functions from incompatible typesAli Mohammad Pur
Previously, AK::Function would accept _any_ callable type, and try to call it when called, first with the given set of arguments, then with zero arguments, and if all of those failed, it would simply not call the function and **return a value-constructed Out type**. This lead to many, many, many hard to debug situations when someone forgot a `const` in their lambda argument types, and many cases of people taking zero arguments in their lambdas to ignore them. This commit reworks the Function interface to not include any such surprising behaviour, if your function instance is not callable with the declared argument set of the Function, it can simply not be assigned to that Function instance, end of story.
2021-05-29Everywhere: Use s.unverwerth@serenityos.org :^)Stephan Unverwerth
2021-05-21Revert "Userland: static vs non-static constexpr variables"Linus Groh
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a. Booting the system no longer worked after these changes.
2021-05-21Userland: static vs non-static constexpr variablesLenny Maiorani
Problem: - `static` variables consume memory and sometimes are less optimizable. - `static const` variables can be `constexpr`, usually. - `static` function-local variables require an initialization check every time the function is run. Solution: - If a global `static` variable is only used in a single function then move it into the function and make it non-`static` and `constexpr`. - Make all global `static` variables `constexpr` instead of `const`. - Change function-local `static const[expr]` variables to be just `constexpr`.
2021-05-21LibGfx: Add missing TextAlignment::BottomLeftLinus Groh
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_fixed_width_font()Andreas Kling
Ask for a bold_variant() of the default_fixed_width_font() instead.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_font()Andreas Kling
Instead use default_font().bold_variant() in cases where we want a bold variant of the default font. :^)
2021-05-19CatDog: Don't show context menu when clicking outside of widgetMarcus Nilsson
The context menu for CatDog was shown when right clicking anywhere on the screen because of global cursor tracking being enabled. Also fix event not being passed by reference. Fixes #7285
2021-05-193DFileViewer: Move `Demos/GLTeapot` to `Applications/3DFileViewer`Erik Biederstadt
Also changes the category to `Graphics`
2021-05-19GLTeapot: Adds a help menu to the GLTeapot demoErik Biederstadt
Having a help menu maintains better consistency with the other GUI apps on the system.
2021-05-19GLTeapot: Adds additional error checking when loading filesErik Biederstadt
- If the 3D file contains no vertices then an error is raised - If the file is not an OBJ file then an error is raised
2021-05-19GLTeapot: Add the ability to open 3D filesErik Biederstadt
This change makes it possible for the GLTeapot demo to open any OBJ file.
2021-05-18CatDog: Remove global menu and add context menuMarcus Nilsson
There was no way to close catdog since it relied on global menus, this adds a context menu for opening the about dialog and quitting. Fixes #7252
2021-05-18Mandelbrot: Export images in a fixed resolutionGunnar Beutner
This makes the exported image independent from the current window size and just always exports it at 1920x1080.
2021-05-18Mandelbrot: Keep the aspect ratio when (re-)sizing the windowGunnar Beutner
Previously the initial aspect ratio was incorrect and there was nothing to ensure that the aspect ratio is kept when resizing the window.
2021-05-18Mandelbrot: Add support for exporting the current imageGunnar Beutner
Unfortunately this means unveil() won't work - at least until we get something like FilePickerServer.
2021-05-18Mandelbrot: Implement color smoothing with gradientsGunnar Beutner
This removes the color banding that happens for some of the "outer" areas which all have the same iteration count.
2021-05-18Mandelbrot: Maintain aspect ratio when selecting a regionGunnar Beutner
This makes sure the aspect ratio of the widget and the selection match. Otherwise you'd end up with distorted images when zooming in.
2021-05-17Demos: Add Mandelbrot demoGunnar Beutner
This adds a very rudimentary Mandelbrot viewer. It supports zooming and pretty much nothing else. Not even color smoothing or super sampling.
2021-05-16GLTeapot: Add support for loading OBJ files containing extra informationErik Biederstadt
If the OBJ loader encounters a file with vertex normals or texture coordinates then it will no longer crash.
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-13LibGfx+Demos: Make Matrix4x4 a true alias for Matrix<4,T>Stephan Unverwerth
Matrix4x4 was defined as a derived class of Matrix<N,T> before. Furthermore, some code was duplicated and it was overall just messy. This commit turns Matrix4x4 into a simple alias for Matrix<4,T>.
2021-05-13LibGfx: Make Matrix class consistently row-majorStephan Unverwerth
Matrix elements were interpreted in different ways. This makes it definitely row-major, allowing initialization via initializer list in a standard scientific order. Also matrix multiplication now happens in the correct order and accessing elements happens as m_elements[row][column].
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-12Everywhere: Rename app_menu to file_menu, continuedLinus Groh
These were missed in 4b0098e.
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-05-11GLTeapot: Use glGenLists() a bit to demonstrate that it worksAli Mohammad Pur
2021-05-09Demos: Implement basic Lambertian lighting for the GLTeapotMathieu Gaillard
The teapot now looks more realistic
2021-05-09Demos: Add indexed meshes in GLTeapot DemosMathieu Gaillard
Improved the basic Wavefront OBJ loader to index vertices. Uses less memory for the same mesh.
2021-05-09Demos: GLTeapot: Enable depth testing in demoStephan Unverwerth
2021-05-09CatDog: Help the user debug their programsGunnar Beutner
This adds helpful speech bubbles to CatDog. CatDog just wants to help, that's all.
2021-05-09CatDog: Rename root_widget to catdog_widgetGunnar Beutner
2021-05-09CatDog: Move the main widget into its own fileGunnar Beutner
2021-05-09Demos: Fix a bunch of incorrect use of GUI::PaintEvent::rect()Andreas Kling
A bunch of programs were using the paint event rect as the rect to draw into. Since the event rect could be any invalidated part of the widget, we need to be passing the full Widget::rect().
2021-05-08Demos: Add OpenGL teapot demo :^)Jesse Buhagiar
Every GL library needs an implementation of this! Currently drawn with "pixel vomit" colours as we don't yet support lighting via the GL library. This also ships with a super basic Wavefront OBJ loader.
2021-05-07WidgetGallery: Convert StringBuilder::appendf() => AK::FormatAndreas Kling
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-01WindowServer+LibGfx: Automatic "modified" markers in window titlesAndreas Kling
You can now add the string "[*]" to a window title and it will be replaced with " (*)" if the window is modified, and with "" otherwise.
2021-05-01Everywhere: Rename app_menu to file_menu or game_menuAndreas Kling
2021-05-01Demos: Added Alt+F4 funtionality to demos that lacked itinalone
The Fire, LibGfxDemo and LibGfxScaleDemo demos did not have Alt+F4 functionality as they lacked menubars - I just added basic menubars with Quit entries to allow this shortcut with the demos that didn't have it.
2021-04-29Userland: Fix two misaligned copyright headersLinus Groh
2021-04-29Everywhere: Use "the SerenityOS developers." in copyright headersLinus Groh
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
2021-04-28Screensaver: Implement mouse hysteresisJelle Raaijmakers
Allow the mouse to move a bit before actually closing the app. Fixes #6692
2021-04-26Demos: Add Starfield screensaver demoJagger De Leo
2021-04-23AK: Rename adopt() to adopt_ref()Andreas Kling
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
2021-04-23WidgetGallery: Split cursor/icon names based on full pathsthankyouverycool
Fixes [null] icons since switching to next_full_path iteration