Mercurial > pidgin.yaz
annotate plugins/perl/perl-common.h @ 13646:e8e5931e7e8d
[gaim-migrate @ 16047]
fix IRC topics
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 17 Apr 2006 14:01:11 +0000 |
parents | b457aa723bab |
children |
rev | line source |
---|---|
6508 | 1 #ifndef _GAIM_PERL_COMMON_H_ |
2 #define _GAIM_PERL_COMMON_H_ | |
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 |
12872
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
12 #include "plugin.h" |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
13 #include "value.h" |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
14 |
6508 | 15 #define is_hvref(o) \ |
16 ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) | |
17 | |
18 #define hvref(o) \ | |
19 (is_hvref(o) ? (HV *)SvRV(o) : NULL); | |
20 | |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
11170
diff
changeset
|
21 #define GAIM_PERL_BOOT_PROTO(x) \ |
12497
202ce52b77a9
[gaim-migrate @ 14809]
Richard Laager <rlaager@wiktel.com>
parents:
12419
diff
changeset
|
22 void boot_Gaim__##x(pTHX_ CV *cv); |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
11170
diff
changeset
|
23 |
6508 | 24 #define GAIM_PERL_BOOT(x) \ |
12419
455610a80747
[gaim-migrate @ 14726]
Richard Laager <rlaager@wiktel.com>
parents:
11170
diff
changeset
|
25 gaim_perl_callXS(boot_Gaim__##x, cv, mark) |
6508 | 26 |
12872
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
27 typedef struct |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
28 { |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
29 GaimPlugin *plugin; |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
30 char *package; |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
31 char *load_sub; |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
32 char *unload_sub; |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
33 char *prefs_sub; |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
34 char *gtk_prefs_sub; |
12988
b457aa723bab
[gaim-migrate @ 15341]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12872
diff
changeset
|
35 char *plugin_action_sub; |
12872
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
36 } GaimPerlScript; |
59ff3e1c874e
[gaim-migrate @ 15224]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12871
diff
changeset
|
37 |
11170 | 38 void gaim_perl_normalize_script_name(char *name); |
39 | |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
40 SV *newSVGChar(const char *str); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
41 |
6508 | 42 void gaim_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark); |
43 void gaim_perl_bless_plain(const char *stash, void *object); | |
44 SV *gaim_perl_bless_object(void *object, const char *stash); | |
45 gboolean gaim_perl_is_ref_object(SV *o); | |
46 void *gaim_perl_ref_object(SV *o); | |
47 | |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
48 int execute_perl(const char *function, int argc, char **args); |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
49 |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
50 #if 0 |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
51 gboolean gaim_perl_value_from_sv(GaimValue *value, SV *sv); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
52 SV *gaim_perl_sv_from_value(const GaimValue *value); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
53 #endif |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
54 |
6920
13f78c350cd3
[gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents:
6816
diff
changeset
|
55 void *gaim_perl_data_from_sv(GaimValue *value, SV *sv); |
13f78c350cd3
[gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents:
6816
diff
changeset
|
56 SV *gaim_perl_sv_from_vargs(const GaimValue *value, va_list *args, |
12871
2422097a7a5e
[gaim-migrate @ 15223]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12497
diff
changeset
|
57 void ***copy_arg); |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
58 |
6508 | 59 #endif /* _GAIM_PERL_COMMON_H_ */ |