| 1 | #cxx . . $ `<file>/src/pt2_mouse.h`/pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | #include <stdbool.h> |
| 5 | #include <SDL2/SDL.h> |
| 6 | |
| 7 | // taken from the ptplay project and modified |
| 8 | enum ptbuttonscxx . . $ ptbuttons# |
| 9 | { |
| 10 | PTB_DUMMYcxx . . $ PTB_DUMMY., |
| 11 | |
| 12 | // ALL SCREENS |
| 13 | PTB_SONGNAMEcxx . . $ PTB_SONGNAME., |
| 14 | PTB_SAMPLENAMEcxx . . $ PTB_SAMPLENAME., |
| 15 | PTB_LOADSAMPLEcxx . . $ PTB_LOADSAMPLE., |
| 16 | |
| 17 | // POS ED. SCREEN |
| 18 | PTB_PE_BADGEcxx . . $ PTB_PE_BADGE., |
| 19 | PTB_PE_PATTcxx . . $ PTB_PE_PATT., |
| 20 | PTB_PE_PATTNAMEcxx . . $ PTB_PE_PATTNAME., |
| 21 | PTB_PE_SCROLLTOPcxx . . $ PTB_PE_SCROLLTOP., |
| 22 | PTB_PE_SCROLLUPcxx . . $ PTB_PE_SCROLLUP., |
| 23 | PTB_PE_EXITcxx . . $ PTB_PE_EXIT., |
| 24 | PTB_PE_SCROLLDOWNcxx . . $ PTB_PE_SCROLLDOWN., |
| 25 | PTB_PE_SCROLLBOTcxx . . $ PTB_PE_SCROLLBOT., |
| 26 | |
| 27 | // EDIT OP. SCREEN |
| 28 | PTB_EO_TITLEBARcxx . . $ PTB_EO_TITLEBAR., |
| 29 | PTB_EO_1cxx . . $ PTB_EO_1., |
| 30 | PTB_EO_2cxx . . $ PTB_EO_2., |
| 31 | PTB_EO_3cxx . . $ PTB_EO_3., |
| 32 | PTB_EO_EXITcxx . . $ PTB_EO_EXIT., |
| 33 | |
| 34 | // EDIT OP. SCREEN #1 |
| 35 | PTB_EO_TRACK_NOTE_UPcxx . . $ PTB_EO_TRACK_NOTE_UP., |
| 36 | PTB_EO_PATT_NOTE_UPcxx . . $ PTB_EO_PATT_NOTE_UP., |
| 37 | PTB_EO_TRACK_NOTE_DOWNcxx . . $ PTB_EO_TRACK_NOTE_DOWN., |
| 38 | PTB_EO_PATT_NOTE_DOWNcxx . . $ PTB_EO_PATT_NOTE_DOWN., |
| 39 | PTB_EO_TRACK_OCTA_UPcxx . . $ PTB_EO_TRACK_OCTA_UP., |
| 40 | PTB_EO_PATT_OCTA_UPcxx . . $ PTB_EO_PATT_OCTA_UP., |
| 41 | PTB_EO_TRACK_OCTA_DOWNcxx . . $ PTB_EO_TRACK_OCTA_DOWN., |
| 42 | PTB_EO_PATT_OCTA_DOWNcxx . . $ PTB_EO_PATT_OCTA_DOWN., |
| 43 | |
| 44 | // EDIT OP. SCREEN #2 |
| 45 | PTB_EO_RECORDcxx . . $ PTB_EO_RECORD., |
| 46 | PTB_EO_DELETEcxx . . $ PTB_EO_DELETE., |
| 47 | PTB_EO_KILLcxx . . $ PTB_EO_KILL., |
| 48 | PTB_EO_QUANTIZEcxx . . $ PTB_EO_QUANTIZE., |
| 49 | PTB_EO_EXCHGEcxx . . $ PTB_EO_EXCHGE., |
| 50 | PTB_EO_COPYcxx . . $ PTB_EO_COPY., |
| 51 | PTB_EO_METRO_1cxx . . $ PTB_EO_METRO_1., |
| 52 | PTB_EO_METRO_2cxx . . $ PTB_EO_METRO_2., |
| 53 | PTB_EO_FROMcxx . . $ PTB_EO_FROM., |
| 54 | PTB_EO_FROM_NUMcxx . . $ PTB_EO_FROM_NUM., |
| 55 | PTB_EO_FROM_UPcxx . . $ PTB_EO_FROM_UP., |
| 56 | PTB_EO_FROM_DOWNcxx . . $ PTB_EO_FROM_DOWN., |
| 57 | PTB_EO_KEYScxx . . $ PTB_EO_KEYS., |
| 58 | PTB_EO_TOcxx . . $ PTB_EO_TO., |
| 59 | PTB_EO_TO_NUMcxx . . $ PTB_EO_TO_NUM., |
| 60 | PTB_EO_TO_UPcxx . . $ PTB_EO_TO_UP., |
| 61 | PTB_EO_TO_DOWNcxx . . $ PTB_EO_TO_DOWN., |
| 62 | |
| 63 | // EDIT OP. SCREEN #3 |
| 64 | PTB_EO_MIXcxx . . $ PTB_EO_MIX., |
| 65 | PTB_EO_ECHOcxx . . $ PTB_EO_ECHO., |
| 66 | PTB_EO_POScxx . . $ PTB_EO_POS., |
| 67 | PTB_EO_POS_NUMcxx . . $ PTB_EO_POS_NUM., |
| 68 | PTB_EO_POS_UPcxx . . $ PTB_EO_POS_UP., |
| 69 | PTB_EO_POS_DOWNcxx . . $ PTB_EO_POS_DOWN., |
| 70 | PTB_EO_BOOSTcxx . . $ PTB_EO_BOOST., |
| 71 | PTB_EO_FILTERcxx . . $ PTB_EO_FILTER., |
| 72 | PTB_EO_MODcxx . . $ PTB_EO_MOD., |
| 73 | PTB_EO_MOD_NUMcxx . . $ PTB_EO_MOD_NUM., |
| 74 | PTB_EO_MOD_UPcxx . . $ PTB_EO_MOD_UP., |
| 75 | PTB_EO_MOD_DOWNcxx . . $ PTB_EO_MOD_DOWN., |
| 76 | PTB_EO_X_FADEcxx . . $ PTB_EO_X_FADE., |
| 77 | PTB_EO_BACKWDcxx . . $ PTB_EO_BACKWD., |
| 78 | PTB_EO_CBcxx . . $ PTB_EO_CB., |
| 79 | PTB_EO_CHORDcxx . . $ PTB_EO_CHORD., |
| 80 | PTB_EO_FUcxx . . $ PTB_EO_FU., |
| 81 | PTB_EO_FDcxx . . $ PTB_EO_FD., |
| 82 | PTB_EO_UPSAMPcxx . . $ PTB_EO_UPSAMP., |
| 83 | PTB_EO_DNSAMPcxx . . $ PTB_EO_DNSAMP., |
| 84 | PTB_EO_VOLcxx . . $ PTB_EO_VOL., |
| 85 | PTB_EO_VOL_NUMcxx . . $ PTB_EO_VOL_NUM., |
| 86 | PTB_EO_VOL_UPcxx . . $ PTB_EO_VOL_UP., |
| 87 | PTB_EO_VOL_DOWNcxx . . $ PTB_EO_VOL_DOWN., |
| 88 | |
| 89 | // EDIT OP. SCREEN #4 |
| 90 | PTB_EO_DOCHORDcxx . . $ PTB_EO_DOCHORD., |
| 91 | PTB_EO_MAJORcxx . . $ PTB_EO_MAJOR., |
| 92 | PTB_EO_MAJOR7cxx . . $ PTB_EO_MAJOR7., |
| 93 | PTB_EO_NOTE1cxx . . $ PTB_EO_NOTE1., |
| 94 | PTB_EO_NOTE1_UPcxx . . $ PTB_EO_NOTE1_UP., |
| 95 | PTB_EO_NOTE1_DOWNcxx . . $ PTB_EO_NOTE1_DOWN., |
| 96 | PTB_EO_RESETcxx . . $ PTB_EO_RESET., |
| 97 | PTB_EO_MINORcxx . . $ PTB_EO_MINOR., |
| 98 | PTB_EO_MINOR7cxx . . $ PTB_EO_MINOR7., |
| 99 | PTB_EO_NOTE2cxx . . $ PTB_EO_NOTE2., |
| 100 | PTB_EO_NOTE2_UPcxx . . $ PTB_EO_NOTE2_UP., |
| 101 | PTB_EO_NOTE2_DOWNcxx . . $ PTB_EO_NOTE2_DOWN., |
| 102 | PTB_EO_UNDOcxx . . $ PTB_EO_UNDO., |
| 103 | PTB_EO_SUS4cxx . . $ PTB_EO_SUS4., |
| 104 | PTB_EO_MAJOR6cxx . . $ PTB_EO_MAJOR6., |
| 105 | PTB_EO_NOTE3cxx . . $ PTB_EO_NOTE3., |
| 106 | PTB_EO_NOTE3_UPcxx . . $ PTB_EO_NOTE3_UP., |
| 107 | PTB_EO_NOTE3_DOWNcxx . . $ PTB_EO_NOTE3_DOWN., |
| 108 | PTB_EO_LENGTHcxx . . $ PTB_EO_LENGTH., |
| 109 | PTB_EO_MINOR6cxx . . $ PTB_EO_MINOR6., |
| 110 | PTB_EO_NOTE4cxx . . $ PTB_EO_NOTE4., |
| 111 | PTB_EO_NOTE4_UPcxx . . $ PTB_EO_NOTE4_UP., |
| 112 | PTB_EO_NOTE4_DOWNcxx . . $ PTB_EO_NOTE4_DOWN., |
| 113 | |
| 114 | // DISK OP. SCREEN |
| 115 | PTB_DO_PACKMODcxx . . $ PTB_DO_PACKMOD., |
| 116 | PTB_DO_MODARROWcxx . . $ PTB_DO_MODARROW., |
| 117 | PTB_DO_LOADMODULEcxx . . $ PTB_DO_LOADMODULE., |
| 118 | PTB_DO_SAVEMODULEcxx . . $ PTB_DO_SAVEMODULE., |
| 119 | PTB_DO_SAMPLEFORMATcxx . . $ PTB_DO_SAMPLEFORMAT., |
| 120 | PTB_DO_SAMPLEARROWcxx . . $ PTB_DO_SAMPLEARROW., |
| 121 | PTB_DO_LOADSAMPLEcxx . . $ PTB_DO_LOADSAMPLE., |
| 122 | PTB_DO_SAVESAMPLEcxx . . $ PTB_DO_SAVESAMPLE., |
| 123 | PTB_DO_DATAPATHcxx . . $ PTB_DO_DATAPATH., |
| 124 | PTB_DO_PARENTcxx . . $ PTB_DO_PARENT., |
| 125 | PTB_DO_REFRESHcxx . . $ PTB_DO_REFRESH., |
| 126 | PTB_DO_SCROLLTOPcxx . . $ PTB_DO_SCROLLTOP., |
| 127 | PTB_DO_SCROLLUPcxx . . $ PTB_DO_SCROLLUP., |
| 128 | PTB_DO_EXITcxx . . $ PTB_DO_EXIT., |
| 129 | PTB_DO_SCROLLDOWNcxx . . $ PTB_DO_SCROLLDOWN., |
| 130 | PTB_DO_SCROLLBOTcxx . . $ PTB_DO_SCROLLBOT., |
| 131 | PTB_DO_FILEAREAcxx . . $ PTB_DO_FILEAREA., |
| 132 | |
| 133 | // MAIN SCREEN |
| 134 | PTB_QUITcxx . . $ PTB_QUIT., |
| 135 | PTB_PLAYcxx . . $ PTB_PLAY., |
| 136 | PTB_PATTERNcxx . . $ PTB_PATTERN., |
| 137 | PTB_EDITcxx . . $ PTB_EDIT., |
| 138 | PTB_RECORDcxx . . $ PTB_RECORD., |
| 139 | PTB_STOPcxx . . $ PTB_STOP., |
| 140 | PTB_CLEARcxx . . $ PTB_CLEAR., |
| 141 | PTB_EDITOPcxx . . $ PTB_EDITOP., |
| 142 | PTB_DISKOPcxx . . $ PTB_DISKOP., |
| 143 | PTB_MOD2WAVcxx . . $ PTB_MOD2WAV., |
| 144 | PTB_POSEDcxx . . $ PTB_POSED., |
| 145 | PTB_PAT2SMPcxx . . $ PTB_PAT2SMP., |
| 146 | PTB_SAMPLERcxx . . $ PTB_SAMPLER., |
| 147 | PTB_CHAN1cxx . . $ PTB_CHAN1., |
| 148 | PTB_CHAN2cxx . . $ PTB_CHAN2., |
| 149 | PTB_CHAN3cxx . . $ PTB_CHAN3., |
| 150 | PTB_CHAN4cxx . . $ PTB_CHAN4., |
| 151 | PTB_ABOUTcxx . . $ PTB_ABOUT., |
| 152 | PTB_POSScxx . . $ PTB_POSS., |
| 153 | PTB_POSUcxx . . $ PTB_POSU., |
| 154 | PTB_POSDcxx . . $ PTB_POSD., |
| 155 | PTB_PATTERNScxx . . $ PTB_PATTERNS., |
| 156 | PTB_PATTERNUcxx . . $ PTB_PATTERNU., |
| 157 | PTB_PATTERNDcxx . . $ PTB_PATTERND., |
| 158 | PTB_LENGTHScxx . . $ PTB_LENGTHS., |
| 159 | PTB_LENGTHUcxx . . $ PTB_LENGTHU., |
| 160 | PTB_LENGTHDcxx . . $ PTB_LENGTHD., |
| 161 | PTB_FTUNEUcxx . . $ PTB_FTUNEU., |
| 162 | PTB_FTUNEDcxx . . $ PTB_FTUNED., |
| 163 | PTB_SAMPLEScxx . . $ PTB_SAMPLES., |
| 164 | PTB_SAMPLEUcxx . . $ PTB_SAMPLEU., |
| 165 | PTB_SAMPLEDcxx . . $ PTB_SAMPLED., |
| 166 | PTB_SVOLUMEScxx . . $ PTB_SVOLUMES., |
| 167 | PTB_SVOLUMEUcxx . . $ PTB_SVOLUMEU., |
| 168 | PTB_SVOLUMEDcxx . . $ PTB_SVOLUMED., |
| 169 | PTB_SLENGTHScxx . . $ PTB_SLENGTHS., |
| 170 | PTB_SLENGTHUcxx . . $ PTB_SLENGTHU., |
| 171 | PTB_SLENGTHDcxx . . $ PTB_SLENGTHD., |
| 172 | PTB_SREPEATScxx . . $ PTB_SREPEATS., |
| 173 | PTB_SREPEATUcxx . . $ PTB_SREPEATU., |
| 174 | PTB_SREPEATDcxx . . $ PTB_SREPEATD., |
| 175 | PTB_SREPLENScxx . . $ PTB_SREPLENS., |
| 176 | PTB_SREPLENUcxx . . $ PTB_SREPLENU., |
| 177 | PTB_SREPLENDcxx . . $ PTB_SREPLEND., |
| 178 | PTB_TEMPOUcxx . . $ PTB_TEMPOU., |
| 179 | PTB_TEMPODcxx . . $ PTB_TEMPOD., |
| 180 | PTB_POScxx . . $ PTB_POS., |
| 181 | PTB_POSINScxx . . $ PTB_POSINS., |
| 182 | PTB_POSDELcxx . . $ PTB_POSDEL., |
| 183 | PTB_VISUALScxx . . $ PTB_VISUALS., |
| 184 | PTB_PATTBOXcxx . . $ PTB_PATTBOX., |
| 185 | PTB_PATTDATAcxx . . $ PTB_PATTDATA., |
| 186 | |
| 187 | // SAMPLER SCREEN |
| 188 | PTB_SA_EXITcxx . . $ PTB_SA_EXIT., |
| 189 | PTB_SA_PLAYWAVEcxx . . $ PTB_SA_PLAYWAVE., |
| 190 | PTB_SA_SHOWRANGEcxx . . $ PTB_SA_SHOWRANGE., |
| 191 | PTB_SA_ZOOMOUTcxx . . $ PTB_SA_ZOOMOUT., |
| 192 | PTB_SA_STOPcxx . . $ PTB_SA_STOP., |
| 193 | PTB_SA_PLAYDISPLAYcxx . . $ PTB_SA_PLAYDISPLAY., |
| 194 | PTB_SA_SHOWALLcxx . . $ PTB_SA_SHOWALL., |
| 195 | PTB_SA_RANGEALLcxx . . $ PTB_SA_RANGEALL., |
| 196 | PTB_SA_LOOPcxx . . $ PTB_SA_LOOP., |
| 197 | PTB_SA_PLAYRANGEcxx . . $ PTB_SA_PLAYRANGE., |
| 198 | PTB_SA_RANGECENTERcxx . . $ PTB_SA_RANGECENTER., |
| 199 | PTB_SA_RANGEBEGcxx . . $ PTB_SA_RANGEBEG., |
| 200 | PTB_SA_RANGEENDcxx . . $ PTB_SA_RANGEEND., |
| 201 | PTB_SA_CUTcxx . . $ PTB_SA_CUT., |
| 202 | PTB_SA_COPYcxx . . $ PTB_SA_COPY., |
| 203 | PTB_SA_PASTEcxx . . $ PTB_SA_PASTE., |
| 204 | PTB_SA_VOLUMEcxx . . $ PTB_SA_VOLUME., |
| 205 | PTB_SA_TUNETONEcxx . . $ PTB_SA_TUNETONE., |
| 206 | PTB_SA_FIXDCcxx . . $ PTB_SA_FIXDC., |
| 207 | PTB_SA_FILTERScxx . . $ PTB_SA_FILTERS., |
| 208 | PTB_SA_SAMPLEcxx . . $ PTB_SA_SAMPLE., |
| 209 | PTB_SA_RESAMPLEcxx . . $ PTB_SA_RESAMPLE., |
| 210 | PTB_SA_RESAMPLENOTEcxx . . $ PTB_SA_RESAMPLENOTE., |
| 211 | PTB_SA_SAMPLEAREAcxx . . $ PTB_SA_SAMPLEAREA., |
| 212 | PTB_SA_ZOOMBARAREAcxx . . $ PTB_SA_ZOOMBARAREA., |
| 213 | PTB_SA_VOL_FROM_NUMcxx . . $ PTB_SA_VOL_FROM_NUM., |
| 214 | PTB_SA_VOL_TO_NUMcxx . . $ PTB_SA_VOL_TO_NUM., |
| 215 | PTB_SA_FIL_LP_CUTOFFcxx . . $ PTB_SA_FIL_LP_CUTOFF., |
| 216 | PTB_SA_FIL_HP_CUTOFFcxx . . $ PTB_SA_FIL_HP_CUTOFF. |
| 217 | }; |
| 218 | |
| 219 | typedef struct guiButton_tcxx . . $ guiButton_t# |
| 220 | { |
| 221 | int32_tcxx . . $ int32_t# x1cxx . . $ guiButton_t#x1., y1cxx . . $ guiButton_t#y1., x2cxx . . $ guiButton_t#x2., y2cxx . . $ guiButton_t#y2., bcxx . . $ guiButton_t#b.; |
| 222 | } guiButton_tcxx . . $ guiButton_t#; |
| 223 | |
| 224 | enumcxx . . $ $anonymous_type_be6849aa03c82fbd_0# |
| 225 | { |
| 226 | POINTER_Wcxx . . $ POINTER_W. = 16, |
| 227 | POINTER_Hcxx . . $ POINTER_H. = 16, |
| 228 | |
| 229 | POINTER_MODE_IDLEcxx . . $ POINTER_MODE_IDLE. = 0, |
| 230 | POINTER_MODE_EDITcxx . . $ POINTER_MODE_EDIT. = 1, |
| 231 | POINTER_MODE_PLAYcxx . . $ POINTER_MODE_PLAY. = 2, |
| 232 | POINTER_MODE_MSG1cxx . . $ POINTER_MODE_MSG1. = 3, |
| 233 | POINTER_MODE_RECORDcxx . . $ POINTER_MODE_RECORD. = 4, |
| 234 | POINTER_MODE_MSG2cxx . . $ POINTER_MODE_MSG2. = 5, |
| 235 | |
| 236 | POINTER_GRAYcxx . . $ POINTER_GRAY. = 0, |
| 237 | POINTER_YELLOWcxx . . $ POINTER_YELLOW. = 1, |
| 238 | POINTER_BLUEcxx . . $ POINTER_BLUE. = 2, |
| 239 | POINTER_PURPLEcxx . . $ POINTER_PURPLE. = 3, |
| 240 | POINTER_GREENcxx . . $ POINTER_GREEN. = 4, |
| 241 | POINTER_REDcxx . . $ POINTER_RED. = 5 |
| 242 | }; |
| 243 | |
| 244 | #define NUM_CURSORScxx . . $ `src/pt2_mouse.h:244:9`! 6 |
| 245 | |
| 246 | #if defined __APPLE__ && defined __aarch64__ |
| 247 | void armMacGhostMouseCursorFix(void); |
| 248 | #endif |
| 249 | |
| 250 | void sampleUpButtoncxx . . $ sampleUpButton(49f6e7a06ebc5aa8).(void); |
| 251 | void sampleDownButtoncxx . . $ sampleDownButton(49f6e7a06ebc5aa8).(void); |
| 252 | void setMsgPointercxx . . $ setMsgPointer(49f6e7a06ebc5aa8).(void); |
| 253 | void setErrPointercxx . . $ setErrPointer(49f6e7a06ebc5aa8).(void); |
| 254 | void pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(uint8_tcxx . . $ uint8_t# pointerMode, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! carry); |
| 255 | void pointerSetModeThreadSafecxx . . $ pointerSetModeThreadSafe(f2ac3508b56cd10).(uint8_tcxx . . $ uint8_t# pointerMode, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! carry); |
| 256 | void pointerSetPreviousModecxx . . $ pointerSetPreviousMode(49f6e7a06ebc5aa8).(void); |
| 257 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! setSystemCursorcxx . . $ setSystemCursor(cf05e5bff5fdf007).(SDL_Cursorcxx . . $ SDL_Cursor# *cur); |
| 258 | void freeMouseCursorscxx . . $ freeMouseCursors(49f6e7a06ebc5aa8).(void); |
| 259 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! createMouseCursorscxx . . $ createMouseCursors(c9857a73d68e59ba).(void); |
| 260 | void readMouseXYcxx . . $ readMouseXY(49f6e7a06ebc5aa8).(void); |
| 261 | void updateMouseScalingcxx . . $ updateMouseScaling(49f6e7a06ebc5aa8).(void); |
| 262 | void mouseWheelUpHandlercxx . . $ mouseWheelUpHandler(49f6e7a06ebc5aa8).(void); |
| 263 | void mouseWheelDownHandlercxx . . $ mouseWheelDownHandler(49f6e7a06ebc5aa8).(void); |
| 264 | void mouseButtonUpHandlercxx . . $ mouseButtonUpHandler(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# mouseButton); |
| 265 | void mouseButtonDownHandlercxx . . $ mouseButtonDownHandler(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# mouseButton); |
| 266 | void handleGUIButtonRepeatcxx . . $ handleGUIButtonRepeat(49f6e7a06ebc5aa8).(void); |
| 267 | void updateMouseCounterscxx . . $ updateMouseCounters(49f6e7a06ebc5aa8).(void); |
| 268 | |
| 269 | extern SDL_Cursorcxx . . $ SDL_Cursor# *cursorscxx . . $ cursors.[NUM_CURSORScxx . . $ `src/pt2_mouse.h:244:9`!]; |