mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
WIP, Functions are declared, still not called
This commit is contained in:
28
source/toy_function.h
Normal file
28
source/toy_function.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "toy_common.h"
|
||||
|
||||
#include "toy_module.h"
|
||||
|
||||
typedef enum Toy_FunctionType {
|
||||
TOY_FUNCTION_MODULE,
|
||||
TOY_FUNCTION_NATIVE,
|
||||
} Toy_FunctionType;
|
||||
|
||||
typedef union Toy_FunctionModule {
|
||||
Toy_FunctionType type;
|
||||
Toy_Module module;
|
||||
} Toy_FunctionModule;
|
||||
|
||||
typedef union Toy_FunctionNative {
|
||||
Toy_FunctionType type;
|
||||
void* native; //TODO: replace with the native function pointer
|
||||
} Toy_FunctionNative;
|
||||
|
||||
typedef union Toy_Function_t {
|
||||
Toy_FunctionType type;
|
||||
Toy_FunctionModule module;
|
||||
Toy_FunctionNative native;
|
||||
} Toy_Function;
|
||||
|
||||
TOY_API Toy_Function* Toy_createModuleFunction(Toy_Bucket** bucketHandle, Toy_Module module);
|
||||
Reference in New Issue
Block a user