diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:13:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:13:10 +0000 |
commit | 3c57dd931145d43f2b0aef96c4d178135956bf91 (patch) | |
tree | 3de698981e9f0cc2c4f9569b19a5f3595e741f6b /libgimp/gimpenums.c.tail | |
parent | Initial commit. (diff) | |
download | gimp-3c57dd931145d43f2b0aef96c4d178135956bf91.tar.xz gimp-3c57dd931145d43f2b0aef96c4d178135956bf91.zip |
Adding upstream version 2.10.36.upstream/2.10.36
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libgimp/gimpenums.c.tail')
-rw-r--r-- | libgimp/gimpenums.c.tail | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/libgimp/gimpenums.c.tail b/libgimp/gimpenums.c.tail new file mode 100644 index 0000000..e8821e2 --- /dev/null +++ b/libgimp/gimpenums.c.tail @@ -0,0 +1,205 @@ + +typedef GType (* GimpGetTypeFunc) (void); + +static const GimpGetTypeFunc get_type_funcs[] = +{ + gegl_distance_metric_get_type, + gimp_add_mask_type_get_type, + gimp_blend_mode_get_type, + gimp_brush_application_mode_get_type, + gimp_brush_generated_shape_get_type, + gimp_bucket_fill_mode_get_type, + gimp_cap_style_get_type, + gimp_channel_ops_get_type, + gimp_channel_type_get_type, + gimp_clone_type_get_type, + gimp_color_management_mode_get_type, + gimp_color_rendering_intent_get_type, + gimp_color_tag_get_type, + gimp_component_type_get_type, + gimp_convert_dither_type_get_type, + gimp_convert_palette_type_get_type, + gimp_convolve_type_get_type, + gimp_desaturate_mode_get_type, + gimp_dodge_burn_type_get_type, + gimp_fill_type_get_type, + gimp_foreground_extract_mode_get_type, + gimp_gradient_blend_color_space_get_type, + gimp_gradient_segment_color_get_type, + gimp_gradient_segment_type_get_type, + gimp_gradient_type_get_type, + gimp_grid_style_get_type, + gimp_histogram_channel_get_type, + gimp_hue_range_get_type, + gimp_icon_type_get_type, + gimp_image_base_type_get_type, + gimp_image_type_get_type, + gimp_ink_blob_type_get_type, + gimp_interpolation_type_get_type, + gimp_join_style_get_type, + gimp_layer_color_space_get_type, + gimp_layer_composite_mode_get_type, + gimp_layer_mode_get_type, + gimp_mask_apply_mode_get_type, + gimp_merge_type_get_type, + gimp_message_handler_type_get_type, + gimp_offset_type_get_type, + gimp_orientation_type_get_type, + gimp_pdb_arg_type_get_type, + gimp_pdb_error_handler_get_type, + gimp_pdb_proc_type_get_type, + gimp_pdb_status_type_get_type, + gimp_paint_application_mode_get_type, + gimp_precision_get_type, + gimp_progress_command_get_type, + gimp_repeat_mode_get_type, + gimp_rotation_type_get_type, + gimp_run_mode_get_type, + gimp_select_criterion_get_type, + gimp_size_type_get_type, + gimp_stack_trace_mode_get_type, + gimp_stroke_method_get_type, + gimp_text_direction_get_type, + gimp_text_hint_style_get_type, + gimp_text_justification_get_type, + gimp_transfer_mode_get_type, + gimp_transform_direction_get_type, + gimp_transform_resize_get_type, + gimp_user_directory_get_type, + gimp_vectors_stroke_type_get_type +}; + +static const gchar * const type_names[] = +{ + "GeglDistanceMetric", + "GimpAddMaskType", + "GimpBlendMode", + "GimpBrushApplicationMode", + "GimpBrushGeneratedShape", + "GimpBucketFillMode", + "GimpCapStyle", + "GimpChannelOps", + "GimpChannelType", + "GimpCloneType", + "GimpColorManagementMode", + "GimpColorRenderingIntent", + "GimpColorTag", + "GimpComponentType", + "GimpConvertDitherType", + "GimpConvertPaletteType", + "GimpConvolveType", + "GimpDesaturateMode", + "GimpDodgeBurnType", + "GimpFillType", + "GimpForegroundExtractMode", + "GimpGradientBlendColorSpace", + "GimpGradientSegmentColor", + "GimpGradientSegmentType", + "GimpGradientType", + "GimpGridStyle", + "GimpHistogramChannel", + "GimpHueRange", + "GimpIconType", + "GimpImageBaseType", + "GimpImageType", + "GimpInkBlobType", + "GimpInterpolationType", + "GimpJoinStyle", + "GimpLayerColorSpace", + "GimpLayerCompositeMode", + "GimpLayerMode", + "GimpMaskApplyMode", + "GimpMergeType", + "GimpMessageHandlerType", + "GimpOffsetType", + "GimpOrientationType", + "GimpPDBArgType", + "GimpPDBErrorHandler", + "GimpPDBProcType", + "GimpPDBStatusType", + "GimpPaintApplicationMode", + "GimpPrecision", + "GimpProgressCommand", + "GimpRepeatMode", + "GimpRotationType", + "GimpRunMode", + "GimpSelectCriterion", + "GimpSizeType", + "GimpStackTraceMode", + "GimpStrokeMethod", + "GimpTextDirection", + "GimpTextHintStyle", + "GimpTextJustification", + "GimpTransferMode", + "GimpTransformDirection", + "GimpTransformResize", + "GimpUserDirectory", + "GimpVectorsStrokeType" +}; + +static gboolean enums_initialized = FALSE; + +GType gimp_convert_dither_type_compat_get_type (void); +GType gimp_layer_mode_effects_get_type (void); + +/** + * gimp_enums_init: + * + * This function makes sure all the enum types are registered + * with the #GType system. This is intended for use by language + * bindings that need the symbols early, before gimp_main is run. + * It's not necessary for plug-ins to call this directly, because + * the normal plug-in initialization code will handle it implicitly. + * + * Since: 2.4 + **/ +void +gimp_enums_init (void) +{ + const GimpGetTypeFunc *funcs = get_type_funcs; + GQuark quark; + gint i; + + if (enums_initialized) + return; + + for (i = 0; i < G_N_ELEMENTS (get_type_funcs); i++, funcs++) + { + GType type = (*funcs) (); + + g_type_class_ref (type); + } + + /* keep compat enum code in sync with app/app.c (app_libs_init) */ + quark = g_quark_from_static_string ("gimp-compat-enum"); + + g_type_set_qdata (GIMP_TYPE_CONVERT_DITHER_TYPE, quark, + (gpointer) gimp_convert_dither_type_compat_get_type ()); + g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark, + (gpointer) gimp_layer_mode_effects_get_type ()); + + gimp_base_compat_enums_init (); + + enums_initialized = TRUE; +} + +/** + * gimp_enums_get_type_names: + * @n_type_names: return location for the number of names + * + * This function gives access to the list of enums registered by libgimp. + * The returned array is static and must not be modified. + * + * Return value: an array with type names + * + * Since: 2.2 + **/ +const gchar ** +gimp_enums_get_type_names (gint *n_type_names) +{ + g_return_val_if_fail (n_type_names != NULL, NULL); + + *n_type_names = G_N_ELEMENTS (type_names); + + return (const gchar **) type_names; +} |