Crossfire Server, Trunk  R20513
ob_methods.h
Go to the documentation of this file.
1 
6 #ifndef OB_METHODS_H
7 #define OB_METHODS_H
8 
14 typedef char method_ret;
15 #define METHOD_OK 0
16 #define METHOD_UNHANDLED 1
17 #define METHOD_ERROR 2
18 #define METHOD_SILENT_ERROR 3
26 /* Example:
27  * typedef method_ret (apply_func)(ob_methods *context, object *ob);
28  */
29 
38 typedef struct ob_methods ob_methods;
39 typedef method_ret (*apply_func)(ob_methods *, object *, object *, int);
40 typedef method_ret (*process_func)(ob_methods *, object *);
41 typedef void (*describe_func)(const ob_methods *, const object *, const object *, char *buf, size_t size);
42 typedef method_ret (*move_on_func)(ob_methods *, object *, object *, object *);
43 typedef method_ret (*trigger_func)(ob_methods *, object *, object *, int);
44 
45 struct ob_methods {
51  struct ob_methods *fallback;
52  /* Example:
53  * apply_func *apply;
54  */
55 };
56 
57 #endif /* OB_METHODS_H */
void(* describe_func)(const ob_methods *, const object *, const object *, char *buf, size_t size)
Definition: ob_methods.h:41
Typedefs for ob_methods.
Definition: ob_methods.h:45
struct ob_methods * fallback
ob_method structure to fallback to
Definition: ob_methods.h:51
apply_func apply
The apply method.
Definition: ob_methods.h:46
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
Definition: ob_methods.h:14
move_on_func move_on
The move_on method.
Definition: ob_methods.h:49
method_ret(* process_func)(ob_methods *, object *)
Definition: ob_methods.h:40
trigger_func trigger
When something is triggered via a button.
Definition: ob_methods.h:50
process_func process
The process method.
Definition: ob_methods.h:47
method_ret(* apply_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:39
method_ret(* trigger_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:43
describe_func describe
The describe method.
Definition: ob_methods.h:48
method_ret(* move_on_func)(ob_methods *, object *, object *, object *)
Definition: ob_methods.h:42