Viewing is open to everyone. Downloading and starring need a GitHub sign-in. Sign in with GitHub

Enums.cs

v0.1.0-build.85 Latest Commit ede38f5

Size
5.0 KB
Lines
142
Language
csharp
SHA-256
c32d5aa20c84…
View on GitHub

Sign in with GitHub to download. Each download is recorded with your GitHub username.

1using System;
2
3namespace OpenCKey
4{
5 /// <summary>Status codes of the C core (<c>ckey_status</c>).</summary>
6 public enum CKeyStatus
7 {
8 /// <summary>CKEY_OK.</summary>
9 Ok = 0,
10 /// <summary>CKEY_INVALID_ARGUMENT.</summary>
11 InvalidArgument = 1,
12 /// <summary>CKEY_UNSUPPORTED_PROFILE.</summary>
13 UnsupportedProfile = 2,
14 /// <summary>CKEY_INSUFFICIENT_BUFFER.</summary>
15 InsufficientBuffer = 3,
16 /// <summary>CKEY_INTERNAL_ERROR.</summary>
17 InternalError = 4,
18 /// <summary>CKEY_UNCORRECTABLE: too many errors for Reed–Solomon.</summary>
19 Uncorrectable = 5,
20 /// <summary>CKEY_INTEGRITY_FAILURE: the CRC did not match.</summary>
21 IntegrityFailure = 6,
22 /// <summary>CKEY_EXPIRED: a Safe Action outside its lifetime, or longer-lived than allowed.</summary>
23 Expired = 7,
24 }
25
26 /// <summary>Error-correction level of a Profile 0 symbol (<c>ckey_ecc_level</c>).</summary>
27 public enum EccLevel
28 {
29 /// <summary>About 7% of each block correctable.</summary>
30 L = 0,
31 /// <summary>About 14% (the default).</summary>
32 M = 1,
33 /// <summary>About 22%.</summary>
34 Q = 2,
35 /// <summary>About 30%.</summary>
36 H = 3,
37 }
38
39 /// <summary>Profile 0 layout family (<c>ckey_scalable_layout</c>).</summary>
40 public enum Layout
41 {
42 /// <summary>Format 0.27, the screen layout.</summary>
43 Standard = 0,
44 /// <summary>Format 0.28 ("Profile 0.1"): every mark and gap at least about one module, for small prints.</summary>
45 Print = 1,
46 }
47
48 /// <summary>How the raster backend turns geometry into pixels (<c>ckey_raster_policy</c>).</summary>
49 public enum RasterPolicy
50 {
51 /// <summary>Antialiased: each pixel's ink is its supersampled area coverage.</summary>
52 Coverage = 0,
53 /// <summary>Each pixel is ink when at least half its samples are covered.</summary>
54 Binary = 1,
55 /// <summary>Coverage, with marks thinner than the minimum feature widened to it.</summary>
56 Hybrid = 2,
57 }
58
59 /// <summary>Shape of payload modules (<c>ckey_module_shape</c>).</summary>
60 public enum ModuleShape
61 {
62 /// <summary>Rounded square (default).</summary>
63 Rounded = 0,
64 /// <summary>Square.</summary>
65 Square = 1,
66 /// <summary>Circle.</summary>
67 Circle = 2,
68 /// <summary>Diamond.</summary>
69 Diamond = 3,
70 }
71
72 /// <summary>How ring marks are drawn (<c>ckey_ring_style</c>).</summary>
73 public enum RingStyle
74 {
75 /// <summary>Adjacent dots join into arcs (default).</summary>
76 Joined = 0,
77 /// <summary>Every ring mark is a separate dot.</summary>
78 Dots = 1,
79 }
80
81 /// <summary>Ray end caps (<c>ckey_ray_cap</c>).</summary>
82 public enum RayCap
83 {
84 /// <summary>Round caps (default).</summary>
85 Round = 0,
86 /// <summary>Flat caps.</summary>
87 Flat = 1,
88 }
89
90 /// <summary>Optical-safety policy carried by a style (<c>ckey_style_policy</c>).</summary>
91 public enum StylePolicy
92 {
93 /// <summary>Renderers refuse a style that fails the safety rules (default).</summary>
94 Strict = 0,
95 /// <summary>Renderers repair the style by fixed rules, then apply the strict rules.</summary>
96 Adaptive = 1,
97 /// <summary>Renderers draw the style as given; the caller accepts an uncertified symbol.</summary>
98 Override = 2,
99 }
100
101 /// <summary>Named style presets (<c>ckey_style_preset</c>).</summary>
102 public enum CKeyStylePreset
103 {
104 /// <summary>Black ink on white: the default style.</summary>
105 Plain = 0,
106 /// <summary>Cream metallic ink on a dark vignette, with accents, depth and grain.</summary>
107 Concept = 1,
108 }
109
110 /// <summary>The CKey profile a symbol was decoded as.</summary>
111 public enum CKeyProfile
112 {
113 /// <summary>Profile 0, the scalable family (versions 1..31, standard or print layout).</summary>
114 Scalable = 0,
115 /// <summary>Profile 1, the 16-byte locator.</summary>
116 Locator = 1,
117 /// <summary>Profile 2, text (up to 200 bytes).</summary>
118 Text = 2,
119 /// <summary>Profile 3, extended (up to 2,048 bytes).</summary>
120 Extended = 3,
121 }
122
123 /// <summary>Changes the adaptive policy made to a style (<c>CKEY_ADJUST_*</c>).</summary>
124 [Flags]
125 public enum StyleAdjustments
126 {
127 /// <summary>No change.</summary>
128 None = 0,
129 /// <summary>Ink replaced by black or white.</summary>
130 Ink = 1,
131 /// <summary>Accents removed.</summary>
132 Accents = 2,
133 /// <summary>Bevel or shadow limited.</summary>
134 Effects = 4,
135 /// <summary>Logo plated or shrunk.</summary>
136 Logo = 8,
137 /// <summary>The symbol was given its own background.</summary>
138 Background = 16,
139 /// <summary>Sheen, vignette, depth and grain removed after a failed model test.</summary>
140 Materials = 32,
141 }
142}