#ifndef NODES_H
#define NODES_H

#include "aliases/aliases.h"
#include "ui.h"
#include "window.h"

#define MAX_NODES 1024

typedef i32 (*node_func)(i32 a, i32 b);
typedef enum node_type node_type;
typedef union node_data node_data;
typedef struct node node;

enum node_type {
  NODEYPE_IO,
  NODEYPE_OP,

  COUNT_NODEYPES,
};

union node_data {
  const char *path;
  node_func func;
};

struct node {
  rect rec;
  ui_elem_colours colours;
  node_type type;
  node_data data;
};

#endif // !NODES_H