comparison gtk/plugins/perl/common/GtkUtils.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 d6eae5115b31
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 void
7 gaim_setup_imhtml(imhtml)
8 Gtk::Widget imhtml
9
10 Gtk::Widget
11 gaim_gtk_create_imhtml(editable, imhtml_ret, toolbar_ret, sw_ret)
12 gboolean editable
13 GtkWidget ** imhtml_ret
14 GtkWidget ** toolbar_ret
15 GtkWidget ** sw_ret
16
17 void
18 gaim_gtk_toggle_sensitive(widget, to_toggle)
19 Gtk::Widget widget
20 Gtk::Widget to_toggle
21
22 void
23 gaim_gtk_set_sensitive_if_input(entry, dialog)
24 Gtk::Widget entry
25 Gtk::Widget dialog
26
27 void
28 gaim_gtk_toggle_sensitive_array(w, data)
29 Gtk::Widget w
30 GPtrArray data
31
32 void
33 gaim_gtk_toggle_showhide(widget, to_toggle)
34 Gtk::Widget widget
35 Gtk::Widget to_toggle
36
37 void
38 gaim_separator(menu)
39 Gtk::Widget menu
40
41 Gtk::Widget
42 gaim_new_item(menu, str)
43 Gtk::Widget menu
44 const char * str
45
46 Gtk::Widget
47 gaim_new_check_item(menu, str, sf, data, checked)
48 Gtk::Widget menu
49 const char * str
50 GtkSignalFunc sf
51 gpointer data
52 gboolean checked
53
54 Gtk::Widget
55 gaim_new_item_from_stock(menu, str, icon, sf, data, accel_key, accel_mods, mod)
56 Gtk::Widget menu
57 const char * str
58 const char * icon
59 GtkSignalFunc sf
60 gpointer data
61 guint accel_key
62 guint accel_mods
63 char * mod
64
65 Gtk::Widget
66 gaim_pixbuf_button_from_stock(text, icon, style)
67 const char * text
68 const char * icon
69 Gaim::ButtonOrientation style
70
71 Gtk::Widget
72 gaim_gtk_make_frame(parent, title)
73 Gtk::Widget parent
74 const char * title
75
76 Gtk::Widget
77 gaim_gtk_protocol_option_menu_new(id, cb, user_data)
78 const char * id
79 GCallback cb
80 gpointer user_data
81
82 Gtk::Widget
83 gaim_gtk_account_option_menu_new(default_account, show_all, cb, filter_func, user_data)
84 Gaim::Account account
85 gboolean show_all
86 GCallback cb
87 Gaim::Account::FilterFunc filter_func
88 gpointer user_data
89
90 Gaim::Account
91 gaim_gtk_account_option_menu_get_selected(optmenu)
92 Gtk::Widget optmenu
93
94 void
95 gaim_gtk_account_option_menu_set_selected(optmenu, account)
96 Gtk::Widget optmenu
97 Gaim::Account account
98
99 void
100 gaim_gtk_setup_screenname_autocomplete(entry, optmenu, all)
101 Gtk::Widget entry
102 Gtk::Widget optmenu
103 gboolean all
104
105 gboolean
106 gaim_gtk_check_if_dir(path, filesel)
107 const char * path
108 Gtk::FileSelection filesel
109
110 void
111 gaim_gtk_setup_gtkspell(textview)
112 Gtk::TextView textview
113
114 void
115 gaim_gtk_save_accels_cb(accel_group, arg1, arg2, arg3, data)
116 Gtk::AccelGroup accel_group
117 guint arg1
118 Gdk::ModifierType arg2
119 GClosure arg3
120 gpointer data
121 */
122
123 /* TODO This needs GaimAccount **
124 gboolean
125 gaim_gtk_parse_x_im_contact(msg, all_accounts, ret_account, ret_protocol, ret_username, ret_alias)
126 const char * msg
127 gboolean all_accounts
128 Gaim::Account ret_account
129 char ** ret_protocol
130 char ** ret_username
131 char ** ret_alias
132 */
133
134 /* This can't work at the moment since I don't have a typemap for Gtk::Widget.
135 * I thought about using the one from libgtk2-perl but wasn't sure how to go
136 * about doing that.
137 void
138 gaim_set_accessible_lable(w, l)
139 Gtk::Widget w
140 Gtk::Widget l
141
142 void
143 gaim_gtk_treeview_popup_menu_position_func(menu, x, y, push_in, user_data)
144 Gtk::Menu menu
145 gint x
146 gint y
147 gboolean push_in
148 gpointer user_data
149
150 void
151 gaim_dnd_file_manage(sd, account, who)
152 Gtk::SelectionData sd
153 Gaim::Account account
154 const char * who
155
156 void
157 gaim_gtk_buddy_icon_get_scale_size(buf, spec, width, height)
158 Gdk::Pixbuf buf
159 Gaim::Buddy::Icon::Spec spec
160 int width
161 int height
162
163 Gdk::Pixbuf
164 gaim_gtk_create_prpl_icon(account, scale_factor)
165 const Gaim::Account account
166 double scale_factor
167
168 Gdk::Pixbuf
169 gaim_gtk_create_prpl_icon_with_status(account, status_type, scale_factor)
170 const Gaim::Account account
171 Gaim::StatusType status_type
172 double scale_factor
173
174 Gdk::Pixbuf
175 gaim_gtk_create_gaim_icon_with_status(primitive, scale_factor)
176 Gaim::StatusPrimitive primitive
177 double scale_factor
178
179 void
180 gaim_gtk_append_menu_action(menu, act, gobject)
181 Gtk::Widget menu
182 Gaim::Menu::Action act
183 gpointer gobject
184
185 void
186 gaim_gtk_set_cursor(widget, cursor_type)
187 Gtk::Widget widget
188 Gdk::CursorType cursor_type
189
190 void
191 gaim_gtk_clear_cursor(widget)
192 Gtk::Widget widget
193 */
194
195 MODULE = Gaim::Gtk::Utils PACKAGE = Gaim::Gtk::Utils PREFIX = gaim_gtk_utils_
196 PROTOTYPES: ENABLE
197
198 gboolean
199 gaim_gtk_save_accels(data)
200 gpointer data
201
202 void
203 gaim_gtk_load_accels()
204
205 char *
206 gaim_gtk_convert_buddy_icon(plugin, path)
207 Gaim::Plugin plugin
208 const char * path