PIKApp/libpika/pikaenums.c.tail

204 lines
5.2 KiB
Plaintext

typedef GType (* PikaGetTypeFunc) (void);
static const PikaGetTypeFunc get_type_funcs[] =
{
gegl_distance_metric_get_type,
pika_add_mask_type_get_type,
pika_brush_application_mode_get_type,
pika_brush_generated_shape_get_type,
pika_cap_style_get_type,
pika_channel_ops_get_type,
pika_channel_type_get_type,
pika_clone_type_get_type,
pika_color_management_mode_get_type,
pika_color_rendering_intent_get_type,
pika_color_tag_get_type,
pika_component_type_get_type,
pika_convert_dither_type_get_type,
pika_convert_palette_type_get_type,
pika_convolve_type_get_type,
pika_desaturate_mode_get_type,
pika_dodge_burn_type_get_type,
pika_fill_type_get_type,
pika_foreground_extract_mode_get_type,
pika_gradient_blend_color_space_get_type,
pika_gradient_segment_color_get_type,
pika_gradient_segment_type_get_type,
pika_gradient_type_get_type,
pika_grid_style_get_type,
pika_histogram_channel_get_type,
pika_hue_range_get_type,
pika_icon_type_get_type,
pika_image_base_type_get_type,
pika_image_type_get_type,
pika_ink_blob_type_get_type,
pika_interpolation_type_get_type,
pika_join_style_get_type,
pika_layer_color_space_get_type,
pika_layer_composite_mode_get_type,
pika_layer_mode_get_type,
pika_mask_apply_mode_get_type,
pika_merge_type_get_type,
pika_message_handler_type_get_type,
pika_offset_type_get_type,
pika_orientation_type_get_type,
pika_pdb_error_handler_get_type,
pika_pdb_proc_type_get_type,
pika_pdb_status_type_get_type,
pika_paint_application_mode_get_type,
pika_precision_get_type,
pika_progress_command_get_type,
pika_repeat_mode_get_type,
pika_rotation_type_get_type,
pika_run_mode_get_type,
pika_select_criterion_get_type,
pika_size_type_get_type,
pika_stack_trace_mode_get_type,
pika_stroke_method_get_type,
pika_text_direction_get_type,
pika_text_hint_style_get_type,
pika_text_justification_get_type,
pika_transfer_mode_get_type,
pika_transform_direction_get_type,
pika_transform_resize_get_type,
pika_vectors_stroke_type_get_type
};
static const gchar * const type_names[] =
{
"GeglDistanceMetric",
"PikaAddMaskType",
"PikaBrushApplicationMode",
"PikaBrushGeneratedShape",
"PikaCapStyle",
"PikaChannelOps",
"PikaChannelType",
"PikaCloneType",
"PikaColorManagementMode",
"PikaColorRenderingIntent",
"PikaColorTag",
"PikaComponentType",
"PikaConvertDitherType",
"PikaConvertPaletteType",
"PikaConvolveType",
"PikaDesaturateMode",
"PikaDodgeBurnType",
"PikaFillType",
"PikaForegroundExtractMode",
"PikaGradientBlendColorSpace",
"PikaGradientSegmentColor",
"PikaGradientSegmentType",
"PikaGradientType",
"PikaGridStyle",
"PikaHistogramChannel",
"PikaHueRange",
"PikaIconType",
"PikaImageBaseType",
"PikaImageType",
"PikaInkBlobType",
"PikaInterpolationType",
"PikaJoinStyle",
"PikaLayerColorSpace",
"PikaLayerCompositeMode",
"PikaLayerMode",
"PikaMaskApplyMode",
"PikaMergeType",
"PikaMessageHandlerType",
"PikaOffsetType",
"PikaOrientationType",
"PikaPDBErrorHandler",
"PikaPDBProcType",
"PikaPDBStatusType",
"PikaPaintApplicationMode",
"PikaPrecision",
"PikaProgressCommand",
"PikaRepeatMode",
"PikaRotationType",
"PikaRunMode",
"PikaSelectCriterion",
"PikaSizeType",
"PikaStackTraceMode",
"PikaStrokeMethod",
"PikaTextDirection",
"PikaTextHintStyle",
"PikaTextJustification",
"PikaTransferMode",
"PikaTransformDirection",
"PikaTransformResize",
"PikaVectorsStrokeType"
};
static gboolean enums_initialized = FALSE;
#if 0
/* keep around as documentation how to do compat enums */
GType pika_convert_dither_type_compat_get_type (void);
#endif
/**
* pika_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 pika_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
pika_enums_init (void)
{
const PikaGetTypeFunc *funcs = get_type_funcs;
#if 0
GQuark quark;
#endif
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);
}
#if 0
/* keep around as documentation how to do compat enums */
/* keep compat enum code in sync with app/app.c (app_libs_init) */
quark = g_quark_from_static_string ("pika-compat-enum");
g_type_set_qdata (PIKA_TYPE_CONVERT_DITHER_TYPE, quark,
(gpointer) pika_convert_dither_type_compat_get_type ());
#endif
pika_base_compat_enums_init ();
enums_initialized = TRUE;
}
/**
* pika_enums_get_type_names:
* @n_type_names: (out): return location for the number of names
*
* This function gives access to the list of enums registered by libpika.
* The returned array is static and must not be modified.
*
* Returns: (array length=n_type_names) (transfer none): an array with type names
*
* Since: 2.2
**/
const gchar **
pika_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;
}