mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 00:52:30 +02:00
Split expandos from special-vars.c to expandos.c. Added list of signals
to each expando that can might change it's value. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@964 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
5f941b8fa6
commit
d1eaeca255
19 changed files with 687 additions and 520 deletions
36
src/core/expandos.h
Normal file
36
src/core/expandos.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#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_SERVER2, /* second argument.. */
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue