File: gimpenums.c.tail

package info (click to toggle)
gimp 2.2.13-1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 93,212 kB
  • ctags: 47,113
  • sloc: ansic: 524,858; xml: 36,798; lisp: 9,870; sh: 9,409; makefile: 7,923; python: 2,674; perl: 2,589; yacc: 520; lex: 334
file content (127 lines) | stat: -rw-r--r-- 3,094 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

typedef GType (* GimpGetTypeFunc) (void);

static GimpGetTypeFunc get_type_funcs[] =
{
  gimp_add_mask_type_get_type,
  gimp_blend_mode_get_type,
  gimp_brush_application_mode_get_type,
  gimp_bucket_fill_mode_get_type,
  gimp_channel_ops_get_type,
  gimp_channel_type_get_type,
  gimp_clone_type_get_type,
  gimp_convert_dither_type_get_type,
  gimp_convert_palette_type_get_type,
  gimp_convolution_type_get_type,
  gimp_convolve_type_get_type,
  gimp_dodge_burn_type_get_type,
  gimp_fill_type_get_type,
  gimp_gradient_segment_color_get_type,
  gimp_gradient_segment_type_get_type,
  gimp_gradient_type_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_interpolation_type_get_type,
  gimp_layer_mode_effects_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_proc_type_get_type,
  gimp_pdb_status_type_get_type,
  gimp_paint_application_mode_get_type,
  gimp_progress_command_get_type,
  gimp_repeat_mode_get_type,
  gimp_rotation_type_get_type,
  gimp_run_mode_get_type,
  gimp_size_type_get_type,
  gimp_stack_trace_mode_get_type,
  gimp_transfer_mode_get_type,
  gimp_transform_direction_get_type
};

static const gchar *type_names[] =
{
  "GimpAddMaskType",
  "GimpBlendMode",
  "GimpBrushApplicationMode",
  "GimpBucketFillMode",
  "GimpChannelOps",
  "GimpChannelType",
  "GimpCloneType",
  "GimpConvertDitherType",
  "GimpConvertPaletteType",
  "GimpConvolutionType",
  "GimpConvolveType",
  "GimpDodgeBurnType",
  "GimpFillType",
  "GimpGradientSegmentColor",
  "GimpGradientSegmentType",
  "GimpGradientType",
  "GimpHistogramChannel",
  "GimpHueRange",
  "GimpIconType",
  "GimpImageBaseType",
  "GimpImageType",
  "GimpInterpolationType",
  "GimpLayerModeEffects",
  "GimpMaskApplyMode",
  "GimpMergeType",
  "GimpMessageHandlerType",
  "GimpOffsetType",
  "GimpOrientationType",
  "GimpPDBArgType",
  "GimpPDBProcType",
  "GimpPDBStatusType",
  "GimpPaintApplicationMode",
  "GimpProgressCommand",
  "GimpRepeatMode",
  "GimpRotationType",
  "GimpRunMode",
  "GimpSizeType",
  "GimpStackTraceMode",
  "GimpTransferMode",
  "GimpTransformDirection"
};

void
_gimp_enums_init (void)
{
  GimpGetTypeFunc *funcs;
  gint             i;

  for (i = 0, funcs = get_type_funcs;
       i < G_N_ELEMENTS (get_type_funcs);
       i++, funcs++)
    {
      GType type = (*funcs) ();

      g_type_class_ref (type);
    }
}

/**
 * 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: GIMP 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 type_names;
}