summaryrefslogtreecommitdiff
path: root/Demos
AgeCommit message (Collapse)Author
2020-01-06AK+Demos+Libraries: Remove executable permissions from {.cpp,.h} filesShannon Booth
2020-01-02Demos: DynamicLink makefile now respects $(QUIET)Andrew Kaster
At a later date we'll probably want a template for SHLIB_OBJS and SHLIB or some such, but for now at least the library demo isn't printing compile commands all over the user's terminal.
2020-01-01Demos: Link our normal startfiles into the dynamic lib demoAndrew Kaster
Now that gcc knows about crtbeginS and crtendS, and knows not to link crt0.o into shared objects, we can get rid of the hacks required due to --nostartfiles.
2020-01-01Build: Demos/DynamicLink: use EXTRA_CLEANjoshua stein
2020-01-01Demos: Add a dynamic linking demo to show off dlfcn methodsAndrew Kaster
The LinkDemo program calls dlopen/dlsym/dlclose to try and load a dyanmic library from /usr/lib. It read a global variable and calls a global function (extern "C" of course :) ). There a few hacks left in the LinkLib dynamic library, however. In order to get the linker to stop complaining, we have to use -nostartfiles -ffreestanding otherwise it will link crt0.o to our shared object, which is definitely not right as the _init function for a main program (that calls main) is not suitable for our lib
2019-12-25Build: support library and generator dependenciesjoshua stein
Instead of directly manipulating LDFLAGS, set LIB_DEPS in each subdirectory Makefile listing the libraries needed for building/linking such as "LIB_DEPS = Core GUI Draw IPC Core". This adds each library as an -L and -l argument in LDFLAGS, but also adds the library.a file as a link dependency on the current $(PROGRAM). This causes the given library to be (re)built before linking the current $(PROGRAM), but will also re-link any binaries depending on that library when it is modified, when running make from the root directory. Also turn generator tools like IPCCompiler into dependencies on the files they generate, so they are built on-demand when a particular directory needs them. This all allows the root Makefile to just list directories and not care about the order, as all of the dependency tracking will figure it out.
2019-12-24LibGUI+LibDraw: Add "Palette" concept for scoped color themingAndreas Kling
GApplication now has a palette. This palette contains all the system theme colors by default, and is inherited by a new top-level GWidget. New child widgets inherit their parents palette. It is possible to override the GApplication palette, and the palette of any GWidget. The Palette object contains a bunch of colors, each corresponding to a ColorRole. Each role has a convenience getter as well. Each GWidget now has a background_role() and foreground_role(), which are then looked up in their current palette when painting. This means that you no longer alter the background color of a widget by setting it directly, rather you alter either its background role, or the widget's palette.
2019-12-20Build: clean up build system, use one shared Makefilejoshua stein
Allow everything to be built from the top level directory with just 'make', cleaned with 'make clean', and installed with 'make install'. Also support these in any particular subdirectory. Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as it runs. Kernel and early host tools (IPCCompiler, etc.) are built as object.host.o so that they don't conflict with other things built with the cross-compiler.
2019-12-02WindowServer: Port to the new IPC systemAndreas Kling
This patch introduces code generation for the WindowServer IPC with its clients. The client/server endpoints are defined by the two .ipc files in Servers/WindowServer/: WindowServer.ipc and WindowClient.ipc It now becomes significantly easier to add features and capabilities to WindowServer since you don't have to know nearly as much about all the intricate paths that IPC messages take between LibGUI and WSWindow. The new system also uses significantly less IPC bandwidth since we're now doing packed serialization instead of passing fixed-sized structs of ~600 bytes for each message. Some repaint coalescing optimizations are lost in this conversion and we'll need to look at how to implement those in the new world. The old CoreIPC::Client::Connection and CoreIPC::Server::Connection classes are removed by this patch and replaced by use of ConnectionNG, which will be renamed eventually. Goodbye, old WindowServer IPC. You served us well :^)
2019-11-25Demos: Remove "RetroFetch"Andreas Kling
We should just get good enough to run "neofetch" or something like that instead of having this half-baked thing.
2019-09-29Demos: Remove useless PaintTest programAndreas Kling
2019-09-22LibCore: Make CObject reference-countedAndreas Kling
Okay, I've spent a whole day on this now, and it finally kinda works! With this patch, CObject and all of its derived classes are reference counted instead of tree-owned. The previous, Qt-like model was nice and familiar, but ultimately also outdated and difficult to reason about. CObject-derived types should now be stored in RefPtr/NonnullRefPtr and each class can be constructed using the forwarding construct() helper: auto widget = GWidget::construct(parent_widget); Note that construct() simply forwards all arguments to an existing constructor. It is inserted into each class by the C_OBJECT macro, see CObject.h to understand how that works. CObject::delete_later() disappears in this patch, as there is no longer a single logical owner of a CObject.
2019-09-21LibGUI: Convert custom widgets and subclasses to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert remaining random little things to ObjectPtrAndreas Kling
2019-09-21GButton: Convert most code to using ObjectPtr for GButtonAndreas Kling
2019-09-21LibGUI: Convert GCheckBox to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GRadioButton to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GWindow to ObjectPtrAndreas Kling
2019-09-21LibCore: Remove CTimer::create() overloads in favor of construct()Andreas Kling
2019-09-21LibGUI: Convert GWidget to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GSlider to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GProgressBar to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GSpinBox to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GTextBox, GTextEditor and GResizeCorner to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GScrollBar to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GLabel to ObjectPtrAndreas Kling
2019-09-20LibCore: Convert CTimer to ObjectPtrAndreas Kling
2019-07-28WindowServer+LibGUI: Pass window icons as shared buffers rather than paths.Andreas Kling
Now that we support more than 2 clients per shared buffer, we can use them for window icons. I didn't do that previously since it would have made the Taskbar process unable to access the icons. This opens up some nice possibilities for programmatically generated icons.
2019-07-23LibGUI: Get rid of GWindow::should_exit_event_loop_on_close().Andreas Kling
This behavior and API was extremely counter-intuitive since our default behavior was for applications to never exit after you close all of their windows. Now that we exit the event loop by default when the very last GWindow is deleted, we don't have to worry about this.
2019-07-20GWidget: Add set_preferred_size(width, height) overload.Andreas Kling
It was annoying to always write set_preferred_size({ width, height }). :^)
2019-07-20GSlider: Add support for vertical sliders.Andreas Kling
You now have to pass an Orientation to the GSlider constructor. It's not possible to change the orientation after construction. Added some vertical GSliders to the WidgetGallery demo for testing. :^)
2019-07-18LibDraw: Introduce (formerly known as SharedGraphics.)Andreas Kling
Instead of LibGUI and WindowServer building their own copies of the drawing and graphics code, let's it in a separate LibDraw library. This avoids building the code twice, and will encourage better separation of concerns. :^)
2019-07-12HelloWorld: Make the demo label say "Hello\nWorld!".Andreas Kling
This is really just to show off multi-line GLabels :^)
2019-07-11GSlider: Make the knob width proportional to the range, if in that mode (#288)Lawrence Manning
Regardless of mode, made the knob container clickable so the knob position can be moved without dragging the knob itself. Added a 3rd GSlider to the WidgetGallery showing the proportional mode in action.
2019-07-10Demos: Add a HelloWorld2 demo.Andreas Kling
This is a simple test app with its UI generated from a VisualBuilder form. The name is probably silly, but who cares. :^)
2019-07-03AK: Rename the common integer typedefs to make it obvious what they are.Andreas Kling
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
2019-06-30Meta: Removed all gitignore in the source tree only keeping the root oneVAN BOSSUYT Nicolas
2019-06-30GUI: Use Win2K-like "warm gray" color instead of the older colder gray.Andreas Kling
Someone suggested this a long time ago and I never got around to it. So here we go, here's the warm gray! I have to admit I like it better. :^)
2019-06-22WidgetGallery: Fix compiler warnings.Andreas Kling
2019-06-21AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.Andreas Kling
2019-06-12Demos: Import Fire demo contributed by "pd".Andreas Kling
2019-06-07Demos: Run clang-format on everything.Andreas Kling
2019-05-27removed extra impl of scalingChristopher Dumas
2019-05-27tiled backgrounds no longer has strange off-by-one pixel errorsChristopher Dumas
2019-05-24Demos: Start working on a simple WidgetGallery app.Andreas Kling
It's good to have a place where we can try out all the different widgets. This needs some more work on a nice layout, and should also include more of the widgets. :^)
2019-05-24LibGUI: Make GCheckBox inherit from GAbstractButton.Andreas Kling
2019-05-13Fix "make clean" not deleting app binaries.Andreas Kling
2019-05-13RetroFetch: Add a silly neofetch-like program.Andreas Kling
The idea is to print out various system info suitable for screenshots. :^)
2019-05-08HelloWorld: Add a simple "Hello World!" app showing the basics.Andreas Kling
This also introduces a Demos/ directory where I hope to add cool things.