RSS/Atom feed Twitter
Site is read-only, email is disabled

Tool API [LONG!]

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Tool API [LONG!] Nathan Carl Summers 03 Apr 07:12
  Tool API [LONG!] Austin Donnelly 03 Apr 10:57
  Tool API [LONG!] Sven Neumann 03 Apr 11:53
  Tool API [LONG!] Sven Neumann 07 Apr 12:39
Nathan Carl Summers
2003-04-03 07:12:23 UTC (about 21 years ago)

Tool API [LONG!]

Here is a list of all the symbols currently used by the current tools, courtesy of
nm tools/*.o paint/*.o | cut -b 10- | grep ^T | cut -b 3- | sort | uniq

stdlib, glib, gdk, pango, and gtk calls have been eliminated from this list.

The big things that stand out are accessing the global "the_gimp", and calling tile and tile manager functions. "the_gimp" should not be accessed directly, and tile_manager is probably too ugly for tool developers with weak stomachs.

Rockwalrus

active_color add_alpha_region
apply_mask_to_region
blend_region
brightness_contrast_lut_setup
brush_scale_mask
brush_scale_pixmap
color_balance
color_balance_create_lookup_tables
color_balance_init
color_balance_range_reset
color_pixels
color_region
combine_mask_and_region
convolve_region
copy_region
curves_calculate_curve
curves_channel_reset
curves_init
curves_lut_func
find_mask_boundary
floating_sel_anchor
floating_sel_relax
floating_sel_rigor
gdisplays_check_valid
gimp_base_config_get_type
gimp_bezier_stroke_extend
gimp_bezier_stroke_get_type
gimp_bezier_stroke_new
gimp_brush_get_spacing
gimp_brush_get_type
gimp_brush_select_brush
gimp_brush_want_null_motion
gimp_bucket_fill_mode_get_type
gimp_channel_add_segment
gimp_channel_invalidate_bounds
gimp_channel_new_mask
gimp_channel_ops_get_type
gimp_channel_value
gimp_color_area_get_type
gimp_color_area_new
gimp_color_area_set_color
gimp_color_panel_get_type
gimp_color_panel_set_context
gimp_config_connect
gimp_config_copy_properties
gimp_config_deserialize
gimp_config_disconnect
gimp_config_duplicate
gimp_config_reset
gimp_config_serialize
gimp_container_add
gimp_container_add_handler
gimp_container_get_child_by_name
gimp_container_remove_handler
gimp_container_thaw
gimp_context_copy_properties
gimp_context_define_properties
gimp_context_get_brush
gimp_context_get_display
gimp_context_get_gradient
gimp_context_get_opacity
gimp_context_get_paint_mode
gimp_context_get_pattern
gimp_context_get_tool
gimp_context_get_type
gimp_context_new
gimp_context_set_background
gimp_context_set_display
gimp_context_set_foreground
gimp_context_set_parent
gimp_context_set_tool
gimp_context_tool_changed
gimp_crop_type_get_type
gimp_cursor_new
gimp_devices_get_current
gimp_dialog_create_action_area
gimp_dialog_factory_dialog_raise
gimp_dialog_get_type
gimp_directory
gimp_display_config_get_type
gimp_display_coords_in_active_drawable gimp_display_flush
gimp_display_flush_now
gimp_display_get_type
gimp_display_shell_draw_guide
gimp_display_shell_get_type
gimp_display_shell_scale_by_values
gimp_display_shell_selection_visibility gimp_display_shell_set_cursor
gimp_display_shell_set_override_cursor gimp_display_shell_transform_xy
gimp_display_shell_transform_xy_f
gimp_display_shell_unset_override_cursor gimp_display_shell_untransform_xy
gimp_dock_get_type
gimp_double_adjustment_update
gimp_drawable_blend
gimp_drawable_bucket_fill
gimp_drawable_bytes
gimp_drawable_calculate_histogram
gimp_drawable_data
gimp_drawable_get_color_at
gimp_drawable_get_type
gimp_drawable_has_alpha
gimp_drawable_height
gimp_drawable_is_indexed
gimp_drawable_is_rgb
gimp_drawable_mask_bounds
gimp_drawable_offsets
gimp_drawable_push_undo
gimp_drawable_transform_cut
gimp_drawable_transform_matrix_perspective gimp_drawable_transform_matrix_rotate_center gimp_drawable_transform_matrix_scale gimp_drawable_transform_matrix_shear gimp_drawable_transform_paste
gimp_drawable_transform_tiles_affine gimp_drawable_transform_tiles_flip
gimp_drawable_type
gimp_drawable_width
gimp_enum_option_menu_new
gimp_enum_radio_frame_new
gimp_get_current_context
gimp_get_mod_name_alt
gimp_get_mod_name_control
gimp_get_type
gimp_get_user_context
gimp_gradient_get_color_at
gimp_gradient_type_get_type
gimp_gui_config_get_type
gimp_help_connect
gimp_help_set_help_data
gimp_histogram_box_get_type
gimp_histogram_box_new
gimp_histogram_calculate
gimp_histogram_channel_get_type
gimp_histogram_free
gimp_histogram_get_count
gimp_histogram_get_mean
gimp_histogram_get_median
gimp_histogram_get_std_dev
gimp_histogram_nchannels
gimp_histogram_new
gimp_histogram_view_get_channel
gimp_histogram_view_get_type
gimp_histogram_view_new
gimp_histogram_view_set_channel
gimp_histogram_view_set_histogram
gimp_histogram_view_set_range
gimp_hls_to_rgb_int
gimp_image_active_drawable
gimp_image_add_guide
gimp_image_add_hguide
gimp_image_add_layer
gimp_image_add_vectors
gimp_image_add_vguide
gimp_image_apply_image
gimp_image_contiguous_region_by_seed gimp_image_crop
gimp_image_crop_auto_shrink
gimp_image_delete_guide
gimp_image_find_guide
gimp_image_floating_sel
gimp_image_flush
gimp_image_get_active_layer
gimp_image_get_background
gimp_image_get_color
gimp_image_get_foreground
gimp_image_get_type
gimp_image_map_abort
gimp_image_map_apply
gimp_image_map_clear
gimp_image_map_commit
gimp_image_map_get_color_at
gimp_image_map_new
gimp_image_mask_boundary
gimp_image_mask_bounds
gimp_image_mask_clear
gimp_image_mask_float
gimp_image_mask_is_empty
gimp_image_mask_select_by_color
gimp_image_mask_select_channel
gimp_image_mask_select_ellipse
gimp_image_mask_select_polygon
gimp_image_mask_select_rectangle
gimp_image_mask_translate
gimp_image_mask_value
gimp_image_pick_color
gimp_image_pick_correlate_layer
gimp_image_projection
gimp_image_projection_bytes
gimp_image_projection_get_color_at
gimp_image_remove_guide
gimp_image_replace_image
gimp_image_selection_control
gimp_image_set_active_layer
gimp_image_snap_rectangle
gimp_image_transform_color
gimp_image_undo
gimp_image_undo_freeze
gimp_image_undo_group_end
gimp_image_undo_group_start
gimp_image_undo_push
gimp_image_undo_push_image_guide
gimp_image_undo_thaw
gimp_image_update
gimp_image_update_guide
gimp_interpolation_type_get_type
gimp_item_factory_update
gimp_item_get_ID
gimp_item_get_image
gimp_item_get_type
gimp_layer_get_linked
gimp_layer_get_mask
gimp_layer_get_type
gimp_layer_is_floating_sel
gimp_layer_set_linked
gimp_layer_translate
gimp_list_get_type
gimp_list_new
gimp_lut_free
gimp_lut_new
gimp_lut_process
gimp_lut_process_2
gimp_lut_setup
gimp_lut_setup_exact
gimp_matrix3_duplicate
gimp_matrix3_identity
gimp_matrix3_invert
gimp_matrix3_transform_point
gimp_menu_item_update
gimp_object_get_type
gimp_object_set_name
gimp_option_menu_new
gimp_option_menu_new2
gimp_option_menu_set_history
gimp_option_menu_set_sensitive
gimp_orientation_type_get_type
gimp_paint_info_get_type
gimp_paint_info_new
gimp_param_spec_unit
gimp_progress_end
gimp_progress_start
gimp_progress_update_and_flush
gimp_prop_boolean_radio_frame_new
gimp_prop_check_button_new
gimp_prop_color_button_new
gimp_prop_enum_option_menu_new
gimp_prop_enum_radio_frame_new
gimp_prop_enum_stock_box_new
gimp_prop_font_selection_new
gimp_prop_opacity_entry_new
gimp_prop_paint_mode_menu_new
gimp_prop_preview_new
gimp_prop_scale_entry_new
gimp_prop_spin_button_new
gimp_prop_text_buffer_new
gimp_prop_unit_menu_new
gimp_radio_button_update
gimp_radio_group_set_active
gimp_rect_select_mode_get_type
gimp_repeat_mode_get_type
gimp_rgb_get_uchar
gimp_rgb_set_uchar
gimp_rgb_to_hls_int
gimp_rgba_get_uchar
gimp_rgba_set
gimp_rgba_set_uchar
gimp_scale_entry_new
gimp_scan_convert_add_points
gimp_scan_convert_free
gimp_scan_convert_new
gimp_scan_convert_to_channel
gimp_set_busy
gimp_size_entry_add_field
gimp_size_entry_get_refval
gimp_size_entry_get_type
gimp_size_entry_get_unit
gimp_size_entry_set_refval
gimp_size_entry_set_refval_boundaries gimp_size_entry_set_resolution
gimp_size_entry_set_size
gimp_size_entry_set_unit
gimp_standard_help_func
gimp_statusbar_get_type
gimp_statusbar_pop
gimp_statusbar_push
gimp_statusbar_push_coords
gimp_stroke_anchor_get
gimp_stroke_anchor_move_absolute
gimp_stroke_anchor_select
gimp_stroke_get_draw_anchors
gimp_stroke_get_draw_controls
gimp_stroke_get_draw_lines
gimp_stroke_interpolate
gimp_table_attach_aligned
gimp_table_attach_stock
gimp_text_editor_new
gimp_text_get_type
gimp_text_layer_get_text
gimp_text_layer_get_type
gimp_text_layer_new
gimp_toggle_button_update
gimp_transfer_mode_get_type
gimp_transform_direction_get_type
gimp_transform_grid_type_get_type
gimp_transform_tool_grid_density_changed gimp_transform_tool_show_path_changed gimp_unit_get_digits
gimp_unit_get_factor
gimp_unit_get_symbol
gimp_unit_menu_get_type
gimp_unit_menu_new
gimp_unit_menu_set_unit
gimp_unit_menu_update
gimp_unset_busy
gimp_vector2_inner_product
gimp_vector2_length
gimp_vectors_anchor_get
gimp_vectors_get_type
gimp_vectors_new
gimp_vectors_stroke_add
gimp_vectors_stroke_get_next
gimp_viewable_dialog_get_type
gimp_viewable_dialog_new
gimp_viewable_dialog_set_viewable
gimp_viewable_get_stock_id
gimp_viewable_get_type
gimp_viewable_invalidate_preview
gimp_zoom_type_get_type
hue_saturation
hue_saturation_calculate_transfers
hue_saturation_init
hue_saturation_partition_reset
info_dialog_add_label
info_dialog_add_scale
info_dialog_add_sizeentry
info_dialog_add_spinbutton
info_dialog_free
info_dialog_new
info_dialog_popdown
info_dialog_popup
info_dialog_update
levels_auto
levels_calculate_transfers
levels_channel_reset
levels_init
levels_lut_func
mask_buf_data
mask_buf_free
mask_buf_new
path_curve_cleanup_segment
path_curve_drag_handle
path_curve_drag_segment
path_curve_draw_segment
path_curve_flip_segment
path_curve_get_point
path_curve_init_segment
path_curve_insert_anchor
path_curve_on_handle
path_curve_on_segment
path_transform_current_path
path_transform_do_undo
path_transform_draw_current
path_transform_free_undo
path_transform_start_undo
path_transform_xy
paths_dialog_set_default_op
paths_first_button_press
paths_new_bezier_select_tool
paths_newpoint_current
pixel_region_init
pixel_region_set_row
pixel_regions_process
pixel_regions_register
posterize_lut_setup
procedural_db_destroy_args
procedural_db_run_proc
temp_buf_data
temp_buf_data_clear
temp_buf_free
temp_buf_resize
the_gimp
threshold
tile_data_pointer
tile_eheight
tile_ewidth
tile_is_valid
tile_manager_destroy
tile_manager_get_offsets
tile_manager_get_tile
tile_manager_get_tile_coordinates
tile_manager_get_user_data
tile_manager_height
tile_manager_map_tile
tile_manager_new
tile_manager_set_user_data
tile_manager_set_validate_proc
tile_manager_width
tile_release
tile_size

Austin Donnelly
2003-04-03 10:57:34 UTC (about 21 years ago)

Tool API [LONG!]

[...] "the_gimp" should not be
accessed directly, and tile_manager is probably too ugly for tool developers with weak stomachs.

Not clear; iscissors uses a custom tile manager which supplies tiles containing gradient/direction information. This way, the expensive calculation of this info is delayed until it is actually needed by the selection-boundary walking code (we don't know ahead of time where the boundary is, but we can guess that it's not going to include every tile in the image).

Austin

Sven Neumann
2003-04-03 11:53:56 UTC (about 21 years ago)

Tool API [LONG!]

Hi,

Nathan Carl Summers writes:

Here is a list of all the symbols currently used by the current tools, courtesy of
nm tools/*.o paint/*.o | cut -b 10- | grep ^T | cut -b 3- | sort | uniq

this list clearly shows that tools use almost everything in the core API (if we can call this an API at all). Is that what you wanted to prove?

Salut, Sven

Sven Neumann
2003-04-07 12:39:58 UTC (about 21 years ago)

Tool API [LONG!]

Hi,

I'm following up on the tool API discussion since I think we need to get to a point here very soon now. I'll thus try to summarize my opinion on plug-in tools once more.

Plug-in tools are essentially a great thing and would be nice to have. A well-defined tools API would allow other developers to contribute to The GIMP without the need for a deep knowledge of GIMP internals and it would allow for continued development even after a stable release is out. Please note however that these advantages entirely rely on the availability of a well-defined and documented API. Unfortunately we can not offer such an API at the moment.

In the past two years we managed to split the core up into several subsystems and started to develop some sort of internal GIMP API with defined relationships. This development has however been a slow migration from the 1.2 code hell towards a cleaner structure. At the end of this road stands a GIMP application which is only few code that ties together the functionality from a bunch of libraries. All tools would be modules (and might as well be plug-ins, i.e. run in a different process). This is however only the vision at the end of the road. At the moment we are only halfway there but we want to provide a new stable release to our users so that they can benefit from the development that has taken place. In my opinion we simply are not at the point where we can provide a tools API for external use. The internals simply are not yet prepared to be exposed. Releasing GIMP with the ability to have tool plug-ins as you propose it, would effectively expose the complete internals of the GIMP core. This would almost certainly introduce a maintainance nightmare. People will start to use this API thus making it impossible to do any source or even binary incompatible changes to the GIMP core. We will however need to make those changes in order to fix bugs. I expect that we will even need to do so after the stable release. The only sane way to support plug-in tools would be to put another year of development into the core. After that time, I expect the internal API to be at a point where we can make large parts of it available to plug-ins as well as plug-in tools. I don't think however that people want to wait another year and that's why I propose to remove plug-in tools for the pending stable release and postpone this feature to the next development cycle.

Salut, Sven