Mercurial > pidgin.yaz
comparison gtk/plugins/perl/common/GtkPluginPref.xs @ 14416:eeca8be382a5
[gaim-migrate @ 17124]
This is a Gaim::Gtk perl module for use by gaim plugins to get access to the
gtkgaim interface functions. It isn't complete because anything dealing with
Gtk widgets themselves doesn't work yet (I need to figure out the best way to
do that). To use this a perl plugin just needs to include 'use Gaim::Gtk;'
either on top of 'use Gaim;' or instead of it.
I'm not done with this yet.
At the moment you have to 'use Gaim;' or 'use Gaim::Gtk;' which loads all the
parts, I'm planning to let you actually say 'use Gaim::Gtk::Debug;' to just
get the gtkdebug.h functions. Though 'use Gaim' would work the same way as
always.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Sat, 02 Sep 2006 05:31:10 +0000 |
parents | |
children | 01915dd6ff85 |
comparison
equal
deleted
inserted
replaced
14415:76d345643ba4 | 14416:eeca8be382a5 |
---|---|
1 #include "gtkmodule.h" | |
2 | |
3 /* This can't work at the moment since I don't have a typemap for Gtk::Widget. | |
4 * I thought about using the one from libgtk2-perl but wasn't sure how to go | |
5 * about doing that. | |
6 Gtk::Widget | |
7 gaim_gtk_plugin_pref_create_frame(frame) | |
8 Gaim::PluginPref::Frame frame | |
9 | |
10 Gtk::Widget | |
11 gaim_gtk_prefs_checkbox(title, key, page) | |
12 const char * title | |
13 const char * key | |
14 Gtk::Widget page | |
15 | |
16 Gtk::Widget | |
17 gaim_gtk_prefs_labeled_spin_button(page, title, key, min, max, sg) | |
18 Gtk::Widget page | |
19 const gchar * title | |
20 const char * key | |
21 int min | |
22 int max | |
23 Gtk::Size::Group sg | |
24 | |
25 Gtk::Widget | |
26 gaim_gtk_prefs_labeled_entry(page, title, key, sg) | |
27 Gtk::Widget page | |
28 const gchar * title | |
29 const char * key | |
30 Gtk::Size::Group sg | |
31 */ | |
32 | |
33 /* TODO I don't know how to handle this in XS | |
34 Gtk::Widget | |
35 gaim_gtk_prefs_dropdown(page, title, type, key, ...) | |
36 Gtk::Widget page | |
37 const gchar * title | |
38 Gaim::Pref::Type type | |
39 const char * key | |
40 | |
41 */ | |
42 | |
43 /* This can't work at the moment since I don't have a typemap for Gtk::Widget. | |
44 * I thought about using the one from libgtk2-perl but wasn't sure how to go | |
45 * about doing that. | |
46 Gtk::Widget | |
47 gaim_gtk_prefs_dropdown_from_list(page, title, type, key, menuitems) | |
48 Gtk::Widget page | |
49 const gchar * title | |
50 Gaim::Pref::Type type | |
51 const char * key | |
52 SV *menuitems | |
53 PREINIT: | |
54 GList *t_GL; | |
55 int i, t_len; | |
56 CODE: | |
57 t_GL = NULL; | |
58 t_len = av_len((AV *)SvRV(menuitems)); | |
59 | |
60 for ( i = 0; i < t_len; i++) { | |
61 STRLEN t_sl; | |
62 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(menuitems), i, 0), t_sl)); | |
63 RETVAL = gaim_gtk_prefs_dropdown_from_list(page, title, type, key, t_GL); | |
64 OUTPUT: | |
65 RETVAL | |
66 */ | |
67 | |
68 MODULE = Gaim::Gtk::PluginPref PACKAGE = Gaim::Gtk::PluginPref PREFIX = gaim_gtk_plugin_pref_ | |
69 PROTOTYPES: ENABLE |