Fumofumotris/source/game/event.h
Julia 879e8f2af2 hh
jhhj
2024-04-09 17:10:30 -05:00

20 lines
393 B
C

#pragma once
#include <iso646.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "fumotris.h"
struct Delegate {
size_t len;
size_t capacity;
void (**events)(void *args);
};
bool NewDelegate(struct Delegate *d, size_t capacity);
void Subscribe(struct Delegate *d, void (*event)(void *args));
void Invoke(struct Delegate *d, void *args);