plugins/perl/perl-handlers.h

Sun, 17 Oct 2004 23:55:49 +0000

author
Sean Egan <seanegan@pidgin.im>
date
Sun, 17 Oct 2004 23:55:49 +0000
changeset 10108
0897c42d6cb9
parent 6568
5c8c70b63dc3
child 11123
098f5c57f2bb
permissions
-rw-r--r--

[gaim-migrate @ 11141]
Two things:
a. Added Enter as a gtk_binding to GtkIMHtml. This fixes everything.
Input methods now work. The "Enter sends" and "Ctrl-Enter sends" preferences
were removed and defaulted to yes and no respectively, BUT, in a very super-cool
turn of events, you can now add your own bindings to .gtkrc to make WHATEVER
YOU WANT send. Awesome. Someone should use g_signal_accumulator_true_handled
or something to make profiles and away messages able to insert newlines.

b. Removed "Use multi-colored screennames in chats," defaulted to yes, and
wrote a nifty algorithm to automatically adjust the colors to accomodate the
background (see http://gaim.sf.net/sean/porn-chat.png). People should play
around and tweak it a bit. The algorithm takes into consideration the
luminosity of the current background and the base hue to use for the screenname
in generating the new colors. Note that it does this while maintaining the hues.
Someone should optimize this so it skips over the floating point arithmatic when
the background color is white.

6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 #ifndef _GAIM_PERL_HANDLERS_H_
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 #define _GAIM_PERL_HANDLERS_H_
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 #include "plugin.h"
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 typedef struct
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 {
6568
5c8c70b63dc3 [gaim-migrate @ 7090]
Christian Hammond <chipx86@chipx86.com>
parents: 6567
diff changeset
8 SV *callback;
5c8c70b63dc3 [gaim-migrate @ 7090]
Christian Hammond <chipx86@chipx86.com>
parents: 6567
diff changeset
9 SV *data;
6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 GaimPlugin *plugin;
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 int iotag;
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 } GaimPerlTimeoutHandler;
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14
6549
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
15 typedef struct
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
16 {
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
17 char *signal;
6567
761a1feb5561 [gaim-migrate @ 7089]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
18 SV *callback;
761a1feb5561 [gaim-migrate @ 7089]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
19 SV *data;
6549
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
20 void *instance;
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
21 GaimPlugin *plugin;
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
22
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
23 } GaimPerlSignalHandler;
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
24
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
25
6568
5c8c70b63dc3 [gaim-migrate @ 7090]
Christian Hammond <chipx86@chipx86.com>
parents: 6567
diff changeset
26 void gaim_perl_timeout_add(GaimPlugin *plugin, int seconds, SV *callback,
5c8c70b63dc3 [gaim-migrate @ 7090]
Christian Hammond <chipx86@chipx86.com>
parents: 6567
diff changeset
27 SV *data);
6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 void gaim_perl_timeout_clear_for_plugin(GaimPlugin *plugin);
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 void gaim_perl_timeout_clear(void);
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30
6550
1f3edf39ef51 [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6549
diff changeset
31 void gaim_perl_signal_connect(GaimPlugin *plugin, void *instance,
6567
761a1feb5561 [gaim-migrate @ 7089]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
32 const char *signal, SV *callback,
761a1feb5561 [gaim-migrate @ 7089]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
33 SV *data);
6550
1f3edf39ef51 [gaim-migrate @ 7072]
Christian Hammond <chipx86@chipx86.com>
parents: 6549
diff changeset
34 void gaim_perl_signal_disconnect(GaimPlugin *plugin, void *instance,
6567
761a1feb5561 [gaim-migrate @ 7089]
Christian Hammond <chipx86@chipx86.com>
parents: 6550
diff changeset
35 const char *signal);
6549
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
36 void gaim_perl_signal_clear_for_plugin(GaimPlugin *plugin);
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
37 void gaim_perl_signal_clear(void);
8e6ba2a45698 [gaim-migrate @ 7071]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
38
6520
5386692555c9 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 #endif /* _GAIM_PERL_HANDLERS_H_ */

mercurial