Put known type names into a hash table
This commit is contained in:
parent
9179c3f92c
commit
031f87fe89
@ -1107,7 +1107,7 @@ moo_glade_xml_get_type_by_name (MooGladeXML *xml, const char *class_name)
|
|||||||
if (!type)
|
if (!type)
|
||||||
type = get_type_by_name (class_name);
|
type = get_type_by_name (class_name);
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Widget*
|
static Widget*
|
||||||
@ -1148,7 +1148,7 @@ widget_new (MooGladeXML *xml,
|
|||||||
id = freeme;
|
id = freeme;
|
||||||
class_name = colon + 1;
|
class_name = colon + 1;
|
||||||
|
|
||||||
type = moo_glade_xml_get_type_by_name (xml, class_name);
|
type = moo_glade_xml_get_type_by_name (xml, class_name);
|
||||||
|
|
||||||
if (!type)
|
if (!type)
|
||||||
{
|
{
|
||||||
@ -2604,271 +2604,190 @@ func_data_pair_free (FuncDataPair *pair)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define REGISTER_TYPE(class_name,type) \
|
|
||||||
if (!strcmp (name, class_name)) \
|
|
||||||
return type
|
|
||||||
|
|
||||||
|
|
||||||
static GType
|
static GType
|
||||||
get_type_by_name (const char *name)
|
get_type_by_name (const char *name)
|
||||||
{
|
{
|
||||||
|
static GHashTable *types;
|
||||||
GType type = g_type_from_name (name);
|
GType type = g_type_from_name (name);
|
||||||
|
GType (*type_func) (void);
|
||||||
|
|
||||||
if (type)
|
if (type)
|
||||||
return type;
|
return type;
|
||||||
|
|
||||||
REGISTER_TYPE ("MooFontButton", MOO_TYPE_FONT_BUTTON);
|
if (!types)
|
||||||
REGISTER_TYPE ("MooFontSelection", MOO_TYPE_FONT_SELECTION);
|
{
|
||||||
REGISTER_TYPE ("MooFontSelectionDialog", MOO_TYPE_FONT_SELECTION_DIALOG);
|
#define add_type(class_name, func) g_hash_table_insert (types, g_strdup (class_name), func)
|
||||||
REGISTER_TYPE ("MooCombo", MOO_TYPE_COMBO);
|
|
||||||
REGISTER_TYPE ("MooHistoryCombo", MOO_TYPE_HISTORY_COMBO);
|
|
||||||
REGISTER_TYPE ("MooEntry", MOO_TYPE_ENTRY);
|
|
||||||
REGISTER_TYPE ("MooPrefsPage", MOO_TYPE_PREFS_PAGE);
|
|
||||||
REGISTER_TYPE ("MooAccelButton", MOO_TYPE_ACCEL_BUTTON);
|
|
||||||
|
|
||||||
REGISTER_TYPE ("GtkAboutDialog", GTK_TYPE_ABOUT_DIALOG);
|
types = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||||
REGISTER_TYPE ("GtkCellRendererCombo", GTK_TYPE_CELL_RENDERER_COMBO);
|
|
||||||
REGISTER_TYPE ("GtkCellRendererProgress", GTK_TYPE_CELL_RENDERER_PROGRESS);
|
add_type ("MooFontButton", moo_font_button_get_type);
|
||||||
REGISTER_TYPE ("GtkCellView", GTK_TYPE_CELL_VIEW);
|
add_type ("MooFontSelection", moo_font_selection_get_type);
|
||||||
REGISTER_TYPE ("GtkIconView", GTK_TYPE_ICON_VIEW);
|
add_type ("MooFontSelectionDialog", moo_font_selection_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkMenuToolButton", GTK_TYPE_MENU_TOOL_BUTTON);
|
add_type ("MooCombo", moo_combo_get_type);
|
||||||
REGISTER_TYPE ("GtkAccelMap", GTK_TYPE_ACCEL_MAP);
|
add_type ("MooHistoryCombo", moo_history_combo_get_type);
|
||||||
REGISTER_TYPE ("GtkAction", GTK_TYPE_ACTION);
|
add_type ("MooEntry", moo_entry_get_type);
|
||||||
REGISTER_TYPE ("GtkActionGroup", GTK_TYPE_ACTION_GROUP);
|
add_type ("MooPrefsPage", moo_prefs_page_get_type);
|
||||||
REGISTER_TYPE ("GtkCellLayout", GTK_TYPE_CELL_LAYOUT);
|
add_type ("MooAccelButton", _moo_accel_button_get_type);
|
||||||
REGISTER_TYPE ("GtkComboBox", GTK_TYPE_COMBO_BOX);
|
|
||||||
REGISTER_TYPE ("GtkComboBoxEntry", GTK_TYPE_COMBO_BOX_ENTRY);
|
add_type ("GtkAboutDialog", gtk_about_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkEntryCompletion", GTK_TYPE_ENTRY_COMPLETION);
|
add_type ("GtkCellRendererCombo", gtk_cell_renderer_combo_get_type);
|
||||||
REGISTER_TYPE ("GtkExpander", GTK_TYPE_EXPANDER);
|
add_type ("GtkCellRendererProgress", gtk_cell_renderer_progress_get_type);
|
||||||
REGISTER_TYPE ("GtkFileChooser", GTK_TYPE_FILE_CHOOSER);
|
add_type ("GtkCellView", gtk_cell_view_get_type);
|
||||||
REGISTER_TYPE ("GtkFileChooserAction", GTK_TYPE_FILE_CHOOSER_ACTION);
|
add_type ("GtkIconView", gtk_icon_view_get_type);
|
||||||
REGISTER_TYPE ("GtkFileChooserDialog", GTK_TYPE_FILE_CHOOSER_DIALOG);
|
add_type ("GtkMenuToolButton", gtk_menu_tool_button_get_type);
|
||||||
REGISTER_TYPE ("GtkFileChooserError", GTK_TYPE_FILE_CHOOSER_ERROR);
|
add_type ("GtkAccelMap", gtk_accel_map_get_type);
|
||||||
REGISTER_TYPE ("GtkFileChooserWidget", GTK_TYPE_FILE_CHOOSER_WIDGET);
|
add_type ("GtkAction", gtk_action_get_type);
|
||||||
REGISTER_TYPE ("GtkFileFilter", GTK_TYPE_FILE_FILTER);
|
add_type ("GtkActionGroup", gtk_action_group_get_type);
|
||||||
REGISTER_TYPE ("GtkFileFilterFlags", GTK_TYPE_FILE_FILTER_FLAGS);
|
add_type ("GtkComboBox", gtk_combo_box_get_type);
|
||||||
REGISTER_TYPE ("GtkIconInfo", GTK_TYPE_ICON_INFO);
|
add_type ("GtkComboBoxEntry", gtk_combo_box_entry_get_type);
|
||||||
REGISTER_TYPE ("GtkIconLookupFlags", GTK_TYPE_ICON_LOOKUP_FLAGS);
|
add_type ("GtkExpander", gtk_expander_get_type);
|
||||||
REGISTER_TYPE ("GtkIconTheme", GTK_TYPE_ICON_THEME);
|
add_type ("GtkFileChooser", gtk_file_chooser_get_type);
|
||||||
REGISTER_TYPE ("GtkIconThemeError", GTK_TYPE_ICON_THEME_ERROR);
|
add_type ("GtkFileChooserDialog", gtk_file_chooser_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkRadioAction", GTK_TYPE_RADIO_ACTION);
|
add_type ("GtkFileChooserWidget", gtk_file_chooser_widget_get_type);
|
||||||
REGISTER_TYPE ("GtkRadioToolButton", GTK_TYPE_RADIO_TOOL_BUTTON);
|
add_type ("GtkFileFilter", gtk_file_filter_get_type);
|
||||||
REGISTER_TYPE ("GtkScrollStep", GTK_TYPE_SCROLL_STEP);
|
add_type ("GtkRadioAction", gtk_radio_action_get_type);
|
||||||
REGISTER_TYPE ("GtkSeparatorToolItem", GTK_TYPE_SEPARATOR_TOOL_ITEM);
|
add_type ("GtkRadioToolButton", gtk_radio_tool_button_get_type);
|
||||||
REGISTER_TYPE ("GtkToggleAction", GTK_TYPE_TOGGLE_ACTION);
|
add_type ("GtkSeparatorToolItem", gtk_separator_tool_item_get_type);
|
||||||
REGISTER_TYPE ("GtkToggleToolButton", GTK_TYPE_TOGGLE_TOOL_BUTTON);
|
add_type ("GtkToggleAction", gtk_toggle_action_get_type);
|
||||||
REGISTER_TYPE ("GtkToolButton", GTK_TYPE_TOOL_BUTTON);
|
add_type ("GtkToggleToolButton", gtk_toggle_tool_button_get_type);
|
||||||
REGISTER_TYPE ("GtkToolItem", GTK_TYPE_TOOL_ITEM);
|
add_type ("GtkToolButton", gtk_tool_button_get_type);
|
||||||
REGISTER_TYPE ("GtkTreeModelFilter", GTK_TYPE_TREE_MODEL_FILTER);
|
add_type ("GtkToolItem", gtk_tool_item_get_type);
|
||||||
REGISTER_TYPE ("GtkUiManager", GTK_TYPE_UI_MANAGER);
|
add_type ("GtkTreeModelFilter", gtk_tree_model_filter_get_type);
|
||||||
REGISTER_TYPE ("GtkUiManagerItemType", GTK_TYPE_UI_MANAGER_ITEM_TYPE);
|
add_type ("GtkUiManager", gtk_ui_manager_get_type);
|
||||||
REGISTER_TYPE ("GtkAccelFlags", GTK_TYPE_ACCEL_FLAGS);
|
add_type ("GtkAccelGroup", gtk_accel_group_get_type);
|
||||||
REGISTER_TYPE ("GtkAccelGroup", GTK_TYPE_ACCEL_GROUP);
|
add_type ("GtkAccelLabel", gtk_accel_label_get_type);
|
||||||
REGISTER_TYPE ("GtkAccelLabel", GTK_TYPE_ACCEL_LABEL);
|
add_type ("GtkAdjustment", gtk_adjustment_get_type);
|
||||||
REGISTER_TYPE ("GtkAccessible", GTK_TYPE_ACCESSIBLE);
|
add_type ("GtkAlignment", gtk_alignment_get_type);
|
||||||
REGISTER_TYPE ("GtkAdjustment", GTK_TYPE_ADJUSTMENT);
|
add_type ("GtkArrow", gtk_arrow_get_type);
|
||||||
REGISTER_TYPE ("GtkAlignment", GTK_TYPE_ALIGNMENT);
|
add_type ("GtkAspectFrame", gtk_aspect_frame_get_type);
|
||||||
REGISTER_TYPE ("GtkAnchorType", GTK_TYPE_ANCHOR_TYPE);
|
add_type ("GtkBin", gtk_bin_get_type);
|
||||||
REGISTER_TYPE ("GtkArgFlags", GTK_TYPE_ARG_FLAGS);
|
add_type ("GtkBox", gtk_box_get_type);
|
||||||
REGISTER_TYPE ("GtkArrow", GTK_TYPE_ARROW);
|
add_type ("GtkButton", gtk_button_get_type);
|
||||||
REGISTER_TYPE ("GtkArrowType", GTK_TYPE_ARROW_TYPE);
|
add_type ("GtkButtonBox", gtk_button_box_get_type);
|
||||||
REGISTER_TYPE ("GtkAspectFrame", GTK_TYPE_ASPECT_FRAME);
|
add_type ("GtkCalendar", gtk_calendar_get_type);
|
||||||
REGISTER_TYPE ("GtkAttachOptions", GTK_TYPE_ATTACH_OPTIONS);
|
add_type ("GtkCellRenderer", gtk_cell_renderer_get_type);
|
||||||
REGISTER_TYPE ("GtkBin", GTK_TYPE_BIN);
|
add_type ("GtkCellRendererMode", gtk_cell_renderer_mode_get_type);
|
||||||
REGISTER_TYPE ("GtkBorder", GTK_TYPE_BORDER);
|
add_type ("GtkCellRendererPixbuf", gtk_cell_renderer_pixbuf_get_type);
|
||||||
REGISTER_TYPE ("GtkBox", GTK_TYPE_BOX);
|
add_type ("GtkCellRendererState", gtk_cell_renderer_state_get_type);
|
||||||
REGISTER_TYPE ("GtkButton", GTK_TYPE_BUTTON);
|
add_type ("GtkCellRendererText", gtk_cell_renderer_text_get_type);
|
||||||
REGISTER_TYPE ("GtkButtonAction", GTK_TYPE_BUTTON_ACTION);
|
add_type ("GtkCellRendererToggle", gtk_cell_renderer_toggle_get_type);
|
||||||
REGISTER_TYPE ("GtkButtonBox", GTK_TYPE_BUTTON_BOX);
|
add_type ("GtkCheckButton", gtk_check_button_get_type);
|
||||||
REGISTER_TYPE ("GtkButtonBoxStyle", GTK_TYPE_BUTTON_BOX_STYLE);
|
add_type ("GtkCheckMenuItem", gtk_check_menu_item_get_type);
|
||||||
REGISTER_TYPE ("GtkButtonsType", GTK_TYPE_BUTTONS_TYPE);
|
add_type ("GtkClipboard", gtk_clipboard_get_type);
|
||||||
REGISTER_TYPE ("GtkCalendar", GTK_TYPE_CALENDAR);
|
add_type ("GtkColorButton", gtk_color_button_get_type);
|
||||||
REGISTER_TYPE ("GtkCalendarDisplayOptions", GTK_TYPE_CALENDAR_DISPLAY_OPTIONS);
|
add_type ("GtkColorSelection", gtk_color_selection_get_type);
|
||||||
REGISTER_TYPE ("GtkCellEditable", GTK_TYPE_CELL_EDITABLE);
|
add_type ("GtkColorSelectionDialog", gtk_color_selection_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkCellRenderer", GTK_TYPE_CELL_RENDERER);
|
add_type ("GtkCombo", gtk_combo_get_type);
|
||||||
REGISTER_TYPE ("GtkCellRendererMode", GTK_TYPE_CELL_RENDERER_MODE);
|
add_type ("GtkContainer", gtk_container_get_type);
|
||||||
REGISTER_TYPE ("GtkCellRendererPixbuf", GTK_TYPE_CELL_RENDERER_PIXBUF);
|
add_type ("GtkCurve", gtk_curve_get_type);
|
||||||
REGISTER_TYPE ("GtkCellRendererState", GTK_TYPE_CELL_RENDERER_STATE);
|
add_type ("GtkDialog", gtk_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkCellRendererText", GTK_TYPE_CELL_RENDERER_TEXT);
|
add_type ("GtkDrawingArea", gtk_drawing_area_get_type);
|
||||||
REGISTER_TYPE ("GtkCellRendererToggle", GTK_TYPE_CELL_RENDERER_TOGGLE);
|
add_type ("GtkEditable", gtk_editable_get_type);
|
||||||
REGISTER_TYPE ("GtkCellType", GTK_TYPE_CELL_TYPE);
|
add_type ("GtkEntry", gtk_entry_get_type);
|
||||||
REGISTER_TYPE ("GtkCheckButton", GTK_TYPE_CHECK_BUTTON);
|
add_type ("GtkEventBox", gtk_event_box_get_type);
|
||||||
REGISTER_TYPE ("GtkCheckMenuItem", GTK_TYPE_CHECK_MENU_ITEM);
|
add_type ("GtkFixed", gtk_fixed_get_type);
|
||||||
REGISTER_TYPE ("GtkClipboard", GTK_TYPE_CLIPBOARD);
|
add_type ("GtkFontButton", gtk_font_button_get_type);
|
||||||
REGISTER_TYPE ("GtkColorButton", GTK_TYPE_COLOR_BUTTON);
|
add_type ("GtkFontSelection", gtk_font_selection_get_type);
|
||||||
REGISTER_TYPE ("GtkColorSelection", GTK_TYPE_COLOR_SELECTION);
|
add_type ("GtkFontSelectionDialog", gtk_font_selection_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkColorSelectionDialog", GTK_TYPE_COLOR_SELECTION_DIALOG);
|
add_type ("GtkFrame", gtk_frame_get_type);
|
||||||
REGISTER_TYPE ("GtkCombo", GTK_TYPE_COMBO);
|
add_type ("GtkGammaCurve", gtk_gamma_curve_get_type);
|
||||||
REGISTER_TYPE ("GtkContainer", GTK_TYPE_CONTAINER);
|
add_type ("GtkHBox", gtk_hbox_get_type);
|
||||||
REGISTER_TYPE ("GtkCornerType", GTK_TYPE_CORNER_TYPE);
|
add_type ("GtkHButtonBox", gtk_hbutton_box_get_type);
|
||||||
REGISTER_TYPE ("GtkCurve", GTK_TYPE_CURVE);
|
add_type ("GtkHPaned", gtk_hpaned_get_type);
|
||||||
REGISTER_TYPE ("GtkCurveType", GTK_TYPE_CURVE_TYPE);
|
add_type ("GtkHRuler", gtk_hruler_get_type);
|
||||||
REGISTER_TYPE ("GtkDeleteType", GTK_TYPE_DELETE_TYPE);
|
add_type ("GtkHScale", gtk_hscale_get_type);
|
||||||
REGISTER_TYPE ("GtkDestDefaults", GTK_TYPE_DEST_DEFAULTS);
|
add_type ("GtkHScrollbar", gtk_hscrollbar_get_type);
|
||||||
REGISTER_TYPE ("GtkDialog", GTK_TYPE_DIALOG);
|
add_type ("GtkHSeparator", gtk_hseparator_get_type);
|
||||||
REGISTER_TYPE ("GtkDialogFlags", GTK_TYPE_DIALOG_FLAGS);
|
add_type ("GtkHandleBox", gtk_handle_box_get_type);
|
||||||
REGISTER_TYPE ("GtkDirectionType", GTK_TYPE_DIRECTION_TYPE);
|
add_type ("GtkIconFactory", gtk_icon_factory_get_type);
|
||||||
REGISTER_TYPE ("GtkDrawingArea", GTK_TYPE_DRAWING_AREA);
|
add_type ("GtkIconSet", gtk_icon_set_get_type);
|
||||||
REGISTER_TYPE ("GtkEditable", GTK_TYPE_EDITABLE);
|
add_type ("GtkIconSource", gtk_icon_source_get_type);
|
||||||
REGISTER_TYPE ("GtkEntry", GTK_TYPE_ENTRY);
|
add_type ("GtkImContext", gtk_im_context_get_type);
|
||||||
REGISTER_TYPE ("GtkEventBox", GTK_TYPE_EVENT_BOX);
|
add_type ("GtkImContextSimple", gtk_im_context_simple_get_type);
|
||||||
REGISTER_TYPE ("GtkExpanderStyle", GTK_TYPE_EXPANDER_STYLE);
|
add_type ("GtkImMulticontext", gtk_im_multicontext_get_type);
|
||||||
REGISTER_TYPE ("GtkFixed", GTK_TYPE_FIXED);
|
add_type ("GtkImage", gtk_image_get_type);
|
||||||
REGISTER_TYPE ("GtkFontButton", GTK_TYPE_FONT_BUTTON);
|
add_type ("GtkImageMenuItem", gtk_image_menu_item_get_type);
|
||||||
REGISTER_TYPE ("GtkFontSelection", GTK_TYPE_FONT_SELECTION);
|
add_type ("GtkInputDialog", gtk_input_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkFontSelectionDialog", GTK_TYPE_FONT_SELECTION_DIALOG);
|
add_type ("GtkInvisible", gtk_invisible_get_type);
|
||||||
REGISTER_TYPE ("GtkFrame", GTK_TYPE_FRAME);
|
add_type ("GtkItem", gtk_item_get_type);
|
||||||
REGISTER_TYPE ("GtkGammaCurve", GTK_TYPE_GAMMA_CURVE);
|
add_type ("GtkLabel", gtk_label_get_type);
|
||||||
REGISTER_TYPE ("GtkHBox", GTK_TYPE_HBOX);
|
add_type ("GtkLayout", gtk_layout_get_type);
|
||||||
REGISTER_TYPE ("GtkHButtonBox", GTK_TYPE_HBUTTON_BOX);
|
add_type ("GtkList", gtk_list_get_type);
|
||||||
REGISTER_TYPE ("GtkHPaned", GTK_TYPE_HPANED);
|
add_type ("GtkListStore", gtk_list_store_get_type);
|
||||||
REGISTER_TYPE ("GtkHRuler", GTK_TYPE_HRULER);
|
add_type ("GtkMenu", gtk_menu_get_type);
|
||||||
REGISTER_TYPE ("GtkHScale", GTK_TYPE_HSCALE);
|
add_type ("GtkMenuBar", gtk_menu_bar_get_type);
|
||||||
REGISTER_TYPE ("GtkHScrollbar", GTK_TYPE_HSCROLLBAR);
|
add_type ("GtkMenuItem", gtk_menu_item_get_type);
|
||||||
REGISTER_TYPE ("GtkHSeparator", GTK_TYPE_HSEPARATOR);
|
add_type ("GtkMenuShell", gtk_menu_shell_get_type);
|
||||||
REGISTER_TYPE ("GtkHandleBox", GTK_TYPE_HANDLE_BOX);
|
add_type ("GtkMessageDialog", gtk_message_dialog_get_type);
|
||||||
REGISTER_TYPE ("GtkIconFactory", GTK_TYPE_ICON_FACTORY);
|
add_type ("GtkMisc", gtk_misc_get_type);
|
||||||
REGISTER_TYPE ("GtkIconSet", GTK_TYPE_ICON_SET);
|
add_type ("GtkNotebook", gtk_notebook_get_type);
|
||||||
REGISTER_TYPE ("GtkIconSize", GTK_TYPE_ICON_SIZE);
|
add_type ("GtkObject", gtk_object_get_type);
|
||||||
REGISTER_TYPE ("GtkIconSource", GTK_TYPE_ICON_SOURCE);
|
add_type ("GtkOptionMenu", gtk_option_menu_get_type);
|
||||||
REGISTER_TYPE ("GtkIdentifier", GTK_TYPE_IDENTIFIER);
|
add_type ("GtkPaned", gtk_paned_get_type);
|
||||||
REGISTER_TYPE ("GtkImContext", GTK_TYPE_IM_CONTEXT);
|
add_type ("GtkProgressBar", gtk_progress_bar_get_type);
|
||||||
REGISTER_TYPE ("GtkImContextSimple", GTK_TYPE_IM_CONTEXT_SIMPLE);
|
add_type ("GtkRadioButton", gtk_radio_button_get_type);
|
||||||
REGISTER_TYPE ("GtkImMulticontext", GTK_TYPE_IM_MULTICONTEXT);
|
add_type ("GtkRadioMenuItem", gtk_radio_menu_item_get_type);
|
||||||
REGISTER_TYPE ("GtkImPreeditStyle", GTK_TYPE_IM_PREEDIT_STYLE);
|
add_type ("GtkRange", gtk_range_get_type);
|
||||||
REGISTER_TYPE ("GtkImStatusStyle", GTK_TYPE_IM_STATUS_STYLE);
|
add_type ("GtkRuler", gtk_ruler_get_type);
|
||||||
REGISTER_TYPE ("GtkImage", GTK_TYPE_IMAGE);
|
add_type ("GtkScale", gtk_scale_get_type);
|
||||||
REGISTER_TYPE ("GtkImageMenuItem", GTK_TYPE_IMAGE_MENU_ITEM);
|
add_type ("GtkScrollbar", gtk_scrollbar_get_type);
|
||||||
REGISTER_TYPE ("GtkImageType", GTK_TYPE_IMAGE_TYPE);
|
add_type ("GtkScrolledWindow", gtk_scrolled_window_get_type);
|
||||||
REGISTER_TYPE ("GtkInputDialog", GTK_TYPE_INPUT_DIALOG);
|
add_type ("GtkSeparator", gtk_separator_get_type);
|
||||||
REGISTER_TYPE ("GtkInvisible", GTK_TYPE_INVISIBLE);
|
add_type ("GtkSeparatorMenuItem", gtk_separator_menu_item_get_type);
|
||||||
REGISTER_TYPE ("GtkItem", GTK_TYPE_ITEM);
|
add_type ("GtkSettings", gtk_settings_get_type);
|
||||||
REGISTER_TYPE ("GtkJustification", GTK_TYPE_JUSTIFICATION);
|
add_type ("GtkSizeGroup", gtk_size_group_get_type);
|
||||||
REGISTER_TYPE ("GtkLabel", GTK_TYPE_LABEL);
|
add_type ("GtkSpinButton", gtk_spin_button_get_type);
|
||||||
REGISTER_TYPE ("GtkLayout", GTK_TYPE_LAYOUT);
|
add_type ("GtkStatusbar", gtk_statusbar_get_type);
|
||||||
REGISTER_TYPE ("GtkList", GTK_TYPE_LIST);
|
add_type ("GtkStyle", gtk_style_get_type);
|
||||||
REGISTER_TYPE ("GtkListItem", GTK_TYPE_LIST_ITEM);
|
add_type ("GtkTable", gtk_table_get_type);
|
||||||
REGISTER_TYPE ("GtkListStore", GTK_TYPE_LIST_STORE);
|
add_type ("GtkTearoffMenuItem", gtk_tearoff_menu_item_get_type);
|
||||||
REGISTER_TYPE ("GtkMatchType", GTK_TYPE_MATCH_TYPE);
|
add_type ("GtkTextBuffer", gtk_text_buffer_get_type);
|
||||||
REGISTER_TYPE ("GtkMenu", GTK_TYPE_MENU);
|
add_type ("GtkTextChildAnchor", gtk_text_child_anchor_get_type);
|
||||||
REGISTER_TYPE ("GtkMenuBar", GTK_TYPE_MENU_BAR);
|
add_type ("GtkTextMark", gtk_text_mark_get_type);
|
||||||
REGISTER_TYPE ("GtkMenuDirectionType", GTK_TYPE_MENU_DIRECTION_TYPE);
|
add_type ("GtkTextTag", gtk_text_tag_get_type);
|
||||||
REGISTER_TYPE ("GtkMenuItem", GTK_TYPE_MENU_ITEM);
|
add_type ("GtkTextTagTable", gtk_text_tag_table_get_type);
|
||||||
REGISTER_TYPE ("GtkMenuShell", GTK_TYPE_MENU_SHELL);
|
add_type ("GtkTextView", gtk_text_view_get_type);
|
||||||
REGISTER_TYPE ("GtkMessageDialog", GTK_TYPE_MESSAGE_DIALOG);
|
add_type ("GtkToggleButton", gtk_toggle_button_get_type);
|
||||||
REGISTER_TYPE ("GtkMessageType", GTK_TYPE_MESSAGE_TYPE);
|
add_type ("GtkToolbar", gtk_toolbar_get_type);
|
||||||
REGISTER_TYPE ("GtkMetricType", GTK_TYPE_METRIC_TYPE);
|
add_type ("GtkTreeDragDest", gtk_tree_drag_dest_get_type);
|
||||||
REGISTER_TYPE ("GtkMisc", GTK_TYPE_MISC);
|
add_type ("GtkTreeDragSource", gtk_tree_drag_source_get_type);
|
||||||
REGISTER_TYPE ("GtkMovementStep", GTK_TYPE_MOVEMENT_STEP);
|
add_type ("GtkTreeIter", gtk_tree_iter_get_type);
|
||||||
REGISTER_TYPE ("GtkNotebook", GTK_TYPE_NOTEBOOK);
|
add_type ("GtkTreeModel", gtk_tree_model_get_type);
|
||||||
REGISTER_TYPE ("GtkNotebookTab", GTK_TYPE_NOTEBOOK_TAB);
|
add_type ("GtkTreeModelSort", gtk_tree_model_sort_get_type);
|
||||||
REGISTER_TYPE ("GtkObject", GTK_TYPE_OBJECT);
|
add_type ("GtkTreePath", gtk_tree_path_get_type);
|
||||||
REGISTER_TYPE ("GtkObjectFlags", GTK_TYPE_OBJECT_FLAGS);
|
add_type ("GtkTreeRowReference", gtk_tree_row_reference_get_type);
|
||||||
REGISTER_TYPE ("GtkOptionMenu", GTK_TYPE_OPTION_MENU);
|
add_type ("GtkTreeSelection", gtk_tree_selection_get_type);
|
||||||
REGISTER_TYPE ("GtkOrientation", GTK_TYPE_ORIENTATION);
|
add_type ("GtkTreeSortable", gtk_tree_sortable_get_type);
|
||||||
REGISTER_TYPE ("GtkPackType", GTK_TYPE_PACK_TYPE);
|
add_type ("GtkTreeStore", gtk_tree_store_get_type);
|
||||||
REGISTER_TYPE ("GtkPaned", GTK_TYPE_PANED);
|
add_type ("GtkTreeView", gtk_tree_view_get_type);
|
||||||
REGISTER_TYPE ("GtkPathPriorityType", GTK_TYPE_PATH_PRIORITY_TYPE);
|
add_type ("GtkTreeViewColumn", gtk_tree_view_column_get_type);
|
||||||
REGISTER_TYPE ("GtkPathType", GTK_TYPE_PATH_TYPE);
|
add_type ("GtkTreeViewMode", gtk_tree_view_mode_get_type);
|
||||||
REGISTER_TYPE ("GtkPolicyType", GTK_TYPE_POLICY_TYPE);
|
add_type ("GtkVBox", gtk_vbox_get_type);
|
||||||
REGISTER_TYPE ("GtkPositionType", GTK_TYPE_POSITION_TYPE);
|
add_type ("GtkVButtonBox", gtk_vbutton_box_get_type);
|
||||||
REGISTER_TYPE ("GtkPrivateFlags", GTK_TYPE_PRIVATE_FLAGS);
|
add_type ("GtkViewport", gtk_viewport_get_type);
|
||||||
REGISTER_TYPE ("GtkProgressBar", GTK_TYPE_PROGRESS_BAR);
|
add_type ("GtkVPaned", gtk_vpaned_get_type);
|
||||||
REGISTER_TYPE ("GtkProgressBarOrientation", GTK_TYPE_PROGRESS_BAR_ORIENTATION);
|
add_type ("GtkVRuler", gtk_vruler_get_type);
|
||||||
REGISTER_TYPE ("GtkProgressBarStyle", GTK_TYPE_PROGRESS_BAR_STYLE);
|
add_type ("GtkVScale", gtk_vscale_get_type);
|
||||||
REGISTER_TYPE ("GtkRadioButton", GTK_TYPE_RADIO_BUTTON);
|
add_type ("GtkVScrollbar", gtk_vscrollbar_get_type);
|
||||||
REGISTER_TYPE ("GtkRadioMenuItem", GTK_TYPE_RADIO_MENU_ITEM);
|
add_type ("GtkVSeparator", gtk_vseparator_get_type);
|
||||||
REGISTER_TYPE ("GtkRange", GTK_TYPE_RANGE);
|
add_type ("GtkWidget", gtk_widget_get_type);
|
||||||
REGISTER_TYPE ("GtkRcFlags", GTK_TYPE_RC_FLAGS);
|
add_type ("GtkWidgetFlags", gtk_widget_flags_get_type);
|
||||||
REGISTER_TYPE ("GtkRcStyle", GTK_TYPE_RC_STYLE);
|
add_type ("GtkWidgetHelpType", gtk_widget_help_type_get_type);
|
||||||
REGISTER_TYPE ("GtkRcTokenType", GTK_TYPE_RC_TOKEN_TYPE);
|
add_type ("GtkWindow", gtk_window_get_type);
|
||||||
REGISTER_TYPE ("GtkReliefStyle", GTK_TYPE_RELIEF_STYLE);
|
add_type ("GtkWindowGroup", gtk_window_group_get_type);
|
||||||
REGISTER_TYPE ("GtkRequisition", GTK_TYPE_REQUISITION);
|
|
||||||
REGISTER_TYPE ("GtkResizeMode", GTK_TYPE_RESIZE_MODE);
|
|
||||||
REGISTER_TYPE ("GtkResponseType", GTK_TYPE_RESPONSE_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkRuler", GTK_TYPE_RULER);
|
|
||||||
REGISTER_TYPE ("GtkScale", GTK_TYPE_SCALE);
|
|
||||||
REGISTER_TYPE ("GtkScrollType", GTK_TYPE_SCROLL_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkScrollbar", GTK_TYPE_SCROLLBAR);
|
|
||||||
REGISTER_TYPE ("GtkScrolledWindow", GTK_TYPE_SCROLLED_WINDOW);
|
|
||||||
REGISTER_TYPE ("GtkSelectionData", GTK_TYPE_SELECTION_DATA);
|
|
||||||
REGISTER_TYPE ("GtkSelectionMode", GTK_TYPE_SELECTION_MODE);
|
|
||||||
REGISTER_TYPE ("GtkSeparator", GTK_TYPE_SEPARATOR);
|
|
||||||
REGISTER_TYPE ("GtkSeparatorMenuItem", GTK_TYPE_SEPARATOR_MENU_ITEM);
|
|
||||||
REGISTER_TYPE ("GtkSettings", GTK_TYPE_SETTINGS);
|
|
||||||
REGISTER_TYPE ("GtkShadowType", GTK_TYPE_SHADOW_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkSideType", GTK_TYPE_SIDE_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkSignalRunType", GTK_TYPE_SIGNAL_RUN_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkSizeGroup", GTK_TYPE_SIZE_GROUP);
|
|
||||||
REGISTER_TYPE ("GtkSizeGroupMode", GTK_TYPE_SIZE_GROUP_MODE);
|
|
||||||
REGISTER_TYPE ("GtkSortType", GTK_TYPE_SORT_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkSpinButton", GTK_TYPE_SPIN_BUTTON);
|
|
||||||
REGISTER_TYPE ("GtkSpinButtonUpdatePolicy", GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY);
|
|
||||||
REGISTER_TYPE ("GtkSpinType", GTK_TYPE_SPIN_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkStateType", GTK_TYPE_STATE_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkStatusbar", GTK_TYPE_STATUSBAR);
|
|
||||||
REGISTER_TYPE ("GtkStyle", GTK_TYPE_STYLE);
|
|
||||||
REGISTER_TYPE ("GtkSubmenuDirection", GTK_TYPE_SUBMENU_DIRECTION);
|
|
||||||
REGISTER_TYPE ("GtkSubmenuPlacement", GTK_TYPE_SUBMENU_PLACEMENT);
|
|
||||||
REGISTER_TYPE ("GtkTable", GTK_TYPE_TABLE);
|
|
||||||
REGISTER_TYPE ("GtkTargetFlags", GTK_TYPE_TARGET_FLAGS);
|
|
||||||
REGISTER_TYPE ("GtkTearoffMenuItem", GTK_TYPE_TEAROFF_MENU_ITEM);
|
|
||||||
REGISTER_TYPE ("GtkTextAttributes", GTK_TYPE_TEXT_ATTRIBUTES);
|
|
||||||
REGISTER_TYPE ("GtkTextBuffer", GTK_TYPE_TEXT_BUFFER);
|
|
||||||
REGISTER_TYPE ("GtkTextChildAnchor", GTK_TYPE_TEXT_CHILD_ANCHOR);
|
|
||||||
REGISTER_TYPE ("GtkTextDirection", GTK_TYPE_TEXT_DIRECTION);
|
|
||||||
REGISTER_TYPE ("GtkTextIter", GTK_TYPE_TEXT_ITER);
|
|
||||||
REGISTER_TYPE ("GtkTextMark", GTK_TYPE_TEXT_MARK);
|
|
||||||
REGISTER_TYPE ("GtkTextSearchFlags", GTK_TYPE_TEXT_SEARCH_FLAGS);
|
|
||||||
REGISTER_TYPE ("GtkTextTag", GTK_TYPE_TEXT_TAG);
|
|
||||||
REGISTER_TYPE ("GtkTextTagTable", GTK_TYPE_TEXT_TAG_TABLE);
|
|
||||||
REGISTER_TYPE ("GtkTextView", GTK_TYPE_TEXT_VIEW);
|
|
||||||
REGISTER_TYPE ("GtkTextWindowType", GTK_TYPE_TEXT_WINDOW_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkToggleButton", GTK_TYPE_TOGGLE_BUTTON);
|
|
||||||
REGISTER_TYPE ("GtkToolbar", GTK_TYPE_TOOLBAR);
|
|
||||||
REGISTER_TYPE ("GtkToolbarChildType", GTK_TYPE_TOOLBAR_CHILD_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkToolbarSpaceStyle", GTK_TYPE_TOOLBAR_SPACE_STYLE);
|
|
||||||
REGISTER_TYPE ("GtkToolbarStyle", GTK_TYPE_TOOLBAR_STYLE);
|
|
||||||
REGISTER_TYPE ("GtkTreeDragDest", GTK_TYPE_TREE_DRAG_DEST);
|
|
||||||
REGISTER_TYPE ("GtkTreeDragSource", GTK_TYPE_TREE_DRAG_SOURCE);
|
|
||||||
REGISTER_TYPE ("GtkTreeIter", GTK_TYPE_TREE_ITER);
|
|
||||||
REGISTER_TYPE ("GtkTreeModel", GTK_TYPE_TREE_MODEL);
|
|
||||||
REGISTER_TYPE ("GtkTreeModelFlags", GTK_TYPE_TREE_MODEL_FLAGS);
|
|
||||||
REGISTER_TYPE ("GtkTreeModelSort", GTK_TYPE_TREE_MODEL_SORT);
|
|
||||||
REGISTER_TYPE ("GtkTreePath", GTK_TYPE_TREE_PATH);
|
|
||||||
REGISTER_TYPE ("GtkTreeRowReference", GTK_TYPE_TREE_ROW_REFERENCE);
|
|
||||||
REGISTER_TYPE ("GtkTreeSelection", GTK_TYPE_TREE_SELECTION);
|
|
||||||
REGISTER_TYPE ("GtkTreeSortable", GTK_TYPE_TREE_SORTABLE);
|
|
||||||
REGISTER_TYPE ("GtkTreeStore", GTK_TYPE_TREE_STORE);
|
|
||||||
REGISTER_TYPE ("GtkTreeView", GTK_TYPE_TREE_VIEW);
|
|
||||||
REGISTER_TYPE ("GtkTreeViewColumn", GTK_TYPE_TREE_VIEW_COLUMN);
|
|
||||||
REGISTER_TYPE ("GtkTreeViewColumnSizing", GTK_TYPE_TREE_VIEW_COLUMN_SIZING);
|
|
||||||
REGISTER_TYPE ("GtkTreeViewDropPosition", GTK_TYPE_TREE_VIEW_DROP_POSITION);
|
|
||||||
REGISTER_TYPE ("GtkTreeViewMode", GTK_TYPE_TREE_VIEW_MODE);
|
|
||||||
REGISTER_TYPE ("GtkUpdateType", GTK_TYPE_UPDATE_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkVBox", GTK_TYPE_VBOX);
|
|
||||||
REGISTER_TYPE ("GtkVButtonBox", GTK_TYPE_VBUTTON_BOX);
|
|
||||||
REGISTER_TYPE ("GtkViewport", GTK_TYPE_VIEWPORT);
|
|
||||||
REGISTER_TYPE ("GtkVisibility", GTK_TYPE_VISIBILITY);
|
|
||||||
REGISTER_TYPE ("GtkVPaned", GTK_TYPE_VPANED);
|
|
||||||
REGISTER_TYPE ("GtkVRuler", GTK_TYPE_VRULER);
|
|
||||||
REGISTER_TYPE ("GtkVScale", GTK_TYPE_VSCALE);
|
|
||||||
REGISTER_TYPE ("GtkVScrollbar", GTK_TYPE_VSCROLLBAR);
|
|
||||||
REGISTER_TYPE ("GtkVSeparator", GTK_TYPE_VSEPARATOR);
|
|
||||||
REGISTER_TYPE ("GtkWidget", GTK_TYPE_WIDGET);
|
|
||||||
REGISTER_TYPE ("GtkWidgetFlags", GTK_TYPE_WIDGET_FLAGS);
|
|
||||||
REGISTER_TYPE ("GtkWidgetHelpType", GTK_TYPE_WIDGET_HELP_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkWindow", GTK_TYPE_WINDOW);
|
|
||||||
REGISTER_TYPE ("GtkWindowGroup", GTK_TYPE_WINDOW_GROUP);
|
|
||||||
REGISTER_TYPE ("GtkWindowPosition", GTK_TYPE_WINDOW_POSITION);
|
|
||||||
REGISTER_TYPE ("GtkWindowType", GTK_TYPE_WINDOW_TYPE);
|
|
||||||
REGISTER_TYPE ("GtkWrapMode", GTK_TYPE_WRAP_MODE);
|
|
||||||
|
|
||||||
#ifndef __WIN32__
|
#ifndef __WIN32__
|
||||||
REGISTER_TYPE ("GtkPlug", GTK_TYPE_PLUG);
|
add_type ("GtkPlug", gtk_plug_get_type);
|
||||||
REGISTER_TYPE ("GtkSocket", GTK_TYPE_SOCKET);
|
add_type ("GtkSocket", gtk_socket_get_type);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef add_type
|
||||||
|
}
|
||||||
|
|
||||||
|
type_func = g_hash_table_lookup (types, name);
|
||||||
|
if (type_func)
|
||||||
|
return type_func ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user