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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
/*
* Copyright (c) 2003-2007 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_PLUGIN_API_H
#define __WEECHAT_PLUGIN_API_H 1
/* strings */
extern void plugin_api_charset_set (struct t_weechat_plugin *, char *);
extern char *plugin_api_iconv_to_internal (struct t_weechat_plugin *, char *, char *);
extern char *plugin_api_iconv_from_internal (struct t_weechat_plugin *, char *, char *);
extern char *plugin_api_gettext (struct t_weechat_plugin *, char *);
extern char *plugin_api_ngettext (struct t_weechat_plugin *, char *, char *, int);
extern int plugin_api_strcasecmp (struct t_weechat_plugin *,char *, char *);
extern int plugin_api_strncasecmp (struct t_weechat_plugin *,char *, char *, int);
extern char **plugin_api_explode_string (struct t_weechat_plugin *, char *, char *, int, int *);
extern void plugin_api_free_exploded_string (struct t_weechat_plugin *, char **);
/* directories */
extern int plugin_api_mkdir_home (struct t_weechat_plugin *, char *);
extern void plugin_api_exec_on_files (struct t_weechat_plugin *, char *,
int (*)(char *));
/* display */
extern void plugin_api_printf (struct t_weechat_plugin *, void *,
char *, ...);
extern char *plugin_api_prefix (struct t_weechat_plugin *, char *);
extern char *plugin_api_color (struct t_weechat_plugin *, char *);
extern void plugin_api_print_infobar (struct t_weechat_plugin *, int,
char *, ...);
extern void plugin_api_infobar_remove (struct t_weechat_plugin *, int);
/* hooks */
extern struct t_hook *plugin_api_hook_command (struct t_weechat_plugin *,
char *, char *, char *, char *,
char *, int (*)(void *, char *),
void *);
extern struct t_hook *plugin_api_hook_message (struct t_weechat_plugin *,
char *, int (*)(void *, char *),
void *);
extern struct t_hook *plugin_api_hook_config (struct t_weechat_plugin *,
char *, char *,
int (*)(void *, char *, char *, char *),
void *);
extern struct t_hook *plugin_api_hook_timer (struct t_weechat_plugin *,
long, int,
int (*)(void *), void *);
extern struct t_hook *plugin_api_hook_fd (struct t_weechat_plugin *,
int, int, int, int,
int (*)(void *), void *);
extern void plugin_api_unhook (struct t_weechat_plugin *, void *);
extern void plugin_api_unhook_all (struct t_weechat_plugin *);
/* buffers */
extern struct t_gui_buffer *plugin_api_buffer_new (struct t_weechat_plugin *,
char *, char *);
extern struct t_gui_buffer *plugin_api_buffer_search (struct t_weechat_plugin *,
char *, char *);
extern void plugin_api_buffer_close (struct t_weechat_plugin *, void *);
extern void plugin_api_buffer_set (struct t_weechat_plugin *, void *, char *,
char *);
extern void plugin_api_buffer_nick_add (struct t_weechat_plugin *, void *,
char *, int, char *, char, char *);
extern void plugin_api_buffer_nick_remove (struct t_weechat_plugin *, char *);
/* command */
extern void plugin_api_command (struct t_weechat_plugin *, void *, char *);
/* infos */
extern char *plugin_api_info_get (struct t_weechat_plugin *, char *);
/* config */
extern char *plugin_api_config_get (struct t_weechat_plugin *, char *);
extern int plugin_api_config_set (struct t_weechat_plugin *, char *, char *);
extern char *plugin_api_plugin_config_get (struct t_weechat_plugin *, char *);
extern int plugin_api_plugin_config_set (struct t_weechat_plugin *, char *, char *);
/* log */
extern void plugin_api_log (struct t_weechat_plugin *, char *, char *, char *, ...);
#endif /* plugin-api.h */
|