On 3/28/07, Benedikt Hazoth <[EMAIL PROTECTED]> wrote:
> hi
> ich hoffe hier ist jemand der deutsch kann, da ich
> selber leider kein englisch kann :-)
>
> ich möchte gerne ein plugin in c++ mit gtkmm dialogen
> schreiben,
> welches in eine gtk+ Applikation (xchat) geladen
> werden soll
>
> leider funktioniert das so nicht einfach
> wenn ihr mir sagen könntet wo mein fehler liegt (am
> besten beim selben beispiel) währ ich echt super
> dankbar :-)
>
> BEISPIEL:
> #include <gtkmm.h>
> // c++ `pkg-config gtkmm-2.4 --cflags --libs` -Wall
> -O1 -shared -fPIC  gtkmm.cpp -o gtkmm.so
> extern "C"
> {
>    #include "xchat/xchat-plugin.h"
> }
>
> #define PNAME "Test"
> #define PDESC "Blahs";
> #define PVERSION "0.1"
>
> static xchat_plugin *ph;
> Gtk::Main main(0,NULL);
>
> static int test_cb(char *word[], char *word_eol[],
> void *userdata)
> {
>     Gtk::Window window_obj;
>     main.run(window_obj);
>     return 0;
> }
>
> extern "C"
> {
>    int xchat_plugin_init(xchat_plugin *plugin_handle,
> char **plugin_name, char **plugin_desc, char
> **plugin_version,char *arg);
> }
>
> void xchat_plugin_get_info(char **name, char **desc,
> char **version, void **reserved)
> {
>    *name = PNAME;
>    *desc = PDESC;
>    *version = PVERSION;
> }
>
> int xchat_plugin_init(xchat_plugin *plugin_handle,
> char **plugin_name, char **plugin_desc, char
> **plugin_version,char *arg)
> {
>    ph = plugin_handle;
>
>    *plugin_name = PNAME;
>    *plugin_desc = PDESC;
>    *plugin_version = PVERSION;
>
>    xchat_hook_command(ph, "test", XCHAT_PRI_NORM,
> test_cb, "Usage: Test YES", 0);
>
>
>    xchat_print(ph, "Test plugin loaded!\n");
>
>    return(1);
> }
>
>
> PS: der fehler tritt nach dem reloaden des plugins auf
> und führt zum crash von xchat

There are people on this list that understand german, but if you are
able to restate the question in English, you'll likely get a better
response on this list. (I don't understand German for instance)

-- 
jonner
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to