Table of Contents
Tcl-Gtk provides a framework for creating Tcl extensions for libraries based on GObject such as Gtk and GdkPixbuf. Right now there is support for GObject, GdkPixbuf, Gdk, Gtk, Gnome, Vte, Pango, and Atk. For information about these libraries, visit http://developer.gnome.org.
Tcl-Gtk requires gtk 2.2, available from http://www.gtk.org and Tcl 8.2 or better available from http://tcl.sourceforge.net. Note that gtk 2.2 itself has a number of dependencies and Tcl 8.4 is required by some of the utility scripts as well as for hacking on Tcl-Gtk itself.
Tcl-Gtk uses the autoconf build system. In general Tcl-Gtk can be installed by running ./configure followed by make and make install. See INSTALL for directions. Note that the configure script may by default setup the C compiler to build binaries with debugging information. To override this behavior set the enviroment variable CFLAGS to a reasonable value for your compiler such as -O2.
Packages can be loaded into a Tcl interpreter with package require Name. All commands in that package will be in a lowercase namespace based on the package name. In general a command groups together a bunch of C functions that operate on the same type. For example in the Gtk package there is a command gtk::button whose options include gtk::button new and gtk::button set_label, which operate on the GtkButton type.
As much as possible wrapped functions work exactly the same as their C counterparts do. Occasionaly to improve usability or because of problems mapping C types to Tcl types wrapped functions take different arguments or behave differently. All such cases are documented in the Packages section.
A pointer to a GType is represented by a new Tcl_Obj type, a handle. A handle has both a pointer and a GType associated with it. It does type checking, but allows NULL ptr values with the keyword "null". It does not check to see if a pointer is valid, because there is simply no way it can. If the type is a GObject there are ways to make sure the pointer is valid. See previous versions of Tcl-Gtk for how the validity can be checked. I don't think the overhead and complexity is worth it. Look at src/gobject/handle.c.
Most of the code for the extensions is generated automatically from C header file and most of the functions wrapped are handled automatically. The extension stores the GType for each argument of the C function and uses that to translate Tcl arguments to C arguments and back. When an arguments to a C function cannot be handled automatically, a stub is generated in src/PACKAGE/stub.c. When the stub is implemented the function is moved to src/PACKAGE/pkg.c, and documentation in mdoc format added.
A package is a collection of classes. Each class has a collection of methods. Each method has a C function to be called and the GType's of the arguments to that function. C code is generated from the packages. Definitions in the package can be overridden by a PACKAGE.pkg.mod file. This is useful when the package has to be tweaked or new utility functions added.
Each package wraps one or more libraries that are based on the GObject type system.
This packages wraps the GObject library used by Gtk. See http://developer.gnome.org/doc/API/2.0/gobject for more information.
Only the useful parts of the GObject library are wrapped. At some point it would be nice to add the ability to define new class types in Tcl.
Functions that use the GError** will instead take the name of a variable. If there's an error that variable will be set to a list of the form {domain_id error_id msg}.
See g::signal connect for information on signal handling.
The package may have additional procedures available which do not correspond to functions in the library.
Usage
The -cmd switch indicates a new command should be created that invokes the new object. The -name switch implies -cmd. If -name is given, the name of the command is str. Otherwise the name is that of new object. The command is deleted when the object is destroyed. Additionally, if the command was named, a handle option is added which returns the wrapped object.
If there is just one arg, it is taken as a list of property name value pairs. Otherwise the list comprising the mulitple args in the same manner.
Examples.
set b [g::new GtkButton label test relief half] set b2 [g::new GtkButton [list label test relief half]] g::object set $b label TEST gtk::button set_relief $b2 normal set b [g::new -cmd GtkButton label test relief half] $b set use-underline false set b [g:::new -name .b GtkButton [list label test relief half]] .b set use-underline false set b [.b handle] g::object set $b use-underline false
For ease of use a number of the functions wrapped are named differently and take arguments in slighly different forms.
Usage
Creates a GObject of type type with property values given by arglist. Wraps g_object_newv.
Usage
Wraps g_object_set_data_full. Set name to value in obj and eval script when name is removed.
Usage
Wraps g_signal_add_emission_hook. The script is evaluated as in g::signal connect.
Usage
Wraps g_signal_connect_closure. The script is evaluated globally when the signal is triggered. When a signal is triggered, the global variable _ will be set to a list of the signal arguments.
Not all functions may be implemented.
Automatically handled functions:
g_object_freeze_notify g_object_notify g_object_thaw_notify g_object_ref g_object_unref g_signal_stop_emission_by_name g_signal_handler_block g_signal_handler_unblock g_signal_handler_disconnect g_signal_handler_is_connected g_type_name g_type_from_name g_type_parent g_type_is_a
Manually handled functions:
g::object new (g_object_newv) g::object set (g_object_set_property) g::object get (g_object_get_property) g::object get_data (g_object_get_data) g::object set_data (g_object_set_data) g::object set_data_full (g_object_set_data_full) g::object steal_data (g_object_steal_data) g::signal list (g_signal_list_ids) g::signal add_emission_hook (g_signal_add_emission_hook) g::signal remove_emission_hook (g_signal_remove_emission_hook) g::signal connect (g_signal_connect_closure) g::type children (g_type_children) g::type interfaces (g_type_interfaces)
Unimplmented stubs:
g::object class_install_property (g_object_class_install_property) g::object class_find_property (g_object_class_find_property) g::object class_list_properties (g_object_class_list_properties) g::signal new (g_signal_newv) g::signal emit (g_signal_emitv)
This packages wraps the Atk library used by Gtk. See http://developer.gnome.org/doc/API/2.0/atk for more information.
A large part of it is automatically wrapped, but I'm not quite sure how this library is supposed to work or what parts of it are useful.
The package may have additional procedures available which do not correspond to functions in the library.
Automatically handled functions:
atk_text_attribute_get_type atk_key_event_type_get_type atk_relation_type_get_type atk_text_boundary_get_type atk_state_type_get_type atk_coord_type_get_type atk_layer_get_type atk_role_get_type atk_action_get_type atk_action_do_action atk_action_get_n_actions atk_action_get_description atk_action_get_name atk_action_get_keybinding atk_action_set_description atk_action_get_localized_name atk_component_get_type atk_component_contains atk_component_ref_accessible_at_point atk_component_get_layer atk_component_get_mdi_zorder atk_component_grab_focus atk_component_remove_focus_handler atk_component_set_extents atk_component_set_position atk_component_set_size atk_document_get_type atk_document_get_document_type atk_editable_text_get_type atk_editable_text_set_text_contents atk_editable_text_copy_text atk_editable_text_cut_text atk_editable_text_delete_text atk_editable_text_paste_text atk_gobject_accessible_get_type atk_gobject_accessible_for_object atk_gobject_accessible_get_object atk_hyperlink_get_type atk_hyperlink_get_uri atk_hyperlink_get_object atk_hyperlink_get_end_index atk_hyperlink_get_start_index atk_hyperlink_is_valid atk_hyperlink_get_n_anchors atk_hypertext_get_type atk_hypertext_get_link atk_hypertext_get_n_links atk_hypertext_get_link_index atk_image_get_type atk_image_get_image_description atk_image_set_image_description atk_no_op_object_get_type atk_no_op_object_new atk_no_op_object_factory_get_type atk_no_op_object_factory_new atk_implementor_get_type atk_implementor_ref_accessible atk_object_get_type atk_object_get_name atk_object_get_description atk_object_get_parent atk_object_get_n_accessible_children atk_object_ref_accessible_child atk_object_ref_relation_set atk_object_get_role atk_object_get_layer atk_object_get_mdi_zorder atk_object_ref_state_set atk_object_get_index_in_parent atk_object_set_name atk_object_set_description atk_object_set_parent atk_object_set_role atk_object_remove_property_change_handler atk_object_add_relationship atk_object_remove_relationship atk_object_factory_get_type atk_object_factory_create_accessible atk_object_factory_invalidate atk_object_factory_get_accessible_type atk_registry_get_type atk_registry_set_factory_type atk_registry_get_factory_type atk_registry_get_factory atk_relation_get_type atk_relation_type_register atk_relation_type_get_name atk_relation_type_for_name atk_relation_get_relation_type atk_relation_set_get_type atk_relation_set_new atk_relation_set_contains atk_relation_set_remove atk_relation_set_add atk_relation_set_get_n_relations atk_relation_set_get_relation atk_relation_set_get_relation_by_type atk_selection_get_type atk_selection_add_selection atk_selection_clear_selection atk_selection_ref_selection atk_selection_get_selection_count atk_selection_is_child_selected atk_selection_remove_selection atk_selection_select_all_selection atk_state_set_get_type atk_state_set_new atk_state_set_is_empty atk_state_set_add_state atk_state_set_add_states atk_state_set_clear_states atk_state_set_contains_state atk_state_set_contains_states atk_state_set_remove_state atk_state_set_and_sets atk_state_set_or_sets atk_state_set_xor_sets atk_streamable_content_get_type atk_streamable_content_get_n_mime_types atk_streamable_content_get_mime_type atk_table_get_type atk_table_ref_at atk_table_get_index_at atk_table_get_column_at_index atk_table_get_row_at_index atk_table_get_n_columns atk_table_get_n_rows atk_table_get_column_extent_at atk_table_get_row_extent_at atk_table_get_caption atk_table_get_column_description atk_table_get_column_header atk_table_get_row_description atk_table_get_row_header atk_table_get_summary atk_table_set_caption atk_table_set_column_description atk_table_set_column_header atk_table_set_row_description atk_table_set_row_header atk_table_set_summary atk_table_is_column_selected atk_table_is_row_selected atk_table_is_selected atk_table_add_row_selection atk_table_remove_row_selection atk_table_add_column_selection atk_table_remove_column_selection atk_text_attribute_register atk_text_get_type atk_text_get_text atk_text_get_caret_offset atk_text_get_character_count atk_text_get_offset_at_point atk_text_get_n_selections atk_text_add_selection atk_text_remove_selection atk_text_set_selection atk_text_set_caret_offset atk_text_attribute_get_name atk_text_attribute_for_name atk_text_attribute_get_value atk_util_get_type atk_value_get_type atk_value_get_current_value atk_value_get_maximum_value atk_value_get_minimum_value atk_value_set_current_value
Manually handled functions:
Unimplmented stubs:
atk::component add_focus_handler (atk_component_add_focus_handler) atk::component get_extents (atk_component_get_extents) atk::component get_position (atk_component_get_position) atk::component get_size (atk_component_get_size) atk::document get_document (atk_document_get_document) atk::editable_text set_run_attributes (atk_editable_text_set_run_attributes) atk::editable_text insert_text (atk_editable_text_insert_text) atk::image get_image_size (atk_image_get_image_size) atk::image get_image_position (atk_image_get_image_position) atk::object connect_property_change_handler (atk_object_connect_property_change_handler) atk::object notify_state_change (atk_object_notify_state_change) atk::object initialize (atk_object_initialize) atk::relation new (atk_relation_new) atk::relation get_target (atk_relation_get_target) atk::streamable_content get_stream (atk_streamable_content_get_stream) atk::table get_selected_columns (atk_table_get_selected_columns) atk::table get_selected_rows (atk_table_get_selected_rows) atk::text get_character_at_offset (atk_text_get_character_at_offset) atk::text get_text_after_offset (atk_text_get_text_after_offset) atk::text get_text_at_offset (atk_text_get_text_at_offset) atk::text get_text_before_offset (atk_text_get_text_before_offset) atk::text get_character_extents (atk_text_get_character_extents) atk::text get_run_attributes (atk_text_get_run_attributes) atk::text get_default_attributes (atk_text_get_default_attributes) atk::text get_selection (atk_text_get_selection)
This packages wraps the GdkPixbuf library used by Gtk. See http://developer.gnome.org/doc/API/2.0/gdk for more information.
Only a bit of this that is useful for event handling in gdk is wrapped. If the rest of gdk is useful, it could be wrapped, or the few event handling commands needed moved into the Gtk package.
A number of functions were added as accessors for the GdkEvent structure.
For ease of use a number of the functions wrapped are named differently and take arguments in slighly different forms.
Functions added to help interoperate with Gdk.
This packages wraps the GdkPixbuf library used by Gtk. See http://developer.gnome.org/doc/API/2.0/gdk-pixbuf for more information.
The package may have additional procedures available which do not correspond to functions in the library.
The manually implementented functions usually have somewhat different calling conventions than the C function they wrap.
Usage
Wraps gdk_pixbuf_animation_new_from_file.
Usage
Wraps gdk_pixbuf_get_pixels. Returns a copy of all the pixel data in obj as binary data.
Usage
Wraps gdk_pixbuf_new_from_data. No destroy callback since our implementation needs it.
Usage
Wraps gdk_pixbuf_new_from_xpm_data. data is a list of the strings making up the xpm.
Usage
Wraps gdk_pixbuf_savev. options is a list of keys and values.
Usage
Wraps gdk_pixbuf_loader_write.
Automatically handled functions:
gdk_pixbuf_alpha_mode_get_type gdk_pixbuf_error_get_type gdk_interp_type_get_type gdk_colorspace_get_type gdk_pixbuf_loader_get_type gdk_pixbuf_loader_new gdk_pixbuf_loader_get_pixbuf gdk_pixbuf_loader_get_animation gdk_pixbuf_animation_iter_get_type gdk_pixbuf_animation_iter_get_delay_time gdk_pixbuf_animation_iter_get_pixbuf gdk_pixbuf_animation_iter_on_currently_loading_frame gdk_pixbuf_animation_get_type gdk_pixbuf_animation_get_width gdk_pixbuf_animation_get_height gdk_pixbuf_animation_is_static_image gdk_pixbuf_animation_get_static_image gdk_pixbuf_error_quark gdk_pixbuf_get_type gdk_pixbuf_get_colorspace gdk_pixbuf_get_n_channels gdk_pixbuf_get_has_alpha gdk_pixbuf_get_bits_per_sample gdk_pixbuf_get_width gdk_pixbuf_get_height gdk_pixbuf_get_rowstride gdk_pixbuf_new gdk_pixbuf_copy gdk_pixbuf_new_subpixbuf gdk_pixbuf_fill gdk_pixbuf_add_alpha gdk_pixbuf_copy_area gdk_pixbuf_saturate_and_pixelate gdk_pixbuf_scale gdk_pixbuf_composite gdk_pixbuf_composite_color gdk_pixbuf_scale_simple gdk_pixbuf_composite_color_simple gdk_pixbuf_get_option
Manually handled functions:
gdk::pixbuf_loader new_with_type (gdk_pixbuf_loader_new_with_type) gdk::pixbuf_loader write (gdk_pixbuf_loader_write) gdk::pixbuf_loader close (gdk_pixbuf_loader_close) gdk::pixbuf_animation_iter advance (gdk_pixbuf_animation_iter_advance) gdk::pixbuf_animation new_from_file (gdk_pixbuf_animation_new_from_file) gdk::pixbuf_animation get_iter (gdk_pixbuf_animation_get_iter) gdk::pixbuf get_pixels (gdk_pixbuf_get_pixels) gdk::pixbuf new_from_file (gdk_pixbuf_new_from_file) gdk::pixbuf new_from_data (gdk_pixbuf_new_from_data) gdk::pixbuf new_from_xpm_data (gdk_pixbuf_new_from_xpm_data) gdk::pixbuf save (gdk_pixbuf_savev)
Unimplmented stubs:
gdk::pixbuf new_from_inline (gdk_pixbuf_new_from_inline)
This packages wraps the libgnome and libgnomeui libraries. See http://developer.gnome.org/doc/API/api-toc.html for more information.
I wrapped the needed initialization functions and widgets that looked useful. Much of the old functionality is now available in Gtk 2.0 and the gnome documentation hasn't been updated in a while which made choosing quite difficult.
Gnome programs must call gnome::program init before doing anything else.
The package may have additional procedures available which do not correspond to functions in the library.
For ease of use a number of the functions wrapped are named differently and take arguments in slighly different forms.
Usage
Wraps gnome_program_init.
Usage
Wraps gnome_help_display.
Automatically handled functions:
gnome_about_get_type gnome_app_get_type gnome_app_new gnome_app_set_menus gnome_app_set_toolbar gnome_app_set_statusbar gnome_app_set_statusbar_custom gnome_app_set_contents gnome_app_enable_layout_config gnome_appbar_get_type gnome_appbar_new gnome_appbar_set_status gnome_appbar_get_status gnome_appbar_set_default gnome_appbar_push gnome_appbar_pop gnome_appbar_clear_stack gnome_appbar_set_progress_percentage gnome_appbar_get_progress gnome_appbar_refresh gnome_appbar_set_prompt gnome_appbar_clear_prompt gnome_appbar_get_response gnome_client_module_info_get gnome_client_get_type gnome_client_get_config_prefix gnome_client_get_global_config_prefix gnome_client_set_global_config_prefix gnome_client_get_flags gnome_client_set_restart_style gnome_client_set_priority gnome_client_set_restart_command gnome_client_set_discard_command gnome_client_set_resign_command gnome_client_set_shutdown_command gnome_client_set_current_directory gnome_client_set_environment gnome_client_set_clone_command gnome_client_set_process_id gnome_client_set_program gnome_client_set_user_id gnome_client_save_any_dialog gnome_client_save_error_dialog gnome_client_request_phase_2 gnome_client_request_save gnome_client_flush gnome_client_new gnome_client_new_without_connection gnome_client_connect gnome_client_disconnect gnome_client_set_id gnome_client_get_id gnome_client_get_previous_id gnome_client_get_desktop_id gnome_color_picker_get_type gnome_color_picker_new gnome_color_picker_set_d gnome_color_picker_set_i8 gnome_color_picker_set_i16 gnome_color_picker_set_dither gnome_color_picker_get_dither gnome_color_picker_set_use_alpha gnome_color_picker_get_use_alpha gnome_color_picker_set_title gnome_color_picker_get_title gnome_date_edit_get_type gnome_date_edit_new gnome_date_edit_new_flags gnome_date_edit_set_time gnome_date_edit_get_time gnome_date_edit_set_popup_range gnome_date_edit_set_flags gnome_date_edit_get_flags gnome_date_edit_get_initial_time gnome_druid_page_edge_get_type gnome_druid_page_edge_new gnome_druid_page_edge_new_aa gnome_druid_page_edge_new_with_vals gnome_druid_page_edge_set_bg_color gnome_druid_page_edge_set_textbox_color gnome_druid_page_edge_set_logo_bg_color gnome_druid_page_edge_set_title_color gnome_druid_page_edge_set_text_color gnome_druid_page_edge_set_text gnome_druid_page_edge_set_title gnome_druid_page_edge_set_logo gnome_druid_page_edge_set_watermark gnome_druid_page_edge_set_top_watermark gnome_druid_page_standard_get_type gnome_druid_page_standard_new gnome_druid_page_standard_new_with_vals gnome_druid_page_standard_set_title gnome_druid_page_standard_set_logo gnome_druid_page_standard_set_top_watermark gnome_druid_page_standard_set_title_foreground gnome_druid_page_standard_set_background gnome_druid_page_standard_set_logo_background gnome_druid_page_standard_set_contents_background gnome_druid_page_standard_append_item gnome_druid_page_get_type gnome_druid_page_new gnome_druid_page_next gnome_druid_page_prepare gnome_druid_page_back gnome_druid_page_cancel gnome_druid_page_finish gnome_druid_get_type gnome_druid_new gnome_druid_set_buttons_sensitive gnome_druid_set_show_finish gnome_druid_set_show_help gnome_druid_prepend_page gnome_druid_insert_page gnome_druid_append_page gnome_druid_set_page gnome_entry_get_type gnome_entry_new gnome_entry_gtk_entry gnome_entry_get_history_id gnome_entry_set_history_id gnome_entry_set_max_saved gnome_entry_get_max_saved gnome_entry_prepend_history gnome_entry_append_history gnome_entry_clear_history gnome_file_entry_get_type gnome_file_entry_new gnome_file_entry_gnome_entry gnome_file_entry_gtk_entry gnome_file_entry_set_title gnome_file_entry_set_default_path gnome_file_entry_set_directory_entry gnome_file_entry_get_directory_entry gnome_file_entry_get_full_path gnome_file_entry_set_filename gnome_file_entry_set_modal gnome_file_entry_get_modal gnome_font_picker_get_type gnome_font_picker_new gnome_font_picker_set_title gnome_font_picker_get_title gnome_font_picker_get_mode gnome_font_picker_set_mode gnome_font_picker_fi_set_use_font_in_label gnome_font_picker_fi_set_show_size gnome_font_picker_uw_set_widget gnome_font_picker_uw_get_widget gnome_font_picker_get_font_name gnome_font_picker_set_font_name gnome_font_picker_get_preview_text gnome_font_picker_set_preview_text gnome_font_picker_get_font gnome_href_get_type gnome_href_new gnome_href_set_url gnome_href_get_url gnome_href_set_text gnome_href_get_text gnome_icon_entry_get_type gnome_icon_entry_new gnome_icon_entry_set_pixmap_subdir gnome_icon_entry_get_filename gnome_icon_entry_set_filename gnome_icon_entry_set_browse_dialog_title gnome_icon_entry_set_history_id gnome_icon_entry_pick_dialog gnome_icon_entry_set_icon gnome_icon_entry_gnome_file_entry gnome_icon_entry_gnome_entry gnome_icon_entry_gtk_entry gnome_icon_list_get_type gnome_icon_list_new gnome_icon_list_set_hadjustment gnome_icon_list_set_vadjustment gnome_icon_list_freeze gnome_icon_list_thaw gnome_icon_list_insert gnome_icon_list_insert_pixbuf gnome_icon_list_append gnome_icon_list_append_pixbuf gnome_icon_list_clear gnome_icon_list_remove gnome_icon_list_get_num_icons gnome_icon_list_get_selection_mode gnome_icon_list_set_selection_mode gnome_icon_list_select_icon gnome_icon_list_unselect_icon gnome_icon_list_unselect_all gnome_icon_list_set_icon_width gnome_icon_list_set_row_spacing gnome_icon_list_set_col_spacing gnome_icon_list_set_text_spacing gnome_icon_list_set_icon_border gnome_icon_list_set_separators gnome_icon_list_get_icon_filename gnome_icon_list_find_icon_from_filename gnome_icon_list_moveto gnome_icon_list_icon_is_visible gnome_icon_list_get_icon_at gnome_icon_list_get_items_per_line gnome_icon_selection_get_type gnome_icon_selection_new gnome_icon_selection_add_defaults gnome_icon_selection_add_directory gnome_icon_selection_show_icons gnome_icon_selection_clear gnome_icon_selection_get_icon gnome_icon_selection_select_icon gnome_icon_selection_stop_loading gnome_icon_selection_get_gil gnome_icon_selection_get_box gnome_pixmap_entry_get_type gnome_pixmap_entry_new gnome_pixmap_entry_set_pixmap_subdir gnome_pixmap_entry_scrolled_window gnome_pixmap_entry_preview_widget gnome_pixmap_entry_set_preview gnome_pixmap_entry_set_preview_size gnome_pixmap_entry_get_filename gnome_help_error_quark gnome_program_get_type gnome_program_get gnome_program_get_human_readable_name gnome_program_get_app_id gnome_program_get_app_version gnome_url_error_quark
Manually handled functions:
gnome::about new (gnome_about_new) gnome::help display (gnome_help_display) gnome::program init (gnome_program_init) gnome::url show (gnome_url_show)
Unimplmented stubs:
gnome::app add_toolbar (gnome_app_add_toolbar) gnome::app add_docked (gnome_app_add_docked) gnome::app add_dock_item (gnome_app_add_dock_item) gnome::app get_dock (gnome_app_get_dock) gnome::app get_dock_item_by_name (gnome_app_get_dock_item_by_name) gnome::client add_static_arg (gnome_client_add_static_arg) gnome::client request_interaction (gnome_client_request_interaction) gnome::client request_interaction_interp (gnome_client_request_interaction_interp) gnome::color_picker get_d (gnome_color_picker_get_d) gnome::color_picker get_i8 (gnome_color_picker_get_i8) gnome::color_picker get_i16 (gnome_color_picker_get_i16) gnome::druid new_with_window (gnome_druid_new_with_window) gnome::icon_list get_selection (gnome_icon_list_get_selection) gnome::icon_list set_icon_data (gnome_icon_list_set_icon_data) gnome::icon_list set_icon_data_full (gnome_icon_list_set_icon_data_full) gnome::icon_list find_icon_from_data (gnome_icon_list_find_icon_from_data) gnome::icon_list get_icon_data (gnome_icon_list_get_icon_data) gnome::icon_list get_icon_text_item (gnome_icon_list_get_icon_text_item) gnome::icon_list get_icon_pixbuf_item (gnome_icon_list_get_icon_pixbuf_item) gnome::help display_with_doc_id (gnome_help_display_with_doc_id) gnome::help display_desktop (gnome_help_display_desktop) gnome::help display_uri (gnome_help_display_uri)
This packages wraps the Gtk library. See http://developer.gnome.org/doc/API/2.0/gtk for more information.
Almost all the functionality of Gtk is available. Work needs to be done on the new tree and text widgets.
New commands were added to create GtkTextIter and GtkTreeIter as well as add stock items.
The package may have additional procedures available which do not correspond to functions in the library.
For ease of use a number of the functions wrapped are named differently and take arguments in slighly different forms.
Adds the ability to create a GtkTextIter since it can't be allocated on the heap like in C. Must be freed with gtk_text_iter_free.
Adds the ability to create a GtkTreeIter since it can't be allocated on the heap like in C. Must be freed with gtk_tree_iter_free.
Usage
Wraps gtk_toolbar_insert_stock. Have to bind own script to clicked.
Usage
Wraps gtk_stock_add_static. The arguments are the contents of a GtkStockItem except that keyval is a string.
Usage
Wraps gtk_message_dialog_new.
Usage
Wraps gtk_tree_selection_get_selected.
Automatically handled functions:
gtk_accel_group_get_type gtk_accel_group_new gtk_accel_group_lock gtk_accel_group_unlock gtk_accel_group_connect gtk_accel_group_connect_by_path gtk_accel_group_disconnect gtk_accel_group_disconnect_key gtk_accel_group_from_accel_closure gtk_accelerator_valid gtk_accelerator_name gtk_accelerator_set_default_mod_mask gtk_accelerator_get_default_mod_mask gtk_accel_label_get_type gtk_accel_label_new gtk_accel_label_get_accel_widget gtk_accel_label_get_accel_width gtk_accel_label_set_accel_widget gtk_accel_label_set_accel_closure gtk_accel_label_refetch gtk_accel_map_add_entry gtk_accel_map_change_entry gtk_accel_map_load gtk_accel_map_save gtk_accel_map_load_fd gtk_accel_map_save_fd gtk_accel_map_add_filter gtk_accessible_get_type gtk_accessible_connect_widget_destroyed gtk_adjustment_get_type gtk_adjustment_new gtk_adjustment_changed gtk_adjustment_value_changed gtk_adjustment_clamp_page gtk_adjustment_get_value gtk_adjustment_set_value gtk_alignment_get_type gtk_alignment_new gtk_alignment_set gtk_arrow_get_type gtk_arrow_new gtk_arrow_set gtk_aspect_frame_get_type gtk_aspect_frame_new gtk_aspect_frame_set gtk_button_box_get_type gtk_button_box_get_layout gtk_button_box_set_layout gtk_button_box_set_child_secondary gtk_bin_get_type gtk_bin_get_child gtk_box_get_type gtk_box_pack_start gtk_box_pack_end gtk_box_pack_start_defaults gtk_box_pack_end_defaults gtk_box_set_homogeneous gtk_box_get_homogeneous gtk_box_set_spacing gtk_box_get_spacing gtk_box_reorder_child gtk_box_set_child_packing gtk_button_get_type gtk_button_new gtk_button_new_with_label gtk_button_new_from_stock gtk_button_new_with_mnemonic gtk_button_pressed gtk_button_released gtk_button_clicked gtk_button_enter gtk_button_leave gtk_button_set_relief gtk_button_get_relief gtk_button_set_label gtk_button_get_label gtk_button_set_use_underline gtk_button_get_use_underline gtk_button_set_use_stock gtk_button_get_use_stock gtk_calendar_get_type gtk_calendar_new gtk_calendar_select_month gtk_calendar_select_day gtk_calendar_mark_day gtk_calendar_unmark_day gtk_calendar_clear_marks gtk_calendar_display_options gtk_calendar_freeze gtk_calendar_thaw gtk_cell_editable_get_type gtk_cell_editable_start_editing gtk_cell_editable_editing_done gtk_cell_editable_remove_widget gtk_cell_renderer_get_type gtk_cell_renderer_render gtk_cell_renderer_activate gtk_cell_renderer_start_editing gtk_cell_renderer_set_fixed_size gtk_cell_renderer_pixbuf_get_type gtk_cell_renderer_pixbuf_new gtk_cell_renderer_text_get_type gtk_cell_renderer_text_new gtk_cell_renderer_text_set_fixed_height_from_font gtk_cell_renderer_toggle_get_type gtk_cell_renderer_toggle_new gtk_cell_renderer_toggle_get_radio gtk_cell_renderer_toggle_set_radio gtk_cell_renderer_toggle_get_active gtk_cell_renderer_toggle_set_active gtk_check_button_get_type gtk_check_button_new gtk_check_button_new_with_label gtk_check_button_new_with_mnemonic gtk_check_menu_item_get_type gtk_check_menu_item_new gtk_check_menu_item_new_with_label gtk_check_menu_item_new_with_mnemonic gtk_check_menu_item_set_active gtk_check_menu_item_get_active gtk_check_menu_item_toggled gtk_check_menu_item_set_inconsistent gtk_check_menu_item_get_inconsistent gtk_clipboard_get_type gtk_clipboard_get_display gtk_clipboard_get_owner gtk_clipboard_clear gtk_clipboard_set_text gtk_clipboard_wait_for_text gtk_clipboard_wait_is_text_available gtk_color_selection_get_type gtk_color_selection_new gtk_color_selection_get_has_opacity_control gtk_color_selection_set_has_opacity_control gtk_color_selection_get_has_palette gtk_color_selection_set_has_palette gtk_color_selection_set_current_color gtk_color_selection_set_current_alpha gtk_color_selection_get_current_color gtk_color_selection_get_current_alpha gtk_color_selection_set_previous_color gtk_color_selection_set_previous_alpha gtk_color_selection_get_previous_color gtk_color_selection_get_previous_alpha gtk_color_selection_is_adjusting gtk_color_selection_palette_to_string gtk_color_selection_dialog_get_type gtk_color_selection_dialog_new gtk_combo_get_type gtk_combo_new gtk_combo_set_value_in_list gtk_combo_set_use_arrows gtk_combo_set_use_arrows_always gtk_combo_set_case_sensitive gtk_combo_set_item_string gtk_combo_disable_activate gtk_container_get_type gtk_container_set_border_width gtk_container_get_border_width gtk_container_add gtk_container_remove gtk_container_set_resize_mode gtk_container_get_resize_mode gtk_container_check_resize gtk_container_unset_focus_chain gtk_container_set_reallocate_redraws gtk_container_set_focus_child gtk_container_set_focus_vadjustment gtk_container_get_focus_vadjustment gtk_container_set_focus_hadjustment gtk_container_get_focus_hadjustment gtk_container_resize_children gtk_container_child_type gtk_container_child_set_property gtk_container_child_get_property gtk_dialog_get_type gtk_dialog_new gtk_dialog_add_action_widget gtk_dialog_add_button gtk_dialog_set_response_sensitive gtk_dialog_set_default_response gtk_dialog_set_has_separator gtk_dialog_get_has_separator gtk_dialog_response gtk_dialog_run gtk_drag_finish gtk_drag_get_source_widget gtk_drag_highlight gtk_drag_unhighlight gtk_drag_dest_set_proxy gtk_drag_dest_unset gtk_drag_source_unset gtk_drag_source_set_icon gtk_drag_source_set_icon_pixbuf gtk_drag_source_set_icon_stock gtk_drag_set_icon_widget gtk_drag_set_icon_pixmap gtk_drag_set_icon_pixbuf gtk_drag_set_icon_stock gtk_drag_set_icon_default gtk_drag_check_threshold gtk_drawing_area_get_type gtk_drawing_area_new gtk_editable_get_type gtk_editable_select_region gtk_editable_delete_text gtk_editable_get_chars gtk_editable_cut_clipboard gtk_editable_copy_clipboard gtk_editable_paste_clipboard gtk_editable_delete_selection gtk_editable_set_position gtk_editable_get_position gtk_editable_set_editable gtk_editable_get_editable gtk_entry_get_type gtk_entry_new gtk_entry_set_visibility gtk_entry_get_visibility gtk_entry_set_invisible_char gtk_entry_get_invisible_char gtk_entry_set_has_frame gtk_entry_get_has_frame gtk_entry_set_max_length gtk_entry_get_max_length gtk_entry_set_activates_default gtk_entry_get_activates_default gtk_entry_set_width_chars gtk_entry_get_width_chars gtk_entry_set_text gtk_entry_get_text gtk_entry_get_layout gtk_event_box_get_type gtk_event_box_new gtk_file_selection_get_type gtk_file_selection_new gtk_file_selection_set_filename gtk_file_selection_get_filename gtk_file_selection_complete gtk_file_selection_show_fileop_buttons gtk_file_selection_hide_fileop_buttons gtk_file_selection_set_select_multiple gtk_file_selection_get_select_multiple gtk_fixed_get_type gtk_fixed_new gtk_fixed_put gtk_fixed_move gtk_fixed_set_has_window gtk_fixed_get_has_window gtk_font_selection_dialog_get_type gtk_font_selection_dialog_new gtk_font_selection_dialog_get_font_name gtk_font_selection_dialog_set_font_name gtk_font_selection_dialog_get_preview_text gtk_font_selection_dialog_set_preview_text gtk_font_selection_get_type gtk_font_selection_new gtk_font_selection_get_font_name gtk_font_selection_set_font_name gtk_font_selection_get_preview_text gtk_font_selection_set_preview_text gtk_frame_get_type gtk_frame_new gtk_frame_set_label gtk_frame_get_label gtk_frame_set_label_widget gtk_frame_get_label_widget gtk_frame_set_label_align gtk_frame_set_shadow_type gtk_frame_get_shadow_type gtk_gc_release gtk_handle_box_get_type gtk_handle_box_new gtk_handle_box_set_shadow_type gtk_handle_box_get_shadow_type gtk_handle_box_set_handle_position gtk_handle_box_get_handle_position gtk_handle_box_set_snap_edge gtk_handle_box_get_snap_edge gtk_hbutton_box_get_type gtk_hbutton_box_new gtk_hbox_get_type gtk_hbox_new gtk_hpaned_get_type gtk_hpaned_new gtk_hscale_get_type gtk_hscale_new gtk_hscale_new_with_range gtk_hscrollbar_get_type gtk_hscrollbar_new gtk_hseparator_get_type gtk_hseparator_new gtk_icon_factory_get_type gtk_icon_factory_new gtk_icon_factory_add gtk_icon_factory_lookup gtk_icon_factory_add_default gtk_icon_factory_remove_default gtk_icon_factory_lookup_default gtk_icon_source_get_type gtk_icon_source_new gtk_icon_source_copy gtk_icon_source_free gtk_icon_source_set_filename gtk_icon_source_set_pixbuf gtk_icon_source_get_filename gtk_icon_source_get_pixbuf gtk_icon_source_set_direction_wildcarded gtk_icon_source_set_state_wildcarded gtk_icon_source_set_size_wildcarded gtk_icon_source_get_size_wildcarded gtk_icon_source_get_state_wildcarded gtk_icon_source_get_direction_wildcarded gtk_icon_source_set_direction gtk_icon_source_set_state gtk_icon_source_set_size gtk_icon_source_get_direction gtk_icon_source_get_state gtk_icon_source_get_size gtk_icon_set_get_type gtk_icon_set_new gtk_icon_set_new_from_pixbuf gtk_icon_set_ref gtk_icon_set_unref gtk_icon_set_copy gtk_icon_set_render_icon gtk_icon_set_add_source gtk_image_get_type gtk_image_new gtk_image_new_from_pixmap gtk_image_new_from_image gtk_image_new_from_file gtk_image_new_from_pixbuf gtk_image_new_from_stock gtk_image_new_from_icon_set gtk_image_new_from_animation gtk_image_set_from_pixmap gtk_image_set_from_image gtk_image_set_from_file gtk_image_set_from_pixbuf gtk_image_set_from_stock gtk_image_set_from_icon_set gtk_image_set_from_animation gtk_image_get_storage_type gtk_image_get_pixbuf gtk_image_get_animation gtk_image_menu_item_get_type gtk_image_menu_item_new gtk_image_menu_item_new_with_label gtk_image_menu_item_new_with_mnemonic gtk_image_menu_item_new_from_stock gtk_image_menu_item_set_image gtk_image_menu_item_get_image gtk_input_dialog_get_type gtk_input_dialog_new gtk_item_get_type gtk_item_select gtk_item_deselect gtk_item_toggle gtk_item_factory_get_type gtk_item_factory_new gtk_item_factory_construct gtk_item_factory_add_foreign gtk_item_factory_from_widget gtk_item_factory_path_from_widget gtk_item_factory_get_item gtk_item_factory_get_widget gtk_item_factory_get_widget_by_action gtk_item_factory_get_item_by_action gtk_item_factory_delete_item gtk_item_factory_popup gtk_label_get_type gtk_label_new gtk_label_new_with_mnemonic gtk_label_set_text gtk_label_get_text gtk_label_set_attributes gtk_label_get_attributes gtk_label_set_label gtk_label_get_label gtk_label_set_markup gtk_label_set_use_markup gtk_label_get_use_markup gtk_label_set_use_underline gtk_label_get_use_underline gtk_label_set_markup_with_mnemonic gtk_label_get_mnemonic_keyval gtk_label_set_mnemonic_widget gtk_label_get_mnemonic_widget gtk_label_set_text_with_mnemonic gtk_label_set_justify gtk_label_get_justify gtk_label_set_pattern gtk_label_set_line_wrap gtk_label_get_line_wrap gtk_label_set_selectable gtk_label_get_selectable gtk_label_select_region gtk_label_get_layout gtk_layout_get_type gtk_layout_new gtk_layout_put gtk_layout_move gtk_layout_set_size gtk_layout_get_hadjustment gtk_layout_get_vadjustment gtk_layout_set_hadjustment gtk_layout_set_vadjustment gtk_list_store_get_type gtk_list_store_remove gtk_list_store_insert gtk_list_store_insert_before gtk_list_store_insert_after gtk_list_store_prepend gtk_list_store_append gtk_list_store_clear gtk_list_store_iter_is_valid gtk_list_store_swap gtk_list_store_move_after gtk_list_store_move_before gtk_menu_get_type gtk_menu_new gtk_menu_reposition gtk_menu_popdown gtk_menu_get_active gtk_menu_set_active gtk_menu_set_accel_group gtk_menu_get_accel_group gtk_menu_set_accel_path gtk_menu_detach gtk_menu_get_attach_widget gtk_menu_set_tearoff_state gtk_menu_get_tearoff_state gtk_menu_set_title gtk_menu_get_title gtk_menu_reorder_child gtk_menu_set_screen gtk_menu_bar_get_type gtk_menu_bar_new gtk_menu_item_get_type gtk_menu_item_new gtk_menu_item_new_with_label gtk_menu_item_new_with_mnemonic gtk_menu_item_set_submenu gtk_menu_item_get_submenu gtk_menu_item_remove_submenu gtk_menu_item_select gtk_menu_item_deselect gtk_menu_item_activate gtk_menu_item_toggle_size_allocate gtk_menu_item_set_right_justified gtk_menu_item_get_right_justified gtk_menu_item_set_accel_path gtk_menu_shell_get_type gtk_menu_shell_append gtk_menu_shell_prepend gtk_menu_shell_insert gtk_menu_shell_deactivate gtk_menu_shell_select_item gtk_menu_shell_deselect gtk_menu_shell_activate_item gtk_menu_shell_select_first gtk_message_dialog_get_type gtk_misc_get_type gtk_misc_set_alignment gtk_misc_set_padding gtk_notebook_get_type gtk_notebook_new gtk_notebook_append_page gtk_notebook_append_page_menu gtk_notebook_prepend_page gtk_notebook_prepend_page_menu gtk_notebook_insert_page gtk_notebook_insert_page_menu gtk_notebook_remove_page gtk_notebook_get_current_page gtk_notebook_get_nth_page gtk_notebook_get_n_pages gtk_notebook_page_num gtk_notebook_set_current_page gtk_notebook_next_page gtk_notebook_prev_page gtk_notebook_set_show_border gtk_notebook_get_show_border gtk_notebook_set_show_tabs gtk_notebook_get_show_tabs gtk_notebook_set_tab_pos gtk_notebook_get_tab_pos gtk_notebook_set_scrollable gtk_notebook_get_scrollable gtk_notebook_popup_enable gtk_notebook_popup_disable gtk_notebook_get_tab_label gtk_notebook_set_tab_label gtk_notebook_set_tab_label_text gtk_notebook_get_tab_label_text gtk_notebook_get_menu_label gtk_notebook_set_menu_label gtk_notebook_set_menu_label_text gtk_notebook_get_menu_label_text gtk_notebook_set_tab_label_packing gtk_notebook_reorder_child gtk_option_menu_get_type gtk_option_menu_new gtk_option_menu_get_menu gtk_option_menu_set_menu gtk_option_menu_remove_menu gtk_option_menu_get_history gtk_option_menu_set_history gtk_paned_get_type gtk_paned_add1 gtk_paned_add2 gtk_paned_pack1 gtk_paned_pack2 gtk_paned_get_position gtk_paned_set_position gtk_paned_compute_position gtk_progress_bar_get_type gtk_progress_bar_new gtk_progress_bar_pulse gtk_progress_bar_set_text gtk_progress_bar_set_fraction gtk_progress_bar_set_pulse_step gtk_progress_bar_set_orientation gtk_progress_bar_get_text gtk_progress_bar_get_fraction gtk_progress_bar_get_pulse_step gtk_progress_bar_get_orientation gtk_radio_button_get_type gtk_radio_button_new_from_widget gtk_radio_button_new_with_label_from_widget gtk_radio_button_new_with_mnemonic_from_widget gtk_radio_menu_item_get_type gtk_range_get_type gtk_range_set_update_policy gtk_range_get_update_policy gtk_range_set_adjustment gtk_range_get_adjustment gtk_range_set_inverted gtk_range_get_inverted gtk_range_set_increments gtk_range_set_range gtk_range_set_value gtk_range_get_value gtk_scale_get_type gtk_scale_set_digits gtk_scale_get_digits gtk_scale_set_draw_value gtk_scale_get_draw_value gtk_scale_set_value_pos gtk_scale_get_value_pos gtk_scrollbar_get_type gtk_scrolled_window_get_type gtk_scrolled_window_new gtk_scrolled_window_set_hadjustment gtk_scrolled_window_set_vadjustment gtk_scrolled_window_get_hadjustment gtk_scrolled_window_get_vadjustment gtk_scrolled_window_set_policy gtk_scrolled_window_get_policy gtk_scrolled_window_set_placement gtk_scrolled_window_get_placement gtk_scrolled_window_set_shadow_type gtk_scrolled_window_get_shadow_type gtk_scrolled_window_add_with_viewport gtk_separator_get_type gtk_separator_menu_item_get_type gtk_separator_menu_item_new gtk_settings_get_type gtk_settings_get_default gtk_settings_get_for_screen gtk_settings_install_property gtk_settings_set_string_property gtk_settings_set_long_property gtk_settings_set_double_property gtk_size_group_get_type gtk_size_group_new gtk_size_group_set_mode gtk_size_group_get_mode gtk_size_group_add_widget gtk_size_group_remove_widget gtk_spin_button_get_type gtk_spin_button_configure gtk_spin_button_new gtk_spin_button_new_with_range gtk_spin_button_set_adjustment gtk_spin_button_get_adjustment gtk_spin_button_set_digits gtk_spin_button_get_digits gtk_spin_button_set_increments gtk_spin_button_set_range gtk_spin_button_get_value gtk_spin_button_get_value_as_int gtk_spin_button_set_value gtk_spin_button_set_update_policy gtk_spin_button_get_update_policy gtk_spin_button_set_numeric gtk_spin_button_get_numeric gtk_spin_button_spin gtk_spin_button_set_wrap gtk_spin_button_get_wrap gtk_spin_button_set_snap_to_ticks gtk_spin_button_get_snap_to_ticks gtk_spin_button_update gtk_statusbar_get_type gtk_statusbar_new gtk_statusbar_get_context_id gtk_statusbar_push gtk_statusbar_pop gtk_statusbar_remove gtk_statusbar_set_has_resize_grip gtk_statusbar_get_has_resize_grip gtk_table_get_type gtk_table_new gtk_table_resize gtk_table_attach gtk_table_attach_defaults gtk_table_set_row_spacing gtk_table_get_row_spacing gtk_table_set_col_spacing gtk_table_get_col_spacing gtk_table_set_row_spacings gtk_table_get_default_row_spacing gtk_table_set_col_spacings gtk_table_get_default_col_spacing gtk_table_set_homogeneous gtk_table_get_homogeneous gtk_tearoff_menu_item_get_type gtk_tearoff_menu_item_new gtk_text_buffer_get_type gtk_text_buffer_new gtk_text_buffer_get_line_count gtk_text_buffer_get_char_count gtk_text_buffer_get_tag_table gtk_text_buffer_set_text gtk_text_buffer_insert gtk_text_buffer_insert_at_cursor gtk_text_buffer_insert_interactive gtk_text_buffer_insert_interactive_at_cursor gtk_text_buffer_insert_range gtk_text_buffer_insert_range_interactive gtk_text_buffer_delete gtk_text_buffer_delete_interactive gtk_text_buffer_get_text gtk_text_buffer_get_slice gtk_text_buffer_insert_pixbuf gtk_text_buffer_insert_child_anchor gtk_text_buffer_create_child_anchor gtk_text_buffer_create_mark gtk_text_buffer_move_mark gtk_text_buffer_delete_mark gtk_text_buffer_get_mark gtk_text_buffer_move_mark_by_name gtk_text_buffer_delete_mark_by_name gtk_text_buffer_get_insert gtk_text_buffer_get_selection_bound gtk_text_buffer_place_cursor gtk_text_buffer_apply_tag gtk_text_buffer_remove_tag gtk_text_buffer_apply_tag_by_name gtk_text_buffer_remove_tag_by_name gtk_text_buffer_remove_all_tags gtk_text_buffer_get_iter_at_line_offset gtk_text_buffer_get_iter_at_line_index gtk_text_buffer_get_iter_at_offset gtk_text_buffer_get_iter_at_line gtk_text_buffer_get_start_iter gtk_text_buffer_get_end_iter gtk_text_buffer_get_bounds gtk_text_buffer_get_iter_at_mark gtk_text_buffer_get_iter_at_child_anchor gtk_text_buffer_get_modified gtk_text_buffer_set_modified gtk_text_buffer_add_selection_clipboard gtk_text_buffer_remove_selection_clipboard gtk_text_buffer_cut_clipboard gtk_text_buffer_copy_clipboard gtk_text_buffer_paste_clipboard gtk_text_buffer_get_selection_bounds gtk_text_buffer_delete_selection gtk_text_buffer_begin_user_action gtk_text_buffer_end_user_action gtk_text_child_anchor_get_type gtk_text_child_anchor_new gtk_text_child_anchor_get_deleted gtk_text_iter_get_buffer gtk_text_iter_copy gtk_text_iter_free gtk_text_iter_get_type gtk_text_iter_get_offset gtk_text_iter_get_line gtk_text_iter_get_line_offset gtk_text_iter_get_line_index gtk_text_iter_get_visible_line_offset gtk_text_iter_get_visible_line_index gtk_text_iter_get_char gtk_text_iter_get_slice gtk_text_iter_get_text gtk_text_iter_get_visible_slice gtk_text_iter_get_visible_text gtk_text_iter_get_pixbuf