mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
Start working on a simple Launcher app.
Let GButton have an optional icon (GraphicsBitmap) that gets rendered in the middle of the button if present. Also add GraphicsBitmap::load_from_file() which allows mmap'ed RGBA32 files. I wrote a little program to take "raw" files from GIMP and swizzle them into the correct byte order.
This commit is contained in:
parent
71b9ec1ae0
commit
887b4a7a1a
29 changed files with 293 additions and 11 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "Size.h"
|
||||
#include <AK/Retainable.h>
|
||||
#include <AK/RetainPtr.h>
|
||||
#include <AK/AKString.h>
|
||||
|
||||
#ifdef KERNEL
|
||||
#include "Process.h"
|
||||
|
@ -16,6 +17,7 @@ public:
|
|||
static RetainPtr<GraphicsBitmap> create(Process&, const Size&);
|
||||
#endif
|
||||
static RetainPtr<GraphicsBitmap> create_wrapper(const Size&, RGBA32*);
|
||||
static RetainPtr<GraphicsBitmap> load_from_file(const String& path, const Size&);
|
||||
~GraphicsBitmap();
|
||||
|
||||
RGBA32* scanline(int y);
|
||||
|
@ -42,6 +44,10 @@ private:
|
|||
RGBA32* m_data { nullptr };
|
||||
size_t m_pitch { 0 };
|
||||
|
||||
#ifdef USERLAND
|
||||
bool m_mmaped { false };
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
WeakPtr<Process> m_client_process;
|
||||
Region* m_client_region { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue