diff options
author | Christopher Davis <loafier@gmail.com> | 2006-06-23 03:51:52 +0000 |
---|---|---|
committer | Christopher Davis <loafier@gmail.com> | 2006-06-23 03:51:52 +0000 |
commit | 4d33c04f15e60e21a537edd635c9ac130312a3cb (patch) | |
tree | 9530c793afd67ef5c8319c452d33011c7f7fe197 /pysigmap.h | |
parent | c76f11d4ead827d8e87e265131a3dee534bc0792 (diff) | |
download | irssi-python-4d33c04f15e60e21a537edd635c9ac130312a3cb.tar.gz irssi-python-4d33c04f15e60e21a537edd635c9ac130312a3cb.tar.xz irssi-python-4d33c04f15e60e21a537edd635c9ac130312a3cb.zip |
Began work on signal handler/map system. It seems to be working;
however, events with varying <cmd> text aren't handled because
it does a straight lookup in the hashtable with the signal name
to locate the argument list. Will need to change the system to
accomodate the <cmd> events.
The basics for reference arg support is there but not well tested.
git-svn-id: http://svn.irssi.org/repos/irssi-python@4289 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'pysigmap.h')
-rw-r--r-- | pysigmap.h | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/pysigmap.h b/pysigmap.h new file mode 100644 index 0000000..0e37935 --- /dev/null +++ b/pysigmap.h @@ -0,0 +1,177 @@ +/* Include in your C module */ +static PY_SIGNAL_SPEC_REC py_sigmap[] = { + {"gui dialog", "ss", 0, 0, 0}, + {"send command", "sSW", 0, 0, 0}, + {"chat protocol created", "?", 0, 0, 0}, + {"chat protocol updated", "?", 0, 0, 0}, + {"chat protocol destroyed", "?", 0, 0, 0}, + {"channel created", "Ci", 0, 0, 0}, + {"channel destroyed", "C", 0, 0, 0}, + {"chatnet created", "c", 0, 0, 0}, + {"chatnet destroyed", "c", 0, 0, 0}, + {"commandlist new", "o", 0, 0, 0}, + {"commandlist remove", "o", 0, 0, 0}, + {"error command", "is", 0, 0, 0}, + {"send command", "sSW", 0, 0, 0}, + {"send text", "sSW", 0, 0, 0}, + {"default command", "sSW", 0, 0, 0}, + {"ignore created", "g", 0, 0, 0}, + {"ignore destroyed", "g", 0, 0, 0}, + {"ignore changed", "g", 0, 0, 0}, + {"log new", "l", 0, 0, 0}, + {"log remove", "l", 0, 0, 0}, + {"log create failed", "l", 0, 0, 0}, + {"log locked", "l", 0, 0, 0}, + {"log started", "l", 0, 0, 0}, + {"log stopped", "l", 0, 0, 0}, + {"log rotated", "l", 0, 0, 0}, + {"log written", "ls", 0, 0, 0}, + {"module loaded", "??", 0, 0, 0}, + {"module unloaded", "??", 0, 0, 0}, + {"module error", "isss", 0, 0, 0}, + {"nicklist new", "Cn", 0, 0, 0}, + {"nicklist remove", "Cn", 0, 0, 0}, + {"nicklist changed", "Cns", 0, 0, 0}, + {"nicklist host changed", "Cn", 0, 0, 0}, + {"nicklist gone changed", "Cn", 0, 0, 0}, + {"nicklist serverop changed", "Cn", 0, 0, 0}, + {"pidwait", "ii", 0, 0, 0}, + {"query created", "qi", 0, 0, 0}, + {"query destroyed", "q", 0, 0, 0}, + {"query nick changed", "qs", 0, 0, 0}, + {"window item name changed", "W", 0, 0, 0}, + {"query address changed", "q", 0, 0, 0}, + {"query server changed", "qS", 0, 0, 0}, + {"rawlog", "as", 0, 0, 0}, + {"server looking", "S", 0, 0, 0}, + {"server connected", "S", 0, 0, 0}, + {"server connecting", "Su", 0, 0, 0}, + {"server connect failed", "S", 0, 0, 0}, + {"server disconnected", "S", 0, 0, 0}, + {"server quit", "Ss", 0, 0, 0}, + {"server sendmsg", "Sssi", 0, 0, 0}, + {"setup reread", "s", 0, 0, 0}, + {"setup saved", "si", 0, 0, 0}, + {"ban type changed", "s", 0, 0, 0}, + {"channel joined", "C", 0, 0, 0}, + {"channel wholist", "C", 0, 0, 0}, + {"channel sync", "C", 0, 0, 0}, + {"channel topic changed", "C", 0, 0, 0}, + {"ctcp msg", "Sssss", 0, 0, 0}, + {"default ctcp msg", "Sssss", 0, 0, 0}, + {"ctcp reply", "Sssss", 0, 0, 0}, + {"default ctcp reply", "Sssss", 0, 0, 0}, + {"ctcp action", "Sssss", 0, 0, 0}, + {"awaylog show", "lii", 0, 0, 0}, + {"server nick changed", "S", 0, 0, 0}, + {"event connected", "S", 0, 0, 0}, + {"server event", "Ssss", 0, 0, 0}, + {"default event", "Ssss", 0, 0, 0}, + {"whois default event", "Ssss", 0, 0, 0}, + {"server incoming", "Ss", 0, 0, 0}, + {"server lag", "S", 0, 0, 0}, + {"server lag disconnect", "S", 0, 0, 0}, + {"massjoin", "CL", 0, 0, 0}, + {"ban new", "Cb", 0, 0, 0}, + {"ban remove", "Cbs", 0, 0, 0}, + {"channel mode changed", "Cs", 0, 0, 0}, + {"nick mode changed", "Cnsss", 0, 0, 0}, + {"user mode changed", "Ss", 0, 0, 0}, + {"away mode changed", "S", 0, 0, 0}, + {"netsplit server new", "Se", 0, 0, 0}, + {"netsplit server remove", "Se", 0, 0, 0}, + {"netsplit new", "N", 0, 0, 0}, + {"netsplit remove", "N", 0, 0, 0}, + {"default dcc ctcp", "sd", 0, 0, 0}, + {"dcc unknown ctcp", "sss", 0, 0, 0}, + {"default dcc reply", "sd", 0, 0, 0}, + {"dcc unknown reply", "sss", 0, 0, 0}, + {"dcc chat message", "ds", 0, 0, 0}, + {"dcc created", "d", 0, 0, 0}, + {"dcc destroyed", "d", 0, 0, 0}, + {"dcc connected", "d", 0, 0, 0}, + {"dcc rejecting", "d", 0, 0, 0}, + {"dcc closed", "d", 0, 0, 0}, + {"dcc request", "ds", 0, 0, 0}, + {"dcc request send", "d", 0, 0, 0}, + {"dcc chat message", "ds", 0, 0, 0}, + {"dcc transfer update", "d", 0, 0, 0}, + {"dcc get receive", "d", 0, 0, 0}, + {"dcc error connect", "d", 0, 0, 0}, + {"dcc error file create", "ds", 0, 0, 0}, + {"dcc error file open", "ssi", 0, 0, 0}, + {"dcc error get not found", "s", 0, 0, 0}, + {"dcc error send exists", "ss", 0, 0, 0}, + {"dcc error unknown type", "s", 0, 0, 0}, + {"dcc error close not found", "sss", 0, 0, 0}, + {"autoignore new", "S?", 0, 0, 0}, + {"autoignore remove", "S?", 0, 0, 0}, + {"flood", "Sssis", 0, 0, 0}, + {"notifylist new", "O", 0, 0, 0}, + {"notifylist remove", "O", 0, 0, 0}, + {"notifylist joined", "Ssssss", 0, 0, 0}, + {"notifylist away changed", "Ssssss", 0, 0, 0}, + {"notifylist unidle", "Ssssss", 0, 0, 0}, + {"notifylist left", "Ssssss", 0, 0, 0}, + {"proxy client connected", "?", 0, 0, 0}, + {"proxy client disconnected", "?", 0, 0, 0}, + {"gui print text", "wiiist", 0, 0, 0}, + {"gui print text finished", "w", 0, 0, 0}, + {"complete word", "GwssI", 0, 0, 0}, + {"exec new", "p", 0, 0, 0}, + {"exec remove", "pi", 0, 0, 0}, + {"exec input", "ps", 0, 0, 0}, + {"message public", "Sssss", 0, 0, 0}, + {"message private", "Ssss", 0, 0, 0}, + {"message own_public", "Sss", 0, 0, 0}, + {"message own_private", "Ssss", 0, 0, 0}, + {"message join", "Ssss", 0, 0, 0}, + {"message part", "Sssss", 0, 0, 0}, + {"message quit", "Ssss", 0, 0, 0}, + {"message kick", "Ssssss", 0, 0, 0}, + {"message nick", "Ssss", 0, 0, 0}, + {"message own_nick", "Ssss", 0, 0, 0}, + {"message invite", "Ssss", 0, 0, 0}, + {"message topic", "Sssss", 0, 0, 0}, + {"keyinfo created", "?", 0, 0, 0}, + {"keyinfo destroyed", "?", 0, 0, 0}, + {"print text", "tss", 0, 0, 0}, + {"theme created", "?", 0, 0, 0}, + {"theme destroyed", "?", 0, 0, 0}, + {"window hilight", "w", 0, 0, 0}, + {"window activity", "wi", 0, 0, 0}, + {"window item hilight", "W", 0, 0, 0}, + {"window item activity", "Wi", 0, 0, 0}, + {"window item new", "wW", 0, 0, 0}, + {"window item remove", "wW", 0, 0, 0}, + {"window item changed", "wW", 0, 0, 0}, + {"window item server changed", "wW", 0, 0, 0}, + {"window created", "w", 0, 0, 0}, + {"window destroyed", "w", 0, 0, 0}, + {"window changed", "ww", 0, 0, 0}, + {"window changed automatic", "w", 0, 0, 0}, + {"window server changed", "wS", 0, 0, 0}, + {"window refnum changed", "wi", 0, 0, 0}, + {"window name changed", "w", 0, 0, 0}, + {"window history changed", "ws", 0, 0, 0}, + {"window level changed", "w", 0, 0, 0}, + {"message irc op_public", "Sssss", 0, 0, 0}, + {"message irc own_wall", "Sss", 0, 0, 0}, + {"message irc own_action", "Sss", 0, 0, 0}, + {"message irc action", "Sssss", 0, 0, 0}, + {"message irc own_notice", "Sss", 0, 0, 0}, + {"message irc notice", "Sssss", 0, 0, 0}, + {"message irc own_ctcp", "Ssss", 0, 0, 0}, + {"message irc ctcp", "Ssssss", 0, 0, 0}, + {"message irc mode", "Sssss", 0, 0, 0}, + {"message dcc own", "ds", 0, 0, 0}, + {"message dcc own_action", "ds", 0, 0, 0}, + {"message dcc own_ctcp", "dss", 0, 0, 0}, + {"message dcc", "ds", 0, 0, 0}, + {"message dcc action", "ds", 0, 0, 0}, + {"message dcc ctcp", "dss", 0, 0, 0}, + {"gui key pressed", "i", 0, 0, 0}, + {NULL} +}; + +#define py_sigmap_len() (sizeof(py_sigmap) / sizeof(py_sigmap[0]) - 1) |