-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathglobal.h
More file actions
61 lines (49 loc) · 1.59 KB
/
Copy pathglobal.h
File metadata and controls
61 lines (49 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// SPDX-License-Identifier: Apache-2.0
#ifndef LIBSCRATCHCPP_GLOBAL_H
#define LIBSCRATCHCPP_GLOBAL_H
#if defined(_MSC_VER) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#define DECL_EXPORT __declspec(dllexport)
#define DECL_IMPORT __declspec(dllimport)
#else
#define DECL_EXPORT __attribute__((visibility("default")))
#define DECL_IMPORT __attribute__((visibility("default")))
#endif
#if defined(LIBSCRATCHCPP_LIBRARY)
#define LIBSCRATCHCPP_EXPORT DECL_EXPORT
#else
#define LIBSCRATCHCPP_EXPORT DECL_IMPORT
#endif
#include <string>
/*! \brief The main namespace of the library. */
namespace libscratchcpp
{
class Compiler;
class CompilerValue;
class Block;
class Value;
/*!
* \typedef BlockComp
*
* BlockComp is a function pointer for functions which are used to compile blocks.
*/
using BlockComp = CompilerValue *(*)(Compiler *);
/*!
* \typedef MonitorNameFunc
*
* MonitorNameFunc is a function pointer for functions which are used to get monitor names.
*/
using MonitorNameFunc = const std::string &(*)(Block *);
/*!
* \typedef MonitorChangeFunc
*
* MonitorChangeFunc is a function pointer for functions which are used to change monitor values.
*/
using MonitorChangeFunc = void (*)(Block *, const Value &newValue);
/*!
* \typedef HatPredicateCompileFunc
*
* HatPredicateCompileFunc is a function pointer for functions which are used to compile edge-activated hat predicates.
*/
using HatPredicateCompileFunc = CompilerValue *(*)(Compiler *vm);
} // namespace libscratchcpp
#endif // LIBSCRATCHCPP_GLOBAL_H