libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
iextension.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2
3#pragma once
4
5#include "value_functions.h"
6
7namespace libscratchcpp
8{
9
10class IEngine;
11
18{
19 public:
20 virtual ~IExtension() { }
21
23 virtual std::string name() const = 0;
24
26 virtual std::string description() const = 0;
27
29 virtual Rgb color() const = 0;
30
32 virtual void registerBlocks(IEngine *engine) = 0;
33
35 virtual void onInit(IEngine *engine) { }
36};
37
38} // namespace libscratchcpp
The IEngine interface provides an API for running Scratch projects.
Definition iengine.h:41
The IExtension class is an interface for extensions.
Definition iextension.h:18
virtual void registerBlocks(IEngine *engine)=0
virtual std::string description() const =0
virtual ~IExtension()
Definition iextension.h:20
virtual Rgb color() const =0
virtual std::string name() const =0
virtual void onInit(IEngine *engine)
Definition iextension.h:35
#define LIBSCRATCHCPP_EXPORT
Definition global.h:17
The main namespace of the library.
Definition asset.h:10
unsigned int Rgb
Definition value_functions.h:11