| 1 |
/* melder_enums.h |
| 2 |
* |
| 3 |
* Copyright (C) 2007,2013,2015,2016,2018,2019,2025,2026 Paul Boersma |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 3 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
* See the GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
enums_begin (kMelder_number, 1) |
| 20 |
enums_add (kMelder_number, 1, EQUAL_TO, U"equal to") |
| 21 |
enums_add (kMelder_number, 2, NOT_EQUAL_TO, U"not equal to") |
| 22 |
enums_add (kMelder_number, 3, LESS_THAN, U"less than") |
| 23 |
enums_add (kMelder_number, 4, LESS_THAN_OR_EQUAL_TO, U"less than or equal to") |
| 24 |
enums_add (kMelder_number, 5, GREATER_THAN, U"greater than") |
| 25 |
enums_add (kMelder_number, 6, GREATER_THAN_OR_EQUAL_TO, U"greater than or equal to") |
| 26 |
enums_end (kMelder_number, 6, EQUAL_TO) |
| 27 |
|
| 28 |
enums_begin (kMelder_string, 1) |
| 29 |
enums_add (kMelder_string, 1, EQUAL_TO, U"is equal to") |
| 30 |
enums_add (kMelder_string, 2, NOT_EQUAL_TO, U"is not equal to") |
| 31 |
enums_add (kMelder_string, 3, CONTAINS, U"contains") |
| 32 |
enums_add (kMelder_string, 4, DOES_NOT_CONTAIN, U"does not contain") |
| 33 |
enums_add (kMelder_string, 5, STARTS_WITH, U"starts with") |
| 34 |
enums_add (kMelder_string, 6, DOES_NOT_START_WITH, U"does not start with") |
| 35 |
enums_add (kMelder_string, 7, ENDS_WITH, U"ends with") |
| 36 |
enums_add (kMelder_string, 8, DOES_NOT_END_WITH, U"does not end with") |
| 37 |
enums_add (kMelder_string, 9, CONTAINS_WORD, U"contains a word equal to") |
| 38 |
enums_add (kMelder_string, 10, DOES_NOT_CONTAIN_WORD, U"does not contain a word equal to") |
| 39 |
enums_add (kMelder_string, 11, CONTAINS_WORD_STARTING_WITH, U"contains a word starting with") |
| 40 |
enums_add (kMelder_string, 12, DOES_NOT_CONTAIN_WORD_STARTING_WITH, U"does not contain a word starting with") |
| 41 |
enums_add (kMelder_string, 13, CONTAINS_WORD_ENDING_WITH, U"contains a word ending with") |
| 42 |
enums_add (kMelder_string, 14, DOES_NOT_CONTAIN_WORD_ENDING_WITH, U"does not contain a word ending with") |
| 43 |
enums_add (kMelder_string, 15, CONTAINS_INK, U"contains ink equal to") |
| 44 |
enums_add (kMelder_string, 16, DOES_NOT_CONTAIN_INK, U"does not contain ink equal to") |
| 45 |
enums_add (kMelder_string, 17, CONTAINS_INK_STARTING_WITH, U"contains ink starting with") |
| 46 |
enums_add (kMelder_string, 18, DOES_NOT_CONTAIN_INK_STARTING_WITH, U"does not contain ink starting with") |
| 47 |
enums_add (kMelder_string, 19, CONTAINS_INK_ENDING_WITH, U"contains ink ending with") |
| 48 |
enums_add (kMelder_string, 20, DOES_NOT_CONTAIN_INK_ENDING_WITH, U"does not contain ink ending with") |
| 49 |
enums_add (kMelder_string, 21, MATCH_REGEXP, U"matches (regex)") |
| 50 |
enums_end (kMelder_string, 21, EQUAL_TO) |
| 51 |
|
| 52 |
enums_begin (kMelder_textInputEncoding, 1) |
| 53 |
enums_add (kMelder_textInputEncoding, 1, UTF8, U"UTF-8") |
| 54 |
enums_add (kMelder_textInputEncoding, 2, UTF8_THEN_ISO_LATIN1, U"try UTF-8, then ISO Latin-1") |
| 55 |
enums_add (kMelder_textInputEncoding, 3, ISO_LATIN1, U"ISO Latin-1") |
| 56 |
enums_add (kMelder_textInputEncoding, 4, UTF8_THEN_WINDOWS_LATIN1, U"try UTF-8, then Windows Latin-1") |
| 57 |
enums_add (kMelder_textInputEncoding, 5, WINDOWS_LATIN1, U"Windows Latin-1") |
| 58 |
enums_add (kMelder_textInputEncoding, 6, UTF8_THEN_MACROMAN, U"try UTF-8, then MacRoman") |
| 59 |
enums_add (kMelder_textInputEncoding, 7, MACROMAN, U"MacRoman") |
| 60 |
#if defined (_WIN32) |
| 61 |
enums_end (kMelder_textInputEncoding, 7, UTF8_THEN_WINDOWS_LATIN1) |
| 62 |
#elif defined (macintosh) |
| 63 |
enums_end (kMelder_textInputEncoding, 7, UTF8_THEN_MACROMAN) |
| 64 |
#else |
| 65 |
enums_end (kMelder_textInputEncoding, 7, UTF8_THEN_ISO_LATIN1) |
| 66 |
#endif |
| 67 |
|
| 68 |
enums_begin (kMelder_textOutputEncoding, 1) |
| 69 |
enums_add (kMelder_textOutputEncoding, 1, UTF8, U"UTF-8") |
| 70 |
enums_add (kMelder_textOutputEncoding, 2, UTF16, U"UTF-16") |
| 71 |
enums_add (kMelder_textOutputEncoding, 3, ASCII_THEN_UTF16, U"try ASCII, then UTF-16") |
| 72 |
enums_add (kMelder_textOutputEncoding, 4, ISO_LATIN1_THEN_UTF16, U"try ISO Latin-1, then UTF-16") |
| 73 |
enums_end (kMelder_textOutputEncoding, 4, UTF8) |
| 74 |
|
| 75 |
enums_begin (kMelder_asynchronicityLevel, 0) |
| 76 |
enums_add (kMelder_asynchronicityLevel, 0, SYNCHRONOUS, U"synchronous (nothing)") |
| 77 |
enums_add (kMelder_asynchronicityLevel, 1, CALLING_BACK, U"calling back (view running cursor)") |
| 78 |
enums_add (kMelder_asynchronicityLevel, 2, INTERRUPTABLE, U"interruptable (Escape key stops playing)") |
| 79 |
enums_add (kMelder_asynchronicityLevel, 3, ASYNCHRONOUS, U"asynchronous (anything)") |
| 80 |
enums_end (kMelder_asynchronicityLevel, 3, ASYNCHRONOUS) |
| 81 |
|
| 82 |
#if defined (_WIN32) |
| 83 |
|
| 84 |
enums_begin (kMelder_inputSoundSystem, 1) |
| 85 |
enums_add (kMelder_inputSoundSystem, 1, MME_VIA_PORTAUDIO, U"MME via PortAudio") |
| 86 |
enums_end (kMelder_inputSoundSystem, 1, MME_VIA_PORTAUDIO) |
| 87 |
// in order to allow recording for over 64 megabytes (paMME) |
| 88 |
|
| 89 |
enums_begin (kMelder_outputSoundSystem, 1) |
| 90 |
enums_add (kMelder_outputSoundSystem, 1, MME, U"MME") |
| 91 |
enums_add (kMelder_outputSoundSystem, 2, MME_VIA_PORTAUDIO, U"MME via PortAudio") |
| 92 |
enums_end (kMelder_outputSoundSystem, 2, MME) |
| 93 |
// in order to reduce the long latencies of paMME and to avoid the incomplete implementation of paDirectSound |
| 94 |
|
| 95 |
#elif defined (macintosh) |
| 96 |
|
| 97 |
enums_begin (kMelder_inputSoundSystem, 1) |
| 98 |
enums_add (kMelder_inputSoundSystem, 1, COREAUDIO_VIA_PORTAUDIO, U"CoreAudio via PortAudio") |
| 99 |
enums_end (kMelder_inputSoundSystem, 1, COREAUDIO_VIA_PORTAUDIO) |
| 100 |
// in order to have CoreAudio |
| 101 |
|
| 102 |
enums_begin (kMelder_outputSoundSystem, 1) |
| 103 |
enums_add (kMelder_outputSoundSystem, 1, COREAUDIO_VIA_PORTAUDIO, U"CoreAudio via PortAudio") |
| 104 |
enums_end (kMelder_outputSoundSystem, 1, COREAUDIO_VIA_PORTAUDIO) |
| 105 |
// in order to have CoreAudio |
| 106 |
|
| 107 |
#elif defined (raspberrypi) |
| 108 |
|
| 109 |
enums_begin (kMelder_inputSoundSystem, 1) |
| 110 |
enums_add (kMelder_inputSoundSystem, 1, JACK_VIA_PORTAUDIO, U"JACK via PortAudio") |
| 111 |
enums_end (kMelder_inputSoundSystem, 1, JACK_VIA_PORTAUDIO) |
| 112 |
// in order to use JACK |
| 113 |
|
| 114 |
enums_begin (kMelder_outputSoundSystem, 1) |
| 115 |
enums_add (kMelder_outputSoundSystem, 1, JACK_VIA_PORTAUDIO, U"JACK via PortAudio") |
| 116 |
enums_end (kMelder_outputSoundSystem, 1, JACK_VIA_PORTAUDIO) |
| 117 |
// in order to use JACK |
| 118 |
|
| 119 |
#else |
| 120 |
|
| 121 |
enums_begin (kMelder_inputSoundSystem, 1) |
| 122 |
enums_add (kMelder_inputSoundSystem, 1, ALSA_OR_JACK_VIA_PORTAUDIO, U"ALSA or JACK via PortAudio") |
| 123 |
enums_alt (kMelder_inputSoundSystem, ALSA_OR_JACK_VIA_PORTAUDIO, U"ALSA via PortAudio") |
| 124 |
// in order to use ALSA and therefore be compatible with Ubuntu 10.10 and later |
| 125 |
// JACK compatible with PipeWire |
| 126 |
enums_end (kMelder_inputSoundSystem, 1, ALSA_OR_JACK_VIA_PORTAUDIO) |
| 127 |
|
| 128 |
enums_begin (kMelder_outputSoundSystem, 1) |
| 129 |
enums_add (kMelder_outputSoundSystem, 1, PULSEAUDIO, U"PulseAudio") // compatible with PipeWire |
| 130 |
enums_add (kMelder_outputSoundSystem, 2, ALSA_OR_JACK_VIA_PORTAUDIO, U"ALSA or JACK via PortAudio") |
| 131 |
enums_alt (kMelder_outputSoundSystem, ALSA_OR_JACK_VIA_PORTAUDIO, U"ALSA via PortAudio") |
| 132 |
// JACK compatible with PipeWire |
| 133 |
enums_end (kMelder_outputSoundSystem, 2, PULSEAUDIO) |
| 134 |
// because we prefer to try PulseAudio directly |
| 135 |
|
| 136 |
#endif |
| 137 |
|
| 138 |
/* End of file melder_enums.h */ |