⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notes

📁 The major functionality added in this release includes: - Rootless mode in X11 - Widget Templt
💻
字号:
Developer notes for XChat dll'sFIRST: There should be a sample module under the sample directory, this gives ageneral overview of writing a module.#define USE_PLUGIN BEFORE EVERYTHING!You must include xchat.h and plugin.h from the xchat main directory. Everymodule MUST export a function called module_init, it is passed the versionnumber (an int), a pointer to the module struct for your module and a pointer tothe current session. It returns an int: 0 = success, 1 = fail. The name and descparts of the module structure must be filled out with strings.You must check the version number is what you think it is (currently 2) BEFOREreferencing anthing else.Any module can hook a signal, using hook_signal and passing a pointer to anxp_signal struct, filling in the name, callback, naddr and mod parts. Then wheneverthat signal is sent, your callback will be called. naddr should be a pointer toa pointer to a function passed 5 void *'s and a char. At the end of the callbackyou use XP_CALLNEXT(naddrfunction, a, b, c, d, e, f) to call the next callback,a to f being the arg you were passed. Beware that XP_CALLNEXT expands to includea return. If the chain of callbacks returns a 1 then the normal handler will notcontinue. XP_CALLBACK next returns what ever the next callback returns (0 if itis the last callback) while XP_CALLNEXT_ANDSET returns 1.A signal callback is passed 5 void *'s and a char (just seemed aboutenough), by convention the first void * is a pointer to the session orserver struct. To cast as a signal callback use the define XP_CALLBACK likea GTK cast.When the module is removed the module_cleanup function is called, it is passedthe module struct and the current session. You do not have to export amodule_cleanup as ALL COMMANDS AND HOOKS ARE REMOVED BY THE PLUGIN CODE.Most modules call module_add_cmds at some point, you pass this function apointer to a module_cmd_set struct and it install hooks to commands andmessages for you.See SIGNALS for a list of current signalsTo test you module, build it, run xchat and type:/loaddll /path/to/your/module.soAfter this a /listdll should list your module.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -