gtk-server.cfg (61984B)
1 # 2 # This is an EXAMPLE config file containing API calls used by the GTK-server. 3 # 4 # When developing your own application, feel free to change any of the 5 # definitions below to your needs. Per application you can use an individual 6 # configfile. Just put the GTK-server configfile in the same directory as your 7 # client script, as the GTK-server will look there first. 8 # 9 # Do you want to add more GTK functions? Please consult the GTK documentation 10 # at http://www.gtk.org/api/. 11 # 12 # The layout of this file is explained in the man-page: 13 # 14 # man gtk-server.cfg 15 # 16 # 17 # Happy GUIfying! 18 # Peter van Eerten 19 # 20 #--------------------------------------------------------------------------- 21 # 22 # Only when the gtk-server binary does not contain the GTK libs, these 23 # settings must be activated. For a static binary this is not necessary. 24 # 25 # Unix/BSD/Linux 26 # 27 # GTK1 backend 28 # LIB_NAME = libgtk.so, libgdk.so, libglib.so, libglade.so 29 # 30 # GTK2 backend 31 LIB_NAME = libgtk-x11-2.0.so, libgdk-x11-2.0.so, libglib-2.0.so, libgobject-2.0.so 32 LIB_NAME = libatk-1.0.so, libpango-1.0.so, libgdk_pixbuf_xlib-2.0.so 33 # 34 # Glade 35 LIB_NAME = libglade-2.0.so 36 # 37 # GtkGlarea, GtkGlExt 38 LIB_NAME = libgtkgl-2.0.so, libgtkglext-x11-1.0.so, libgdkglext-x11-1.0.so 39 # 40 # Joy, GL and GLUT can be imported also! 41 LIB_NAME = libglut.so, libGL.so 42 # 43 # Mozilla 44 LIB_NAME = libgtkembedmoz.so 45 # 46 # XForms backend 47 LIB_NAME = libforms.so, libflimage.so, libformsGL.so 48 # 49 # Optionally, define a signalnumber to send to the client 50 # program when the GTK-server exits. See also 'man 7 signal'. 51 # Examples: SIGQUIT (3) SIGKILL (9) SIGUSR1 (10) 52 # SIGPIPE (13) SIGTERM (15) 53 # 54 # EXIT_SIGNAL = 10 55 # 56 # Directory where to put the logfile if logging is enabled. 57 LOG_FILE = /tmp 58 # 59 # We can include an additional configfile here. 60 # 61 # INCLUDE = /etc/gtk-extra.cfg 62 # 63 #--------------------------------------------------------------------------- 64 # 65 # Windows 66 # 67 # GTK1 backend: 68 # LIB_NAME = libgtk-0.dll, libgdk-0.dll, libglib-2.0-0.dll, libglade.dll 69 # 70 # GTK2 backend: 71 # LIB_NAME = libgtk-win32-2.0-0.dll, libgdk-win32-2.0-0.dll, libglib-2.0-0.dll 72 # LIB_NAME = libgobject-2.0-0.dll, libatk-1.0-0.dll, libpango-1.0-0.dll, libgdk_pixbuf-2.0-0.dll 73 # LIB_NAME = libglade-2.0-0.dll 74 # 75 # Directory where to put the logfile if logging is enabled. 76 # In Windows, also use a slash forward (/) to separate directory's! 77 # LOG_FILE = c: 78 # 79 #--------------------------------------------------------------------------- 80 # 81 ## API name, callback signal type, return value, amount of arguments, arg1, arg2... 82 # 83 # GTK_WINDOW 84 # 85 FUNCTION_NAME = gtk_window_new, delete-event, WIDGET, 1, LONG 86 FUNCTION_NAME = gtk_window_set_title, NONE, NONE, 2, WIDGET, STRING 87 FUNCTION_NAME = gtk_window_get_title, NONE, STRING, 1, WIDGET 88 FUNCTION_NAME = gtk_window_set_default_size, NONE, NONE, 3, WIDGET, LONG, LONG 89 FUNCTION_NAME = gtk_window_set_position, NONE, NONE, 2, WIDGET, LONG 90 FUNCTION_NAME = gtk_window_set_resizable, NONE, NONE, 2, WIDGET, BOOL 91 FUNCTION_NAME = gtk_window_set_transient_for, NONE, NONE, 2, WIDGET, WIDGET 92 FUNCTION_NAME = gtk_window_set_modal, NONE, NONE, 2, WIDGET, BOOL 93 FUNCTION_NAME = gtk_window_maximize, NONE, NONE, 1, WIDGET 94 FUNCTION_NAME = gtk_message_dialog_new, response, WIDGET, 5, WIDGET, LONG, LONG, LONG, STRING 95 FUNCTION_NAME = gtk_message_dialog_new_with_markup, response, WIDGET, 5, WIDGET, LONG, LONG, LONG, STRING 96 FUNCTION_NAME = gtk_window_set_icon_from_file, NONE, BOOL, 3, WIDGET, STRING, NULL 97 FUNCTION_NAME = gtk_window_set_keep_above, NONE, NONE, 2, WIDGET, BOOL 98 FUNCTION_NAME = gtk_window_set_keep_below, NONE, NONE, 2, WIDGET, BOOL 99 FUNCTION_NAME = gtk_about_dialog_set_version, NONE, NONE, 2, WIDGET, STRING 100 FUNCTION_NAME = gtk_window_set_policy, NONE, NONE, 4, WIDGET, LONG, LONG, LONG 101 FUNCTION_NAME = gtk_window_fullscreen, NONE, NONE, 1, WIDGET 102 FUNCTION_NAME = gtk_window_unfullscreen, NONE, NONE, 1, WIDGET 103 FUNCTION_NAME = gtk_window_set_icon_name, NONE, NONE, 2, WIDGET, STRING 104 # 105 # Containers 106 # 107 FUNCTION_NAME = gtk_table_new, NONE, WIDGET, 3, LONG, LONG, BOOL 108 FUNCTION_NAME = gtk_table_attach_defaults, NONE, NONE, 6, WIDGET, WIDGET, LONG, LONG, LONG, LONG 109 FUNCTION_NAME = gtk_container_add, NONE, NONE, 2, WIDGET, WIDGET 110 FUNCTION_NAME = gtk_container_remove, NONE, NONE, 2, WIDGET, WIDGET 111 FUNCTION_NAME = gtk_container_set_border_width, NONE, NONE, 2, WIDGET, LONG 112 FUNCTION_NAME = gtk_hbox_new, NONE, WIDGET, 2, BOOL, LONG 113 FUNCTION_NAME = gtk_vbox_new, NONE, WIDGET, 2, BOOL, LONG 114 FUNCTION_NAME = gtk_box_pack_start, NONE, NONE, 5, WIDGET, WIDGET, BOOL, BOOL, LONG 115 FUNCTION_NAME = gtk_box_pack_end, NONE, NONE, 5, WIDGET, WIDGET, BOOL, BOOL, LONG 116 FUNCTION_NAME = gtk_box_pack_start_defaults, NONE, NONE, 2, WIDGET, WIDGET 117 FUNCTION_NAME = gtk_box_pack_end_defaults, NONE, NONE, 2, WIDGET, WIDGET 118 FUNCTION_NAME = gtk_box_set_spacing, NONE, NONE, 2, WIDGET, LONG 119 # 120 # GTK_BUTTON 121 # 122 FUNCTION_NAME = gtk_button_new, clicked, WIDGET, 0 123 FUNCTION_NAME = gtk_button_new_with_label, clicked, WIDGET, 1, STRING 124 FUNCTION_NAME = gtk_button_new_from_stock, clicked, WIDGET, 1, STRING 125 FUNCTION_NAME = gtk_button_new_with_mnemonic, clicked, WIDGET, 1, STRING 126 FUNCTION_NAME = gtk_button_set_use_stock, NONE, NONE, 2, WIDGET, BOOL 127 FUNCTION_NAME = gtk_button_set_label, NONE, NONE, 2, WIDGET, STRING 128 FUNCTION_NAME = gtk_button_set_relief, NONE, NONE, 2, WIDGET, LONG 129 # 130 # GTK_TOGGLE 131 # 132 FUNCTION_NAME = gtk_toggle_button_new, clicked, WIDGET, 0 133 FUNCTION_NAME = gtk_toggle_button_new_with_label, clicked, WIDGET, 1, STRING 134 FUNCTION_NAME = gtk_toggle_button_get_active, NONE, BOOL, 1, WIDGET 135 FUNCTION_NAME = gtk_toggle_button_set_active, NONE, NONE, 2, WIDGET, BOOL 136 # 137 # GTK_CHECK_BUTTON 138 # 139 FUNCTION_NAME = gtk_check_button_new_with_label, clicked, WIDGET, 1, STRING 140 # 141 # GTK_ENTRY 142 # 143 FUNCTION_NAME = gtk_entry_new, activate, WIDGET, 0 144 FUNCTION_NAME = gtk_entry_get_text, NONE, STRING, 1, WIDGET 145 FUNCTION_NAME = gtk_entry_set_text, NONE, NONE, 2, WIDGET, STRING 146 FUNCTION_NAME = gtk_entry_set_visibility, NONE, NONE, 2, WIDGET, BOOL 147 # 148 # GTK_EDITABLE 149 # 150 FUNCTION_NAME = gtk_editable_delete_text, NONE, NONE, 3, WIDGET, LONG, LONG 151 FUNCTION_NAME = gtk_editable_get_chars, NONE, STRING, 3, WIDGET, LONG, LONG 152 FUNCTION_NAME = gtk_editable_set_editable, NONE, NONE, 2, WIDGET, BOOL 153 FUNCTION_NAME = gtk_editable_select_region, NONE, NONE, 3, WIDGET, LONG, LONG 154 FUNCTION_NAME = gtk_editable_set_position, NONE, NONE, 2, WIDGET, LONG 155 FUNCTION_NAME = gtk_editable_get_position, NONE, LONG, 1, WIDGET 156 FUNCTION_NAME = gtk_editable_get_selection_bounds, NONE, BOOL, 3, WIDGET, PTR_LONG, PTR_LONG 157 FUNCTION_NAME = gtk_editable_insert_text, NONE, NONE, 4, WIDGET, STRING, LONG, PTR_LONG 158 # 159 # GTK_TEXT_VIEW related(GTK2.x) 160 # 161 FUNCTION_NAME = gtk_text_buffer_new, NONE, WIDGET, 1, NULL 162 FUNCTION_NAME = gtk_text_buffer_set_text, NONE, NONE, 3, WIDGET, STRING, LONG 163 FUNCTION_NAME = gtk_text_buffer_insert_at_cursor, NONE, NONE, 3, WIDGET, STRING, LONG 164 FUNCTION_NAME = gtk_text_buffer_get_insert, NONE, WIDGET, 1, WIDGET 165 FUNCTION_NAME = gtk_text_buffer_get_start_iter, NONE, NONE, 2, WIDGET, WIDGET 166 FUNCTION_NAME = gtk_text_buffer_get_end_iter, NONE, NONE, 2, WIDGET, WIDGET 167 FUNCTION_NAME = gtk_text_buffer_get_bounds, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 168 FUNCTION_NAME = gtk_text_buffer_get_selection_bounds, NONE, BOOL, 3, WIDGET, WIDGET, WIDGET 169 FUNCTION_NAME = gtk_text_buffer_get_iter_at_offset, NONE, NONE, 3, WIDGET, WIDGET, LONG 170 FUNCTION_NAME = gtk_text_buffer_get_text, NONE, STRING, 4, WIDGET, WIDGET, WIDGET, BOOL 171 FUNCTION_NAME = gtk_text_buffer_insert, NONE, NONE, 4, WIDGET, WIDGET, STRING, LONG 172 FUNCTION_NAME = gtk_text_buffer_create_tag, NONE, WIDGET, 5, WIDGET, STRING, STRING, LONG, NULL 173 FUNCTION_NAME = gtk_text_buffer_insert_with_tags_by_name, NONE, NONE, 8, WIDGET, WIDGET, STRING, LONG, STRING, STRING, STRING, NULL 174 FUNCTION_NAME = gtk_text_buffer_apply_tag_by_name, NONE, NONE, 4, WIDGET, STRING, WIDGET, WIDGET 175 FUNCTION_NAME = gtk_text_buffer_remove_tag_by_name, NONE, NONE, 4, WIDGET, STRING, WIDGET, WIDGET 176 FUNCTION_NAME = gtk_text_buffer_remove_all_tags, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 177 FUNCTION_NAME = gtk_text_buffer_get_tag_table, NONE, WIDGET, 1, WIDGET 178 FUNCTION_NAME = gtk_text_buffer_select_range, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 179 FUNCTION_NAME = gtk_text_buffer_get_selection_bound, NONE, WIDGET, 1, WIDGET 180 FUNCTION_NAME = gtk_text_buffer_get_line_count, NONE, LONG, 1, WIDGET 181 FUNCTION_NAME = gtk_text_buffer_create_mark, NONE, WIDGET, 4, WIDGET, STRING, WIDGET, BOOL 182 FUNCTION_NAME = gtk_text_buffer_get_iter_at_mark, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 183 FUNCTION_NAME = gtk_text_buffer_get_iter_at_line, NONE, NONE, 3, WIDGET, WIDGET, LONG 184 FUNCTION_NAME = gtk_text_buffer_delete, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 185 FUNCTION_NAME = gtk_text_buffer_delete_mark, NONE, NONE, 2, WIDGET, WIDGET 186 FUNCTION_NAME = gtk_text_buffer_delete_mark_by_name, NONE, NONE, 2, WIDGET, STRING 187 FUNCTION_NAME = gtk_text_buffer_place_cursor, NONE, NONE, 2, WIDGET, WIDGET 188 FUNCTION_NAME = gtk_text_buffer_copy_clipboard, NONE, NONE, 2, WIDGET, WIDGET 189 FUNCTION_NAME = gtk_text_buffer_cut_clipboard, NONE, NONE, 3, WIDGET, WIDGET, BOOL 190 FUNCTION_NAME = gtk_text_buffer_paste_clipboard, NONE, NONE, 4, WIDGET, WIDGET, NULL, BOOL 191 FUNCTION_NAME = gtk_scrolled_window_new, NONE, WIDGET, 2, NULL, NULL 192 FUNCTION_NAME = gtk_scrolled_window_set_policy, NONE, NONE, 3, WIDGET, LONG, LONG 193 FUNCTION_NAME = gtk_scrolled_window_set_shadow_type, NONE, NONE, 2, WIDGET, LONG 194 FUNCTION_NAME = gtk_scrolled_window_add_with_viewport, NONE, NONE, 2, WIDGET, WIDGET 195 FUNCTION_NAME = gtk_scrolled_window_get_hadjustment, NONE, WIDGET, 1, WIDGET 196 FUNCTION_NAME = gtk_scrolled_window_get_vadjustment, NONE, WIDGET, 1, WIDGET 197 FUNCTION_NAME = gtk_scrolled_window_set_hadjustment, NONE, NONE, 2, WIDGET, WIDGET 198 FUNCTION_NAME = gtk_scrolled_window_set_vadjustment, NONE, NONE, 2, WIDGET, WIDGET 199 FUNCTION_NAME = gtk_scrolled_window_set_placement, NONE, NONE, 2, WIDGET, LONG 200 FUNCTION_NAME = gtk_text_view_new_with_buffer, NONE, WIDGET, 1, WIDGET 201 FUNCTION_NAME = gtk_text_view_set_wrap_mode, NONE, NONE, 2, WIDGET, LONG 202 FUNCTION_NAME = gtk_text_view_set_editable, NONE, NONE, 2, WIDGET, BOOL 203 FUNCTION_NAME = gtk_text_view_set_border_window_size, NONE, NONE, 3, WIDGET, LONG, LONG 204 FUNCTION_NAME = gtk_text_view_move_mark_onscreen, NONE, BOOL, 2, WIDGET, WIDGET 205 FUNCTION_NAME = gtk_text_view_scroll_to_mark, NONE, NONE, 6, WIDGET, WIDGET, DOUBLE, BOOL, DOUBLE, DOUBLE 206 FUNCTION_NAME = gtk_text_view_scroll_mark_onscreen, NONE, NONE, 2, WIDGET, WIDGET 207 FUNCTION_NAME = gtk_text_view_set_pixels_inside_wrap, NONE, NONE, 2, WIDGET, LONG 208 FUNCTION_NAME = gtk_text_view_get_pixels_inside_wrap, NONE, LONG, 1, WIDGET 209 FUNCTION_NAME = gtk_text_view_set_pixels_above_lines, NONE, NONE, 2, WIDGET, LONG 210 FUNCTION_NAME = gtk_text_view_get_pixels_above_lines, NONE, LONG, 1, WIDGET 211 FUNCTION_NAME = gtk_text_view_set_cursor_visible, NONE, NONE, 2, WIDGET, BOOL 212 FUNCTION_NAME = gtk_text_view_window_to_buffer_coords, NONE, NONE, 6, WIDGET, LONG, LONG, LONG, WIDGET, WIDGET 213 FUNCTION_NAME = gtk_text_iter_forward_search, NONE, BOOL, 6, WIDGET, STRING, LONG, WIDGET, WIDGET, NULL 214 FUNCTION_NAME = gtk_text_iter_forward_visible_cursor_position, NONE, BOOL, 1, WIDGET 215 FUNCTION_NAME = gtk_text_iter_forward_to_line_end, NONE, BOOL, 1, WIDGET 216 FUNCTION_NAME = gtk_text_iter_set_line, NONE, NONE, 2, WIDGET, LONG 217 FUNCTION_NAME = gtk_text_iter_set_line_offset, NONE, NONE, 2, WIDGET, LONG 218 FUNCTION_NAME = gtk_text_iter_set_line_index, NONE, NONE, 2, WIDGET, LONG 219 FUNCTION_NAME = gtk_text_iter_get_text, NONE, STRING, 2, WIDGET, WIDGET 220 FUNCTION_NAME = gtk_text_iter_get_line, NONE, LONG, 1, WIDGET 221 FUNCTION_NAME = gtk_text_view_new, NONE, WIDGET, 0 222 FUNCTION_NAME = gtk_text_view_get_buffer, NONE, WIDGET, 1, WIDGET 223 FUNCTION_NAME = gtk_text_tag_table_remove, NONE, NONE, 2, WIDGET, WIDGET 224 # 225 # GTK_TEXT 226 # 227 FUNCTION_NAME = gtk_text_new, NONE, WIDGET, 2, NULL, NULL 228 FUNCTION_NAME = gtk_text_set_editable, NONE, NONE, 2, WIDGET, BOOL 229 FUNCTION_NAME = gtk_text_insert, NONE, NONE, 6, WIDGET, NULL, NULL, NULL, STRING, LONG 230 FUNCTION_NAME = gtk_text_set_adjustments, NONE, NONE, 3, WIDGET, NULL, WIDGET 231 FUNCTION_NAME = gtk_text_get_length, NONE, LONG, 1, WIDGET 232 FUNCTION_NAME = gtk_text_set_word_wrap, NONE, NONE, 2, WIDGET, BOOL 233 FUNCTION_NAME = gtk_text_backward_delete, NONE, BOOL, 2, WIDGET, LONG 234 FUNCTION_NAME = gtk_text_forward_delete, NONE, BOOL, 2, WIDGET, LONG 235 FUNCTION_NAME = gtk_text_set_point, NONE, NONE, 2, WIDGET, LONG 236 # 237 # GDK functions and drawing stuff 238 # 239 FUNCTION_NAME = gdk_font_load, NONE, WIDGET, 1, STRING 240 FUNCTION_NAME = gdk_pixmap_new, NONE, WIDGET, 4, WIDGET, LONG, LONG, LONG 241 FUNCTION_NAME = gdk_pixmap_unref, NONE, NONE, 1, WIDGET 242 FUNCTION_NAME = gdk_pixmap_create_from_xpm, NONE, WIDGET, 4, WIDGET, NULL, NULL, STRING 243 FUNCTION_NAME = gdk_pixmap_colormap_create_from_xpm, NONE, WIDGET, 5, NULL, WIDGET, NULL, NULL, STRING 244 FUNCTION_NAME = gdk_draw_rectangle, NONE, NONE, 7, WIDGET, WIDGET, BOOL, LONG, LONG, LONG, LONG 245 FUNCTION_NAME = gdk_draw_arc, NONE, NONE, 9, WIDGET, WIDGET, BOOL, LONG, LONG, LONG, LONG, LONG, LONG 246 FUNCTION_NAME = gdk_draw_line, NONE, NONE, 6, WIDGET, WIDGET, LONG, LONG, LONG, LONG 247 FUNCTION_NAME = gdk_draw_point, NONE, NONE, 4, WIDGET, WIDGET, LONG, LONG 248 FUNCTION_NAME = gdk_draw_layout, NONE, NONE, 5, WIDGET, WIDGET, LONG, LONG, WIDGET 249 FUNCTION_NAME = gdk_draw_layout_with_colors, NONE, NONE, 7, WIDGET, WIDGET, LONG, LONG, WIDGET, WIDGET, WIDGET 250 FUNCTION_NAME = gdk_draw_drawable, NONE, NONE, 9, WIDGET, WIDGET, WIDGET, LONG, LONG, LONG, LONG, LONG, LONG 251 FUNCTION_NAME = gdk_gc_new, NONE, WIDGET, 1, WIDGET 252 FUNCTION_NAME = gdk_gc_set_rgb_fg_color, NONE, NONE, 2, WIDGET, WIDGET 253 FUNCTION_NAME = gdk_gc_set_rgb_bg_color, NONE, NONE, 2, WIDGET, WIDGET 254 FUNCTION_NAME = gdk_gc_set_foreground, NONE, NONE, 2, WIDGET, WIDGET 255 FUNCTION_NAME = gdk_gc_set_background, NONE, NONE, 2, WIDGET, WIDGET 256 FUNCTION_NAME = gdk_gc_set_colormap, NONE, NONE, 2, WIDGET, WIDGET 257 FUNCTION_NAME = gdk_color_alloc, NONE, LONG, 2, WIDGET, WIDGET 258 FUNCTION_NAME = gdk_color_parse, NONE, NONE, 2, STRING, WIDGET 259 FUNCTION_NAME = gdk_colormap_get_system, NONE, WIDGET, 0 260 FUNCTION_NAME = gdk_colormap_alloc_color, NONE, BOOL, 4, WIDGET, WIDGET, BOOL, BOOL 261 FUNCTION_NAME = gdk_get_default_root_window, NONE, WIDGET, 0 262 FUNCTION_NAME = gdk_rgb_find_color, NONE, NONE, 2, WIDGET, WIDGET 263 FUNCTION_NAME = gdk_drawable_set_colormap, NONE, NONE, 2, WIDGET, WIDGET 264 FUNCTION_NAME = gdk_drawable_get_size, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 265 FUNCTION_NAME = gdk_keymap_translate_keyboard_state, NONE, BOOL, 8, NULL, LONG, LONG, LONG, WIDGET, NULL, NULL, NULL 266 FUNCTION_NAME = gdk_window_process_all_updates, NONE, NONE, 0 267 FUNCTION_NAME = gdk_window_freeze_updates, NONE, NONE, 1, WIDGET 268 FUNCTION_NAME = gdk_window_thaw_updates, NONE, NONE, 1, WIDGET 269 FUNCTION_NAME = gdk_window_get_geometry, NONE, NONE, 6, WIDGET, NULL, NULL, WIDGET, STRING, NULL 270 FUNCTION_NAME = gdk_screen_get_default, NONE, WIDGET, 0 271 FUNCTION_NAME = gdk_screen_get_width, NONE, LONG, 1, WIDGET 272 FUNCTION_NAME = gdk_screen_get_height, NONE, LONG, 1, WIDGET 273 FUNCTION_NAME = gdk_screen_width, NONE, LONG, 0 274 FUNCTION_NAME = gdk_screen_height, NONE, LONG, 0 275 FUNCTION_NAME = gdk_flush, NONE, NONE, 0 276 FUNCTION_NAME = gdk_init, NONE, NONE, 2, NULL, NULL 277 FUNCTION_NAME = gdk_display_get_default, NONE, WIDGET, 0 278 FUNCTION_NAME = gdk_display_get_pointer, NONE, NONE, 5, WIDGET, NULL, WIDGET, WIDGET, NULL 279 FUNCTION_NAME = gdk_cursor_new, NONE, WIDGET, 1, LONG 280 FUNCTION_NAME = gdk_window_set_cursor, NONE, NONE, 2, WIDGET, WIDGET 281 FUNCTION_NAME = gdk_window_get_pointer, NONE, WIDGET, 4, WIDGET, PTR_LONG, PTR_LONG, PTR_WIDGET 282 # 283 # GTK functions for drawings 284 # 285 FUNCTION_NAME = gtk_image_new, NONE, WIDGET, 0 286 FUNCTION_NAME = gtk_image_new_from_pixmap, NONE, WIDGET, 2, WIDGET, WIDGET 287 FUNCTION_NAME = gtk_image_set_from_pixbuf, NONE, WIDGET, 2, WIDGET, WIDGET 288 FUNCTION_NAME = gtk_image_set_from_pixmap, NONE, NONE, 3, WIDGET, WIDGET, NULL 289 FUNCTION_NAME = gtk_image_set, NONE, NONE, 3, WIDGET, WIDGET, NULL 290 FUNCTION_NAME = gtk_image_set_from_file, NONE, NONE, 2, WIDGET, STRING 291 FUNCTION_NAME = gtk_image_new_from_file, NONE, WIDGET, 1, STRING 292 FUNCTION_NAME = gtk_image_new_from_stock, NONE, WIDGET, 2, STRING, LONG 293 FUNCTION_NAME = gtk_pixmap_new, NONE, WIDGET, 2, WIDGET, NULL 294 FUNCTION_NAME = gtk_drawing_area_new, NONE, WIDGET, 0 295 FUNCTION_NAME = gtk_widget_queue_draw, NONE, NONE, 1, WIDGET 296 FUNCTION_NAME = gtk_widget_get_colormap, NONE, WIDGET, 1, WIDGET 297 FUNCTION_NAME = gtk_widget_get_parent_window, NONE, WIDGET, 1, WIDGET 298 FUNCTION_NAME = gtk_widget_create_pango_layout, NONE, WIDGET, 2, WIDGET, STRING 299 # 300 # GTK_SCROLLBARS 301 # 302 FUNCTION_NAME = gtk_vscrollbar_new, NONE, WIDGET, 1, WIDGET 303 # 304 # GTK_LABEL 305 # 306 FUNCTION_NAME = gtk_label_new, NONE, WIDGET, 1, STRING 307 FUNCTION_NAME = gtk_label_set_text, NONE, NONE, 2, WIDGET, STRING 308 FUNCTION_NAME = gtk_label_get_text, NONE, STRING, 1, WIDGET 309 FUNCTION_NAME = gtk_label_set_line_wrap, NONE, NONE, 2, WIDGET, BOOL 310 FUNCTION_NAME = gtk_label_set_selectable, NONE, NONE, 2, WIDGET, BOOL 311 FUNCTION_NAME = gtk_label_set_use_markup, NONE, NONE, 2, WIDGET, BOOL 312 FUNCTION_NAME = gtk_label_set_justify, NONE, NONE, 2, WIDGET, LONG 313 FUNCTION_NAME = gtk_label_get_width_chars, NONE, LONG, 1, WIDGET 314 FUNCTION_NAME = gtk_label_get_max_width_chars, NONE, LONG, 1, WIDGET 315 FUNCTION_NAME = gtk_label_set_markup_with_mnemonic, NONE, NONE, 2, WIDGET, STRING 316 # 317 # GTK_FRAME 318 # 319 FUNCTION_NAME = gtk_frame_new, NONE, WIDGET, 1, NULL 320 FUNCTION_NAME = gtk_frame_set_label_align, NONE, NONE, 3, WIDGET, FLOAT, FLOAT 321 FUNCTION_NAME = gtk_frame_set_label, NONE, NONE, 2, WIDGET, STRING 322 FUNCTION_NAME = gtk_frame_get_label, NONE, STRING, 1, WIDGET 323 FUNCTION_NAME = gtk_aspect_frame_new, NONE, WIDGET, 5, STRING, FLOAT, FLOAT, FLOAT, BOOL 324 FUNCTION_NAME = gtk_aspect_frame_set, NONE, NONE, 5, WIDGET, FLOAT, FLOAT, FLOAT, BOOL 325 # 326 # GTK_RADIO_BUTTON 327 # 328 FUNCTION_NAME = gtk_radio_button_new, clicked, WIDGET, 1, NULL 329 FUNCTION_NAME = gtk_radio_button_new_with_label, clicked, WIDGET, 2, WIDGET, STRING 330 FUNCTION_NAME = gtk_radio_button_new_from_widget, clicked, WIDGET, 1, WIDGET 331 FUNCTION_NAME = gtk_radio_button_new_with_label_from_widget, clicked, WIDGET, 2, WIDGET, STRING 332 # 333 # GTK_NOTEBOOK 334 # 335 FUNCTION_NAME = gtk_notebook_new, NONE, WIDGET, 0 336 FUNCTION_NAME = gtk_notebook_set_tab_pos, NONE, NONE, 2, WIDGET, LONG 337 FUNCTION_NAME = gtk_notebook_popup_enable, NONE, NONE, 1, WIDGET 338 FUNCTION_NAME = gtk_notebook_popup_disable, NONE, NONE, 1, WIDGET 339 FUNCTION_NAME = gtk_notebook_get_n_pages, NONE, LONG, 1, WIDGET 340 FUNCTION_NAME = gtk_notebook_get_nth_page, NONE, WIDGET, 2, WIDGET, LONG 341 FUNCTION_NAME = gtk_notebook_append_page, NONE, LONG, 3, WIDGET, WIDGET, WIDGET 342 FUNCTION_NAME = gtk_notebook_insert_page, NONE, LONG, 4, WIDGET, WIDGET, WIDGET, LONG 343 FUNCTION_NAME = gtk_notebook_remove_page, NONE, NONE, 2, WIDGET, LONG 344 FUNCTION_NAME = gtk_notebook_get_current_page, NONE, LONG, 1, WIDGET 345 FUNCTION_NAME = gtk_notebook_get_menu_label, NONE, WIDGET, 2, WIDGET, WIDGET 346 FUNCTION_NAME = gtk_notebook_set_page, NONE, NONE, 2, WIDGET, LONG 347 FUNCTION_NAME = gtk_notebook_set_current_page, NONE, NONE, 2, WIDGET, LONG 348 FUNCTION_NAME = gtk_notebook_set_tab_label_text, NONE, NONE, 3, WIDGET, WIDGET, STRING 349 FUNCTION_NAME = gtk_notebook_set_scrollable, NONE, NONE, 2, WIDGET, LONG 350 FUNCTION_NAME = gtk_notebook_set_tab_reorderable, NONE, NONE, 3, WIDGET, WIDGET, BOOL 351 # 352 # GTK_ADJUSTMENT 353 # 354 FUNCTION_NAME = gtk_adjustment_new, NONE, WIDGET, 6, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE 355 FUNCTION_NAME = gtk_adjustment_get_value, NONE, DOUBLE, 1, WIDGET 356 FUNCTION_NAME = gtk_adjustment_set_value, NONE, NONE, 2, WIDGET, DOUBLE 357 FUNCTION_NAME = gtk_adjustment_clamp_page, NONE, NONE, 3, WIDGET, DOUBLE, DOUBLE 358 # 359 # GTK_RANGE 360 # 361 FUNCTION_NAME = gtk_range_get_adjustment, NONE, WIDGET, 1, WIDGET 362 FUNCTION_NAME = gtk_range_get_value, NONE, DOUBLE, 1, WIDGET 363 FUNCTION_NAME = gtk_range_set_value, NONE, NONE, 2, WIDGET, DOUBLE 364 # 365 # GTK_SCALE 366 # 367 FUNCTION_NAME = gtk_scale_set_draw_value, NONE, NONE, 2, WIDGET, BOOL 368 FUNCTION_NAME = gtk_scale_set_value_pos, NONE, NONE, 2, WIDGET, LONG 369 # 370 # GTK_HSCALE 371 # 372 FUNCTION_NAME = gtk_hscale_new, value-changed, WIDGET, 1, WIDGET 373 FUNCTION_NAME = gtk_hscale_new_with_range, value-changed, WIDGET, 3, DOUBLE, DOUBLE, DOUBLE 374 # 375 # GTK_VSCALE 376 # 377 FUNCTION_NAME = gtk_vscale_new_with_range, value-changed, WIDGET, 3, DOUBLE, DOUBLE, DOUBLE 378 # 379 # GTK_SPIN 380 # 381 FUNCTION_NAME = gtk_spin_button_new, NONE, WIDGET, 3, WIDGET, DOUBLE, LONG 382 FUNCTION_NAME = gtk_spin_button_new_with_range, NONE, WIDGET, 3, DOUBLE, DOUBLE, DOUBLE 383 FUNCTION_NAME = gtk_spin_button_get_value_as_int, NONE, LONG, 1, WIDGET 384 FUNCTION_NAME = gtk_spin_button_get_value, NONE, FLOAT, 1, WIDGET 385 FUNCTION_NAME = gtk_spin_button_set_wrap, NONE, NONE, 2, WIDGET, BOOL 386 FUNCTION_NAME = gtk_spin_button_set_value, NONE, NONE, 2, WIDGET, DOUBLE 387 # 388 # GTK_ARROW 389 # 390 FUNCTION_NAME = gtk_arrow_new, NONE, WIDGET, 2, LONG, LONG 391 # 392 # File selector 393 # 394 FUNCTION_NAME = gtk_file_chooser_dialog_new, NONE, WIDGET, 8, STRING, WIDGET, LONG, STRING, LONG, STRING, LONG, NULL 395 FUNCTION_NAME = gtk_file_chooser_widget_new, NONE, WIDGET, 1, LONG 396 FUNCTION_NAME = gtk_dialog_run, NONE, LONG, 1, WIDGET 397 FUNCTION_NAME = gtk_file_chooser_get_filename, NONE, STRING, 1, WIDGET 398 FUNCTION_NAME = gtk_file_chooser_get_uri, NONE, STRING, 1, WIDGET 399 FUNCTION_NAME = gtk_file_chooser_get_current_folder, NONE, STRING, 1, WIDGET 400 FUNCTION_NAME = gtk_file_chooser_set_filename, NONE, BOOL, 2, WIDGET, STRING 401 FUNCTION_NAME = gtk_file_filter_new, NONE, WIDGET, 0 402 FUNCTION_NAME = gtk_file_filter_add_pattern, NONE, NONE, 2, WIDGET, STRING 403 FUNCTION_NAME = gtk_file_filter_set_name, NONE, NONE, 2, WIDGET, STRING 404 FUNCTION_NAME = gtk_file_chooser_add_filter, NONE, NONE, 2, WIDGET, WIDGET 405 FUNCTION_NAME = gtk_file_chooser_set_select_multiple, NONE, NONE, 2, WIDGET, BOOL 406 # 407 # FONT selector 408 # 409 FUNCTION_NAME = gtk_font_selection_dialog_new, button-press-event, WIDGET, 1, STRING 410 FUNCTION_NAME = gtk_font_selection_dialog_get_font_name, NONE, STRING, 1, WIDGET 411 FUNCTION_NAME = gtk_font_selection_new, NONE, WIDGET, 0 412 FUNCTION_NAME = gtk_font_selection_get_font_name, NONE, STRING, 1, WIDGET 413 FUNCTION_NAME = gtk_font_selection_set_font_name, NONE, BOOL, 2, WIDGET, STRING 414 # 415 # Color selections 416 # 417 FUNCTION_NAME = gtk_color_selection_new, NONE, WIDGET, 0 418 FUNCTION_NAME = gtk_color_selection_set_has_opacity_control, NONE, NONE, 2, WIDGET, BOOL 419 FUNCTION_NAME = gtk_color_selection_set_current_color, NONE, NONE, 2, WIDGET, STRING 420 FUNCTION_NAME = gtk_color_selection_get_current_color, NONE, NONE, 2, WIDGET, WIDGET 421 FUNCTION_NAME = gtk_color_selection_set_color, NONE, NONE, 2, WIDGET, STRING 422 # 423 # Menubar 424 # 425 FUNCTION_NAME = gtk_menu_bar_new, NONE, WIDGET, 0 426 FUNCTION_NAME = gtk_menu_shell_append, NONE, NONE, 2, WIDGET, WIDGET 427 FUNCTION_NAME = gtk_menu_item_new, activate, WIDGET, 0 428 FUNCTION_NAME = gtk_menu_item_new_with_label, activate, WIDGET, 1, STRING 429 FUNCTION_NAME = gtk_menu_item_new_with_mnemonic, activate, WIDGET, 1, STRING 430 FUNCTION_NAME = gtk_tearoff_menu_item_new, activate, WIDGET, 0 431 FUNCTION_NAME = gtk_separator_menu_item_new, NONE, WIDGET, 0 432 FUNCTION_NAME = gtk_menu_new, NONE, WIDGET, 0 433 FUNCTION_NAME = gtk_menu_set_title, NONE, NONE, 2, WIDGET, STRING 434 FUNCTION_NAME = gtk_menu_item_set_right_justified, NONE, NONE, 2, WIDGET, BOOL 435 FUNCTION_NAME = gtk_menu_item_set_submenu, NONE, NONE, 2, WIDGET, WIDGET 436 FUNCTION_NAME = gtk_check_menu_item_new_with_label, activate, WIDGET, 1, STRING 437 FUNCTION_NAME = gtk_check_menu_item_new_with_mnemonic, activate, WIDGET, 1, STRING 438 FUNCTION_NAME = gtk_check_menu_item_get_active, NONE, BOOL, 1, WIDGET 439 FUNCTION_NAME = gtk_check_menu_item_set_active, NONE, NONE, 2, WIDGET, BOOL 440 FUNCTION_NAME = gtk_menu_popup, NONE, NONE, 7, WIDGET, NULL, NULL, NULL, NULL, LONG, LONG 441 # 442 # GTK_PROGRESS_BAR 443 # 444 FUNCTION_NAME = gtk_progress_bar_new, NONE, WIDGET, 0 445 FUNCTION_NAME = gtk_progress_bar_set_text, NONE, NONE, 2, WIDGET, STRING 446 FUNCTION_NAME = gtk_progress_bar_set_fraction, NONE, NONE, 2, WIDGET, DOUBLE 447 FUNCTION_NAME = gtk_progress_bar_pulse, NONE, NONE, 1, WIDGET 448 FUNCTION_NAME = gtk_progress_bar_set_pulse_step, NONE, NONE, 2, WIDGET, DOUBLE 449 FUNCTION_NAME = gtk_progress_configure, NONE, NONE, 4, WIDGET, DOUBLE, DOUBLE, DOUBLE 450 FUNCTION_NAME = gtk_progress_set_value, NONE, NONE, 2, WIDGET, DOUBLE 451 # 452 # GTK_STATUS_BAR 453 # 454 FUNCTION_NAME = gtk_statusbar_new, NONE, WIDGET, 0 455 FUNCTION_NAME = gtk_statusbar_get_context_id, NONE, LONG, 2, WIDGET, STRING 456 FUNCTION_NAME = gtk_statusbar_push, NONE, LONG, 3, WIDGET, LONG, STRING 457 FUNCTION_NAME = gtk_statusbar_pop, NONE, NONE, 2, WIDGET, LONG 458 FUNCTION_NAME = gtk_statusbar_remove, NONE, NONE, 3, WIDGET, LONG, LONG 459 FUNCTION_NAME = gtk_statusbar_set_has_resize_grip, NONE, NONE, 2, WIDGET, BOOL 460 # 461 # EVENT_BOX 462 # 463 FUNCTION_NAME = gtk_event_box_new, NONE, WIDGET, 0 464 # 465 # COMBO BOX - only with GTK 2.4.x or higher 466 # 467 FUNCTION_NAME = gtk_combo_box_new_text, changed, WIDGET, 0 468 FUNCTION_NAME = gtk_combo_box_append_text, NONE, NONE, 2, WIDGET, STRING 469 FUNCTION_NAME = gtk_combo_box_insert_text, NONE, NONE, 3, WIDGET, LONG, STRING 470 FUNCTION_NAME = gtk_combo_box_prepend_text, NONE, NONE, 2, WIDGET, STRING 471 FUNCTION_NAME = gtk_combo_box_remove_text, NONE, NONE, 2, WIDGET, LONG 472 FUNCTION_NAME = gtk_combo_box_get_active, NONE, LONG, 1, WIDGET 473 FUNCTION_NAME = gtk_combo_box_set_active, NONE, NONE, 2, WIDGET, LONG 474 FUNCTION_NAME = gtk_combo_box_get_active_text, NONE, STRING, 1, WIDGET 475 # 476 # SEPARATORS 477 # 478 FUNCTION_NAME = gtk_vseparator_new, NONE, WIDGET, 0 479 FUNCTION_NAME = gtk_hseparator_new, NONE, WIDGET, 0 480 # 481 # Clipboards 482 # 483 FUNCTION_NAME = gtk_editable_copy_clipboard, NONE, NONE, 1, WIDGET 484 FUNCTION_NAME = gtk_editable_cut_clipboard, NONE, NONE, 1, WIDGET 485 FUNCTION_NAME = gtk_editable_paste_clipboard, NONE, NONE, 1, WIDGET 486 FUNCTION_NAME = gdk_atom_intern, NONE, WIDGET, 2, STRING, LONG 487 FUNCTION_NAME = gtk_clipboard_get, NONE, WIDGET, 1, LONG 488 FUNCTION_NAME = gtk_clipboard_set_text, NONE, NONE, 3, WIDGET, STRING, LONG 489 FUNCTION_NAME = gtk_clipboard_wait_for_text, NONE, STRING, 1, WIDGET 490 # 491 # CLists (GTK 1.x, obsolete in GTK2) 492 # 493 FUNCTION_NAME = gtk_clist_new, select-row, WIDGET, 1, LONG 494 FUNCTION_NAME = gtk_clist_set_column_title, NONE, NONE, 3, WIDGET, LONG, STRING 495 FUNCTION_NAME = gtk_clist_column_titles_show, NONE, NONE, 1, WIDGET 496 FUNCTION_NAME = gtk_clist_append, NONE, LONG, 2, WIDGET, WIDGET 497 FUNCTION_NAME = gtk_clist_set_text, NONE, NONE, 4, WIDGET, LONG, LONG, STRING 498 # 499 # GTK fixed 500 # 501 FUNCTION_NAME = gtk_fixed_new, NONE, WIDGET, 0 502 FUNCTION_NAME = gtk_fixed_put, NONE, NONE, 4, WIDGET, WIDGET, LONG, LONG 503 FUNCTION_NAME = gtk_fixed_move, NONE, NONE, 4, WIDGET, WIDGET, LONG, LONG 504 # 505 # Lists (GTK2.x) defined for 1 column with strings 506 # Redefine with 'gtk_server_redefine' if necessary 507 # 508 FUNCTION_NAME = gtk_list_store_new, NONE, WIDGET, 2, LONG, LONG 509 FUNCTION_NAME = gtk_list_store_append, NONE, NONE, 2, WIDGET, WIDGET 510 FUNCTION_NAME = gtk_list_store_set, NONE, NONE, 5, WIDGET, WIDGET, LONG, STRING, LONG 511 FUNCTION_NAME = gtk_list_store_set_value, NONE, NONE, 4, WIDGET, WIDGET, LONG, STRING 512 FUNCTION_NAME = gtk_list_store_clear, NONE, NONE, 1, WIDGET 513 FUNCTION_NAME = gtk_list_store_remove, NONE, BOOL, 2, WIDGET, WIDGET 514 FUNCTION_NAME = gtk_list_store_move_before, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 515 FUNCTION_NAME = gtk_list_store_move_after, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 516 FUNCTION_NAME = gtk_list_store_insert, NONE, NONE, 3, WIDGET, WIDGET, LONG 517 FUNCTION_NAME = gtk_list_store_insert_with_values, NONE, NONE, 6, WIDGET, WIDGET, LONG, LONG, STRING, LONG 518 FUNCTION_NAME = gtk_cell_renderer_text_new, NONE, WIDGET, 0 519 FUNCTION_NAME = gtk_tree_view_new_with_model, NONE, WIDGET, 1, WIDGET 520 FUNCTION_NAME = gtk_tree_view_column_new, NONE, WIDGET, 0 521 FUNCTION_NAME = gtk_tree_view_column_new_with_attributes, clicked, WIDGET, 5, STRING, WIDGET, STRING, LONG, NULL 522 FUNCTION_NAME = gtk_tree_view_column_pack_start, NONE, NONE, 3, WIDGET, WIDGET, BOOL 523 FUNCTION_NAME = gtk_tree_view_append_column, NONE, NONE, 2, WIDGET, WIDGET 524 FUNCTION_NAME = gtk_tree_view_set_headers_visible, NONE, NONE, 2, WIDGET, BOOL 525 FUNCTION_NAME = gtk_tree_view_set_headers_clickable, NONE, NONE, 2, WIDGET, BOOL 526 FUNCTION_NAME = gtk_tree_view_get_selection, NONE, WIDGET, 1, WIDGET 527 FUNCTION_NAME = gtk_tree_view_get_hadjustment, NONE, WIDGET, 1, WIDGET 528 FUNCTION_NAME = gtk_tree_view_get_vadjustment, NONE, WIDGET, 1, WIDGET 529 FUNCTION_NAME = gtk_tree_view_column_set_resizable, NONE, NONE, 2, WIDGET, BOOL 530 FUNCTION_NAME = gtk_tree_view_column_set_clickable, NONE, NONE, 2, WIDGET, BOOL 531 FUNCTION_NAME = gtk_tree_view_scroll_to_cell, NONE, NONE, 6, WIDGET, WIDGET, WIDGET, BOOL, FLOAT, FLOAT 532 FUNCTION_NAME = gtk_tree_view_set_grid_lines, NONE, NONE, 2, WIDGET, LONG 533 FUNCTION_NAME = gtk_tree_selection_get_selected, NONE, BOOL, 3, WIDGET, NULL, WIDGET 534 FUNCTION_NAME = gtk_tree_selection_get_tree_view, NONE, WIDGET, 1, WIDGET 535 FUNCTION_NAME = gtk_tree_selection_select_iter, NONE, NONE, 2, WIDGET, WIDGET 536 FUNCTION_NAME = gtk_tree_selection_select_path, NONE, NONE, 2, WIDGET, WIDGET 537 FUNCTION_NAME = gtk_tree_selection_path_is_selected, NONE, BOOL, 2, WIDGET, WIDGET 538 FUNCTION_NAME = gtk_tree_selection_set_mode, NONE, NONE, 2, WIDGET, LONG 539 FUNCTION_NAME = gtk_tree_model_get, NONE, NONE, 5, WIDGET, WIDGET, LONG, PTR_STRING, LONG 540 FUNCTION_NAME = gtk_tree_model_get_iter, NONE, BOOL, 3, WIDGET, WIDGET, WIDGET 541 FUNCTION_NAME = gtk_tree_model_get_string_from_iter, NONE, STRING, 2, WIDGET, WIDGET 542 FUNCTION_NAME = gtk_tree_model_get_iter_first, NONE, NONE, 2, WIDGET, WIDGET 543 FUNCTION_NAME = gtk_tree_path_new_from_string, NONE, WIDGET, 1, STRING 544 FUNCTION_NAME = gtk_tree_path_free, NONE, NONE, 1, WIDGET 545 FUNCTION_NAME = gtk_tree_path_prev, NONE, BOOL, 1, WIDGET 546 FUNCTION_NAME = gtk_tree_path_next, NONE, BOOL, 1, WIDGET 547 FUNCTION_NAME = gtk_tree_sortable_set_sort_column_id, NONE, NONE, 3, WIDGET, LONG, LONG 548 # 549 # Expander widget 550 # 551 FUNCTION_NAME = gtk_expander_new, activate, WIDGET, 1, STRING 552 FUNCTION_NAME = gtk_expander_new_with_mnemonic, NONE, WIDGET, 1, STRING 553 FUNCTION_NAME = gtk_expander_set_expanded, NONE, NONE, 2, WIDGET, BOOL 554 FUNCTION_NAME = gtk_expander_get_expanded, NONE, BOOL, 1, WIDGET 555 FUNCTION_NAME = gtk_expander_set_spacing, NONE, NONE, 2, WIDGET, LONG 556 FUNCTION_NAME = gtk_expander_get_spacing, NONE, LONG, 1, WIDGET 557 # 558 # Tooltips 559 # Note: for these to work, you will need a widget which can process events, so 560 # you may need to add an GtkEvent as the parent of some widgets 561 FUNCTION_NAME = gtk_tooltips_new, NONE, WIDGET, 0 562 FUNCTION_NAME = gtk_tooltips_enable, NONE, NONE, 1, WIDGET 563 FUNCTION_NAME = gtk_tooltips_disable, NONE, NONE, 1, WIDGET 564 FUNCTION_NAME = gtk_tooltips_set_tip, NONE, NONE, 4, WIDGET, WIDGET, STRING, STRING 565 FUNCTION_NAME = gtk_tooltips_force_window, NONE, NONE, 1, WIDGET 566 # 567 # Calendar 568 # 569 FUNCTION_NAME = gtk_calendar_get_date, NONE, NONE, 4, WIDGET, LONG, LONG, LONG 570 # 571 # General GTK routines 572 # 573 FUNCTION_NAME = gtk_init, NONE, NONE, 2, NULL, NULL 574 FUNCTION_NAME = gtk_widget_show, NONE, NONE, 1, WIDGET 575 FUNCTION_NAME = gtk_widget_show_all, NONE, NONE, 1, WIDGET 576 FUNCTION_NAME = gtk_widget_realize, NONE, NONE, 1, WIDGET 577 FUNCTION_NAME = gtk_widget_unrealize, NONE, NONE, 1, WIDGET 578 FUNCTION_NAME = gtk_widget_hide, NONE, NONE, 1, WIDGET 579 FUNCTION_NAME = gtk_widget_destroy, NONE, NONE, 1, WIDGET 580 FUNCTION_NAME = gtk_widget_grab_focus, NONE, NONE, 1, WIDGET 581 FUNCTION_NAME = gtk_widget_set_size_request, NONE, NONE, 3, WIDGET, LONG, LONG 582 FUNCTION_NAME = gtk_widget_size_request, NONE, NONE, 2, WIDGET, WIDGET 583 FUNCTION_NAME = gtk_widget_set_usize, NONE, NONE, 3, WIDGET, LONG, LONG 584 FUNCTION_NAME = gtk_widget_modify_base, NONE, NONE, 3, WIDGET, LONG, WIDGET 585 FUNCTION_NAME = gtk_widget_modify_text, NONE, NONE, 3, WIDGET, LONG, WIDGET 586 FUNCTION_NAME = gtk_widget_modify_bg, NONE, NONE, 3, WIDGET, LONG, WIDGET 587 FUNCTION_NAME = gtk_widget_modify_fg, NONE, NONE, 3, WIDGET, LONG, WIDGET 588 FUNCTION_NAME = gtk_widget_modify_font, NONE, NONE, 2, WIDGET, WIDGET 589 FUNCTION_NAME = gtk_widget_set_sensitive, NONE, NONE, 2, WIDGET, BOOL 590 FUNCTION_NAME = gtk_settings_get_default, NONE, WIDGET, 0 591 FUNCTION_NAME = gtk_widget_get_parent, NONE, WIDGET, 1, WIDGET 592 FUNCTION_NAME = gtk_misc_set_alignment, NONE, NONE, 3, WIDGET, FLOAT, FLOAT 593 FUNCTION_NAME = gtk_main, NONE, NONE, 0 594 FUNCTION_NAME = gtk_main_iteration, NONE, BOOL, 0 595 FUNCTION_NAME = gtk_main_iteration_do, NONE, BOOL, 1, BOOL 596 FUNCTION_NAME = gtk_events_pending, NONE, BOOL, 0 597 FUNCTION_NAME = gtk_exit, NONE, NONE, 1, LONG 598 FUNCTION_NAME = gtk_main_quit, NONE, NONE, 0 599 FUNCTION_NAME = gtk_rc_parse, NONE, NONE, 1, STRING 600 FUNCTION_NAME = gtk_rc_parse_string, NONE, NONE, 1, STRING 601 FUNCTION_NAME = gtk_rc_reparse_all, NONE, BOOL, 0 602 FUNCTION_NAME = gtk_rc_reset_styles, NONE, NONE, 1, WIDGET 603 FUNCTION_NAME = gtk_rc_add_default_file, NONE, NONE, 1, STRING 604 FUNCTION_NAME = gtk_widget_set_name, NONE, NONE, 2, WIDGET, STRING 605 FUNCTION_NAME = gtk_check_version, NONE, STRING, 3, LONG, LONG, LONG 606 FUNCTION_NAME = gtk_drag_source_set, NONE, NONE, 5, WIDGET, LONG, WIDGET, LONG, LONG 607 FUNCTION_NAME = gtk_drag_dest_set, NONE, NONE, 5, WIDGET, LONG, WIDGET, LONG, LONG 608 FUNCTION_NAME = gtk_drag_finish, NONE, NONE, 4, WIDGET, BOOL, BOOL, LONG 609 FUNCTION_NAME = gtk_drag_set_icon_stock, NONE, NONE, 4, WIDGET, STRING, LONG, LONG 610 FUNCTION_NAME = gtk_get_current_event_time, NONE, LONG, 0 611 FUNCTION_NAME = gtk_widget_get_size_request, NONE, NONE, 3, WIDGET, WIDGET, WIDGET 612 FUNCTION_NAME = gtk_signal_emit_by_name, NONE, NONE, 2, WIDGET, STRING 613 FUNCTION_NAME = gtk_invisible_new, NONE, WIDGET, 0 614 FUNCTION_NAME = gtk_target_list_new, NONE, WIDGET, 2, NULL, LONG 615 FUNCTION_NAME = gtk_target_list_add, NONE, NONE, 4, WIDGET, WIDGET, LONG, LONG 616 FUNCTION_NAME = gtk_target_table_new_from_list, NONE, WIDGET, 2, WIDGET, WIDGET 617 # 618 # Some GDK_PIXBUF functions 619 # 620 FUNCTION_NAME = gdk_pixbuf_new_from_file, NONE, WIDGET, 2, STRING, NULL 621 FUNCTION_NAME = gdk_pixbuf_new_from_file_at_size, NONE, WIDGET, 4, STRING, LONG, LONG, NULL 622 FUNCTION_NAME = gdk_pixbuf_new_from_file_at_scale, NONE, WIDGET, 5, STRING, LONG, LONG, BOOL, NULL 623 FUNCTION_NAME = gdk_pixbuf_rotate_simple, NONE, WIDGET, 2, WIDGET, LONG 624 FUNCTION_NAME = gdk_pixbuf_get_height, NONE, LONG, 1, WIDGET 625 FUNCTION_NAME = gdk_pixbuf_get_width, NONE, LONG, 1, WIDGET 626 FUNCTION_NAME = gdk_pixbuf_scale_simple, NONE, WIDGET, 4, WIDGET, LONG, LONG, LONG 627 # 628 # GLIB functions 629 # 630 FUNCTION_NAME = g_object_unref, NONE, NONE, 1, WIDGET 631 FUNCTION_NAME = g_object_get, NONE, NONE, 4, WIDGET, STRING, PTR_STRING, NULL 632 FUNCTION_NAME = g_object_set, NONE, NONE, 4, WIDGET, STRING, LONG, NULL 633 FUNCTION_NAME = g_locale_to_utf8, NONE, STRING, 5, STRING, LONG, NULL, NULL, NULL 634 FUNCTION_NAME = g_locale_from_utf8, NONE, STRING, 5, STRING, LONG, NULL, NULL, NULL 635 FUNCTION_NAME = g_free, NONE, NONE, 1, WIDGET 636 FUNCTION_NAME = g_printf, NONE, NONE, 2, STRING, WIDGET 637 FUNCTION_NAME = g_io_channel_unix_new, NONE, WIDGET, 1, LONG 638 FUNCTION_NAME = g_io_channel_read_line_string, NONE, LONG, 4, WIDGET, STRING, NULL, NULL 639 # 640 # Pango 641 # 642 FUNCTION_NAME = pango_font_description_from_string, NONE, WIDGET, 1, STRING 643 FUNCTION_NAME = pango_font_description_free, NONE, NONE, 1, WIDGET 644 # 645 # The internal functions (not necessary but sometimes handy for language bindings like newLisp) 646 # 647 FUNCTION_NAME = gtk_server_version, NONE, STRING, 0 648 FUNCTION_NAME = gtk_server_ffi, NONE, STRING, 0 649 FUNCTION_NAME = gtk_server_callback, NONE, STRING, 1, STRING 650 FUNCTION_NAME = gtk_server_callback_value, NONE, STRING, 1, STRING 651 FUNCTION_NAME = gtk_server_connect, NONE, STRING, 3, STRING, STRING, STRING 652 FUNCTION_NAME = gtk_server_connect_after, NONE, STRING, 3, STRING, STRING, STRING 653 FUNCTION_NAME = gtk_server_disconnect, NONE, STRING, 0 654 FUNCTION_NAME = gtk_server_enable_c_string_escaping, NONE, STRING, 0 655 FUNCTION_NAME = gtk_server_disable_c_string_escaping, NONE, STRING, 0 656 FUNCTION_NAME = gtk_server_set_c_string_escaping, NONE, STRING, 1, STRING 657 FUNCTION_NAME = gtk_server_mouse, NONE, STRING, 1, STRING 658 FUNCTION_NAME = gtk_server_define, NONE, STRING, 1, STRING 659 FUNCTION_NAME = gtk_server_redefine, NONE, STRING, 1, STRING 660 FUNCTION_NAME = gtk_server_timeout, NONE, STRING, 3, STRING, STRING, STRING 661 FUNCTION_NAME = gtk_server_timeout_remove, NONE, STRING, 1, STRING 662 FUNCTION_NAME = gtk_server_echo, NONE, STRING, 1, STRING 663 FUNCTION_NAME = gtk_server_cfg, NONE, STRING, 1, STRING 664 FUNCTION_NAME = gtk_server_exit, NONE, NONE, 0 665 FUNCTION_NAME = gtk_server_pid, NONE, STRING, 0 666 FUNCTION_NAME = gtk_server_key, NONE, STRING, 0 667 FUNCTION_NAME = gtk_server_macro, NONE, STRING, 2, STRING, STRING 668 FUNCTION_NAME = gtk_server_opaque, NONE, STRING, 0 669 # 670 # Some Glade functions 671 # 672 FUNCTION_NAME = glade_init, NONE, NONE, 0 673 FUNCTION_NAME = glade_xml_new_from_buffer, NONE, WIDGET, 4, STRING, LONG, NULL, NULL 674 FUNCTION_NAME = glade_xml_new, NONE, WIDGET, 3, STRING, NULL, NULL 675 FUNCTION_NAME = glade_xml_signal_autoconnect, NONE, NONE, 1, WIDGET 676 FUNCTION_NAME = glade_xml_get_widget, NONE, WIDGET, 2, WIDGET, STRING 677 # 678 # GTKMOZEMBED from Mozilla 679 # 680 FUNCTION_NAME = gtk_moz_embed_new, NONE, WIDGET, 0 681 FUNCTION_NAME = gtk_moz_embed_set_comp_path, NONE, NONE, 1, STRING 682 FUNCTION_NAME = gtk_moz_embed_set_profile_path, NONE, NONE, 2, STRING, STRING 683 FUNCTION_NAME = gtk_moz_embed_load_url, NONE, NONE, 2, WIDGET, STRING 684 FUNCTION_NAME = gtk_moz_embed_open_stream, NONE, NONE, 3, WIDGET, STRING, STRING 685 FUNCTION_NAME = gtk_moz_embed_append_data, NONE, NONE, 3, WIDGET, STRING, LONG 686 # 687 # GtkGlExt & GLUT & GL 688 # 689 FUNCTION_NAME = gtk_gl_init, NONE, NONE, 2, NULL, NULL 690 FUNCTION_NAME = gtk_widget_set_gl_capability, NONE, BOOL, 5, WIDGET, WIDGET, WIDGET, BOOL, LONG 691 FUNCTION_NAME = gdk_gl_config_new_by_mode, NONE, WIDGET, 1, LONG 692 FUNCTION_NAME = gtk_widget_get_gl_context, NONE, WIDGET, 1, WIDGET 693 FUNCTION_NAME = gtk_widget_get_gl_window, NONE, WIDGET, 1, WIDGET 694 FUNCTION_NAME = gdk_gl_drawable_gl_begin, NONE, BOOL, 2, WIDGET, WIDGET 695 FUNCTION_NAME = gdk_gl_drawable_gl_end, NONE, NONE, 1, WIDGET 696 FUNCTION_NAME = gdk_gl_drawable_swap_buffers, NONE, NONE, 1, WIDGET 697 FUNCTION_NAME = glutInit, NONE, NONE, 2, PTR_LONG, PTR_STRING 698 FUNCTION_NAME = glutSolidTeapot, NONE, NONE, 1, DOUBLE 699 FUNCTION_NAME = glutSwapBuffers, NONE, NONE, 0 700 FUNCTION_NAME = glutBitmapCharacter, NONE, NONE, 2, LONG, LONG 701 FUNCTION_NAME = glutBitmap9By15, NONE, ADDRESS, 0 702 FUNCTION_NAME = glutBitmap8By13, NONE, ADDRESS, 0 703 FUNCTION_NAME = glutBitmapTimesRoman10, NONE, ADDRESS, 0 704 FUNCTION_NAME = glutBitmapTimesRoman24, NONE, ADDRESS, 0 705 FUNCTION_NAME = glutBitmapHelvetica10, NONE, ADDRESS, 0 706 FUNCTION_NAME = glutBitmapHelvetica12, NONE, ADDRESS, 0 707 FUNCTION_NAME = glutBitmapHelvetica18, NONE, ADDRESS, 0 708 FUNCTION_NAME = glutStrokeCharacter, NONE, NONE, 2, LONG, LONG 709 FUNCTION_NAME = glutStrokeRoman, NONE, ADDRESS, 0 710 FUNCTION_NAME = glutStrokeMonoRoman, NONE, ADDRESS, 0 711 FUNCTION_NAME = glClearColor, NONE, NONE, 4, FLOAT, FLOAT, FLOAT, FLOAT 712 FUNCTION_NAME = glClear, NONE, NONE, 1, LONG 713 FUNCTION_NAME = glEnable, NONE, NONE, 1, LONG 714 FUNCTION_NAME = glShadeModel, NONE, NONE, 1, LONG 715 FUNCTION_NAME = glLightfv, NONE, NONE, 3, LONG, LONG, BASE64 716 FUNCTION_NAME = glMaterialfv, NONE, NONE, 3, LONG, LONG, BASE64 717 FUNCTION_NAME = glMatrixMode, NONE, NONE, 1, LONG 718 FUNCTION_NAME = glPushMatrix, NONE, NONE, 0 719 FUNCTION_NAME = glPopMatrix, NONE, NONE, 0 720 FUNCTION_NAME = glFlush, NONE, NONE, 0 721 FUNCTION_NAME = glRotatef, NONE, NONE, 4, FLOAT, FLOAT, FLOAT, FLOAT 722 FUNCTION_NAME = glLoadIdentity, NONE, NONE, 0 723 FUNCTION_NAME = glRasterPos2f, NONE, NONE, 2, FLOAT, FLOAT 724 FUNCTION_NAME = glTranslatef, NONE, NONE, 2, FLOAT, FLOAT 725 FUNCTION_NAME = glScalef, NONE, NONE, 3, FLOAT, FLOAT, FLOAT 726 FUNCTION_NAME = glViewport, NONE, NONE, 4, LONG, LONG, LONG, LONG 727 # 728 #--------------------------------------------------------------------------- 729 # 730 # XForms calls 731 # 732 FUNCTION_NAME = fl_bgn_form, NONE, WIDGET, 3, LONG, LONG, LONG 733 FUNCTION_NAME = fl_end_form, NONE, NONE, 0 734 FUNCTION_NAME = fl_show_form, NONE, NONE, 4, WIDGET, LONG, LONG, STRING 735 FUNCTION_NAME = fl_prepare_form_window, NONE, NONE, 4, WIDGET, LONG, LONG, STRING 736 FUNCTION_NAME = fl_show_form_window, NONE, NONE, 1, WIDGET 737 FUNCTION_NAME = fl_set_form_position, NONE, NONE, 3, WIDGET, LONG, LONG 738 # 739 FUNCTION_NAME = fl_add_box, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 740 # 741 FUNCTION_NAME = fl_add_button, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 742 FUNCTION_NAME = fl_set_button, NONE, NONE, 2, WIDGET, LONG 743 FUNCTION_NAME = fl_get_button, NONE, LONG, 1, WIDGET 744 FUNCTION_NAME = fl_add_checkbutton, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 745 FUNCTION_NAME = fl_add_roundbutton, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 746 FUNCTION_NAME = fl_add_round3dbutton, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 747 # 748 FUNCTION_NAME = fl_add_slider, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 749 FUNCTION_NAME = fl_set_slider_value, NONE, NONE, 2, WIDGET, DOUBLE 750 FUNCTION_NAME = fl_set_slider_bounds, NONE, NONE, 3, WIDGET, DOUBLE, DOUBLE 751 FUNCTION_NAME = fl_get_slider_value, NONE, FLOAT, 1, WIDGET 752 FUNCTION_NAME = fl_add_valslider, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 753 FUNCTION_NAME = fl_set_slider_step, NONE, NONE, 2, WIDGET, DOUBLE 754 FUNCTION_NAME = fl_set_slider_precision, NONE, NONE, 2, WIDGET, LONG 755 # 756 FUNCTION_NAME = fl_add_text, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 757 # 758 FUNCTION_NAME = fl_add_input, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 759 FUNCTION_NAME = fl_set_input, NONE, NONE, 2, WIDGET, STRING 760 FUNCTION_NAME = fl_set_input_color, NONE, NONE, 3, WIDGET, LONG, LONG 761 FUNCTION_NAME = fl_get_input, NONE, STRING, 1, WIDGET 762 # 763 FUNCTION_NAME = fl_add_frame, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 764 FUNCTION_NAME = fl_add_labelframe, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 765 # 766 FUNCTION_NAME = fl_add_choice, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 767 FUNCTION_NAME = fl_clear_choice, NONE, NONE, 1, WIDGET 768 FUNCTION_NAME = fl_addto_choice, NONE, LONG, 2, WIDGET, STRING 769 FUNCTION_NAME = fl_delete_choice, NONE, NONE, 2, WIDGET, LONG 770 FUNCTION_NAME = fl_replace_choice, NONE, NONE, 3, WIDGET, LONG, STRING 771 FUNCTION_NAME = fl_get_choice, NONE, LONG, 1, WIDGET 772 FUNCTION_NAME = fl_get_choice_text, NONE, STRING, 1, WIDGET 773 FUNCTION_NAME = fl_get_choice_item_text, NONE, STRING, 2, WIDGET, LONG 774 FUNCTION_NAME = fl_get_choice_maxitems, NONE, LONG, 1, WIDGET 775 # 776 FUNCTION_NAME = fl_add_browser, NONE, WIDGET, 6, LONG, LONG, LONG, LONG, LONG, STRING 777 FUNCTION_NAME = fl_clear_browser, NONE, NONE, 1, WIDGET 778 FUNCTION_NAME = fl_add_browser_line, NONE, NONE, 2, WIDGET, STRING 779 FUNCTION_NAME = fl_addto_browser, NONE, NONE, 2, WIDGET, STRING 780 FUNCTION_NAME = fl_addto_browser_chars, NONE, NONE, 2, WIDGET, STRING 781 FUNCTION_NAME = fl_insert_browser_line, NONE, NONE, 3, WIDGET, LONG, STRING 782 FUNCTION_NAME = fl_delete_browser_line, NONE, NONE, 2, WIDGET, LONG 783 FUNCTION_NAME = fl_replace_browser_line, NONE, NONE, 3, WIDGET, LONG, STRING 784 FUNCTION_NAME = fl_get_browser_line, NONE, STRING, 2, WIDGET, LONG 785 FUNCTION_NAME = fl_get_browser, NONE, LONG, 1, WIDGET 786 FUNCTION_NAME = fl_select_browser_line, NONE, NONE, 2, WIDGET, LONG 787 # 788 FUNCTION_NAME = fl_deactivate_object, NONE, NONE, 1, WIDGET 789 FUNCTION_NAME = fl_activate_object, NONE, NONE, 1, WIDGET 790 FUNCTION_NAME = fl_set_icm_color, NONE, NONE, 4, LONG, LONG, LONG, LONG 791 FUNCTION_NAME = fl_set_focus_object, NONE, NONE, 2, WIDGET, WIDGET 792 FUNCTION_NAME = fl_get_focus_object, NONE, WIDGET, 1, WIDGET 793 FUNCTION_NAME = fl_bgn_group, NONE, WIDGET, 0 794 FUNCTION_NAME = fl_end_group, NONE, WIDGET, 0 795 FUNCTION_NAME = fl_addto_group, NONE, NONE, 1, WIDGET 796 FUNCTION_NAME = fl_show_message, NONE, NONE, 3, STRING, STRING, STRING 797 FUNCTION_NAME = fl_hide_object, NONE, NONE, 1, WIDGET 798 FUNCTION_NAME = fl_show_object, NONE, NONE, 1, WIDGET 799 FUNCTION_NAME = fl_set_object_color, NONE, NONE, 3, WIDGET, LONG, LONG 800 FUNCTION_NAME = fl_set_object_lsize, NONE, NONE, 2, WIDGET, LONG 801 FUNCTION_NAME = fl_set_object_lcol, NONE, NONE, 2, WIDGET, LONG 802 FUNCTION_NAME = fl_set_object_label, NONE, NONE, 2, WIDGET, STRING 803 FUNCTION_NAME = fl_set_font_name, NONE, LONG, 2, LONG, STRING 804 FUNCTION_NAME = fl_set_idle_delta, NONE, NONE, 1, LONG 805 FUNCTION_NAME = fl_finish, NONE, NONE, 0 806 # 807 #--------------------------------------------------------------------------- 808 # 809 # We can also define macro objects. Check 'man gtk-server.cfg' for details 810 # on programming macros. They provide a convenient way to group many 811 # GTK functions and can be used from every client language. 812 # 813 # The macros below are the beginnings of the Highlevel Universal GUI (HUG). 814 # 815 # Also check the demoscript 'hug.ksh' in the demo-gtk directory. 816 # 817 # GPL, (c) PvE. 818 #--------------------------------------------------------------------------- 819 # 820 # HHHHHHHHH HHHHHHHHHUUUUUUUU UUUUUUUU GGGGGGGGGGGGG 821 # H:::::::H H:::::::HU::::::U U::::::U GGG::::::::::::G 822 # H:::::::H H:::::::HU::::::U U::::::U GG:::::::::::::::G 823 # HH::::::H H::::::HHUU:::::U U:::::UU G:::::GGGGGGGG::::G 824 # H:::::H H:::::H U:::::U U:::::U G:::::G GGGGGG 825 # H:::::H H:::::H U:::::D D:::::UG:::::G 826 # H::::::HHHHH::::::H U:::::D D:::::UG:::::G 827 # H:::::::::::::::::H U:::::D D:::::UG:::::G GGGGGGGGGG 828 # H:::::::::::::::::H U:::::D D:::::UG:::::G G::::::::G 829 # H::::::HHHHH::::::H U:::::D D:::::UG:::::G GGGGG::::G 830 # H:::::H H:::::H U:::::D D:::::UG:::::G G::::G 831 # H:::::H H:::::H U::::::U U::::::U G:::::G G::::G 832 # HH::::::H H::::::HH U:::::::UUU:::::::U G:::::GGGGGGGG::::G 833 # H:::::::H H:::::::H UU:::::::::::::UU GG:::::::::::::::G 834 # H:::::::H H:::::::H UU:::::::::UU GGG::::::GGG:::G 835 # HHHHHHHHH HHHHHHHHH UUUUUUUUU GGGGGG GGGG 836 # 837 # ...TO BE CONTINUED... 838 #--------------------------------------------------------------------------- 839 # 840 # Define a new window: 841 # u_window "title" xsize ysize 842 # 843 #--------------------------------------------------------------------------- 844 845 MACRO u_window 846 847 # If the variable $window has a value, skip the gtk_init 848 $window BNE 2 849 850 gtk_init 851 852 $window : gtk_window_new 0 853 gtk_window_set_title $window $1 854 gtk_window_set_position $window 1 855 gtk_widget_set_size_request $window $2 $3 856 gtk_widget_set_name $window $window 857 gtk_widget_show $window 858 859 RETURN $window 860 861 ENDMACRO 862 863 #--------------------------------------------------------------------------- 864 # 865 # Define a grid: 866 # u_grid parent xres yres 867 # 868 #--------------------------------------------------------------------------- 869 870 MACRO u_grid 871 872 $grid : gtk_table_new $2 $3 1 873 gtk_container_add $1 $grid 874 gtk_widget_show $grid 875 876 RETURN $grid 877 878 ENDMACRO 879 880 #--------------------------------------------------------------------------- 881 # 882 # Define button: 883 # u_button "label" xsize ysize 884 # 885 #--------------------------------------------------------------------------- 886 887 MACRO u_button 888 889 $button : gtk_button_new_with_label $1 890 gtk_widget_set_size_request $button $2 $3 891 gtk_widget_set_name $button $button 892 gtk_widget_show $button 893 894 RETURN $button 895 896 ENDMACRO 897 898 #--------------------------------------------------------------------------- 899 # 900 # Define checkbutton: 901 # u_check "label" xsize ysize 902 # 903 #--------------------------------------------------------------------------- 904 905 MACRO u_check 906 907 $check : gtk_check_button_new_with_label $1 908 gtk_widget_set_size_request $check $2 $3 909 gtk_widget_set_name $check $check 910 gtk_widget_show $check 911 912 RETURN $check 913 914 ENDMACRO 915 916 #--------------------------------------------------------------------------- 917 # 918 # Define radiobutton: 919 # u_radio "label" xsize ysize group 920 # 921 #--------------------------------------------------------------------------- 922 923 MACRO u_radio 924 925 $radio : gtk_radio_button_new_with_label_from_widget $4 $1 926 gtk_widget_set_size_request $radio $2 $3 927 gtk_widget_set_name $radio $radio 928 gtk_widget_show $radio 929 930 RETURN $radio 931 932 ENDMACRO 933 934 #--------------------------------------------------------------------------- 935 # 936 # Define text entry: 937 # u_entry xsize ysize 938 # 939 #--------------------------------------------------------------------------- 940 941 MACRO u_entry 942 943 $entry : gtk_entry_new 944 gtk_widget_set_size_request $entry $1 $2 945 gtk_widget_set_name $entry $entry 946 gtk_widget_show $entry 947 948 RETURN $entry 949 950 ENDMACRO 951 952 #--------------------------------------------------------------------------- 953 # 954 # Define password entry: 955 # u_password xsize ysize 956 # 957 #--------------------------------------------------------------------------- 958 959 MACRO u_password 960 961 $password : gtk_entry_new 962 gtk_widget_set_size_request $password $1 $2 963 gtk_entry_set_visibility $password 0 964 gtk_widget_set_name $password $password 965 gtk_widget_show $password 966 967 RETURN $password 968 969 ENDMACRO 970 971 #--------------------------------------------------------------------------- 972 # 973 # Define label: 974 # u_label "text" xsize ysize 975 # 976 #--------------------------------------------------------------------------- 977 978 MACRO u_label 979 980 $label : gtk_label_new $1 981 gtk_widget_set_size_request $label $2 $3 982 gtk_widget_set_name $label $label 983 gtk_widget_show $label 984 985 RETURN $label 986 987 ENDMACRO 988 989 #--------------------------------------------------------------------------- 990 # 991 # Define droplist: 992 # u_combo "text1" xsize ysize 993 # 994 #--------------------------------------------------------------------------- 995 996 MACRO u_combo 997 998 $combo : gtk_combo_box_new_text 999 gtk_combo_box_append_text $combo $1 1000 gtk_combo_box_set_active $combo 0 1001 gtk_widget_set_size_request $combo $2 $3 1002 gtk_widget_set_name $combo $combo 1003 gtk_widget_show $combo 1004 1005 RETURN $combo 1006 1007 ENDMACRO 1008 1009 #--------------------------------------------------------------------------- 1010 # 1011 # Define horizontal separator: 1012 # u_hseparator xsize 1013 # 1014 #--------------------------------------------------------------------------- 1015 1016 MACRO u_hseparator 1017 1018 $hseparator : gtk_hseparator_new 1019 gtk_widget_set_size_request $hseparator $1 0 1020 gtk_widget_set_name $hseparator $hseparator 1021 gtk_widget_show $hseparator 1022 1023 RETURN $hseparator 1024 1025 ENDMACRO 1026 1027 #--------------------------------------------------------------------------- 1028 # 1029 # Define vertical separator: 1030 # u_vseparator xsize 1031 # 1032 #--------------------------------------------------------------------------- 1033 1034 MACRO u_vseparator 1035 1036 $vseparator : gtk_vseparator_new 1037 gtk_widget_set_size_request $vseparator 0 $1 1038 gtk_widget_set_name $hseparator $vseparator 1039 gtk_widget_show $vseparator 1040 1041 RETURN $vseparator 1042 1043 ENDMACRO 1044 1045 #--------------------------------------------------------------------------- 1046 # 1047 # Define frame: 1048 # u_frame text xsize ysize 1049 # 1050 #--------------------------------------------------------------------------- 1051 1052 MACRO u_frame 1053 1054 $frame : gtk_frame_new 1055 gtk_frame_set_label $frame $1 1056 gtk_widget_set_size_request $frame $2 $3 1057 gtk_widget_set_name $frame $frame 1058 gtk_widget_show $frame 1059 1060 RETURN $frame 1061 1062 ENDMACRO 1063 1064 #--------------------------------------------------------------------------- 1065 # 1066 # Define multiline text: 1067 # u_text xsize ysize 1068 # 1069 #--------------------------------------------------------------------------- 1070 1071 MACRO u_text 1072 1073 $text : gtk_text_new 1074 gtk_widget_set_size_request $text $1 $2 1075 gtk_text_set_word_wrap $text 1 1076 gtk_text_set_editable $text 1 1077 gtk_widget_set_name $text $text 1078 gtk_widget_show $text 1079 1080 RETURN $text 1081 1082 ENDMACRO 1083 1084 #--------------------------------------------------------------------------- 1085 # 1086 # Define a dialog: 1087 # u_dialog "title" "text" xsize ysize 1088 # the "exit" event means button was clicked 1089 #--------------------------------------------------------------------------- 1090 1091 MACRO u_dialog 1092 1093 $window : u_window $1 $3 $4 1094 1095 $table : gtk_table_new 10 10 1 1096 gtk_container_add $window $table 1097 1098 $label : gtk_label_new $2 1099 gtk_table_attach_defaults $table $label 2 9 2 4 1100 1101 $button : gtk_button_new_with_label "OK" 1102 gtk_table_attach_defaults $table $button 3 7 7 9 1103 gtk_server_connect $button clicked exit 1104 1105 gtk_widget_show_all $window 1106 1107 RETURN $window 1108 1109 ENDMACRO 1110 1111 #--------------------------------------------------------------------------- 1112 # 1113 # Define canvas: 1114 # u_canvas xsize ysize (only 1 canvas per application) 1115 # 1116 #--------------------------------------------------------------------------- 1117 1118 MACRO u_canvas 1119 1120 $image BNE 12 1121 1122 $image : gtk_image_new 1123 gtk_widget_show $image 1124 gtk_server_redefine gdk_pixmap_new NONE WIDGET 4 NULL LONG LONG LONG 1125 $pix : gdk_pixmap_new 0 $1 $2 24 1126 $context : gdk_gc_new $pix 1127 gtk_image_set_from_pixmap $image $pix 0 1128 # color with a 'k' because the 'c' is used by 'context' 1129 $kolor : gtk_server_opaque 1130 gdk_color_parse "#ffffff" $kolor 1131 gdk_gc_set_rgb_bg_color $context $kolor 1132 gdk_gc_set_rgb_fg_color $context $kolor 1133 gdk_draw_rectangle $pix $context 1 0 0 $1 $2 1134 gtk_widget_queue_draw $image 1135 1136 RETURN $image 1137 1138 ENDMACRO 1139 1140 #--------------------------------------------------------------------------- 1141 # 1142 # Define circle: 1143 # u_circle color xcoord ycoord xsize ysize full 1144 # 1145 #--------------------------------------------------------------------------- 1146 1147 MACRO u_circle 1148 1149 $kolor : gtk_server_macro u_canvas kolor 1150 1151 $kolor BEQ 8 1152 1153 gdk_color_parse $1 $kolor 1154 $context : gtk_server_macro u_canvas context 1155 gdk_gc_set_rgb_fg_color $context $kolor 1156 $pix : gtk_server_macro u_canvas pix 1157 gdk_draw_arc $pix $context $6 $2 $3 $4 $5 0 23040 1158 $image : gtk_server_macro u_canvas image 1159 gtk_widget_queue_draw $image 1160 1161 ENDMACRO 1162 1163 #--------------------------------------------------------------------------- 1164 # 1165 # Define pixel: 1166 # u_pixel color xcoord ycoord 1167 # 1168 #--------------------------------------------------------------------------- 1169 1170 MACRO u_pixel 1171 1172 $kolor : gtk_server_macro u_canvas kolor 1173 1174 $kolor BEQ 8 1175 1176 gdk_color_parse $1 $kolor 1177 $context : gtk_server_macro u_canvas context 1178 gdk_gc_set_rgb_fg_color $context $kolor 1179 $pix : gtk_server_macro u_canvas pix 1180 gdk_draw_point $pix $context $2 $3 1181 $image : gtk_server_macro u_canvas image 1182 gtk_widget_queue_draw $image 1183 1184 ENDMACRO 1185 1186 #--------------------------------------------------------------------------- 1187 # 1188 # Define line: 1189 # u_line color xstart ystart xend yend 1190 # 1191 #--------------------------------------------------------------------------- 1192 1193 MACRO u_line 1194 1195 $kolor : gtk_server_macro u_canvas kolor 1196 1197 $kolor BEQ 8 1198 1199 gdk_color_parse $1 $kolor 1200 $context : gtk_server_macro u_canvas context 1201 gdk_gc_set_rgb_fg_color $context $kolor 1202 $pix : gtk_server_macro u_canvas pix 1203 gdk_draw_line $pix $context $2 $3 $4 $5 1204 $image : gtk_server_macro u_canvas image 1205 gtk_widget_queue_draw $image 1206 1207 ENDMACRO 1208 1209 #--------------------------------------------------------------------------- 1210 # 1211 # Define rectangle: 1212 # u_square color xcoord ycoord xsize ysize full 1213 # 1214 #--------------------------------------------------------------------------- 1215 1216 MACRO u_square 1217 1218 $kolor : gtk_server_macro u_canvas kolor 1219 1220 $kolor BEQ 8 1221 1222 gdk_color_parse $1 $kolor 1223 $context : gtk_server_macro u_canvas context 1224 gdk_gc_set_rgb_fg_color $context $kolor 1225 $pix : gtk_server_macro u_canvas pix 1226 gdk_draw_rectangle $pix $context $6 $2 $3 $4 $5 1227 $image : gtk_server_macro u_canvas image 1228 gtk_widget_queue_draw $image 1229 1230 ENDMACRO 1231 1232 #--------------------------------------------------------------------------- 1233 # 1234 # Define text on canvas: 1235 # u_out "text" fgcolor bgcolor xcoord ycoord 1236 # 1237 #--------------------------------------------------------------------------- 1238 1239 MACRO u_out 1240 1241 $kolor : gtk_server_macro u_canvas kolor 1242 1243 $kolor BEQ 11 1244 1245 gdk_color_parse $2 $kolor 1246 $context : gtk_server_macro u_canvas context 1247 $pix : gtk_server_macro u_canvas pix 1248 $image : gtk_server_macro u_canvas image 1249 $layout : gtk_widget_create_pango_layout $image $1 1250 1251 $back : gtk_server_opaque 1252 gdk_color_parse $3 $back 1253 gdk_draw_layout_with_colors $pix $context $4 $5 $layout $kolor $back 1254 g_free $back 1255 1256 gtk_widget_queue_draw $image 1257 1258 ENDMACRO 1259 1260 #--------------------------------------------------------------------------- 1261 # 1262 # Define METHOD attach: 1263 # u_attach grid widget x1 x2 y1 y2 1264 # 1265 #--------------------------------------------------------------------------- 1266 1267 MACRO u_attach 1268 1269 gtk_table_attach_defaults $1 $2 $3 $4 $5 $6 1270 1271 ENDMACRO 1272 1273 #--------------------------------------------------------------------------- 1274 # 1275 # Define METHOD bgcolor: 1276 # u_bgcolor widget <color state> <color state> ... 1277 # 1278 # color: for example "#00FF00" or "Red" 1279 # 1280 # 0 = GTK_STATE_NORMAL 1281 # 1 = GTK_STATE_ACTIVE 1282 # 2 = GTK_STATE_PRELIGHT 1283 # 3 = GTK_STATE_SELECTED 1284 # 4 = GTK_STATE_INSENSITIVE 1285 # 1286 #--------------------------------------------------------------------------- 1287 1288 MACRO u_bgcolor 1289 1290 $opaque : gtk_server_opaque 1291 gdk_color_parse $2 $opaque 1292 gtk_widget_modify_bg $1 0 $opaque 1293 g_free $opaque 1294 1295 $3 BEQ 20 1296 1297 $opaque : gtk_server_opaque 1298 gdk_color_parse $3 $opaque 1299 gtk_widget_modify_bg $1 1 $opaque 1300 g_free $opaque 1301 1302 $4 BEQ 15 1303 1304 $opaque : gtk_server_opaque 1305 gdk_color_parse $4 $opaque 1306 gtk_widget_modify_bg $1 2 $opaque 1307 g_free $opaque 1308 1309 $5 BEQ 10 1310 1311 $opaque : gtk_server_opaque 1312 gdk_color_parse $5 $opaque 1313 gtk_widget_modify_bg $1 3 $opaque 1314 g_free $opaque 1315 1316 $6 BEQ 5 1317 1318 $opaque : gtk_server_opaque 1319 gdk_color_parse $6 $opaque 1320 gtk_widget_modify_bg $1 4 $opaque 1321 g_free $opaque 1322 1323 ENDMACRO 1324 1325 #--------------------------------------------------------------------------- 1326 # 1327 # Define METHOD fgcolor: 1328 # u_fgcolor widget <color state> <color state> ... 1329 # 1330 # color: for example "#00FF00" 1331 # 1332 # 0 = GTK_STATE_NORMAL 1333 # 1 = GTK_STATE_ACTIVE 1334 # 2 = GTK_STATE_PRELIGHT 1335 # 3 = GTK_STATE_SELECTED 1336 # 4 = GTK_STATE_INSENSITIVE 1337 # 1338 #--------------------------------------------------------------------------- 1339 1340 MACRO u_fgcolor 1341 1342 $opaque : gtk_server_opaque 1343 gdk_color_parse $2 $opaque 1344 gtk_widget_modify_fg $1 0 $opaque 1345 g_free $opaque 1346 1347 $3 BEQ 20 1348 1349 $opaque : gtk_server_opaque 1350 gdk_color_parse $3 $opaque 1351 gtk_widget_modify_fg $1 1 $opaque 1352 g_free $opaque 1353 1354 $4 BEQ 15 1355 1356 $opaque : gtk_server_opaque 1357 gdk_color_parse $4 $opaque 1358 gtk_widget_modify_fg $1 2 $opaque 1359 g_free $opaque 1360 1361 $5 BEQ 10 1362 1363 $opaque : gtk_server_opaque 1364 gdk_color_parse $5 $opaque 1365 gtk_widget_modify_fg $1 3 $opaque 1366 g_free $opaque 1367 1368 $6 BEQ 5 1369 1370 $opaque : gtk_server_opaque 1371 gdk_color_parse $6 $opaque 1372 gtk_widget_modify_fg $1 4 $opaque 1373 g_free $opaque 1374 1375 ENDMACRO 1376 1377 #--------------------------------------------------------------------------- 1378 # 1379 # Define METHOD textcolor: 1380 # u_textcolor widget <color state> <color state> ... 1381 # 1382 # color: for example "#00FF00" 1383 # 1384 # 0 = GTK_STATE_NORMAL 1385 # 1 = GTK_STATE_ACTIVE 1386 # 2 = GTK_STATE_PRELIGHT 1387 # 3 = GTK_STATE_SELECTED 1388 # 4 = GTK_STATE_INSENSITIVE 1389 # 1390 #--------------------------------------------------------------------------- 1391 1392 MACRO u_textcolor 1393 1394 $opaque : gtk_server_opaque 1395 gdk_color_parse $2 $opaque 1396 gtk_widget_modify_text $1 0 $opaque 1397 g_free $opaque 1398 1399 $3 BEQ 20 1400 1401 $opaque : gtk_server_opaque 1402 gdk_color_parse $3 $opaque 1403 gtk_widget_modify_text $1 1 $opaque 1404 g_free $opaque 1405 1406 $4 BEQ 15 1407 1408 $opaque : gtk_server_opaque 1409 gdk_color_parse $4 $opaque 1410 gtk_widget_modify_text $1 2 $opaque 1411 g_free $opaque 1412 1413 $5 BEQ 10 1414 1415 $opaque : gtk_server_opaque 1416 gdk_color_parse $5 $opaque 1417 gtk_widget_modify_text $1 3 $opaque 1418 g_free $opaque 1419 1420 $6 BEQ 5 1421 1422 $opaque : gtk_server_opaque 1423 gdk_color_parse $6 $opaque 1424 gtk_widget_modify_text $1 4 $opaque 1425 g_free $opaque 1426 1427 ENDMACRO 1428 1429 #--------------------------------------------------------------------------- 1430 # 1431 # Define METHOD basecolor: 1432 # u_basecolor widget <color state> <color state> ... 1433 # 1434 # color: for example "#00FF00" 1435 # 1436 # 0 = GTK_STATE_NORMAL 1437 # 1 = GTK_STATE_ACTIVE 1438 # 2 = GTK_STATE_PRELIGHT 1439 # 3 = GTK_STATE_SELECTED 1440 # 4 = GTK_STATE_INSENSITIVE 1441 # 1442 #--------------------------------------------------------------------------- 1443 1444 MACRO u_basecolor 1445 1446 $opaque : gtk_server_opaque 1447 gdk_color_parse $2 $opaque 1448 gtk_widget_modify_base $1 0 $opaque 1449 g_free $opaque 1450 1451 $3 BEQ 20 1452 1453 $opaque : gtk_server_opaque 1454 gdk_color_parse $3 $opaque 1455 gtk_widget_modify_base $1 1 $opaque 1456 g_free $opaque 1457 1458 $4 BEQ 15 1459 1460 $opaque : gtk_server_opaque 1461 gdk_color_parse $4 $opaque 1462 gtk_widget_modify_base $1 2 $opaque 1463 g_free $opaque 1464 1465 $5 BEQ 10 1466 1467 $opaque : gtk_server_opaque 1468 gdk_color_parse $5 $opaque 1469 gtk_widget_modify_base $1 3 $opaque 1470 g_free $opaque 1471 1472 $6 BEQ 5 1473 1474 $opaque : gtk_server_opaque 1475 gdk_color_parse $6 $opaque 1476 gtk_widget_modify_base $1 4 $opaque 1477 g_free $opaque 1478 1479 ENDMACRO 1480 1481 #--------------------------------------------------------------------------- 1482 # 1483 # Define METHOD font: 1484 # u_font widget font (for example "Arial 15", "Luxi Mono 12") 1485 # 1486 #--------------------------------------------------------------------------- 1487 1488 MACRO u_font 1489 1490 $desc : pango_font_description_from_string $2 1491 gtk_widget_modify_font $1 $desc 1492 pango_font_description_free $desc 1493 1494 ENDMACRO 1495 1496 #--------------------------------------------------------------------------- 1497 # 1498 # Define METHOD disable: 1499 # u_disable widget 1500 # 1501 #--------------------------------------------------------------------------- 1502 1503 MACRO u_disable 1504 1505 gtk_widget_set_sensitive $1 0 1506 1507 ENDMACRO 1508 1509 #--------------------------------------------------------------------------- 1510 # 1511 # Define METHOD enable: 1512 # u_enable widget 1513 # 1514 #--------------------------------------------------------------------------- 1515 1516 MACRO u_enable 1517 1518 gtk_widget_set_sensitive $1 1 1519 1520 ENDMACRO 1521 1522 #--------------------------------------------------------------------------- 1523 # 1524 # Define METHOD hide: 1525 # u_hide widget 1526 # 1527 #--------------------------------------------------------------------------- 1528 1529 MACRO u_hide 1530 1531 gtk_widget_hide $1 1532 1533 ENDMACRO 1534 1535 #--------------------------------------------------------------------------- 1536 # 1537 # Define METHOD show: 1538 # u_show widget 1539 # 1540 #--------------------------------------------------------------------------- 1541 1542 MACRO u_show 1543 1544 gtk_widget_show $1 1545 1546 ENDMACRO 1547 1548 #--------------------------------------------------------------------------- 1549 # 1550 # Define METHOD focus: 1551 # u_focus widget 1552 # 1553 #--------------------------------------------------------------------------- 1554 1555 MACRO u_focus 1556 1557 gtk_widget_grab_focus $1 1558 1559 ENDMACRO 1560 1561 #--------------------------------------------------------------------------- 1562 # 1563 # Define METHOD event: 1564 # u_event <optional async> 1565 # 1566 #--------------------------------------------------------------------------- 1567 1568 MACRO u_event 1569 1570 $1 BNE 4 1571 1572 $event : gtk_server_callback wait 1573 BRA 2 1574 1575 $event : gtk_server_callback update 1576 1577 RETURN $event 1578 1579 ENDMACRO 1580 1581 #--------------------------------------------------------------------------- 1582 # 1583 # Define METHOD end: 1584 # u_end 1585 # 1586 #--------------------------------------------------------------------------- 1587 1588 MACRO u_end 1589 1590 gtk_server_exit 1591 1592 ENDMACRO 1593 1594 #--------------------------------------------------------------------------- 1595 # 1596 # Connect a glade UI: 1597 # glade-ui "filename" 1598 # 1599 #--------------------------------------------------------------------------- 1600 1601 MACRO glade-ui 1602 1603 gtk_init 1604 glade_init 1605 $xml : glade_xml_new $1 NULL NULL 1606 glade_xml_signal_autoconnect $xml 1607 1608 RETURN $xml 1609 1610 ENDMACRO