1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00
irssi/src/core/expandos.h
Timo Sirainen 9f2f1dc70a Server events: switched order of data and server parameters. it's now
SERVER_REC *server, const char *data, .. hope this doesn't cause too
many problems :)


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@967 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-12-05 21:12:52 +00:00

36 lines
965 B
C

#ifndef __EXPANDOS_H
#define __EXPANDOS_H
#include "servers.h"
/* first argument of signal must match to active .. */
typedef enum {
EXPANDO_ARG_NONE,
EXPANDO_ARG_SERVER,
EXPANDO_ARG_WINDOW,
EXPANDO_ARG_WINDOW_ITEM,
EXPANDO_NEVER /* special: expando never changes */
} ExpandoArg;
typedef char* (*EXPANDO_FUNC)
(SERVER_REC *server, void *item, int *free_ret);
/* Create expando - overrides any existing ones.
... = signal, type, ..., NULL - list of signals that might change the
value of this expando */
void expando_create(const char *key, EXPANDO_FUNC func, ...);
/* Add new signal to expando */
void expando_add_signal(const char *key, const char *signal, ExpandoArg arg);
/* Destroy expando */
void expando_destroy(const char *key, EXPANDO_FUNC func);
/* internal: */
EXPANDO_FUNC expando_find_char(char chr);
EXPANDO_FUNC expando_find_long(const char *key);
void expandos_init(void);
void expandos_deinit(void);
#endif