2024-04-03 23:31:47 +00:00
|
|
|
#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);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Delegate NewDelegate(size_t capacity);
|
|
|
|
|
|
|
|
void Subscribe(struct Delegate *d, void (*event)(void *args));
|
|
|
|
|
2024-04-04 19:43:45 +00:00
|
|
|
void Invoke(struct Delegate *d, void *args);
|