annotate plugins/perl/perl-common.h @ 12711:145f76e74a9f

[gaim-migrate @ 15055] Fix SF Bug #1384698 - "Last word in text auto replace not changed" This uses astro96's idea: 'when the user types something like "Hi how r u" they will see this (where the "^" is the cursor): "Hi how are u^" When they hit enter to send the message, instead of sending the message, the last word would be replaced: [Enter] "Hi how are you^" and then if they hit enter again it would send the message.' I code a preference for this, but have #if 0'ed it before committing. I don't think we need a preference to disable this. If it turns out I'm wrong, the code is right there to use. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 04 Jan 2006 03:01:32 +0000
parents 202ce52b77a9
children 2422097a7a5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 #ifndef _GAIM_PERL_COMMON_H_
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 #define _GAIM_PERL_COMMON_H_
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3
6816
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6566
diff changeset
4 #include <glib.h>
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6566
diff changeset
5 #ifdef _WIN32
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6566
diff changeset
6 #undef pipe
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6566
diff changeset
7 #endif
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
8 #include <XSUB.h>
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
9 #include <EXTERN.h>
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
10 #include <perl.h>
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
11
6566
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
12 #include "value.h"
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
13
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 #define is_hvref(o) \
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV))
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 #define hvref(o) \
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 (is_hvref(o) ? (HV *)SvRV(o) : NULL);
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19
12419
455610a80747 [gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents: 11170
diff changeset
20 #define GAIM_PERL_BOOT_PROTO(x) \
12497
202ce52b77a9 [gaim-migrate @ 14809]
Richard Laager <rlaager@wiktel.com>
parents: 12419
diff changeset
21 void boot_Gaim__##x(pTHX_ CV *cv);
12419
455610a80747 [gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents: 11170
diff changeset
22
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #define GAIM_PERL_BOOT(x) \
12419
455610a80747 [gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents: 11170
diff changeset
24 gaim_perl_callXS(boot_Gaim__##x, cv, mark)
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
11170
0e9e2b923d09 [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 6921
diff changeset
26 void gaim_perl_normalize_script_name(char *name);
0e9e2b923d09 [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 6921
diff changeset
27
0e9e2b923d09 [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 6921
diff changeset
28
6566
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
29 SV *newSVGChar(const char *str);
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
30
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 void gaim_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark);
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 void gaim_perl_bless_plain(const char *stash, void *object);
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 SV *gaim_perl_bless_object(void *object, const char *stash);
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 gboolean gaim_perl_is_ref_object(SV *o);
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 void *gaim_perl_ref_object(SV *o);
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36
6520
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
37 int execute_perl(const char *function, int argc, char **args);
2e2593d95121 [gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents: 6508
diff changeset
38
6566
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
39 #if 0
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
40 gboolean gaim_perl_value_from_sv(GaimValue *value, SV *sv);
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
41 SV *gaim_perl_sv_from_value(const GaimValue *value);
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
42 #endif
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
43
6920
13f78c350cd3 [gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents: 6816
diff changeset
44 void *gaim_perl_data_from_sv(GaimValue *value, SV *sv);
13f78c350cd3 [gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents: 6816
diff changeset
45 SV *gaim_perl_sv_from_vargs(const GaimValue *value, va_list *args,
6921
11d05ddf30a3 [gaim-migrate @ 7468]
Christian Hammond <chipx86@chipx86.com>
parents: 6920
diff changeset
46 void ***copy_arg);
6566
f6c2a7b5afa7 [gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
47
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 #endif /* _GAIM_PERL_COMMON_H_ */