~ubuntu-branches/ubuntu/natty/lua-gtk/natty

« back to all changes in this revision

Viewing changes to src/gtk/spec.lua

  • Committer: Bazaar Package Importer
  • Author(s): Enrico Tassi
  • Date: 2009-05-17 18:16:21 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090517181621-9kmdd82nxg54jsio
* new upstream snapshot comprising many more GNOME libraries:
    Gtk, GDK, GLib, Pango, Atk, Libxml2, Cairo, Clutter, Gtkhtml, 
    GtkSourceView, Gio, Gtkspell and GConf. 
* new upstream release includes a new configure script written in Lua,
  no more bashisms there (Closes: #507205)
* renamed binary packages to liblua5.1-gnome-*
* updated standards-version to 3.8.1, no changes needed
* patch to load .so.* version of libraries and not .so (that was requiring
  -dev packages) (Closes: #522087)
* removed redundant Architecture line from the source stanza of control
  (Closes: #498120)
* updated copyright file, Wolfgang Oertl holds it for 2009 too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- vim:sw=4:sts=4
 
2
 
 
3
name = "Gtk"
 
4
pkg_config_name = "gtk+-2.0"
 
5
required = true
 
6
 
 
7
libraries = {}
 
8
libraries.linux = { "/usr/lib/libgtk-x11-2.0.so" }
 
9
libraries.win32 = { "libgtk-win32-2.0-0.dll" }
 
10
 
 
11
include_dirs = { "gtk-2.0/gtk" }
 
12
 
 
13
path_gtk = "/usr/include/gtk-2.0"
 
14
 
 
15
headers = {
 
16
    { path_gtk .. "/gtk/gtkstock.h", false },
 
17
}
 
18
 
 
19
includes = { all = { "<gtk/gtk.h>" } }
 
20
 
 
21
 
 
22
-- Defines for make-xml.lua
 
23
 
 
24
-- #undef __OPTIMIZE_: Avoid trouble with -O regarding __builtin_clzl.
 
25
-- Seems to have no other side effects (XML file exactly the same).
 
26
-- Suggested by Michael Kolodziejczyk on 2007-10-23
 
27
 
 
28
defs = {}
 
29
defs.all = {
 
30
--   "#undef __OPTIMIZE__",
 
31
    "#define GTK_DISABLE_DEPRECATED 1",
 
32
    "#define GDK_DISABLE_DEPRECATED 1",
 
33
    "#define GDK_PIXBUF_ENABLE_BACKEND 1",
 
34
}
 
35
defs.win32 = {
 
36
--      "#define G_OS_WIN32",
 
37
    -- workaround for compilation error in gtk-2.0/gdk/gdk.h:189
 
38
    "#define __declspec(x)",
 
39
    "#define dllexport",
 
40
    "#define __GTK_DEBUG_H__",
 
41
}
 
42
-- defs.linux = {
 
43
--      "#define G_STDIO_NO_WRAP_ON_UNIX",
 
44
-- }
 
45
 
 
46
 
 
47
-- entry: function name = { [arg_nr]=flags, ... }
 
48
-- arg_nr start with 1 for the return value.  If only the return value is
 
49
-- specified, can be just "flags".
 
50
function_flags = {
 
51
    gtk_file_chooser_get_current_folder = CHAR_PTR,
 
52
    gtk_clipboard_get = CONST_OBJECT,
 
53
    gtk_text_tag_table_lookup = NOT_NEW_OBJECT,         -- like a _get function
 
54
    gtk_text_buffer_create_tag = NOT_NEW_OBJECT,        -- owned by text tag table
 
55
    gtk_text_buffer_create_mark = CONST_OBJECT,
 
56
    gtk_text_view_get_buffer = NOT_NEW_OBJECT,
 
57
 
 
58
    -- configuration of the char_ptr return values - whether to free the
 
59
    -- resulting string or not.
 
60
 
 
61
    gtk_file_chooser_get_current_folder = CHAR_PTR,
 
62
    gtk_file_chooser_get_filename = CHAR_PTR,
 
63
    gtk_file_chooser_get_preview_filename = CHAR_PTR,
 
64
    gtk_icon_info_get_filename = CONST_CHAR_PTR,
 
65
    gtk_icon_source_get_filename = CONST_CHAR_PTR,
 
66
 
 
67
    -- arch win32
 
68
 
 
69
    gtk_file_chooser_get_current_folder_utf8 = CHAR_PTR,
 
70
    gtk_file_chooser_get_filename_utf8 = CHAR_PTR,
 
71
    gtk_file_chooser_get_preview_filename_utf8 = CHAR_PTR,
 
72
    gtk_icon_info_get_filename_utf8 = CONST_CHAR_PTR,
 
73
    gtk_icon_source_get_filename_utf8 = CONST_CHAR_PTR,
 
74
 
 
75
    -- arch all
 
76
 
 
77
    gtk_combo_box_get_active_text = CHAR_PTR,
 
78
 
 
79
    gtk_entry_get_text = CONST_CHAR_PTR,
 
80
    gtk_file_chooser_get_uri = CHAR_PTR,
 
81
    gtk_file_chooser_get_current_folder_uri = CHAR_PTR,
 
82
    gtk_file_chooser_get_preview_uri = CHAR_PTR,
 
83
 
 
84
    gtk_about_dialog_get_comments = CONST_CHAR_PTR,
 
85
    gtk_about_dialog_get_copyright = CONST_CHAR_PTR,
 
86
    gtk_about_dialog_get_license = CONST_CHAR_PTR,
 
87
    gtk_about_dialog_get_logo_icon_name = CONST_CHAR_PTR,
 
88
    gtk_about_dialog_get_program_name = CONST_CHAR_PTR,
 
89
    gtk_about_dialog_get_translator_credits = CONST_CHAR_PTR,
 
90
    gtk_about_dialog_get_version = CONST_CHAR_PTR,
 
91
    gtk_about_dialog_get_website = CONST_CHAR_PTR,
 
92
    gtk_about_dialog_get_website_label = CONST_CHAR_PTR,
 
93
 
 
94
    gtk_window_get_title = CONST_CHAR_PTR,
 
95
    gtk_window_get_role = CONST_CHAR_PTR,
 
96
    gtk_window_get_icon_name = CONST_CHAR_PTR,
 
97
 
 
98
    -- documentation is wrong, the code is right.  A bug has been filed
 
99
    -- already.
 
100
    gtk_widget_get_composite_name = CHAR_PTR,
 
101
 
 
102
    gtk_widget_get_name = CONST_CHAR_PTR,
 
103
    gtk_widget_get_tooltip_markup = CHAR_PTR,
 
104
    gtk_widget_get_tooltip_text = CHAR_PTR,
 
105
    gtk_ui_manager_get_ui = CHAR_PTR,
 
106
 
 
107
    gtk_tree_view_column_get_title = CONST_CHAR_PTR,
 
108
    gtk_tree_path_to_string = CHAR_PTR,
 
109
    gtk_tree_model_get_string_from_iter = CHAR_PTR,
 
110
 
 
111
    gtk_tool_button_get_label = CONST_CHAR_PTR,
 
112
    gtk_tool_button_get_stock_id = CONST_CHAR_PTR,
 
113
    gtk_tool_button_get_icon_name = CONST_CHAR_PTR,
 
114
 
 
115
    gtk_text_mark_get_name = CONST_CHAR_PTR,
 
116
    gtk_text_buffer_get_slice = CHAR_PTR,
 
117
    gtk_text_buffer_get_text = CHAR_PTR,
 
118
    gtk_text_iter_get_slice = CHAR_PTR,
 
119
    gtk_text_iter_get_text = CHAR_PTR,
 
120
    gtk_text_iter_get_visible_slice = CHAR_PTR,
 
121
    gtk_text_iter_get_visible_text = CHAR_PTR,
 
122
 
 
123
    gtk_recent_chooser_get_current_uri = CHAR_PTR,
 
124
    gtk_recent_filter_get_name = CONST_CHAR_PTR,
 
125
    gtk_recent_info_get_description = CONST_CHAR_PTR,
 
126
    gtk_recent_info_get_display_name = CONST_CHAR_PTR,
 
127
    gtk_recent_info_get_mime_type = CONST_CHAR_PTR,
 
128
    gtk_recent_info_get_short_name = CHAR_PTR,
 
129
    gtk_recent_info_get_uri = CONST_CHAR_PTR,
 
130
    gtk_recent_info_get_uri_display = CHAR_PTR,
 
131
    gtk_recent_info_last_application = CHAR_PTR,
 
132
 
 
133
    gtk_print_settings_get = CONST_CHAR_PTR,
 
134
    gtk_print_settings_get_default_source = CONST_CHAR_PTR,
 
135
    gtk_print_settings_get_dither = CONST_CHAR_PTR,
 
136
    gtk_print_settings_get_finishings = CONST_CHAR_PTR,
 
137
    gtk_print_settings_get_media_type = CONST_CHAR_PTR,
 
138
    gtk_print_settings_get_output_bin = CONST_CHAR_PTR,
 
139
    gtk_print_settings_get_printer = CONST_CHAR_PTR,
 
140
 
 
141
    gtk_editable_get_chars = CHAR_PTR,
 
142
    gtk_entry_completion_get_completion_prefix = CONST_CHAR_PTR,
 
143
    gtk_expander_get_label = CONST_CHAR_PTR,
 
144
 
 
145
    -- from here on not verified!
 
146
    gtk_accelerator_get_label = CHAR_PTR,
 
147
    gtk_accelerator_name = CHAR_PTR,
 
148
    gtk_action_get_accel_path = CONST_CHAR_PTR,
 
149
    gtk_action_get_name = CONST_CHAR_PTR,
 
150
    gtk_action_group_get_name = CONST_CHAR_PTR,
 
151
    gtk_action_group_translate_string = CONST_CHAR_PTR,
 
152
    gtk_assistant_get_page_title = CONST_CHAR_PTR,
 
153
    gtk_buildable_get_name = CONST_CHAR_PTR,
 
154
    gtk_builder_get_translation_domain = CONST_CHAR_PTR,
 
155
    gtk_button_get_label = CONST_CHAR_PTR,
 
156
    gtk_check_version = CONST_CHAR_PTR,
 
157
    gtk_clipboard_wait_for_text = CHAR_PTR,
 
158
    gtk_color_button_get_title = CONST_CHAR_PTR,
 
159
    gtk_color_selection_palette_to_string = CHAR_PTR,
 
160
    gtk_combo_box_get_title = CONST_CHAR_PTR,
 
161
    gtk_file_chooser_button_get_title = CONST_CHAR_PTR,
 
162
    gtk_file_filter_get_name = CONST_CHAR_PTR,
 
163
    gtk_font_button_get_font_name = CONST_CHAR_PTR,
 
164
    gtk_font_button_get_title = CONST_CHAR_PTR,
 
165
    gtk_font_selection_dialog_get_font_name = CHAR_PTR,
 
166
    gtk_font_selection_dialog_get_preview_text = CONST_CHAR_PTR,
 
167
    gtk_font_selection_get_font_name = CHAR_PTR,
 
168
    gtk_font_selection_get_preview_text = CONST_CHAR_PTR,
 
169
    gtk_frame_get_label = CONST_CHAR_PTR,
 
170
    gtk_icon_info_get_display_name = CONST_CHAR_PTR,
 
171
    gtk_icon_size_get_name = CONST_CHAR_PTR,
 
172
    gtk_icon_source_get_icon_name = CONST_CHAR_PTR,
 
173
    gtk_icon_theme_get_example_icon_name = CHAR_PTR,
 
174
    gtk_label_get_label = CONST_CHAR_PTR,
 
175
    gtk_label_get_text = CONST_CHAR_PTR,
 
176
    gtk_link_button_get_uri = CONST_CHAR_PTR,
 
177
    gtk_menu_get_title = CONST_CHAR_PTR,
 
178
    gtk_notebook_get_menu_label_text = CONST_CHAR_PTR,
 
179
    gtk_notebook_get_tab_label_text = CONST_CHAR_PTR,
 
180
    gtk_paper_size_get_default = CONST_CHAR_PTR,
 
181
    gtk_paper_size_get_display_name = CONST_CHAR_PTR,
 
182
    gtk_paper_size_get_name = CONST_CHAR_PTR,
 
183
    gtk_paper_size_get_ppd_name = CONST_CHAR_PTR,
 
184
    gtk_print_operation_get_status_string = CONST_CHAR_PTR,
 
185
    gtk_progress_bar_get_text = CONST_CHAR_PTR,
 
186
    gtk_rc_find_module_in_path = CHAR_PTR,
 
187
    gtk_rc_find_pixmap_in_path = CHAR_PTR,
 
188
    gtk_rc_get_im_module_file = CHAR_PTR,
 
189
    gtk_rc_get_im_module_path = CHAR_PTR,
 
190
    gtk_rc_get_module_dir = CHAR_PTR,
 
191
    gtk_rc_get_theme_dir = CHAR_PTR,
 
192
    gtk_recent_chooser_get_current_uri = CHAR_PTR,
 
193
    gtk_recent_filter_get_name = CONST_CHAR_PTR,
 
194
    gtk_recent_info_get_uri_display = CHAR_PTR,
 
195
    gtk_set_locale = CHAR_PTR,
 
196
    gtk_status_icon_get_icon_name = CONST_CHAR_PTR,
 
197
    gtk_status_icon_get_stock = CONST_CHAR_PTR,
 
198
 
 
199
    -- prototypes
 
200
    ["GtkBuildableIface.get_name"] = CONST_CHAR_PTR,
 
201
    ["GtkContainerClass.composite_name"] = CHAR_PTR,
 
202
    ["GtkRecentChooserIface.get_current_uri"] = CHAR_PTR,
 
203
 
 
204
    -- verified inconsistency.
 
205
    ["gtk_action_group_set_translate_func.func"] = CONST_CHAR_PTR,
 
206
    ["gtk_stock_set_translate_func.func"] = CHAR_PTR,
 
207
 
 
208
    -- set the object->flag on some return values
 
209
    gtk_stock_list_ids = "GSLIST_FREE_GFREE",
 
210
 
 
211
}
 
212
 
 
213
-- flags that can be used by name in the function_flags table
 
214
flag_table = {
 
215
    GSLIST_FREE_GFREE       = 1,
 
216
}
 
217
 
 
218
 
 
219
 
 
220
-- extra types to include even though they are not used in functions
 
221
-- or structures:
 
222
include_types = {
 
223
    "GtkFileChooserWidget*",
 
224
    "GtkFileChooserDialog*",
 
225
    "GtkInputDialog*",
 
226
    "GtkHBox*",
 
227
    "GtkVBox*",
 
228
    "GtkDrawingArea*",
 
229
    "GtkCheckButton*",
 
230
    "GtkVSeparator*",
 
231
    "GtkHSeparator*",
 
232
    "GtkCellRendererPixbuf*",
 
233
    "GtkHPaned*",
 
234
    "GtkVPaned*",
 
235
    "GtkHScale*",
 
236
    "GtkVScale*",
 
237
 
 
238
    -- needed for GtkSourceView
 
239
    "GtkTextBuffer",
 
240
 
 
241
    "GtkLayout",                -- gtkhtml
 
242
 
 
243
    -- might be useful?
 
244
    -- GtkAccelGroup, GtkProgressBar, GtkSpinButton,
 
245
    -- GtkRadioButton
 
246
}
 
247
 
 
248
-- Functions used from the dynamic libraries (GLib, GDK, Gtk)
 
249
linklist = {
 
250
    "g_malloc",
 
251
    "g_object_ref_sink",
 
252
    "g_object_unref",
 
253
    "g_slice_alloc0",
 
254
    "g_type_check_instance_is_a",       -- used!
 
255
    "g_type_from_name",
 
256
    "g_type_is_a",
 
257
    "g_strfreev",
 
258
    "g_value_unset",
 
259
    "gdk_color_copy",
 
260
    "gtk_init",
 
261
    "gtk_object_get_type",              -- used!
 
262
    "gtk_tree_model_get_value",
 
263
    "gtk_major_version",
 
264
    "gtk_minor_version",
 
265
    "gtk_micro_version",
 
266
    "gtk_tree_model_get_column_type",
 
267
    "gtk_list_store_set_value",
 
268
}
 
269
 
 
270
-- extra settings for the module_info structure
 
271
module_info = {
 
272
    allocate_object = "gtk_allocate_object",
 
273
    call_hook = "gtk_call_hook",
 
274
    prefix_func = '"gtk_"',
 
275
    prefix_constant = '"GTK_"',
 
276
    prefix_type = '"Gtk"',
 
277
    depends = '"gdk\\0"',
 
278
    overrides = 'gtk_overrides',
 
279
}
 
280