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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
/*
* 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_strcasestr (struct t_weechat_plugin *,char *, char *);
extern char *plugin_api_string_replace (struct t_weechat_plugin *,char *,
char *, char *);
extern char **plugin_api_string_explode (struct t_weechat_plugin *, char *,
char *, int, int, int *);
extern void plugin_api_string_free_exploded (struct t_weechat_plugin *,
char **);
extern char **plugin_api_string_split_command (struct t_weechat_plugin *,
char *, char);
extern void plugin_api_string_free_splitted_command (struct t_weechat_plugin *,
char **);
/* UTF-8 strings */
extern int plugin_api_utf8_has_8bits (struct t_weechat_plugin *, char *);
extern int plugin_api_utf8_is_valid (struct t_weechat_plugin *, char *, char **);
extern void plugin_api_utf8_normalize (struct t_weechat_plugin *, char *, char);
extern char *plugin_api_utf8_prev_char (struct t_weechat_plugin *, char *, char *);
extern char *plugin_api_utf8_next_char (struct t_weechat_plugin *, char *);
extern int plugin_api_utf8_char_size (struct t_weechat_plugin *, char *);
extern int plugin_api_utf8_strlen (struct t_weechat_plugin *, char *);
extern int plugin_api_utf8_strnlen (struct t_weechat_plugin *, char *, int);
extern int plugin_api_utf8_strlen_screen (struct t_weechat_plugin *, char *);
extern int plugin_api_utf8_charcasecmp (struct t_weechat_plugin *, char *, char *);
extern int plugin_api_utf8_char_size_screen (struct t_weechat_plugin *, char *);
extern char *plugin_api_utf8_add_offset (struct t_weechat_plugin *, char *, int);
extern int plugin_api_utf8_real_pos (struct t_weechat_plugin *, char *, int);
extern int plugin_api_utf8_pos (struct t_weechat_plugin *, char *, int);
/* directories */
extern int plugin_api_mkdir_home (struct t_weechat_plugin *, char *, int);
extern int plugin_api_mkdir (struct t_weechat_plugin *, char *, int);
extern void plugin_api_exec_on_files (struct t_weechat_plugin *, char *,
int (*)(char *));
/* util */
extern long plugin_api_timeval_diff (struct t_weechat_plugin *, void *, void *);;
/* lists */
extern struct t_weelist *plugin_api_list_new( struct t_weechat_plugin *);
extern char *plugin_api_list_add (struct t_weechat_plugin *, void *, char *,
char *);
extern struct t_weelist_item *plugin_api_list_search (struct t_weechat_plugin *,
void *, char *);
extern struct t_weelist_item *plugin_api_list_casesearch (struct t_weechat_plugin *,
void *, char *);
extern struct t_weelist_item *plugin_api_list_get (struct t_weechat_plugin *,
void *, int);
extern struct t_weelist_item *plugin_api_list_next (struct t_weechat_plugin *,
void *);
extern struct t_weelist_item *plugin_api_list_prev (struct t_weechat_plugin *,
void *);
extern char *plugin_api_list_string (struct t_weechat_plugin *, void *);
extern int plugin_api_list_size (struct t_weechat_plugin *, void *);
extern void plugin_api_list_remove (struct t_weechat_plugin *, void *, void *);
extern void plugin_api_list_remove_all (struct t_weechat_plugin *, void *);
extern void plugin_api_list_free (struct t_weechat_plugin *, void *);
/* config */
extern struct t_config_file *plugin_api_config_new (struct t_weechat_plugin *,
char *);
extern struct t_config_section *plugin_api_config_new_section (struct t_weechat_plugin *,
void *, char *,
void (*)(void *, char *, char *),
void (*)(void *, char *),
void (*)(void *, char *));
extern struct t_config_section *plugin_api_config_search_section (struct t_weechat_plugin *,
void *, char *);
extern struct t_config_option *plugin_api_config_new_option (struct t_weechat_plugin *,
void *, char *,
char *, char *,
char *, int, int,
char *,
void (*)());
extern struct t_config_option *plugin_api_config_search_option (struct t_weechat_plugin *,
void *, void *,
char *);
extern int plugin_api_config_option_set (struct t_weechat_plugin *, void *,
char *);
extern char plugin_api_config_string_to_boolean (struct t_weechat_plugin *,
char *);
extern char plugin_api_config_boolean (struct t_weechat_plugin *, void *);
extern int plugin_api_config_integer (struct t_weechat_plugin *, void *);
extern char *plugin_api_config_string (struct t_weechat_plugin *, void *);
extern int plugin_api_config_color (struct t_weechat_plugin *, void *);
extern int plugin_api_config_read (struct t_weechat_plugin *, void *);
extern int plugin_api_config_reload (struct t_weechat_plugin *, void *);
extern int plugin_api_config_write (struct t_weechat_plugin *, void *);
extern void plugin_api_config_write_line (struct t_weechat_plugin *, void *,
char *, char *, ...);
extern void plugin_api_config_free (struct t_weechat_plugin *, void *);
extern struct t_config_option *plugin_api_config_get (struct t_weechat_plugin *,
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 *);
/* display */
extern char *plugin_api_prefix (struct t_weechat_plugin *, char *);
extern char *plugin_api_color (struct t_weechat_plugin *, char *);
extern void plugin_api_printf (struct t_weechat_plugin *, void *,
char *, ...);
extern void plugin_api_printf_date (struct t_weechat_plugin *, void *,
time_t, char *, ...);
extern void plugin_api_log_printf (struct t_weechat_plugin *, char *, ...);
extern void plugin_api_infobar_printf (struct t_weechat_plugin *, int, char *,
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 *, void *, int, 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 struct t_hook *plugin_api_hook_print (struct t_weechat_plugin *,
void *, char *, int,
int (*)(void *, void *, time_t, char *, char *),
void *);
extern struct t_hook *plugin_api_hook_signal (struct t_weechat_plugin *, char *,
int (*)(void *, char *, void *),
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_completion (struct t_weechat_plugin *,
char *,
int (*)(void *, char *, void *, 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 *,
void (*)(struct t_gui_buffer *, 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_get (struct t_weechat_plugin *, void *, char *);
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 *);
/* infolists */
extern struct t_plugin_infolist *plugin_api_infolist_get (struct t_weechat_plugin *,
char *, void *);
extern int plugin_api_infolist_next (struct t_weechat_plugin *,
void *);
extern int plugin_api_infolist_prev (struct t_weechat_plugin *,
void *);
extern char *plugin_api_infolist_fields (struct t_weechat_plugin *, void *);
extern int plugin_api_infolist_integer (struct t_weechat_plugin *, void *, char *);
extern char *plugin_api_infolist_string (struct t_weechat_plugin *, void *, char *);
extern void *plugin_api_infolist_pointer (struct t_weechat_plugin *, void *, char *);
extern time_t plugin_api_infolist_time (struct t_weechat_plugin *, void *, char *);
extern void plugin_api_infolist_free (struct t_weechat_plugin *, void *);
/* log */
extern void plugin_api_log (struct t_weechat_plugin *, char *, char *,
char *, ...);
#endif /* plugin-api.h */
|