mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Removed win_process_line from all APIs
This commit is contained in:
parent
b012a1b1b6
commit
dd91a88eb0
@ -156,13 +156,6 @@ api_win_focus(const char *tag)
|
||||
ui_switch_win(num);
|
||||
}
|
||||
|
||||
void
|
||||
api_win_process_line(const char *tag, const char * const line)
|
||||
{
|
||||
PluginWindowCallback *window = callbacks_get_window_handler(tag);
|
||||
window->callback_func(window, tag, line);
|
||||
}
|
||||
|
||||
void
|
||||
api_win_show(const char *tag, const char *line)
|
||||
{
|
||||
|
@ -46,7 +46,6 @@ int api_win_exists(const char *tag);
|
||||
void api_win_create(const char *tag, void *callback,
|
||||
void(*callback_func)(PluginWindowCallback *window_callback, char *tag, char *line));
|
||||
void api_win_focus(const char *tag);
|
||||
void api_win_process_line(const char *tag, const char * const line);
|
||||
void api_win_show(const char *tag, const char *line);
|
||||
void api_win_show_green(const char *tag, const char *line);
|
||||
void api_win_show_red(const char *tag, const char *line);
|
||||
|
@ -135,12 +135,6 @@ c_api_win_focus(char *tag)
|
||||
api_win_focus(tag);
|
||||
}
|
||||
|
||||
void
|
||||
c_api_win_process_line(char *tag, char *line)
|
||||
{
|
||||
api_win_process_line(tag, line);
|
||||
}
|
||||
|
||||
void
|
||||
c_api_win_show(char *tag, char *line)
|
||||
{
|
||||
@ -212,7 +206,6 @@ c_api_init(void)
|
||||
prof_win_exists = c_api_win_exists;
|
||||
prof_win_create = c_api_win_create;
|
||||
prof_win_focus = c_api_win_focus;
|
||||
prof_win_process_line = c_api_win_process_line;
|
||||
prof_win_show = c_api_win_show;
|
||||
prof_win_show_green = c_api_win_show_green;
|
||||
prof_win_show_red = c_api_win_show_red;
|
||||
|
@ -183,15 +183,6 @@ lua_api_win_focus(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
lua_api_win_process_line(lua_State *L)
|
||||
{
|
||||
const char *tag = lua_tostring(L, -2);
|
||||
const char *line = lua_tostring(L, -1);
|
||||
api_win_process_line(tag, strdup(line));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
lua_api_win_show(lua_State *L)
|
||||
{
|
||||
@ -348,6 +339,4 @@ lua_api_init(lua_State *L)
|
||||
lua_setglobal(L, "prof_win_show_cyan");
|
||||
lua_pushcfunction(L, lua_api_win_show_yellow);
|
||||
lua_setglobal(L, "prof_win_show_yellow");
|
||||
lua_pushcfunction(L, lua_api_win_process_line);
|
||||
lua_setglobal(L, "prof_win_process_line");
|
||||
}
|
||||
|
@ -160,7 +160,8 @@ plugins_get_lang_string(ProfPlugin *plugin)
|
||||
void
|
||||
plugins_win_process_line(char *win, const char * const line)
|
||||
{
|
||||
api_win_process_line(win, line);
|
||||
PluginWindowCallback *window = callbacks_get_window_handler(win);
|
||||
window->callback_func(window, win, line);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -48,7 +48,6 @@ void (*prof_log_error)(const char *message) = NULL;
|
||||
int (*prof_win_exists)(PROF_WIN_TAG win) = NULL;
|
||||
void (*prof_win_create)(PROF_WIN_TAG win, void(*input_handler)(PROF_WIN_TAG win, char *line)) = NULL;
|
||||
void (*prof_win_focus)(PROF_WIN_TAG win) = NULL;
|
||||
void (*prof_win_process_line)(PROF_WIN_TAG win, char *line) = NULL;
|
||||
void (*prof_win_show)(PROF_WIN_TAG win, char *line) = NULL;
|
||||
void (*prof_win_show_green)(PROF_WIN_TAG win, char *line) = NULL;
|
||||
void (*prof_win_show_red)(PROF_WIN_TAG win, char *line) = NULL;
|
||||
|
@ -48,7 +48,6 @@ void (*prof_log_error)(const char *message);
|
||||
int (*prof_win_exists)(PROF_WIN_TAG win);
|
||||
void (*prof_win_create)(PROF_WIN_TAG win, void(*input_handler)(PROF_WIN_TAG win, char *line));
|
||||
void (*prof_win_focus)(PROF_WIN_TAG win);
|
||||
void (*prof_win_process_line)(PROF_WIN_TAG win, char *line);
|
||||
void (*prof_win_show)(PROF_WIN_TAG win, char *line);
|
||||
void (*prof_win_show_green)(PROF_WIN_TAG win, char *line);
|
||||
void (*prof_win_show_red)(PROF_WIN_TAG win, char *line);
|
||||
|
@ -217,20 +217,6 @@ python_api_win_focus(PyObject *self, PyObject *args)
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
python_api_win_process_line(PyObject *self, PyObject *args)
|
||||
{
|
||||
char *tag = NULL;
|
||||
char *line = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "ss", &tag, &line)) {
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
||||
api_win_process_line(tag, line);
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
python_api_win_show(PyObject *self, PyObject *args)
|
||||
{
|
||||
@ -388,7 +374,6 @@ static PyMethodDef apiMethods[] = {
|
||||
{ "win_show_red", python_api_win_show_red, METH_VARARGS, "Show red text in the window." },
|
||||
{ "win_show_cyan", python_api_win_show_cyan, METH_VARARGS, "Show cyan text in the window." },
|
||||
{ "win_show_yellow", python_api_win_show_yellow, METH_VARARGS, "Show yellow text in the window." },
|
||||
{ "win_process_line", python_api_win_process_line, METH_VARARGS, "Send a line of input to a window." },
|
||||
{ NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -182,16 +182,6 @@ ruby_api_win_focus(VALUE self, VALUE v_tag)
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
ruby_api_win_process_line(VALUE self, VALUE v_tag, VALUE v_line)
|
||||
{
|
||||
char *tag = STR2CSTR(v_tag);
|
||||
char *line = STR2CSTR(v_line);
|
||||
|
||||
api_win_process_line(tag, line);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
ruby_api_win_show(VALUE self, VALUE v_tag, VALUE v_line)
|
||||
{
|
||||
@ -306,7 +296,6 @@ ruby_api_init(void)
|
||||
rb_define_module_function(prof_module, "win_exists", RUBY_METHOD_FUNC(ruby_api_win_exists), 1);
|
||||
rb_define_module_function(prof_module, "win_create", RUBY_METHOD_FUNC(ruby_api_win_create), 2);
|
||||
rb_define_module_function(prof_module, "win_focus", RUBY_METHOD_FUNC(ruby_api_win_focus), 1);
|
||||
rb_define_module_function(prof_module, "win_process_line", RUBY_METHOD_FUNC(ruby_api_win_process_line), 2);
|
||||
rb_define_module_function(prof_module, "win_show", RUBY_METHOD_FUNC(ruby_api_win_show), 2);
|
||||
rb_define_module_function(prof_module, "win_show_green", RUBY_METHOD_FUNC(ruby_api_win_show_green), 2);
|
||||
rb_define_module_function(prof_module, "win_show_red", RUBY_METHOD_FUNC(ruby_api_win_show_red), 2);
|
||||
|
Loading…
Reference in New Issue
Block a user