summaryrefslogtreecommitdiff
path: root/src/hooks.h
blob: 8ea87bc3f9776ad5355a6aa582c5a6d1f009de74 (plain)
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
#pragma once

#include "angband.h"

#ifdef __cplusplus
extern "C" {
#endif

extern FILE *hook_file;
extern void wipe_hooks(void);
extern void init_hooks(void);
extern hooks_chain* add_hook(int h_idx, hook_type hook, cptr name);
extern void add_hook_new(int h_idx, bool_ (*hook_f)(void *, void *, void *), cptr name, void *data);
extern void del_hook(int h_idx, hook_type hook);
extern s32b get_next_arg(const char *fmt);
extern char* get_next_arg_str(const char *fmt);
extern object_type *get_next_arg_obj();
extern int process_hooks_restart;
extern hook_return process_hooks_return[20];
extern bool_ process_hooks_ret(int h_idx, const char *ret, const char *fmt, ...);
extern bool_ process_hooks(int h_idx, const char *fmt, ...);
extern bool_ process_hooks_new(int h_idx, void *in, void *out);

#ifdef __cplusplus
} // extern "C"
#endif