1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:45:42 +02:00

New plugin interface (loads dynamic C libraries)

This commit is contained in:
Sebastien Helleu
2005-10-15 12:34:21 +00:00
parent 5130b1dc4f
commit cdc33d08b0
60 changed files with 13636 additions and 7740 deletions
+37
View File
@@ -0,0 +1,37 @@
# Copyright (c) 2003-2005 FlashCode <flashcode@flashtux.org>
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
noinst_LTLIBRARIES = lib_weechat_plugins_scripts.la
lib_weechat_plugins_scripts_la_SOURCES = weechat-script.h \
weechat-script.c
if PLUGIN_PERL
perl_dir = perl
endif
if PLUGIN_PYTHON
python_dir = python
endif
if PLUGIN_RUBY
#ruby_dir = ruby
endif
SUBDIRS = . $(perl_dir) $(python_dir) $(ruby_dir)
+26
View File
@@ -0,0 +1,26 @@
# Copyright (c) 2003-2005 FlashCode <flashcode@flashtux.org>
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PERL_CFLAGS)
libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = libperl.la
libperl_la_SOURCES = weechat-perl.c
libperl_la_LDFLAGS = -module
libperl_la_LIBADD = ../lib_weechat_plugins_scripts.la $(PERL_LFLAGS)
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
# Copyright (c) 2003-2005 FlashCode <flashcode@flashtux.org>
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS)
libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = libpython.la
libpython_la_SOURCES = weechat-python.c
libpython_la_LDFLAGS = -module
libpython_la_LIBADD = ../lib_weechat_plugins_scripts.la $(PYTHON_LFLAGS)
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
# Copyright (c) 2003-2005 FlashCode <flashcode@flashtux.org>
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(RUBY_CFLAGS)
libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = libruby.la
libruby_la_SOURCES = weechat-ruby.c
libruby_la_LDFLAGS = -module
libruby_la_LIBADD = ../lib_weechat_plugins_scripts.la $(RUBY_LFLAGS)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+52
View File
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2003-2005 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* This header is designed to be distributed with WeeChat plugins, if scripts
management is needed */
#ifndef __WEECHAT_WEECHAT_SCRIPT_H
#define __WEECHAT_WEECHAT_SCRIPT_H 1
typedef struct t_plugin_script t_plugin_script;
struct t_plugin_script
{
/* script variables */
char *filename; /* name of script on disk */
void *interpreter; /* interpreter for script */
char *name; /* script name */
char *description; /* plugin description */
char *version; /* plugin version */
char *shutdown_func; /* function when script is unloaded */
t_plugin_script *prev_script; /* link to previous script */
t_plugin_script *next_script; /* link to next script */
};
extern void weechat_script_auto_load (t_weechat_plugin *, char *,
int (*)(t_weechat_plugin *, char *));
extern t_plugin_script *weechat_script_search (t_weechat_plugin *,
t_plugin_script **, char *);
extern t_plugin_script *weechat_script_add (t_weechat_plugin *,
t_plugin_script **, char *, char *,
char *, char *, char *);
extern void weechat_script_remove (t_weechat_plugin *,
t_plugin_script **, t_plugin_script *);
#endif /* weechat-script.h */