diff options
| author | Christopher Davis <loafier@gmail.com> | 2006-08-12 22:16:53 +0000 |
|---|---|---|
| committer | Christopher Davis <loafier@gmail.com> | 2006-08-12 22:16:53 +0000 |
| commit | 3a028090359e5d5d24ccbfc11d9b6ff5681aab4f (patch) | |
| tree | 0cfb8ec1eb8a49366fc663bef00bf4dfb1f7c307 /src/objects/factory.h | |
| parent | f13ea25509e932d426ebd69d90368fe9b1d4c1ab (diff) | |
| download | irssi-python-3a028090359e5d5d24ccbfc11d9b6ff5681aab4f.tar.gz irssi-python-3a028090359e5d5d24ccbfc11d9b6ff5681aab4f.tar.xz irssi-python-3a028090359e5d5d24ccbfc11d9b6ff5681aab4f.zip | |
directory structure change
git-svn-id: http://svn.irssi.org/repos/irssi-python@4312 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/objects/factory.h')
| -rw-r--r-- | src/objects/factory.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/objects/factory.h b/src/objects/factory.h new file mode 100644 index 0000000..9d4bd79 --- /dev/null +++ b/src/objects/factory.h @@ -0,0 +1,58 @@ +#ifndef _FACTORY_H_ +#define _FACTORY_H_ + +#include <Python.h> +#include "pyscript-object.h" +#include "base-objects.h" +#include "window-item-object.h" +#include "channel-object.h" +#include "query-object.h" +#include "server-object.h" +#include "connect-object.h" +#include "irc-server-object.h" +#include "irc-connect-object.h" +#include "irc-channel-object.h" +#include "ban-object.h" +#include "nick-object.h" +#include "chatnet-object.h" +#include "reconnect-object.h" +#include "window-object.h" +#include "textdest-object.h" +#include "rawlog-object.h" +#include "log-object.h" +#include "logitem-object.h" +#include "ignore-object.h" +#include "dcc-object.h" +#include "dcc-chat-object.h" +#include "dcc-get-object.h" +#include "dcc-send-object.h" +#include "netsplit-object.h" +#include "netsplit-server-object.h" +#include "netsplit-channel-object.h" +#include "notifylist-object.h" +#include "process-object.h" +#include "command-object.h" +#include "theme-object.h" +#include "statusbar-item-object.h" +#include "main-window-object.h" + +int factory_init(void); +void factory_deinit(void); + +/*managed == 1: object invalidates itself + *managed == 0: caller responsible for invalidating object + *XXX: most objects invalidate themselves, ignoring "managed" switch, + * and some are never managed (Reconnect) + */ + +/* For objects with a type member but no chat_type */ +PyObject *py_irssi_new(void *typeobj, int managed); +/* For objects with both type and chat_type members */ +PyObject *py_irssi_chat_new(void *typeobj, int managed); + +typedef PyObject *(*InitFunc)(void *, int); +PyObject *py_irssi_objlist_new(GSList *node, int managed, InitFunc init); +#define py_irssi_chatlist_new(n, m) py_irssi_objlist_new(n, m, py_irssi_chat_new) +#define py_irssi_list_new(n, m) py_irssi_objlist_new(n, m, py_irssi_new) + +#endif |
