Commit graph

99 commits

Author SHA1 Message Date
tgsm 56c4538085 Demos: Compile LibGfxDemo with the new CMake build system 2020-05-16 22:59:19 +02:00
Sergey Bugaev 450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Andreas Kling 977863ea07 LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking
a button.
2020-05-12 20:31:16 +02:00
Linus Groh 0669dbcf5d LibGfx: Add support for dashed lines
Non-configurable for now.
2020-05-10 19:41:00 +02:00
Linus Groh d3d29ea1cc Demos: Add LibGfx Demo :^) 2020-05-10 13:34:59 +02:00
Linus Groh d097835939 Demos: Add missing copyright header to Mouse/main.cpp 2020-05-09 23:45:16 +02:00
pierre 662e47e140 MouseDemo: A more visual approach for MouseEvents :^) 2020-05-07 12:21:52 +02:00
Ben Wiederhake b80ad2d791 MouseDemo: Add menu, using the new icon :^) 2020-05-04 09:58:14 +02:00
Andreas Kling b8f778a430 Demos: Add a little "Mouse" demo for showing mouse button states
This was very helpful when adding support for 5-button mice! :^)
2020-05-02 22:13:54 +02:00
Brendan Coles 548ecceb75 Screensaver: Add app-screensaver.png 16x16 icon 2020-05-02 14:12:45 +02:00
Brendan Coles 905de7df58 Fire: Add app-fire.png 16x16 icon 2020-05-02 11:42:29 +02:00
Brendan Coles 6c1e842a7e Cube: Add app-cube.png 16x16 icon 2020-05-02 11:42:21 +02:00
Brendan Coles 24b9e57b15 Screensaver: Draw screen before first timer iteration and seed srand() 2020-04-28 09:36:28 +02:00
Brendan Coles c4d3723087 Fire: Use LibC srand() 2020-04-28 09:30:01 +02:00
Hüseyin ASLITÜRK 30e95d017e Demos: Add ColorInput, TabWidget and MessageBox demos in WidgetGallery 2020-04-23 11:49:02 +02:00
Brendan Coles 1c44ae6d19 Demos: Add Screensaver demo 2020-04-19 02:09:50 +02:00
Andreas Kling 9a109128f8 Cube: Two small tweaks
I noticed these when playing with the demo locally:

- Use RGB32 instead of RGBA32 for the bitmap buffer. This avoids some
  flickering that would sometimes occur.

- Clip the gradient fill to the widget rect rather than the painter
  clip rect. In practice, the painter was always clipped to the widget
  rect here, but it seems logical to say "fill widget with gradient."
2020-04-18 13:46:55 +02:00
Stephan Unverwerth 1806592d58 Demos: Add 3D Cube Demo
This renders a spinning 3D cube and demonstrates the 3D math classes
from LibGfx.
2020-04-18 12:28:54 +02:00
Itamar 3e9a7175d1 Debugger: Add DebugSession
The DebugSession class wraps the usage of Ptrace.
It is intended to be used by cli & gui debugger programs.

Also, call objdump for disassemly
2020-04-13 00:53:22 +02:00
Itamar 0431712660 ptrace: Stop a traced thread when it exists from execve
This was a missing feature in the PT_TRACEME command.

This feature allows the tracer to interact with the tracee before the
tracee has started executing its program.

It will be useful for automatically inserting a breakpoint at a
debugged program's entry point.
2020-04-13 00:53:22 +02:00
Itamar 77f671b462 CPU: Handle breakpoint trap
Also, start working on the debugger app.
2020-04-13 00:53:22 +02:00
Tibor Nagy 120e8028f6 WidgetGallery: Remove G prefixes from components 2020-03-19 22:52:44 +01:00
Andreas Kling 028c011760 LibCore: Make Core::Object::add<ChildType> return a ChildType&
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
2020-03-04 21:04:06 +01:00
Andreas Kling 0f3e57a6fb LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients 2020-03-04 14:26:16 +01:00
Andreas Kling 4697195645 LibGUI: Use set_layout<LayoutType>() in lots of client code 2020-03-04 13:49:48 +01:00
Andreas Kling 03e0ddce52 LibGUI: Some more convenience functions for constructing widgets
This patch adds two new API's:

- WidgetType& GUI::Window::set_main_widget<WidgetType>();

  This creates a new main widget for a window, assigns it, and returns
  it to you as a WidgetType&.

- LayoutType& GUI::Widget::set_layout<LayoutType>();

  Same basic idea, creates a new layout, assigns it, and returns it to
  you as a LayoutType&.
2020-03-03 22:37:48 +01:00
Andreas Kling a26b63a958 LibGUI: Remove Button& parameter from Button::on_click hook
There was but a single user of this parameter and it's a bit tedious
to write it out every time, so let's get rid of it.
2020-03-03 17:02:38 +01:00
Andrew Kaster c678b35043 LibELF: Use MAP_PRIVATE for file-backed mmaps in ELFDynamicLoader
Clean up some unused code, clean up FIXMEs, and remove premature
--dynamic-loader/-pie from LinkDemo (so it runs again on master)
2020-02-29 10:58:45 +01:00
joshua stein 0d2bfe5c65 Build: Only look at SUBDIRS with Makefiles
If a directory is renamed or deleted before 'make clean', git will
delete the Makefile but leave all of the object and dependency files
around.  When make would try to recurse into that directory from the
wildcard, it would error out since there is no Makefile.
2020-02-25 19:56:48 +01:00
Andreas Kling bbc02af090 Demos: Remove silly HelloWorld2 demo
This was just a tiny test app made with the old VisualBuilder. It's not
really useful for anything.
2020-02-23 12:27:53 +01:00
Andreas Kling 3d20da9ee4 Userspace: Use Core::Object::add() when building interfaces 2020-02-23 11:10:52 +01:00
Andreas Kling e1ff4fa034 LibGUI: Remove more header dependencies from Widget.h 2020-02-15 00:24:14 +01:00
Andreas Kling 3fe2640c8c LibGfx: Add forward declaration header
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
2020-02-14 23:31:18 +01:00
Andreas Kling 6cbd72f54f AK: Remove bitrotted Traits::dump() mechanism
This was only used by HashTable::dump() which I used when doing the
first HashTable implementation. Removing this allows us to also remove
most includes of <AK/kstdio.h>.
2020-02-10 11:55:34 +01:00
Andreas Kling 6a9cc66b97 LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
Andreas Kling d17e23bd27 LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
Andreas Kling 799b0a4fa8 LibGUI: Rename {H,V}BoxLayout => {Horizontal,Vertical}BoxLayout 2020-02-06 14:44:13 +01:00
Andreas Kling dccf335d5b LibGUI: Add HorizontalSlider and VerticalSlider convenience classes 2020-02-06 14:43:16 +01:00
Andreas Kling 5c06c32df4 LibGfx: Prefer using Gfx::Bitmap::load_from_file instead of load_png()
Code that just wants to open a Gfx::Bitmap from a file should not be
calling the PNG codec directly.
2020-02-06 13:39:17 +01:00
Andreas Kling c39d44fc2e LibGfx: Rename GraphicsBitmap.{cpp,h} => Bitmap.{cpp,h} 2020-02-06 12:07:05 +01:00
Andreas Kling 9ac94d393e LibGfx: Rename from LibDraw :^) 2020-02-06 12:04:00 +01:00
Andreas Kling 11580babbf LibDraw: Put all classes in the Gfx namespace
I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
2020-02-06 11:56:38 +01:00
Andreas Kling c5bd9d4ed1 LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
2020-02-02 15:15:33 +01:00
Andreas Kling 2d39da5405 LibCore: Put all classes in the Core namespace and remove the leading C
I've been wanting to do this for a long time. It's time we start being
consistent about how this stuff works.

The new convention is:

- "LibFoo" is a userspace library that provides the "Foo" namespace.

That's it :^) This was pretty tedious to convert and I didn't even
start on LibGUI yet. But it's coming up next.
2020-02-02 15:15:30 +01:00
Andreas Kling d67da8c101 LibGUI: Add GHBoxLayout and GVBoxLayout convenience classes 2020-02-02 15:09:48 +01:00
Andrew Kaster 117820f610 Meta: Claim copyright on files added by me
Demos/DynamicLink, LibC/cxxabi.cpp, and LibELF/ELFDynamic*.[cpp/h]
2020-02-02 02:05:38 +01:00
Andreas Kling 94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Emanuel Sprung 542098d90d Build: Fix helloworld2's form compiler dependency 2020-01-15 09:39:44 +01:00
Andrew Kaster c3be3718cf Demos: Compile LinkDemo as a PIE with interpreter /lib/lib-elf.so 2020-01-13 13:03:30 +01:00
Andrew Kaster 5accedfedb Demos: Remove extra methods/globals from DynamicLib 2020-01-13 13:03:30 +01:00