mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
LibGfx: Move all image loaders and writers to a subdirectory
This commit is contained in:
parent
752f06f228
commit
496b7ffb2b
73 changed files with 129 additions and 129 deletions
39
Userland/Libraries/LibGfx/ImageFormats/ICOLoader.h
Normal file
39
Userland/Libraries/LibGfx/ImageFormats/ICOLoader.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Paul Roukema <roukemap@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGfx/ImageFormats/ImageDecoder.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
struct ICOLoadingContext;
|
||||
|
||||
class ICOImageDecoderPlugin final : public ImageDecoderPlugin {
|
||||
public:
|
||||
static bool sniff(ReadonlyBytes);
|
||||
static ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> create(ReadonlyBytes);
|
||||
|
||||
virtual ~ICOImageDecoderPlugin() override;
|
||||
|
||||
virtual IntSize size() override;
|
||||
virtual void set_volatile() override;
|
||||
[[nodiscard]] virtual bool set_nonvolatile(bool& was_purged) override;
|
||||
virtual bool initialize() override;
|
||||
virtual bool is_animated() override;
|
||||
virtual size_t loop_count() override;
|
||||
virtual size_t frame_count() override;
|
||||
virtual ErrorOr<ImageFrameDescriptor> frame(size_t index) override;
|
||||
virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override;
|
||||
|
||||
private:
|
||||
ICOImageDecoderPlugin(u8 const*, size_t);
|
||||
static ErrorOr<void> load_ico_bitmap(ICOLoadingContext& context, Optional<size_t> index);
|
||||
|
||||
OwnPtr<ICOLoadingContext> m_context;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue