Re: GTK 3.0: an app developer's view
- From: Martyn Russell <martyn imendio com>
- To: Allin Cottrell <cottrell wfu edu>
- Cc: gtk-devel-list gnome org, gtk-app-devel-list gnome org
- Subject: Re: GTK 3.0: an app developer's view
- Date: Tue, 17 Jun 2008 10:05:28 +0100
Allin Cottrell wrote:
> Sorry for cross-posting, but I think this does cross gtk-devel and
> gtk-app-devel: it's the thoughts of a common-or-garden app
> developer following the dicussions on gtk-devel about what's
> coming with GTK 3.0.
>
> As a starting point, on June 5, in the thread "Steps to get to
> GTK+ 3.0", Martyn Russell (name_obscured imendio com) wrote:
>
> "Many applications didn't make the change [from GTK 1.2 to GTK 2]
> because it meant rewriting a lot of code. Unless my applications
> are using some evil voodoo they shouldn't be using, I don't expect
> the transition from GTK+ 2.x to 3.x to take much time at all."
>
> As an app developer who did take the trouble to re-write a lot of
> code in the transition 1.2 -> 2.0, I wonder about this statement.
I did too, I had several applications which had to make the transition
and it wasn't a quick job.
> (Note: In my understanding, one key difference between GTK 2.0 and
> 3.0 is that all the APIs deprecated in 2.0 will be removed in 3.0;
> If I'm wrong about that, please tell me!)
>
> What's the status of the portion of the GTK API that was not
> deprecated from the get-go with GTK 2.0, but joined the deprecated
> list later, after 2.4? I'm thinking in particular of
> GtkItemFactory: if I'm remembering right, that was still kosher
> when GTK 2.0 appeared.
I just put together quickly a few lists of ALL things marked as
deprecated right now. GtkItemFactory is in that list. It will be removed
(as I understand it) in 3.0 as will everything else that is marked as
deprecated.
These lists give you an idea of how much dead code is left in GTK+ right
now and why it is so hard to maintain with it lying around.
This list is in no way conclusive, it is literally those I looked up in
all .h files in the gtk/ directory. There may be others.
> Moreover, the new
> code would be less efficient than the old (lots of strcmp as
> opposed to just looking at integer values from an enumeration).
If you find the loading speed so bad that it is affecting performance of
your application, please file a bug. If this is not the case, I think
the benefits of a *readable* XML format outweigh the inefficiency you
talk about.
> In addition, I'm not 100% convinced of the virtues of defining a
> UI in XML as opposed to via an array of C structs (having both
> options would be nice).
Glade has been doing this for years. It is much quicker for an
application developer to use Glade to define menus, windows, dialogs,
etc than it is to code then *statically*. I say statically because you
don't need to recompile your program to change some slight detail of the
menu layout or labelling. This bears a huge advantage as far as I am
concerned.
> Gtk-demo has an example where the UI is
> defined via a chunk of XML inlined as a C string. This really
> sucks, and would be a maintenence nightmare in any real app.
What kind of real application are you talking about?
I have written many in my time and I use glade for most of them (which
uses an XML format for not only the menus but all window layouts). I
don't find it a maintenance nightmare at all, in fact it is quite the
opposite.
> OK, I don't want to be too negative about GtkUIManager; it surely
> has its advantages. But I am concerned about the possibility that
> GtkItemFactory will disappear:
It is a certainty from what I can see.
> this API is not "evil voodoo", IMO,
> and I don't suppose that mine is the only GTK 2 app that uses it
> rather extensively.
I too have had to move from GtkItemFactory to the new GtkUIManager. It
wasn't great, but it is needed. I am not saying GtkItemFactory is "evil
voodoo" either, I am just saying there are some things in GTK+ that just
need to be removed and there are some things application developers are
*able* to do as a result of not sealing structures with proper APIs.
I should add at this point too, that the GtkItemFactory has been marked
as deprecated for some time (since GTK+ 2.4) and the documentation has
explicitly said so too. So you have had plenty of time to update your
application and/or bring your concerns forward about this.
Please do not feel like we don't care about application developers here,
many of us are application developers and know we too will have
transitions to make for our software where we switch from deprecated APIs.
--
Regards,
Martyn
gtk_about_dialog_get_name
gtk_about_dialog_set_name
gtk_accel_group_ref
gtk_accel_group_unref
gtk_accel_label_accelerator_width
gtk_binding_entry_add
gtk_binding_entry_add_signall
gtk_binding_entry_clear
gtk_binding_parse_binding
gtk_button_box_get_child_ipadding
gtk_button_box_get_child_size
gtk_button_box_get_spacing
gtk_button_box_set_child_ipadding
gtk_button_box_set_child_size
gtk_button_box_set_spacing
gtk_calendar_display_options
gtk_calendar_freeze
gtk_calendar_thaw
gtk_cell_renderer_editing_canceled
gtk_check_menu_item_set_show_toggle
GtkColorSelectionChangePaletteFunc
gtk_color_selection_get_color
gtk_color_selection_set_color
gtk_color_selection_set_update_policy
gtk_container_border_width
gtk_container_children
gtk_container_foreach_full
gtk_drag_set_default_icon
gtk_draw_arrow
gtk_draw_box
gtk_draw_box_gap
gtk_draw_check
gtk_draw_diamond
gtk_draw_expander
gtk_draw_extension
gtk_draw_flat_box
gtk_draw_focus
gtk_draw_handle
gtk_draw_hline
gtk_drawing_area_size
gtk_draw_layout
gtk_draw_option
gtk_draw_polygon
gtk_draw_resize_grip
gtk_draw_shadow
gtk_draw_shadow_gap
gtk_draw_slider
gtk_draw_string
gtk_draw_tab
gtk_draw_vline
gtk_entry_append_text
gtk_entry_new_with_max_length
gtk_entry_prepend_text
gtk_entry_select_region
gtk_entry_set_editable
gtk_entry_set_position
gtk_exit
gtk_font_selection_dialog_get_font
gtk_font_selection_get_font
gtk_hbutton_box_get_layout_default
gtk_hbutton_box_get_spacing_default
gtk_hbutton_box_set_layout_default
gtk_hbutton_box_set_spacing_default
gtk_idle_add
gtk_idle_add_full
gtk_idle_add_priority
gtk_idle_remove
gtk_idle_remove_by_data
gtk_image_get
gtk_image_set
gtk_input_add_full
gtk_input_remove
gtk_label_get
gtk_label_parse_uline
gtk_label_set
gtk_layout_freeze
gtk_layout_thaw
gtk_marshall_*
gtk_menu_append
gtk_menu_bar_append
gtk_menu_bar_insert
gtk_menu_bar_prepend
gtk_menu_insert
gtk_menu_item_remove_submenu
gtk_menu_item_right_justify
gtk_menu_prepend
gtk_menu_tool_button_set_arrow_tooltip
gtk_notebook_current_page
gtk_notebook_get_group_id
gtk_notebook_set_group_id
gtk_notebook_set_homogeneous_tabs
gtk_notebook_set_page
gtk_notebook_set_tab_border
gtk_notebook_set_tab_hborder
gtk_notebook_set_tab_vborder
gtk_object_add_arg_type
gtk_object_data_force_id
gtk_object_data_try_key
gtk_object_get
gtk_object_get_data
gtk_object_get_data_by_id
gtk_object_get_user_data
gtk_object_new
gtk_object_ref
gtk_object_remove_data
gtk_object_remove_data_by_id
gtk_object_remove_no_notify
gtk_object_remove_no_notify_by_id
gtk_object_set
gtk_object_set_data
gtk_object_set_data_by_id
gtk_object_set_data_by_id_full
gtk_object_set_data_full
gtk_object_set_user_data
gtk_object_sink
gtk_object_unref
gtk_object_weakref
gtk_object_weakunref
gtk_paint_string
gtk_paned_compute_position
gtk_paned_gutter_size
gtk_paned_set_gutter_size
gtk_progress_bar_new_with_adjustment
gtk_progress_bar_set_activity_blocks
gtk_progress_bar_set_activity_step
gtk_progress_bar_set_bar_style
gtk_progress_bar_set_discrete_blocks
gtk_progress_bar_update
gtk_progress_configure
gtk_progress_get_current_percentage
gtk_progress_get_current_text
gtk_progress_get_percentage_from_value
gtk_progress_get_text_from_value
gtk_progress_get_type
gtk_progress_get_value
gtk_progress_set_activity_mode
gtk_progress_set_adjustment
gtk_progress_set_format_string
gtk_progress_set_percentage
gtk_progress_set_show_text
gtk_progress_set_text_alignment
gtk_progress_set_value
gtk_radio_button_group
gtk_radio_menu_item_group
gtk_rc_add_class_style
gtk_rc_add_widget_class_style
gtk_rc_add_widget_name_style
gtk_rc_style_ref
gtk_rc_style_unref
gtk_recent_chooser_get_show_numbers
gtk_recent_chooser_set_show_numbers
gtk_recent_manager_get_for_screen
gtk_recent_manager_set_screen
gtk_selection_clear
gtk_socket_steal
gtk_spin_button_get_value_as_float
gtk_style_apply_default_pixmap
gtk_style_get_font
gtk_style_ref
gtk_style_set_font
gtk_style_unref
gtk_timeout_add
gtk_timeout_add_full
gtk_timeout_remove
gtk_toggle_button_set_state
gtk_toolbar_append_element
gtk_toolbar_append_item
gtk_toolbar_append_space
gtk_toolbar_append_widget
gtk_toolbar_insert_element
gtk_toolbar_insert_item
gtk_toolbar_insert_space
gtk_toolbar_insert_stock
gtk_toolbar_insert_widget
gtk_toolbar_prepend_element
gtk_toolbar_prepend_item
gtk_toolbar_prepend_space
gtk_toolbar_prepend_widget
gtk_toolbar_remove_space
gtk_tool_item_set_tooltip
gtk_tree_model_get_iter_root
gtk_tree_path_new_root
gtk_tree_view_tree_to_widget_coords
gtk_tree_view_widget_to_tree_coords
gtk_type_enum_find_value
gtk_type_enum_get_values
gtk_type_flags_find_value
gtk_type_flags_get_values
gtk_type_from_name
gtk_type_init
gtk_type_is_a
gtk_type_name
gtk_type_new
gtk_type_parent
gtk_type_unique
gtk_vbutton_box_get_layout_default
gtk_vbutton_box_get_spacing_default
gtk_vbutton_box_set_layout_default
gtk_vbutton_box_set_spacing_default
gtk_widget_draw
gtk_widget_pop_visual
gtk_widget_push_visual
gtk_widget_queue_clear
gtk_widget_queue_clear_area
gtk_widget_ref
gtk_widget_restore_default_style
gtk_widget_set
gtk_widget_set_default_visual
gtk_widget_set_rc_style
gtk_widget_set_uposition
gtk_widget_set_usize
gtk_widget_set_visual
gtk_widget_unref
gtk_window_position
gtk_window_set_policy
GTK_ARG_READWRITE
GTK_CLASS_NAME
GTK_CLASS_TYPE
GTK_FUNDAMENTAL_TYPE
GTK_OBJECT_FLOATING
GTK_PRIORITY_DEFAULT
GTK_PRIORITY_HIGH
GTK_PRIORITY_INTERNAL
GTK_PRIORITY_LOW
GTK_PRIORITY_REDRAW
GTK_RETLOC_BOOL
GTK_RETLOC_BOXED
GTK_RETLOC_CHAR
GTK_RETLOC_DOUBLE
GTK_RETLOC_ENUM
GTK_RETLOC_FLAGS
GTK_RETLOC_FLOAT
GTK_RETLOC_INT
GTK_RETLOC_LONG
GTK_RETLOC_OBJECT
GTK_RETLOC_POINTER
GTK_RETLOC_STRING
GTK_RETLOC_UCHAR
GTK_RETLOC_UINT
GTK_RETLOC_ULONG
GTK_STRUCT_OFFSET
GTK_TYPE_BOOL
GTK_TYPE_BOXED
GTK_TYPE_CHAR
GTK_TYPE_DOUBLE
GTK_TYPE_ENUM
GTK_TYPE_FLAGS
GTK_TYPE_FLOAT
GTK_TYPE_FUNDAMENTAL_LAST
GTK_TYPE_FUNDAMENTAL_MAX
GTK_TYPE_INT
GTK_TYPE_INVALID
GTK_TYPE_IS_OBJECT
GTK_TYPE_LONG
GTK_TYPE_NONE
GTK_TYPE_POINTER
GTK_TYPE_STRING
GTK_TYPE_UCHAR
GTK_TYPE_UINT
GTK_TYPE_ULONG
GTK_VALUE_BOOL
GTK_VALUE_BOXED
GTK_VALUE_CHAR
GTK_VALUE_DOUBLE
GTK_VALUE_ENUM
GTK_VALUE_FLAGS
GTK_VALUE_FLOAT
GTK_VALUE_INT
GTK_VALUE_LONG
GTK_VALUE_OBJECT
GTK_VALUE_POINTER
GTK_VALUE_SIGNAL
GTK_VALUE_STRING
GTK_VALUE_UCHAR
GTK_VALUE_UINT
GTK_VALUE_ULONG
GtkArgFlags
GtkEnumValue
GtkFlagValue
GtkMatchType
GtkPreviewType
GtkSideType
GtkSignalRunType
GtkSubmenuDirection
GtkSubmenuPlacement
GtkToolbarChildType
GTK_CALENDAR_WEEK_START_MONDAY
GTK_FLOATING
GTK_SELECTION_EXTENDED
GtkArg
GtkClassInitFunc
GtkCList
GtkCombo
GtkCTree
GtkFileSelection
GtkFundamentalType
GtkItemFactory
GtkList
GtkListItem
GtkObjectInitFunc
GtkOldEditable
GtkOptionMenu
GtkPixmap
GtkPreview
GtkSignal
GtkSignalMarshaller
GtkTipsQuery
GtkToolbarChild
GtkTooltips
GtkTypeClass
GtkTypeInfo
GtkTypeObject
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]